Skip to content

Commit 914b37c

Browse files
committed
Added commands abbreviations + changed sLockscreenctl options
1 parent 25ffada commit 914b37c

File tree

10 files changed

+91
-47
lines changed

10 files changed

+91
-47
lines changed

.config/i3/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ exec numlockx
2525

2626
# Lockscreen
2727
exec xset s 600 300
28-
exec xss-lock -n "sBrightnessctl screensaver" -l -- sLockscreenctl --suspend
28+
exec xss-lock -n "sBrightnessctl screensaver" -l -- sLockscreenctl suspend
2929

3030
# Restore redshift state
3131
exec $HOME/.config/i3/scripts/restoreRedshift.sh
@@ -84,7 +84,7 @@ bindsym $mod+Ctrl+Shift+p exec sPolybarctl hide
8484

8585

8686
# === Lock the screen
87-
bindsym $mod+l exec sLockscreenctl --lock
87+
bindsym $mod+l exec sLockscreenctl lock
8888

8989
# Adjust volume
9090
# -Ctrl is used to control the microphone

.local/bin/sBatteryctl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,19 @@ function printUsage() {
188188
plugin Show notification about plugging AC
189189
unplug Show notification about unplugging AC
190190
current Show current information on the battery
191+
192+
- Abbreviations
193+
m = monitor
194+
p = plugin
195+
u = unplug
196+
c = current
191197
"
192198
}
193199

194200
case $1 in
195-
monitor) monitor ;;
196-
plugin) plugin ;;
197-
unplug) unplug ;;
198-
current) current ;;
201+
monitor | m) monitor ;;
202+
plugin | p) plugin ;;
203+
unplug | u) unplug ;;
204+
current | c) current ;;
199205
help | *) printUsage ;;
200206
esac

.local/bin/sBluetoothctl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,15 @@ function printUsage() {
5454
help Show this help
5555
print Print the current status label
5656
power <toggle|on|off> Switch on or off the bluetooth, or toggle between the states
57+
58+
- Abbreviations
59+
p = power
5760
"
5861
}
5962

6063
case $1 in
6164
print) printStatus ;;
62-
power) power $2 && updatePolybar ;;
65+
power | p) power $2 && updatePolybar ;;
6366
help | *) printUsage ;;
6467
esac
6568

.local/bin/sBrightnessctl

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,21 +215,28 @@ function printUsage() {
215215
redshift increase [amount] Increase the redshift temperature by [amount] if specified or the default value otherwise
216216
redshift decrease [amount] Decrease the redshift temperature by [amount] if specified or the default value otherwise
217217
redshift print Print the current redshift temperature (used in polybar)
218+
219+
- Abbreviations
220+
i = increase
221+
d = decrease
222+
s = set
223+
r = redshift
224+
t = toggle
218225
"
219226
}
220227

221228
case $1 in
222-
increase)
229+
increase | i)
223230
changeBrightness -inc $2
224231
updatePolybar
225232
sendNotification
226233
;;
227-
decrease)
234+
decrease | d)
228235
changeBrightness -dec $2
229236
updatePolybar
230237
sendNotification
231238
;;
232-
set)
239+
set | s)
233240
setBrightness "$2 -step $fade_fps -time $fade_time"
234241
updatePolybar
235242
sendNotification
@@ -241,14 +248,14 @@ case $1 in
241248
print)
242249
printBrightness $2
243250
;;
244-
redshift)
251+
redshift | r)
245252
case $2 in
246-
toggle)
253+
toggle | t)
247254
toggleRedshift
248255
updatePolybar
249256
sendNotification
250257
;;
251-
increase)
258+
increase | i)
252259
if [ -z $3 ]; then
253260
changeTemp $((REDSHIFT_TEMP+defaultTempChangeValue))
254261
else
@@ -257,7 +264,7 @@ case $1 in
257264
updatePolybar
258265
sendNotification
259266
;;
260-
decrease)
267+
decrease | d)
261268
if [ -z $3 ]; then
262269
changeTemp $((REDSHIFT_TEMP-defaultTempChangeValue))
263270
else

.local/bin/sLockscreenctl

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,27 +131,29 @@ function printUsage() {
131131
sLockscreenctl <options>
132132
133133
- Options
134-
--suspend Lock the screen and suspend
135-
-s Equivalent to --suspend
136-
--lock Lock the screen
137-
-l Equivalent to --lock
134+
suspend Lock the screen and suspend
135+
lock Lock the screen
136+
137+
- Abbreviations
138+
s = suspend
139+
l = lock
138140
"
139141
}
140142

141143
case "$1" in
142-
-s | --suspend)
143-
suspend=true
144-
;&
145-
146-
-l | --lock)
147-
lock=true
148-
[[ $suspend ]] || extraArgs="$extraArgs -n"
149-
;;
150-
* | help) printUsage ;;
144+
suspend | s)
145+
isSuspend=true
146+
;&
147+
148+
lock | l)
149+
isLock=true
150+
[[ $isSuspend ]] || extraArgs="$extraArgs -n"
151+
;;
152+
help | *) printUsage ;;
151153
esac
152154

