From 6283e390b38513c970093697294f7ba8b68830d6 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 27 Mar 2020 13:01:23 -0400 Subject: [PATCH 01/35] actually, let's do this a non-retarded way --- .local/bin/statusbar/battery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index c05a3519..69da3f5e 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -19,8 +19,8 @@ do capacity=$(cat "$battery"/capacity) || exit status=$(cat "$battery"/status) - # If it is discharging and 20% or less, we will add a ❗ as a warning. - [ "$status" = "Discharging" ] && echo "$capacity" | grep -q "^[12][0-9]$" && warn="❗" + # If it is discharging and 25% or less, we will add a ❗ as a warning. + [ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && warn="❗" # Print the battery status (replaced by a cooresponding emoji with # sed), the percentage left and the warning if there is one. From 5cb4c6deeaecf349111d51166b98848f1fc1b584 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 27 Mar 2020 13:01:36 -0400 Subject: [PATCH 02/35] Q to align in nvim --- .config/nvim/init.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2bdca65c..d8b0ba20 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -64,6 +64,9 @@ set clipboard+=unnamedplus map k map l +" Replace ex mode with gq + map Q gq + " Check file in shellcheck: map s :!clear && shellcheck % From 04c117f85699f6d13a61ebf465e9171bddf3d9b7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 27 Mar 2020 22:06:47 -0400 Subject: [PATCH 03/35] setbg overhaul, dwm update mv'd to postrun Yeah of course I'm going to totally rewrite a script right after I do a video on it. It uses links now to not waste space and env variables. Location moved to cache. Thanks to those who suggested some changes. --- .cache/bg | 1 + .config/wal/postrun | 1 + .local/bin/setbg | 27 ++++++++++++--------------- 3 files changed, 14 insertions(+), 15 deletions(-) create mode 120000 .cache/bg diff --git a/.cache/bg b/.cache/bg new file mode 120000 index 00000000..c2468135 --- /dev/null +++ b/.cache/bg @@ -0,0 +1 @@ +.config/wall.png \ No newline at end of file diff --git a/.config/wal/postrun b/.config/wal/postrun index e2ee73cb..ae28d832 100755 --- a/.config/wal/postrun +++ b/.config/wal/postrun @@ -24,5 +24,6 @@ done fix_sequences <"${HOME}/.cache/wal/sequences" +xsetroot -name "fsignal:xrdb" pkill dunst dunst & diff --git a/.local/bin/setbg b/.local/bin/setbg index be4adfd4..7b07e23e 100755 --- a/.local/bin/setbg +++ b/.local/bin/setbg @@ -1,22 +1,19 @@ #!/bin/sh -# In LARBS, ~/.config/wall.png is the location of the system wallpaper. This -# script, if given an argument, moves it there. This script without an -# argument sets ~/.config/wall.png as the wallpaper, which is required on login -# if you don't want a black screen. -# -# You may also give a directory name to select a random image from that -# directory as a wallpaper. Be careful that the directory only has images. +# This script does the following: +# Run by itself, set the wallpaper (at X start). +# If given a file, set that as the new wallpaper. +# If given a directory, choose random file in it. +# If wal is installed, also generate a colorscheme. -[ -f "$1" ] && cp "$1" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." +# Location of link to wallpaper link. +bgloc="${XDG_CACHE_HOME:-$HOME/.cache/}/bg" -[ -d "$1" ] && cp "$(find "$1" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." +[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." + +[ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen." # If pywal is installed, use it. -type wal >/dev/null 2>&1 && { wal -c - wal -s -i ~/.config/wall.png -o ~/.config/wal/postrun - xsetroot -name "fsignal:xrdb" - killall dwmblocks - setsid dwmblocks >/dev/null & } >/dev/null 2>&1 +wal -s -i "$(readlink -f "$bgloc")" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 -xwallpaper --zoom ~/.config/wall.png +xwallpaper --zoom "$bgloc" From 9365b3db7d0f80bb9bbe965a0b1d1df663ee06f3 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 28 Mar 2020 10:07:32 -0400 Subject: [PATCH 04/35] bg fix? --- .cache/bg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cache/bg b/.cache/bg index c2468135..787af6fd 120000 --- a/.cache/bg +++ b/.cache/bg @@ -1 +1 @@ -.config/wall.png \ No newline at end of file +../.config/wall.png \ No newline at end of file From b340d3dc839abab1688ba0b6592905b49646716b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 28 Mar 2020 14:12:53 -0400 Subject: [PATCH 05/35] calcurse automatically xdg compliant now --- .config/i3/config | 2 +- .config/sxhkd/sxhkdrc | 2 +- .local/bin/statusbar/clock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 8aee9537..a22fe8ec 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -81,7 +81,7 @@ bindsym $mod+Shift+r exec --no-startup-id winresize bindsym $mod+t split toggle bindsym $mod+Shift+t gaps inner current set $inner_gaps; gaps outer current set $outer_gaps -bindsym $mod+y exec $term -e calcurse -D ~/.config/calcurse +bindsym $mod+y exec $term -e calcurse bindsym $mod+Shift+y exec --no-startup-id i3resize left bindsym $mod+u exec --no-startup-id ddspawn tmuxdd diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 6d8bda11..0b05a3df 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -21,7 +21,7 @@ super + m super + n $TERMINAL -e newsboat super + c - $TERMINAL -e calcurse -D ~/.config/calcurse + $TERMINAL -e calcurse super + v $TERMINAL -e nvim -c VimwikiIndex super + shift + a diff --git a/.local/bin/statusbar/clock b/.local/bin/statusbar/clock index 5d463594..c668926a 100755 --- a/.local/bin/statusbar/clock +++ b/.local/bin/statusbar/clock @@ -3,7 +3,7 @@ date '+%Y %b %d (%a) %I:%M%p' case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null && notify-send "This Month" "$(cal --color=always | sed "s/..7m//;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -D ~/.config/calcurse -d3)" ;; + 1) pgrep -x dunst >/dev/null && notify-send "This Month" "$(cal --color=always | sed "s/..7m//;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse)" ;; 2) $TERMINAL -e calcurse -D ~/.config/calcurse ;; 3) pgrep -x dunst >/dev/null && notify-send "πŸ“… Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` - Middle click opens calcurse if installed" ;; From bd4d5379266d0907e23425c1dda0dcc3717f7e25 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 28 Mar 2020 14:16:36 -0400 Subject: [PATCH 06/35] dumb oversight --- .local/bin/statusbar/clock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/clock b/.local/bin/statusbar/clock index c668926a..d17f3c63 100755 --- a/.local/bin/statusbar/clock +++ b/.local/bin/statusbar/clock @@ -3,7 +3,7 @@ date '+%Y %b %d (%a) %I:%M%p' case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null && notify-send "This Month" "$(cal --color=always | sed "s/..7m//;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse)" ;; + 1) pgrep -x dunst >/dev/null && notify-send "This Month" "$(cal --color=always | sed "s/..7m//;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; 2) $TERMINAL -e calcurse -D ~/.config/calcurse ;; 3) pgrep -x dunst >/dev/null && notify-send "πŸ“… Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` - Middle click opens calcurse if installed" ;; From 97cd22f7fc780e7753e72684380ae79d6069ef3b Mon Sep 17 00:00:00 2001 From: Hekuran <62762955+narukeh@users.noreply.github.com> Date: Sun, 29 Mar 2020 12:42:13 +0000 Subject: [PATCH 07/35] for partial XDG supporting apps (#523) calcurse keeps creating new configs at ~/ without these two lines --- .config/user-dirs.dirs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs index 5a28707c..f25c63a2 100644 --- a/.config/user-dirs.dirs +++ b/.config/user-dirs.dirs @@ -1 +1,3 @@ XDG_DESKTOP_DIR="$HOME/" +XDG_CONFIG_HOME="$HOME/.config" +XDG_DATA_HOME="$HOME/.local/share" From 49247875e0cdd9de5019090ab525c0d700ba178a Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 29 Mar 2020 12:02:15 -0400 Subject: [PATCH 08/35] lmc can run mixer --- .local/bin/lmc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.local/bin/lmc b/.local/bin/lmc index bbe99a56..6d64b649 100755 --- a/.local/bin/lmc +++ b/.local/bin/lmc @@ -10,11 +10,13 @@ if [ "$PULSE" ]; then mute() { pulsemixer --mute ;} up() { pulsemixer --change-volume +"$NUM" ;} down() { pulsemixer --change-volume -"$NUM" ;} + control() { pulsemixer ;} else toggle() { amixer sset Master toggle ;} mute() { amixer sset Master mute ;} up() { amixer sset Master "$NUM"%+ ;} down() { amixer sset Master "$NUM"%- ;} + control() { alsamixer ;} fi case "$1" in @@ -22,6 +24,7 @@ case "$1" in mute) mute ;; up) up ;; down) down ;; -esac >/dev/null + control) control ;; +esac pkill -RTMIN+10 "${STATUSBAR:?}" & From 326ed6b56d71a9b689819256c9d85a2a5ece4b8f Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 29 Mar 2020 14:16:07 -0400 Subject: [PATCH 09/35] battery minor imporvements --- .local/bin/statusbar/battery | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index 69da3f5e..82e8450f 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -1,7 +1,7 @@ #!/bin/sh # Prints all batteries, their percentage remaining and an emoji corresponding -# to charge status (πŸ”Œ for pluged up, πŸ”‹ for discharging on battery, etc.). +# to charge status (πŸ”Œ for plugged up, πŸ”‹ for discharging on battery, etc.). case $BLOCK_BUTTON in 3) pgrep -x dunst >/dev/null && notify-send "πŸ”‹ Battery module" "πŸ”‹: discharging @@ -16,15 +16,12 @@ esac for battery in /sys/class/power_supply/BAT? do # Get its remaining capacity and charge status. - capacity=$(cat "$battery"/capacity) || exit - status=$(cat "$battery"/status) + capacity=$(cat "$battery"/capacity) + status=$(sed "s/Discharging/πŸ”‹/;s/Not charging/πŸ›‘/;s/Charging/πŸ”Œ/;s/Unknown/♻️/;s/Full/⚑/" "$battery"/status) # If it is discharging and 25% or less, we will add a ❗ as a warning. - [ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && warn="❗" + [ "$capacity" -le 25 ] && [ "$status" = "πŸ”‹" ] && warn="❗" - # Print the battery status (replaced by a cooresponding emoji with - # sed), the percentage left and the warning if there is one. - printf "%s%s%s\n" "$(echo "$status" | sed "s/,//;s/Discharging/πŸ”‹/;s/Not charging/πŸ›‘/;s/Charging/πŸ”Œ/;s/Unknown/♻️/;s/Full/⚑/;s/ 0*/ /g;s/ :/ /g")" "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" + printf "%s%s%s%%\n" "$status" "$warn" "$capacity" unset warn done - From d21d1f1be3f3f52d05e395c5d482876cad16c235 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 31 Mar 2020 18:53:43 -0400 Subject: [PATCH 10/35] break to avoid % on desktops --- .local/bin/statusbar/battery | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index 82e8450f..395ad8d2 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -16,7 +16,7 @@ esac for battery in /sys/class/power_supply/BAT? do # Get its remaining capacity and charge status. - capacity=$(cat "$battery"/capacity) + capacity=$(cat "$battery"/capacity) || break status=$(sed "s/Discharging/πŸ”‹/;s/Not charging/πŸ›‘/;s/Charging/πŸ”Œ/;s/Unknown/♻️/;s/Full/⚑/" "$battery"/status) # If it is discharging and 25% or less, we will add a ❗ as a warning. From 581924c71c8890374d57164403b4634d4477b743 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 31 Mar 2020 20:29:34 -0400 Subject: [PATCH 11/35] changes and simplifications to `disk` --- .local/bin/statusbar/disk | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.local/bin/statusbar/disk b/.local/bin/statusbar/disk index 2ca88059..269eba7e 100755 --- a/.local/bin/statusbar/disk +++ b/.local/bin/statusbar/disk @@ -1,18 +1,22 @@ #!/bin/sh # Status bar module for disk space -# $1 should be drive mountpoint -# $2 is optional icon, otherwise mountpoint will displayed +# $1 should be drive mountpoint, otherwise assumed /. -[ -z "$1" ] && exit +location=${1:-/} -icon="$2" -[ -z "$2" ] && icon="$1" +[ -d "$location" ] || exit case $BLOCK_BUTTON in - 1) pgrep -x dunst >/dev/null && notify-send "πŸ’½ Disk space" "$(df -h --output=target,used,size)" ;; - 3) pgrep -x dunst >/dev/null && notify-send "πŸ’½ Disk module" "\- Shows used hard drive space. + 1) notify-send "πŸ’½ Disk space" "$(df -h --output=target,used,size)" ;; + 3) notify-send "πŸ’½ Disk module" "\- Shows used hard drive space. - Click to show all disk info." ;; esac -printf "%s: %s\n" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')" +case "$location" in + "/home"* ) icon="🏠" ;; + "/mnt"* ) icon="πŸ’Ύ" ;; + *) icon="πŸ–₯ ";; +esac + +printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')" From 86a5b350a7bf57aede15d7fe063a5af5878d7d7b Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 31 Mar 2020 20:30:19 -0400 Subject: [PATCH 12/35] labels moved to scripts for dwm compatibility --- .config/i3blocks/config | 4 +--- .local/bin/statusbar/cpu | 2 +- .local/bin/statusbar/memory | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.config/i3blocks/config b/.config/i3blocks/config index e4626545..457a9a2a 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -37,11 +37,9 @@ signal=12 #[memory] #interval=30 -#label=🧠 #[cpu] #interval=15 -#label=πŸ’» [volume] interval=once @@ -53,7 +51,7 @@ signal=10 #[disk] #interval=60 -#command=disk /home 🏠 +#command=disk /home [battery] command=battery BAT0 diff --git a/.local/bin/statusbar/cpu b/.local/bin/statusbar/cpu index 3b1394af..5b5528e6 100755 --- a/.local/bin/statusbar/cpu +++ b/.local/bin/statusbar/cpu @@ -7,4 +7,4 @@ case $BLOCK_BUTTON in - % is of single core." ;; esac -sensors | awk '/Core 0/ {print $3}' +sensors | awk '/Core 0/ {print "🌑", $3}' diff --git a/.local/bin/statusbar/memory b/.local/bin/statusbar/memory index dfd3d7b0..c1f704fa 100755 --- a/.local/bin/statusbar/memory +++ b/.local/bin/statusbar/memory @@ -6,4 +6,4 @@ case $BLOCK_BUTTON in - Click to show memory hogs." ;; esac -free -h | awk '/^Mem:/ {print $3 "/" $2}' +free -h | awk '/^Mem:/ {print "🧠", $3 "/" $2}' From 3ae11f5969d614fd2afa8a24251fa9218aac47cc Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 31 Mar 2020 20:30:42 -0400 Subject: [PATCH 13/35] statusbarinfo script for dwm --- .local/bin/statusbar/statusbarinfo | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 .local/bin/statusbar/statusbarinfo diff --git a/.local/bin/statusbar/statusbarinfo b/.local/bin/statusbar/statusbarinfo new file mode 100755 index 00000000..ae799e99 --- /dev/null +++ b/.local/bin/statusbar/statusbarinfo @@ -0,0 +1,33 @@ +#!/bin/sh + +echo " + ____ _ _ _ +/ ___|| |_ __ _| |_ _ _ ___| |__ __ _ _ __ +\___ \| __/ _\` | __| | | / __| '_ \ / _\` | '__| + ___) | || (_| | |_| |_| \__ \ |_) | (_| | | +|____/ \__\__,_|\__|\__,_|___/_.__/ \__,_|_| + +This is a list of the statusbar modules. + +πŸ“¦5 pacpackages: updatable packages (must have pacman -Sy run in root cronjob to check). +πŸ“° 41 news: unread RSS entries in newsboat. +β˜” 83% ❄️ 69Β° 🌞 80Β° weather: β˜” for precipitation, 🌞 and ❄ for daily high and low. +πŸ“¬ 20 mailbox: number of unread mail if mutt-wizard is active. +πŸ”‰ 62% volume: master sink volume. +πŸ”Œ83% battery: πŸ”Œ for charging, πŸ”‹ for discharging, ⚑ for full. +πŸ“Ά 80% ❎ internet: πŸ“Ά for wifi with % (πŸ“‘ if none), 🌐 for ethernet. (❎ if none). + +Obviously the time and date are displayed as well. + +Optional script modules: + +Edit ~/.local/src/dwmblocks/config.h to add these or your own if you'd like (and recompile and restart dwmblocks). + +'memory' 🧠 559Mi/3.7Gi Current used memory/total memory. +'cpu' 🌑 +46.0Β°C CPU temperature. +'disk' πŸ–₯ : 28G/30G Remaining disk space... +'disk ~' 🏠: 641G/850G ...can be given directory argument. +'moonphase' πŸŒ• 39% Phase of the moon (requires \`pom-perl\`). +'iplocate' πŸ‡ΊπŸ‡Έ United States Your own or VPN location (requires \`geoiplookup\`). + +" | less From 22ff37646c3088dd2db78082fa175ae14f581cde Mon Sep 17 00:00:00 2001 From: Hekuran <62762955+narukeh@users.noreply.github.com> Date: Wed, 1 Apr 2020 14:38:03 +0000 Subject: [PATCH 14/35] =?UTF-8?q?=F0=9F=8C=9Cupdated=20moonphase?= =?UTF-8?q?=F0=9F=8C=9B=20(#532)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit right click to open notification left & middle to update fixes specific dates --- .local/bin/statusbar/moonphase | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.local/bin/statusbar/moonphase b/.local/bin/statusbar/moonphase index d2bbad61..09af87ba 100755 --- a/.local/bin/statusbar/moonphase +++ b/.local/bin/statusbar/moonphase @@ -1,17 +1,23 @@ #!/bin/sh mnphs=$(pom $1 | grep -o 'New\|Waxing Crescent\|First Quarter\|Waxing Gibbous\|Full\|Waning Gibbous\|Last Quarter\|Waning Crescent' | grep -m1 '.') -prcnt=$(pom $1 | grep -o '[[:digit:]]*%') +prcnt=$(pom $1 | grep -o '[[:digit:]]*%' | grep -o '[[:digit:]]*' ) case "$mnphs" in - "New") icon="πŸŒ‘" prcnt="0%" ;; + "New") icon="πŸŒ‘" prcnt="0" ;; "Waxing Crescent") icon="πŸŒ’" ;; - "First Quarter") icon="πŸŒ“" prcnt="50%" ;; + "First Quarter") icon="πŸŒ“" prcnt="50" ;; "Waxing Gibbous") icon="πŸŒ”" ;; - "Full") icon="πŸŒ•" prcnt="100%" ;; + "Full") icon="πŸŒ•" prcnt="100" ;; "Waning Gibbous") icon="πŸŒ–" ;; - "Last Quarter") icon="πŸŒ—" prcnt="50%" ;; + "Last Quarter") icon="πŸŒ—" prcnt="50" ;; "Waning Crescent") icon="🌘" ;; *) echo errorrrr ;; esac -printf "%s %s\\n" "$icon" "$prcnt" +case $BLOCK_BUTTON in + 1) $mnphs ;; + 2) $mnphs ;; + 3) pgrep -x dunst >/dev/null && notify-send " 🌜$(pom)" ;; +esac + +echo "$icon" "$prcnt"% From 26d8e9e006260611cd1daa556b42194612be69f5 Mon Sep 17 00:00:00 2001 From: Hekuran <62762955+narukeh@users.noreply.github.com> Date: Thu, 2 Apr 2020 13:09:54 +0200 Subject: [PATCH 15/35] memory statusbar with multilanguage support (#536) * for multilanguage support see issue number #535 * emoji --- .local/bin/statusbar/memory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/memory b/.local/bin/statusbar/memory index c1f704fa..25a29585 100755 --- a/.local/bin/statusbar/memory +++ b/.local/bin/statusbar/memory @@ -6,4 +6,4 @@ case $BLOCK_BUTTON in - Click to show memory hogs." ;; esac -free -h | awk '/^Mem:/ {print "🧠", $3 "/" $2}' +free -h | sed -n '2{p;q}' | awk '{print "🧠", $3 "/" $2}' From 633db36d0938fbdc6db408b51fe2e49b2faabb75 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 2 Apr 2020 07:23:21 -0400 Subject: [PATCH 16/35] noto mono default if installed, inconsolata comted --- .config/fontconfig/fonts.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index cc435d5e..749a7cc8 100755 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -28,8 +28,9 @@ monospace + Noto Sans Mono Liberation Mono - Inconsolata + Joy Pixels Noto Color Emoji From 043c6253537a20875adbfd274c1c3a3377803095 Mon Sep 17 00:00:00 2001 From: Aleks Ozolins Date: Sun, 5 Apr 2020 09:19:53 -0400 Subject: [PATCH 17/35] Update .profile to export XDG base dirs (#526) Not every program will read them from ~/.config/user-dirs.dirs so might as well export them yourself... Also can now use them elsewhere. --- .profile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.profile b/.profile index 1b5460a0..890acde7 100644 --- a/.profile +++ b/.profile @@ -14,6 +14,9 @@ export BROWSER="brave" export READER="zathura" export STATUSBAR="${LARBSWM}blocks" +# Export XDG environmental variables from '~/.config/user-dirs.dirs' +eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" + # ~/ Clean-up: #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export NOTMUCH_CONFIG="$HOME/.config/notmuch-config" From 77ba6e73c64aebf9e4f35a217117fc3dafbde99c Mon Sep 17 00:00:00 2001 From: Spenser Truex Date: Sun, 5 Apr 2020 15:30:49 -0700 Subject: [PATCH 18/35] Prevent writing all marked imgs onto file (lossage) (#534) This fix issues a warning message and does nothing in that case. Running C-x c (copy) or C-x m (move) will copy/move all the marked files to a single location. If that location is not a directory, then creating that file and overwriting it several times results in complete loss of data in the case of moving, and unhelpful behaviour in the case of "copying". Only the last marked file remains in the file. --- .config/sxiv/exec/key-handler | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index d9f18254..73b572a0 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -6,11 +6,13 @@ do "c") [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & ;; "m") [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & ;; "r") From 6cb9c842c6691842d1bd34e495e84e12646d4991 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 5 Apr 2020 18:31:37 -0400 Subject: [PATCH 19/35] inc rmd --- .config/fontconfig/fonts.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 749a7cc8..1a4b4042 100755 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -30,7 +30,6 @@ Noto Sans Mono Liberation Mono - Joy Pixels Noto Color Emoji From 4471100f17dcdf33fcaafab8cb7c4947473930a5 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 5 Apr 2020 23:13:33 -0400 Subject: [PATCH 20/35] negatives fix --- .local/bin/statusbar/weather | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index 285ac917..34cd2451 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -4,7 +4,7 @@ getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1 curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;} showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/β˜” /g" | tr -d '\n')" -sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-+\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "Β°","🌞",$2 "Β°"}' ;} +sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "Β°","🌞",$2 "Β°"}' ;} case $BLOCK_BUTTON in 1) $TERMINAL -e less -Srf "$HOME/.local/share/weatherreport" ;; From d650aacb907a2458fc22d9a225f6fd3c4ab2ef28 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 5 Apr 2020 23:14:14 -0400 Subject: [PATCH 21/35] weather updates --- .local/bin/statusbar/weather | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index 34cd2451..e98628e4 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -1,11 +1,22 @@ #!/bin/sh -getforecast() { ping -q -c 1 1.1.1.1 >/dev/null || exit 1 +# Displays todays precipication chance (β˜”) and daily low (❄) and high (🌞). +# Usually intended for the statusbar. + +# If we have internet, get a weather report from wttr.in and store it locally. +# You could set up a shell alias to view the full file in a pager in the +# terminal if desired. This function will only be run once a day when needed. +getforecast() { ping -q -c 1 1.1.1.1 >/dev/null && curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;} -showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -n | sed -e '$!d' | sed -e "s/^/β˜” /g" | tr -d '\n')" +# Some very particular and terse stream manipulation. We get the maximum +# precipication chance and the daily high and low from the downloaded file and +# display them with coresponding emojis. +showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | + grep -wo "[0-9]*%" | sort -rn | sed "s/^/β˜” /g;1q" | tr -d '\n')" sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "Β°","🌞",$2 "Β°"}' ;} +# The BLOCK_BUTTON bloat for clicking in i3. case $BLOCK_BUTTON in 1) $TERMINAL -e less -Srf "$HOME/.local/share/weatherreport" ;; 2) getforecast && showweather ;; @@ -16,7 +27,9 @@ case $BLOCK_BUTTON in 🌞: Daily high" ;; esac -if [ "$(stat -c %y "$HOME/.local/share/weatherreport" 2>/dev/null | awk '{print $1}')" != "$(date '+%Y-%m-%d')" ] - then getforecast && showweather - else showweather -fi +# The test if our forcecast is updated to the day. If it isn't download a new +# weather report from wttr.in with the above function. +[ "$(stat -c %y "$HOME/.local/share/weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || + getforecast + +showweather From 29096439ac8de198511736345206e916a3a5cbe7 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 6 Apr 2020 19:28:33 -0400 Subject: [PATCH 22/35] weather for pos, neg and signless pos temps --- .local/bin/statusbar/weather | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/statusbar/weather b/.local/bin/statusbar/weather index e98628e4..0a501e3c 100755 --- a/.local/bin/statusbar/weather +++ b/.local/bin/statusbar/weather @@ -14,7 +14,7 @@ curl -sf "wttr.in/$LOCATION" > "$HOME/.local/share/weatherreport" || exit 1 ;} # display them with coresponding emojis. showweather() { printf "%s" "$(sed '16q;d' "$HOME/.local/share/weatherreport" | grep -wo "[0-9]*%" | sort -rn | sed "s/^/β˜” /g;1q" | tr -d '\n')" -sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\(-\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "Β°","🌞",$2 "Β°"}' ;} +sed '13q;d' "$HOME/.local/share/weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " ❄️",$1 "Β°","🌞",$2 "Β°"}' ;} # The BLOCK_BUTTON bloat for clicking in i3. case $BLOCK_BUTTON in From 091aa28dccfcecfb811534c51fe0484d3c5fa4bb Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:50:20 -0500 Subject: [PATCH 23/35] Delete .imwheelrc --- .imwheelrc | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .imwheelrc diff --git a/.imwheelrc b/.imwheelrc deleted file mode 100644 index e69de29b..00000000 From 44b3b7d330fba11cb6f99ae8aa1369f1adb3604d Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:51:40 -0500 Subject: [PATCH 24/35] Delete podentr --- .local/bin/podentr | 7 ------- 1 file changed, 7 deletions(-) delete mode 100755 .local/bin/podentr diff --git a/.local/bin/podentr b/.local/bin/podentr deleted file mode 100755 index e765c584..00000000 --- a/.local/bin/podentr +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# entr command to run `queueandnotify` when newsboat queue is changed - -[ "$(pgrep -x $(basename $0) | wc -l)" -gt 2 ] && exit - -echo ~/.local/share/newsboat/queue | entr -p queueandnotify 2>/dev/null From afb54ca6487b68fd5f378a70587873fb6f48a757 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:52:44 -0500 Subject: [PATCH 25/35] Delete qndl --- .local/bin/qndl | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 .local/bin/qndl diff --git a/.local/bin/qndl b/.local/bin/qndl deleted file mode 100755 index f5bd14f2..00000000 --- a/.local/bin/qndl +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# $1 is a url; $2 is a command -[ -z "$1" ] && exit -base="$(basename "$1")" -notify-send "⏳ Queuing $base..." -cmd="$2" -[ -z "$cmd" ] && cmd="youtube-dl --add-metadata" -idnum="$(tsp $cmd "$1")" -realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")" -tsp -D "$idnum" mv "$base" "$realname" -tsp -D "$idnum" notify-send "πŸ‘ $realname done." From 66c5ddae0363987dc6ee11eca28a48e22c1b3d72 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:53:06 -0500 Subject: [PATCH 26/35] Delete queueandnotify --- .local/bin/queueandnotify | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100755 .local/bin/queueandnotify diff --git a/.local/bin/queueandnotify b/.local/bin/queueandnotify deleted file mode 100755 index 867b15e6..00000000 --- a/.local/bin/queueandnotify +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Podboat sucks. This script replaces it. -# It reads the newsboat queue, queuing downloads with taskspooler. -# It also removes the junk from extentions. -queuefile="$HOME/.local/share/newsboat/queue" - -while read -r line; do - [ -z "$line" ] && continue - url="$(echo "$line" | awk '{print $1}')" - qndl "$url" "curl -LO" -done < "$queuefile" - -echo > "$queuefile" From fe4bb32e6c615df63746008c8c19afb3307682c6 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:53:19 -0500 Subject: [PATCH 27/35] Delete rssadd --- .local/bin/rssadd | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100755 .local/bin/rssadd diff --git a/.local/bin/rssadd b/.local/bin/rssadd deleted file mode 100755 index 4ef31a4c..00000000 --- a/.local/bin/rssadd +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && - notify-send "That doesn't look like a full URL." && exit -RSSFILE="$HOME/.config/newsboat/urls" -if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then - notify-send "You already have this RSS feed." -else - echo "$1" >> "$RSSFILE" && notify-send "RSS feed added." -fi From 6efdcb3832d56ded756c583a6631c22edcee44de Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:53:41 -0500 Subject: [PATCH 28/35] Delete transadd --- .local/bin/transadd | 9 --------- 1 file changed, 9 deletions(-) delete mode 100755 .local/bin/transadd diff --git a/.local/bin/transadd b/.local/bin/transadd deleted file mode 100755 index 5d8f510d..00000000 --- a/.local/bin/transadd +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# Mimeapp script for adding torrent to transmission-daemon, but will also start the daemon first if not running. - -# transmission-daemon sometimes fails to take remote requests in its first moments. - -pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}") - -transmission-remote -a "$@" && notify-send "πŸ”½ Torrent added." From 0de72dd0b22150d2f3899dab48cd289a94f36129 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:54:01 -0500 Subject: [PATCH 29/35] Delete torwrap --- .local/bin/torwrap | 7 ------- 1 file changed, 7 deletions(-) delete mode 100755 .local/bin/torwrap diff --git a/.local/bin/torwrap b/.local/bin/torwrap deleted file mode 100755 index 0fbb3a80..00000000 --- a/.local/bin/torwrap +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -ifinstalled tremc transmission-cli || exit - -! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}" - -$TERMINAL -e tremc From 4de69096905abb8ac0fb293bed35fcfba90d8e85 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:54:16 -0500 Subject: [PATCH 30/35] Delete td-toggle --- .local/bin/td-toggle | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 .local/bin/td-toggle diff --git a/.local/bin/td-toggle b/.local/bin/td-toggle deleted file mode 100755 index dfac906f..00000000 --- a/.local/bin/td-toggle +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# If transmission-daemon is running, will ask to kill, else will ask to start. -if pgrep -x transmission-da >/dev/null ; -then - [ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon killed." -else - ifinstalled transmission-cli || exit - [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started." -fi -sleep 3 && pkill -RTMIN+7 "${STATUSBAR:?}" From 0151981ead2d0b8175ea2e9be8efafbc041c711f Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:55:36 -0500 Subject: [PATCH 31/35] Delete newsup --- .local/bin/cron/newsup | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 .local/bin/cron/newsup diff --git a/.local/bin/cron/newsup b/.local/bin/cron/newsup deleted file mode 100755 index dd270921..00000000 --- a/.local/bin/cron/newsup +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# Set as a cron job to check for new RSS entries for newsboat. -# If newsboat is open, sends it an "R" key to refresh. - -ping -q -c 1 1.1.1.1 > /dev/null || exit - -/usr/bin/notify-send "πŸ“° Updating RSS feeds..." - -pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit - -echo πŸ”ƒ > /tmp/newsupdate -pkill -RTMIN+6 "${STATUSBAR:?}" -/usr/bin/newsboat -x reload -rm -f /tmp/newsupdate -pkill -RTMIN+6 "${STATUSBAR:?}" -/usr/bin/notify-send "πŸ“° RSS feed update complete." From 8c2235682fb5075d56a13b9aebf412c71ae7aa5e Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:56:49 -0500 Subject: [PATCH 32/35] Delete newsboat --- .local/share/larbs/getkeys/newsboat | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .local/share/larbs/getkeys/newsboat diff --git a/.local/share/larbs/getkeys/newsboat b/.local/share/larbs/getkeys/newsboat deleted file mode 100644 index b6953b35..00000000 --- a/.local/share/larbs/getkeys/newsboat +++ /dev/null @@ -1,22 +0,0 @@ - _ _ - _ __ _____ _____| |__ ___ __ _| |_ -| '_ \ / _ \ \ /\ / / __| '_ \ / _ \ / _` | __| -| | | | __/\ V V /\__ \ |_) | (_) | (_| | |_ -|_| |_|\___| \_/\_/ |___/_.__/ \___/ \__,_|\__| - -newsboat is the RSS reader. - j/k - Move down/up - l - Open entry - h/q - Back/quit - Q - Quit immediately - J/K - Previous/next feed - n - Next unread - N - Previous unread - a - Toggle article read/unread - A - Mark all as read - U - Show all URLs - ,, - Open main link with linkhandler - ,p - Pick which program to open link with - ,v - Open video link in mpv - ,w - Open link in w3m - ,c - Copy link to clipboard From cbfcf4ea04bc927e636b36028537496771bbbc1f Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 00:57:00 -0500 Subject: [PATCH 33/35] Delete ncmpcpp --- .local/share/larbs/getkeys/ncmpcpp | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .local/share/larbs/getkeys/ncmpcpp diff --git a/.local/share/larbs/getkeys/ncmpcpp b/.local/share/larbs/getkeys/ncmpcpp deleted file mode 100644 index 75cdf261..00000000 --- a/.local/share/larbs/getkeys/ncmpcpp +++ /dev/null @@ -1,21 +0,0 @@ - - _ __ ___ _ __ ___ _ __ ___ _ __ _ __ -| '_ \ / __| '_ ` _ \| '_ \ / __| '_ \| '_ \ -| | | | (__| | | | | | |_) | (__| |_) | |_) | -|_| |_|\___|_| |_| |_| .__/ \___| .__/| .__/ - |_| |_| |_| - -ncmpcpp is the music player. - h/j/k/l - Move left/down/up/right - d/u - Down/up page - a - Add song(s) to playlist - c - Clear playlist - g - Go to top - G - Go to bottom - p - Pause - m - Media library - f - Music sorted by directory structure - t - Tag editor - s - Search - v - Visualizer - P - Playlist From 2d8fe0c738e84f2a202914771e7be665718d588e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 7 Apr 2020 09:22:41 -0400 Subject: [PATCH 34/35] emoji fonts not specified for mono --- .config/fontconfig/fonts.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf index 1a4b4042..2d58803c 100755 --- a/.config/fontconfig/fonts.conf +++ b/.config/fontconfig/fonts.conf @@ -30,8 +30,6 @@ Noto Sans Mono Liberation Mono - Joy Pixels - Noto Color Emoji From 50204131c6836f12a4d06554cdf8e850cd10597d Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Tue, 7 Apr 2020 15:44:15 -0500 Subject: [PATCH 35/35] Delete lmc --- .local/bin/lmc | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 .local/bin/lmc diff --git a/.local/bin/lmc b/.local/bin/lmc deleted file mode 100755 index 6d64b649..00000000 --- a/.local/bin/lmc +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -NUM="${2:-5}" - -# Uncomment the following line to use Pulseaudio. -# PULSE=true - -if [ "$PULSE" ]; then - toggle() { pulsemixer --toggle-mute ;} - mute() { pulsemixer --mute ;} - up() { pulsemixer --change-volume +"$NUM" ;} - down() { pulsemixer --change-volume -"$NUM" ;} - control() { pulsemixer ;} -else - toggle() { amixer sset Master toggle ;} - mute() { amixer sset Master mute ;} - up() { amixer sset Master "$NUM"%+ ;} - down() { amixer sset Master "$NUM"%- ;} - control() { alsamixer ;} -fi - -case "$1" in - toggle) toggle ;; - mute) mute ;; - up) up ;; - down) down ;; - control) control ;; -esac - -pkill -RTMIN+10 "${STATUSBAR:?}" &