13 lines
349 B
Bash
Executable file
13 lines
349 B
Bash
Executable file
#!/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"
|