153155
# Activate lockscreen (and suspend if specified)
154-
[[ $lock ]] && lock && { [[ $suspend ]] && systemctl suspend; }
156+
[[ $isLock ]] && lock && { [[ $isSuspend ]] && systemctl suspend; }
155157

156158
exit 0
157159

.local/bin/sMicrophonectl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,26 @@ function printUsage() {
8383
up [amount] Increase input volume by [amount] if specified or the default value otherwise
8484
down [amount] Decrease input volume by [amount] if specified or the default value otherwise
8585
mute Toggle mute on/off for the microphone
86+
87+
- Abbreviations
88+
u = up
89+
d = down
90+
m = mute
8691
"
8792
}
8893

8994
case $1 in
90-
up)
95+
up | u)
9196
amixer sset Capture cap
9297
amixer -D pulse sset Capture csvolume "$2"%+ > /dev/null
9398
sendNotification
9499
;;
95-
down)
100+
down | d)
96101
amixer sset Capture cap
97102
amixer -D pulse sset Capture csvolume "$2"%- > /dev/null
98103
sendNotification
99104
;;
100-
mute)
105+
mute | m)
101106
amixer -D pulse sset Capture toggle > /dev/null
102107
if isMute ; then
103108
# Building the volume bar

.local/bin/sPlayerctl

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,30 +127,37 @@ function printUsage() {
127127
next Go to the next song
128128
previous Go to the previous song
129129
info Print info of the playing song
130+
131+
- Abbreviations
132+
pp = play-pause
133+
s = stop
134+
n = next
135+
p = previous
136+
i = info
130137
"
131138
}
132139

133140
if [ -z $1 ] || [ $1 == "help" ]; then
134141
printUsage
135142
elif [ "$(playerctl -l | head -n 1)" != "No players were found" ]; then
136143
case $1 in
137-
play-pause)
144+
play-pause | pp)
138145
playerctl -p "$player" play-pause
139146
sendNotification
140147
;;
141-
stop)
148+
stop | s)
142149
playerctl -p "$player" stop
143150
sendNotification
144151
;;
145-
next)
152+
next | n)
146153
playerctl -p "$player" next
147154
sendNotification
148155
;;
149-
previous)
156+
previous | p)
150157
playerctl -p "$player" previous
151158
sendNotification
152159
;;
153-
info)
160+
info | i)
154161
info
155162
;;
156163
esac

.local/bin/sPolybarctl

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,23 @@ function printUsage() {
151151
[WIP] autoHide <bar id> Enable auto-hide for the specified bar. Move the cursor to [position] to show the bar
152152
[WIP] drag <bar id> Drag the polybar with the mouse
153153
[WIP] resize <bar id> Resize the polybar with the mouse
154+
155+
- Abbreviations
156+
l = launch
157+
t = toggle
158+
s = show
159+
h = hide
160+
d = drag
161+
r = resize
162+
i = ipc
154163
"
155164
}
156165

157166
case "$1" in
158-
launch)
167+
launch | l)
159168
launch
160169
;;
161-
toggle)
170+
toggle | t)
162171
toggle $2
163172
updateSwitches
164173
;;
@@ -171,21 +180,21 @@ case "$1" in
171180
autoHide)
172181
autoHide $2
173182
;;
174-
show)
183+
show | s)
175184
show $2
176185
updateSwitches
177186
;;
178-
hide)
187+
hide | h)
179188
hide $2
180189
updateSwitches
181190
;;
182-
drag)
191+
drag | d)
183192
drag $2
184193
;;
185-
resize)
194+
resize | r)
186195
resize $2
187196
;;
188-
ipc)
197+
ipc | i)
189198
ipc $2 $3 $4 $5
190199
;;
191200
help | *) printUsage ;;

.local/bin/sVolumectl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,22 +86,27 @@ function printUsage() {
8686
up [amount] Increase speaker/headphone volume by [amount] if specified or the default value otherwise
8787
down [amount] Decrease speaker/headphone volume by [amount] if specified or the default value otherwise
8888
mute Toggle mute on/off for the speaker/headphone
89+
90+
- Abbreviations
91+
u = up
92+
d = down
93+
m = mute
8994
"
9095
}
9196

9297
case $1 in
93-
up)
98+
up | u)
9499
# Set the volume on (if it was muted)
95100
amixer -D pulse set Master on > /dev/null
96101
amixer -D pulse sset Master "$2"%+ > /dev/null
97102
sendNotification
98103
;;
99-
down)
104+
down | d)
100105
amixer -D pulse set Master on > /dev/null
101106
amixer -D pulse sset Master "$2"%- > /dev/null
102107
sendNotification
103108
;;
104-
mute)
109+
mute | m)
105110
# Toggle mute
106111
amixer -D pulse set Master toggle > /dev/null
107112
if isMute ; then

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# simonvic personal full-keyboard driven rice/workflow
2-
![version](https://img.shields.io/badge/version-2.0.0-red)
2+
![version](https://img.shields.io/badge/version-2.1.0-red)
33

44
## Getting started
55
Make sure to visit the [Wiki](https://github.com/simonvic/dotfiles/wiki) to have a ful overview of what my workflow can offer

0 commit comments

Comments
 (0)