add user and install scripts
This commit is contained in:
17
user-scripts/changebrightness.sh
Normal file
17
user-scripts/changebrightness.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
function send_notification() {
|
||||
brightness=$(printf "%.0f\n" $(brillo -G))
|
||||
dunstify -a "changebrightness" -u low -r 9991 -h int:value:"$brightness" -i "brightness-$1" "Brightness: $brightness%" -t 2000
|
||||
}
|
||||
|
||||
case $1 in
|
||||
up)
|
||||
brillo -A 5 -q
|
||||
send_notification $1
|
||||
;;
|
||||
down)
|
||||
brillo -U 5 -q
|
||||
send_notification $1
|
||||
;;
|
||||
esac
|
||||
28
user-scripts/changevolume.sh
Normal file
28
user-scripts/changevolume.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
function send_notification() {
|
||||
volume=$(pamixer --get-volume)
|
||||
dunstify -a "changevolume" -u low -r "9993" -h int:value:"$volume" -i "volume-$1" "Volume: ${volume}%" -t 2000
|
||||
}
|
||||
|
||||
case $1 in
|
||||
up)
|
||||
# Set the volume on (if it was muted)
|
||||
pamixer -u
|
||||
pamixer -i 5 --allow-boost
|
||||
send_notification $1
|
||||
;;
|
||||
down)
|
||||
pamixer -u
|
||||
pamixer -d 5 --allow-boost
|
||||
send_notification $1
|
||||
;;
|
||||
mute)
|
||||
pamixer -t
|
||||
if $(pamixer --get-mute); then
|
||||
dunstify -i volume-mute -a "changevolume" -t 2000 -r 9993 -u low "Muted"
|
||||
else
|
||||
send_notification up
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
10
user-scripts/powermenu.sh
Normal file
10
user-scripts/powermenu.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
chosen=$(printf " Power Off\n Restart\n Lock" | rofi -dmenu -i -theme-str '@import "powermenu.rasi"')
|
||||
|
||||
case "$chosen" in
|
||||
" Power Off") poweroff ;;
|
||||
" Restart") reboot ;;
|
||||
" Lock") i3lock-fancy -gpf DejaVu Sans -- scrot -z ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user