Krolyxon
Commit fd20f3a

Branches

Refs →

dotfiles-x11fd20f3a

transadd script improvement

Author
krolyxon
Date
2022-06-16 00:53 +0530
Parent
1de5367
Commit
fd20f3a9da6caabffb94cc5c130c4f66c1306113

+14 −32

5 files changed

  1. D .config/pcmanfm/default/pcmanfm.conf +0 −26
  2. M .config/sxhkd/sxhkdrc +1 −1
  3. M .local/bin/transadd +9 −4
  4. M .local/bin/upfile +1 −1
  5. M .local/share/vocab/words.txt +3 −0
D .config/pcmanfm/default/pcmanfm.conf View
@@ -1,26 +0,0 @@
1−[config]
2−bm_open_method=0
3−
4−[volume]
5−mount_on_startup=1
6−mount_removable=1
7−autorun=1
8−
9−[ui]
10−always_show_tabs=0
11−max_tab_chars=32
12−win_width=1049
13−win_height=1053
14−splitter_pos=147
15−media_in_new_tab=0
16−desktop_folder_new_win=0
17−change_tab_on_drop=1
18−close_on_unmount=1
19−focus_previous=0
20−side_pane_mode=places
21−view_mode=icon
22−show_hidden=1
23−sort=name;ascending;
24−toolbar=newtab;navigation;home;
25−show_statusbar=1
26−pathbar_mode_buttons=0
M .config/sxhkd/sxhkdrc View
@@ -8,7 +8,7 @@ super + grave
88
99 # swap cap if stops working
1010 super + c
11− setxkbmap -option caps:swapescape
11+ setxkbmap -option caps:swapescape && xset r rate 300 50
1212
1313 # Screenshot tool
1414 Print
M .local/bin/transadd View
@@ -1,9 +1,14 @@
11 #!/bin/sh
22
3−# Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running.
4−
3+# Starting transmission-daemon if not already running
54 # transmission-daemon sometimes fails to take remote requests in its first moments, hence the sleep.
6−
75 pidof transmission-daemon >/dev/null || (transmission-daemon && notify-send "Starting transmission daemon...")
86 sleep 3
9−transmission-remote -a "$@" && notify-send "🔽 Torrent added."
7+
8+# adding the Torrent
9+if [ -z "$*" ]; then
10+ magnetlink="$(xclip -sel c -o)"
11+ transmission-remote -a "$magnetlink" && notify-send "🔽 Torrent added."
12+else
13+ transmission-remote -a "$@" && notify-send "🔽 Torrent added."
14+fi
M .local/bin/upfile View
@@ -9,4 +9,4 @@ fi
99 [ -z "$file" ] && exit
1010
1111 curl -F"file=@$file" 0x0.st | xclip -sel c
12−notify-send "The url has been copied to your clipboard. $file"
12+notify-send "The url has been copied to your clipboard."
M .local/share/vocab/words.txt View
@@ -66,3 +66,6 @@ sceptical -> not easily convinced; having doubts or reservations
6666 psyched -> excited and full of anticipation
6767 faucet -> a tap, "nal" in hindi
6868 duress -> threats, violence, constrains, or other actions used to coerce someone into doing something against theri will or better judgement
69+detriment -> the state of being harmed or damaged
70+alleviate -> make (suffering, deficiency, or a problem) less severe
71+sentient -> able to perceive or feel things