Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Don't use $TERMINAL
Browse files Browse the repository at this point in the history
Different terminals have different flags.
  • Loading branch information
BBaoVanC committed Mar 24, 2021
1 parent a414af6 commit e2019c4
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion blocks/battery.block
@@ -1,7 +1,7 @@
#!/bin/sh

case $BUTTON in
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac

if [ -e /sys/class/power_supply/BAT?* ]; then
Expand Down
4 changes: 2 additions & 2 deletions blocks/cpu.block
Expand Up @@ -11,8 +11,8 @@
cache=/tmp/cpubarscache

case $BUTTON in
1) setsid -f "$TERMINAL" -c "st-floating" -e htop -s PERCENT_CPU ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
1) setsid -f st -c "st-floating" -e htop -s PERCENT_CPU ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac

# id total idle
Expand Down
2 changes: 1 addition & 1 deletion blocks/date.block
@@ -1,7 +1,7 @@
#!/bin/sh

case $BUTTON in
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac

echo "$(date '+%a %F %r')"
2 changes: 1 addition & 1 deletion blocks/keymap.block
Expand Up @@ -10,7 +10,7 @@ case $BUTTON in
setxkbmap -layout us && sigdwmblocks 2 ;;
esac
;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac

echo "$(xkblayout-state print '%e')"
4 changes: 2 additions & 2 deletions blocks/memory.block
@@ -1,8 +1,8 @@
#!/bin/sh

case $BUTTON in
1) setsid -f "$TERMINAL" -c "st-floating" -e htop -s PERCENT_MEM ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
1) setsid -f st -c "st-floating" -e htop -s PERCENT_MEM ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac

echo "$(free -h | awk '/^Mem/ { print $3"/"$2 }' | sed s/i//g)"
4 changes: 2 additions & 2 deletions blocks/torrent.block
Expand Up @@ -18,6 +18,6 @@ echo "$grepped" |
sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' -

case $BUTTON in
1) setsid -f "$TERMINAL" -c "st-floating" -e tremc ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
1) setsid -f st -c "st-floating" -e tremc ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac
4 changes: 2 additions & 2 deletions blocks/volume.block
Expand Up @@ -2,8 +2,8 @@

case $BUTTON in
1) setsid -f audioctl toggle ;;
3) setsid -f "$TERMINAL" -c "st-floating" -e pulsemixer ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
3) setsid -f st -c "st-floating" -e pulsemixer ;;
6) setsid -f st -e "$EDITOR" "$0" ;;
esac

vol=$(pamixer --get-volume)
Expand Down

0 comments on commit e2019c4

Please sign in to comment.