Création du script de gestion de la fréquence de l’écran
This commit is contained in:
parent
e810eff72c
commit
a57cebca97
1 changed files with 13 additions and 0 deletions
13
.i3blocks/screen_freq
Executable file
13
.i3blocks/screen_freq
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
{
|
||||||
|
runtime="${XDG_RUNTIME_DIR}/i3blocks"
|
||||||
|
[[ ! -d "$runtime" ]] && mkdir -p "$runtime"
|
||||||
|
|
||||||
|
[[ ! -f "$runtime/screen_freq" ]] && [[ -z "$button" ]] && button=1
|
||||||
|
|
||||||
|
case $button in
|
||||||
|
1) xrandr --rate 60; echo "60" > "$runtime/screen_freq";;
|
||||||
|
3) xrandr --rate 240; echo "240" > "$runtime/screen_freq";;
|
||||||
|
esac
|
||||||
|
} &>/dev/null
|
||||||
|
cat "$runtime/screen_freq"
|
Loading…
Reference in a new issue