mirror of
https://gitlab.com/dbrw/ansible-setup.git
synced 2026-02-06 01:05:32 +07:00
initial commit
This commit is contained in:
13
roles/common/files/user_home/.local/bin/brightness
Executable file
13
roles/common/files/user_home/.local/bin/brightness
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
case $1 in
|
||||
"up")
|
||||
xbacklight -inc 5
|
||||
;;
|
||||
"down")
|
||||
xbacklight -dec 5
|
||||
;;
|
||||
*)
|
||||
xbacklight -get
|
||||
esac
|
||||
dunstify -a "Brightness" -r 88879 -u low -t 1500 $(xbacklight -get)
|
||||
28
roles/common/files/user_home/.local/bin/keyboard-udev
Executable file
28
roles/common/files/user_home/.local/bin/keyboard-udev
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/bash
|
||||
### WARNING: Your distro might not put bash in this location.
|
||||
### You could just use `/usr/bin/env bash` instead.
|
||||
|
||||
# only needed for debugging
|
||||
exec >/tmp/udev.out 2>&1
|
||||
|
||||
HOME=/home/dim
|
||||
XAUTHORITY=$HOME/.Xauthority
|
||||
export XAUTHORITY HOME
|
||||
DISPLAY=:0 ; export DISPLAY;
|
||||
|
||||
# Path to lock file
|
||||
lock="/tmp/keyboard.lock"
|
||||
|
||||
# Lock the file (other atomic alternatives would be "ln" or "mkdir")
|
||||
exec 9>"$lock"
|
||||
if ! flock -n 9; then
|
||||
notify-send -t 5000 "Keyboard script is already running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/su dim -c "sleep 3; /usr//bin/xmodmap $HOME/.Xmodmap;" &
|
||||
notify-send -t 2000 "Xmodmap finished" &
|
||||
|
||||
# The lock file will be unlocked when the script ends
|
||||
echo '' > /tmp/keyboard.lock &
|
||||
unset DISPLAY
|
||||
3
roles/common/files/user_home/.local/bin/lockscreen
Executable file
3
roles/common/files/user_home/.local/bin/lockscreen
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
/usr/local/bin/slock
|
||||
8
roles/common/files/user_home/.local/bin/update-keyboard-keys
Executable file
8
roles/common/files/user_home/.local/bin/update-keyboard-keys
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
# make CapsLock behave like Ctrl:
|
||||
setxkbmap -option ctrl:nocaps
|
||||
|
||||
# make short-pressed Ctrl behave like Escape:
|
||||
xcape -e 'Control_L=Escape'
|
||||
|
||||
16
roles/common/files/user_home/.local/bin/vol
Executable file
16
roles/common/files/user_home/.local/bin/vol
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
case $1 in
|
||||
"up")
|
||||
pamixer -i 3
|
||||
;;
|
||||
"down")
|
||||
pamixer -d 3
|
||||
;;
|
||||
"mute")
|
||||
pamixer -t
|
||||
;;
|
||||
*)
|
||||
pamixer --get-volume-human
|
||||
esac
|
||||
dunstify -a "Volume" -r 88878 -u low -t 1500 $(pamixer --get-volume-human)
|
||||
Reference in New Issue
Block a user