commit 1e2b00a
hovercats
·
2026-08-20 19:57:04 +0000 UTC
parent 0019ec1
make flags consistent across scripts
M
rc/bmks
+5,
-5
1@@ -8,7 +8,7 @@ bookmarks=$file_path/$filename
2 tmpfile=/tmp/.bmks
3
4 switch($1) {
5- case a
6+ case -a
7 url=$2
8 if (! ~ $2 0) description=`{printf '' | dmenu -p 'Description: '}
9 if not printf 'No url\n' && exit 1
10@@ -18,17 +18,17 @@ switch($1) {
11 sed 's/[ ]*$//' $bookmarks > $tmpfile
12 mv -f $tmpfile $bookmarks
13 }
14- case c
15+ case -c
16 test -d $file_path || mkdir -p $file_path
17 test -f $bookmarks || touch $bookmarks
18- case h
19+ case -h
20 printf 'Usage: bmks a|c|h|d|l\n'
21- case d
22+ case -d
23 selection=`{cat $bookmarks | dmenu -l 10 -p 'Delete: '}
24 if (~ $#selection 0) printf 'No selction made\n' && exit 1
25 grep -v $"selection $bookmarks > $tmpfile
26 mv -f $tmpfile $bookmarks
27- case l
28+ case -l
29 cat $bookmarks
30 case *
31 selection=`{cat $bookmarks | dmenu -i -l 10 | awk '{print $NF}'}
M
rc/bri
+2,
-2
1@@ -6,10 +6,10 @@ file=/sys/class/backlight/amdgpu_bl0/brightness
2 tmpfile=/tmp/.bri
3
4 switch($1) {
5- case d
6+ case -d
7 awk <$file '{ print $1 - 5 }' >$tmpfile
8 cat $tmpfile >$file
9- case i
10+ case -i
11 awk <$file '{ print $1 + 5 }' >$tmpfile
12 cat $tmpfile >$file
13 }
M
rc/tab
+2,
-2
1@@ -3,14 +3,14 @@
2 flag e +
3
4 switch($1) {
5- case p
6+ case -p
7 howlc lower
8 howlc focus_prev
9 focused=`{howlc get_focus}
10 unfocused=`{howlc list_windows | grep -v $focused}
11 howlc lower $unfocused
12 howlc raise
13- case n
14+ case -n
15 howlc lower
16 howlc focus_next
17 focused=`{howlc get_focus}