make use of setsid(1)'s -f flag (#652)
Co-authored-by: Luke Smith <luke@lukesmith.xyz>
This commit is contained in:
@@ -20,7 +20,7 @@ esac
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -D ~/.config/calcurse -d3)" ;;
|
||||
2) setsid "$TERMINAL" -e calcurse -D ~/.config/calcurse & ;;
|
||||
2) setsid -f "$TERMINAL" -e calcurse -D ~/.config/calcurse ;;
|
||||
3) 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" ;;
|
||||
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;;
|
||||
2) setsid "$TERMINAL" -e htop & ;;
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send "🖥 CPU module " "\- Shows CPU temperature.
|
||||
- Click to show intensive processes.
|
||||
- Middle click to open htop." ;;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
# When clicked, brings up `neomutt`.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e neomutt & ;;
|
||||
2) setsid mailsync >/dev/null & ;;
|
||||
1) setsid -f "$TERMINAL" -e neomutt ;;
|
||||
2) setsid -f mailsync >/dev/null ;;
|
||||
3) notify-send "📬 Mail module" "\- Shows unread mail
|
||||
- Shows 🔃 if syncing mail
|
||||
- Left click opens neomutt
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
||||
2) setsid "$TERMINAL" -e htop & ;;
|
||||
2) setsid -f "$TERMINAL" -e htop ;;
|
||||
3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
|
||||
- Click to show memory hogs.
|
||||
- Middle click to open htop." ;;
|
||||
|
||||
@@ -5,7 +5,7 @@ filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playi
|
||||
pidof -x mpdup >/dev/null 2>&1 || mpdup &
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) mpc status | filter ; setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause
|
||||
1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause
|
||||
2) mpc toggle | filter ;; # right click, pause/unpause
|
||||
3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing.
|
||||
- Italic when paused.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e newsboat ;;
|
||||
2) setsid newsup >/dev/null & exit ;;
|
||||
2) setsid -f newsup >/dev/null exit ;;
|
||||
3) notify-send "📰 News module" "\- Shows unread news items
|
||||
- Shows 🔃 if updating with \`newsup\`
|
||||
- Left click opens newsboat
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e popupgrade & ;;
|
||||
1) setsid -f "$TERMINAL" -e popupgrade ;;
|
||||
2) notify-send "$(/usr/bin/pacman -Qu)" ;;
|
||||
3) notify-send "🎁 Upgrade module" "📦: number of upgradable packages
|
||||
- Left click to upgrade packages
|
||||
|
||||
@@ -17,7 +17,7 @@ transmission-remote -l | grep % |
|
||||
s/Z/🌱/g" | awk '{print $2 $1}' | paste -sd ' '
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid "$TERMINAL" -e tremc & ;;
|
||||
1) setsid -f "$TERMINAL" -e tremc ;;
|
||||
2) td-toggle ;;
|
||||
3) notify-send "🌱 Torrent module" "\- Left click to open tremc.
|
||||
- Middle click to toggle transmission.
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
# uncomment the ALSA lines if you remove PulseAudio.
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
# 1) setsid "$TERMINAL" -e alsamixer & ;;
|
||||
# 1) setsid -f "$TERMINAL" -e alsamixer ;;
|
||||
# 2) amixer sset Master toggle ;;
|
||||
# 4) amixer sset Master 5%+ >/dev/null 2>/dev/null ;;
|
||||
# 5) amixer sset Master 5%- >/dev/null 2>/dev/null ;;
|
||||
1) setsid "$TERMINAL" -e pulsemixer & ;;
|
||||
1) setsid -f "$TERMINAL" -e pulsemixer ;;
|
||||
2) pamixer -t ;;
|
||||
4) pamixer --allow-boost -i 1 ;;
|
||||
5) pamixer --allow-boost -d 1 ;;
|
||||
|
||||
@@ -16,7 +16,7 @@ showweather() { printf "%s" "$(sed '16q;d' "${XDG_DATA_HOME:-$HOME/.local/share}
|
||||
sed '13q;d' "${XDG_DATA_HOME:-$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) setsid "$TERMINAL" -e less -Srf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" & ;;
|
||||
1) setsid -f "$TERMINAL" -e less -Srf "${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" ;;
|
||||
2) getforecast && showweather ;;
|
||||
3) notify-send "🌈 Weather module" "\- Left click for full forecast.
|
||||
- Middle click to update forecast.
|
||||
|
||||
Reference in New Issue
Block a user