From 7a0346d01ae533a2b1dc65df99803612f87c7c7b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 18 Jan 2019 13:20:51 -0500 Subject: 1 multimon fix --- .scripts/i3cmds/displayselect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect index 2c3133f..84d1855 100755 --- a/.scripts/i3cmds/displayselect +++ b/.scripts/i3cmds/displayselect @@ -49,7 +49,7 @@ morescreen() { # If multi-monitor is selected and there are more than two screen multimon() { # Multi-monitor handler. case "$(echo "$screens" | wc -l)" in - 1) xrandr $(echo "$allposs" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;; + 1) xrandr $(echo "$allposs" | grep -v "$screens" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;; 2) twoscreen ;; *) morescreen ;; esac ;} -- cgit v1.3.1 From 2eaabe4fbd6ba9d46e1e61af8c3504d611776fe8 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 18 Jan 2019 13:21:25 -0500 Subject: svgs will be added later --- .scripts/cron/checkup | 2 +- .scripts/cron/newsup | 4 ++-- .scripts/i3cmds/dmenumount | 6 +++--- .scripts/i3cmds/dmenuumount | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/cron/checkup b/.scripts/cron/checkup index 770c349..a32cdcb 100755 --- a/.scripts/cron/checkup +++ b/.scripts/cron/checkup @@ -3,7 +3,7 @@ ping -q -w 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit -notify-send -i "$PIX/larbs.gif" "Checking for pacakge updates..." +notify-send -i "$PIX/larbs.svg" "Checking for pacakge updates..." sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates. diff --git a/.scripts/cron/newsup b/.scripts/cron/newsup index 598cced..a760daa 100755 --- a/.scripts/cron/newsup +++ b/.scripts/cron/newsup @@ -4,7 +4,7 @@ ping -q -t 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit -/usr/bin/notify-send -i "$PIX/rss.gif" "Updating RSS feeds..." +/usr/bin/notify-send -i "$HOME/.pix/rss.svg" "Updating RSS feeds..." pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit @@ -13,4 +13,4 @@ pkill -RTMIN+6 i3blocks /usr/bin/newsboat -x reload rm -f ~/.config/newsboat/.update pkill -RTMIN+6 i3blocks -/usr/bin/notify-send -i "$PIX/rss.gif" "RSS feed update complete." +/usr/bin/notify-send -i "$HOME/.pix/rss.svg" "RSS feed update complete." diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount index 4de7438..a270886 100755 --- a/.scripts/i3cmds/dmenumount +++ b/.scripts/i3cmds/dmenumount @@ -17,21 +17,21 @@ getmount() { \ mountusb() { \ chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" - sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0 + sudo -A mount "$chosen" && notify-send -i "$PIX/usb.svg" "$chosen mounted." && exit 0 getmount "/mnt /media /mount /home -maxdepth 5 -type d" partitiontype="$(lsblk -no "fstype" "$chosen")" case "$partitiontype" in "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";; esac - notify-send "$chosen mounted to $mp." + notify-send -i "$PIX/usb.svg" "$chosen mounted to $mp." } mountandroid() { \ chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) getmount "$HOME -maxdepth 3 -type d" simple-mtpfs --device "$chosen" "$mp" - notify-send "Android device mounted to $mp." + notify-send -i "$PIX/android.svg" "Android device mounted to $mp." } asktype() { \ diff --git a/.scripts/i3cmds/dmenuumount b/.scripts/i3cmds/dmenuumount index a267010..3191ec5 100755 --- a/.scripts/i3cmds/dmenuumount +++ b/.scripts/i3cmds/dmenuumount @@ -7,13 +7,13 @@ unmountusb() { [ -z "$drives" ] && exit chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}') [ -z "$chosen" ] && exit - sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted." + sudo -A umount "$chosen" && pgrep -x dunst && notify-send -i "$PIX/usb.svg" "$chosen unmounted." } unmountandroid() { \ chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?") [ -z "$chosen" ] && exit - fusermount -u "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted." + fusermount -u "$chosen" && pgrep -x dunst && notify-send -i "$PIX/android.svg" "$chosen unmounted." } asktype() { \ -- cgit v1.3.1 From b6d17549e9f7429d000ccb8bdb5d2717d299a265 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 20 Jan 2019 17:39:21 -0500 Subject: lockscreen simplification --- .scripts/i3cmds/lockscreen | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/i3cmds/lockscreen b/.scripts/i3cmds/lockscreen index b745a6a..456857f 100755 --- a/.scripts/i3cmds/lockscreen +++ b/.scripts/i3cmds/lockscreen @@ -1,19 +1,9 @@ #!/bin/sh - -rm -f /tmp/locked.png - -# If `imagemagick` is not installed, use a blank screen. -[ -f /usr/bin/convert ] && -scrot -m -z /tmp/base.png && -pgrep -x dunst && notify-send -i ~/.scripts/pix/lock.png "Locking computer..." && -convert /tmp/base.png -blur 0x8 /tmp/locked.png - -# Pause music (mocp, mpd and send the pause key to all mpv videos): -mocp -P >/dev/null 2>&1 +# Pause mpd and send the pause key to all mpv videos: mpc pause >/dev/null 2>&1 pauseallmpv >/dev/null 2>&1 -i3lock -e -f -c 000000 -i /tmp/locked.png +i3lock -e -f -c 1d2021 # In five seconds, turn off display unless key press in last 4 seconds. sleep 5 && [ 4000 -lt "$(xssstate -i)" ] && pgrep -x i3lock && xset dpms force off -- cgit v1.3.1 From 713f4812cd01c3021793c6c881377c7122bc52d7 Mon Sep 17 00:00:00 2001 From: 8bitmcu Date: Sun, 20 Jan 2019 20:27:17 -0400 Subject: fixes unplugged displays not getting disabled --- .scripts/i3cmds/displayselect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect index 84d1855..e526014 100755 --- a/.scripts/i3cmds/displayselect +++ b/.scripts/i3cmds/displayselect @@ -65,7 +65,7 @@ chosen=$(printf "%s\\nmulti-monitor\\nmanual selection" "$screens" | dmenu -i -p case "$chosen" in "manual selection") arandr ; exit ;; "multi-monitor") multimon ;; - *) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$screens" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;; + *) xrandr --output "$chosen" --auto --scale 1.0x1.0 $(echo "$allposs" | grep -v "$chosen" | awk '{print "--output", $1, "--off"}' | tr '\n' ' ') ;; esac setbg # Fix background if screen size/arangement has changed. -- cgit v1.3.1 From a0906c68f33924a036c2b788e7f7febcf5b77b7d Mon Sep 17 00:00:00 2001 From: xDroid Date: Fri, 25 Jan 2019 10:54:29 +0800 Subject: Added window id from xdotool in mainpick. Copied a similar parameter `"$(xdotool getactivewindow)"` from the second option (a.k.a "current window") to the fifth. --- .scripts/i3cmds/maimpick | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/i3cmds/maimpick b/.scripts/i3cmds/maimpick index f3f72fe..34eb1a3 100755 --- a/.scripts/i3cmds/maimpick +++ b/.scripts/i3cmds/maimpick @@ -4,6 +4,6 @@ case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area "current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; "full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;; "a selected area (copy)") maim -s | xclip -selection clipboard -t image/png ;; - "current window (copy)") maim -i | xclip -selection clipboard -t image/png ;; + "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; "full screen (copy)") maim | xclip -selection clipboard -t image/png ;; esac -- cgit v1.3.1 From 489f5fbdb67c5f86958f057d54db34e1ce19b2a0 Mon Sep 17 00:00:00 2001 From: xDroid Date: Fri, 25 Jan 2019 11:03:26 +0800 Subject: Fixed typo in maimpick. --- .scripts/i3cmds/maimpick | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/i3cmds/maimpick b/.scripts/i3cmds/maimpick index 34eb1a3..07d032f 100755 --- a/.scripts/i3cmds/maimpick +++ b/.scripts/i3cmds/maimpick @@ -1,5 +1,5 @@ #!/bin/sh -case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfullscreen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in +case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in "a selected area") maim -s pic-selected-"$(date '+%y%m%d-%H%M-%S').png" ;; "current window") maim -i "$(xdotool getactivewindow)" pic-window-"$(date '+%y%m%d-%H%M-%S').png" ;; "full screen") maim pic-full-"$(date '+%y%m%d-%H%M-%S').png" ;; -- cgit v1.3.1 From 9ddf765a03fae63892644d11bb48112daeaf528a Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 26 Jan 2019 18:13:36 -0500 Subject: torrent wrap and other changes --- .config/i3/config | 2 +- .scripts/i3cmds/td-toggle | 13 ++++--------- .scripts/i3cmds/torwrap | 6 ++++++ 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100755 .scripts/i3cmds/torwrap (limited to '.scripts/i3cmds') diff --git a/.config/i3/config b/.config/i3/config index c30ef9a..dfdf1e1 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -286,7 +286,7 @@ bindsym $mod+F2 restart bindsym $mod+F3 exec --no-startup-id displayselect bindsym $mod+F4 exec --no-startup-id prompt "Hibernate computer?" "$hibernate" bindsym $mod+F5 exec --no-startup-id $netrefresh -bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli +bindsym $mod+F6 exec --no-startup-id torwrap bindsym $mod+F7 exec --no-startup-id td-toggle bindsym $mod+F8 exec --no-startup-id ~/.config/mutt/etc/mailsync.sh bindsym $mod+F9 exec --no-startup-id dmenumount diff --git a/.scripts/i3cmds/td-toggle b/.scripts/i3cmds/td-toggle index 6489626..729e697 100755 --- a/.scripts/i3cmds/td-toggle +++ b/.scripts/i3cmds/td-toggle @@ -1,15 +1,10 @@ #!/bin/sh - # If transmission-daemon is running, will ask to kill, else will ask to start. - -[ ! -f /usr/bin/transmission-daemon ] && notify-send "Transmission daemon not installed." && exit - -if pgrep -x transmission-da >/dev/null ; +if pgrep -x transmission-da >/dev/null ; then - yn=$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?") - [ "$yn" = "Yes" ] && killall transmission-da + [ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed." else - yn=$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?") - [ "$yn" = "Yes" ] && transmission-daemon + ifinstalled transmission-cli || exit + [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send -i "$PIX/torrent.svg" "tranmission-daemon started." fi sleep 3 && pkill -RTMIN+7 i3blocks diff --git a/.scripts/i3cmds/torwrap b/.scripts/i3cmds/torwrap new file mode 100755 index 0000000..6b501cc --- /dev/null +++ b/.scripts/i3cmds/torwrap @@ -0,0 +1,6 @@ +#!/bin/sh +ifinstalled transmission-remote-cli transmission-cli || exit + +! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send -i "$PIX/torrent.svg" "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks + +$TERMINAL -e transmission-remote-cli -- cgit v1.3.1 From 212f6853f7d55c6f72222e634228689b34fcf24b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 31 Jan 2019 18:23:55 -0500 Subject: xcqr installed feh --- .scripts/i3cmds/xcqr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/i3cmds') diff --git a/.scripts/i3cmds/xcqr b/.scripts/i3cmds/xcqr index 5e7b5f0..2352599 100755 --- a/.scripts/i3cmds/xcqr +++ b/.scripts/i3cmds/xcqr @@ -1,6 +1,6 @@ #!/bin/sh # Credit to Maddison Hellstrom (@b0o on Github) -qrencode -o - -s 1 \ +ifinstalled feh && qrencode -o - -s 1 \ "$(xclip -out -selection clipboard)" | feh --zoom max \ -F \ -- cgit v1.3.1