@@ -1,5 +1,5 @@
|
||||
[font]
|
||||
size = 10
|
||||
size = 12
|
||||
|
||||
[font.bold]
|
||||
style = "Bold"
|
||||
|
||||
@@ -123,6 +123,8 @@ bindsym XF86MonBrightnessDown exec --no-startup-id ~/.scripts/brightness.sh down
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.scripts/sound.sh down
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.scripts/sound.sh up
|
||||
bindsym XF86AudioMute exec --no-startup-id ~/.scripts/sound.sh toggle
|
||||
# bindsym $mod+p exec ~/.scripts/monitor.sh next
|
||||
|
||||
bindsym XF86AudioPlay exec "playerctl play-pause"
|
||||
bindsym XF86AudioStop exec "playerctl stop"
|
||||
bindsym XF86AudioNext exec "playerctl next"
|
||||
@@ -139,7 +141,6 @@ bindsym XF86Favorites exec dunstify -r 3 "Favorites"
|
||||
|
||||
# Application Shortcuts
|
||||
bindsym $mod+b exec firefox
|
||||
bindsym $mod+p exec firefox --private-window https://tudattr.dev
|
||||
|
||||
# Whole Screen
|
||||
bindsym Control+Print exec --no-startup-id ~/.scripts/screenshot.sh screen
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
':/home/tudattr/.ssh
|
||||
':/home/tudattr/Pictures/Screenshots/2016-12
|
||||
a:/home/tudattr/Documents/Arbeit/Uni-DuE_NCS_SHK/04_-_Projekte
|
||||
s:/home/tudattr/Pictures/Screenshots
|
||||
u:/home/tudattr/.genesis/Documents/Uni/Studium
|
||||
e:/home/tudattr/.genesis/Documents/Fachschaft/Berufungskomission/Pohl/Sitzungen
|
||||
r:/home/tudattr/.genesis/Documents/Uni/Studium/2023_Sommersemester/ethfuzz-evaluation/eval_ityfuzz/contracts/VeriSmart-benchmarks
|
||||
m:/run/media/tudattr
|
||||
|
||||
@@ -1,36 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
lower_battery_threshold=10
|
||||
KBD="";
|
||||
oldKBD="";
|
||||
KBD=""
|
||||
oldKBD=""
|
||||
connected_monitors=""
|
||||
old_connected_monitors=""
|
||||
internal_monitor="eDP"
|
||||
|
||||
function kb_routine {
|
||||
oldKBD="$KBD";
|
||||
kb_routine() {
|
||||
oldKBD="$KBD"
|
||||
case "$(xset -q | grep -A 0 'LED' | cut -c59-67)" in
|
||||
"00000000")
|
||||
KBD="Europe" ;;
|
||||
"00001000")
|
||||
KBD="Deutsch" ;;
|
||||
*) KBD="unknown" ;;
|
||||
"00000000")
|
||||
KBD="Europe"
|
||||
;;
|
||||
"00001000")
|
||||
KBD="Deutsch"
|
||||
;;
|
||||
*) KBD="unknown" ;;
|
||||
esac
|
||||
|
||||
if [ "$KBD" != "$oldKBD" ]; then
|
||||
dunstify -r 1 "$KBD";
|
||||
dunstify -r 1 "$KBD"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function battery_routine {
|
||||
capacity=$(< /sys/class/power_supply/BAT0/capacity)
|
||||
if [[ $capacity -lt lower_battery_threshold ]]; then
|
||||
acpi | grep -q '0: Discharging' && dunstify "Battery at $capacity%";
|
||||
sleep 60;
|
||||
battery_routine() {
|
||||
capacity="$(cat /sys/class/power_supply/BAT0/capacity)"
|
||||
if [ "$capacity" -lt $lower_battery_threshold ]; then
|
||||
acpi | grep -q '0: Discharging' && dunstify "Battery at $capacity%"
|
||||
sleep 60
|
||||
fi
|
||||
}
|
||||
|
||||
while :
|
||||
do
|
||||
kb_routine;
|
||||
battery_routine;
|
||||
sleep 1;
|
||||
monitors() {
|
||||
connected_monitors=$(xrandr | grep -c "\<connected\>")
|
||||
if [ "$connected_monitors" != "old_connected_monitors" ]; then
|
||||
if [ "$connected_monitors" -eq 1 ]; then
|
||||
# dunstify -r 1 "Swichting to single monitor"
|
||||
xrandr --output $internal_monitor --auto
|
||||
fi
|
||||
if [ "$connected_monitors" -gt 1 ]; then
|
||||
external_monitor=$(xrandr | grep "\<connected\>" | grep -v $internal_monitor | cut -d" " -f1)
|
||||
# dunstify -r 1 "Swichting to external monitor"
|
||||
xrandr --output $internal_monitor --off --output "$external_monitor" --auto
|
||||
fi
|
||||
old_connected_monitors=$connected_monitors
|
||||
fi
|
||||
}
|
||||
|
||||
while :; do
|
||||
kb_routine
|
||||
battery_routine
|
||||
# monitors
|
||||
sleep 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user