Initial commit
This commit is contained in:
12
README.md
Normal file
12
README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Thinkpad T14 (AMD) with Debian specific FVWM2/3 configs
|
||||
A collection of small but useful scripts, menu items, and shortcuts for FVWM
|
||||
running on my Thinkpad T14 with Debian 13.
|
||||
|
||||
A huge thank you goes out to [Carl Svensson](https://datagubbe.se/) who got me interested
|
||||
in FVWM again after many years.
|
||||
My `xvol` and `xbrightness` scripts are also based on [his versions](https://datagubbe.se/xvol/).
|
||||
If you haven't done so already, check out his [FVWM daily driver config](https://datagubbe.se/1yearconf/).
|
||||
|
||||
Please note that the config file in this directory only show the parts where my scripts are
|
||||
used. The rest of my FVWM config is pretty standard, based on the default
|
||||
FVWM3 config.
|
2
battery-info
Executable file
2
battery-info
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
upower -i /org/freedesktop/UPower/devices/battery_BAT0
|
6
battery-thresholds
Executable file
6
battery-thresholds
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
echo "Current Thresholds"
|
||||
echo ""
|
||||
|
||||
echo "Start: $(cat /sys/class/power_supply/BAT0/charge_start_threshold)%"
|
||||
echo "Stop: $(cat /sys/class/power_supply/BAT0/charge_stop_threshold)%"
|
39
fvwm-config
Normal file
39
fvwm-config
Normal file
@@ -0,0 +1,39 @@
|
||||
#################
|
||||
### Shortcuts ###
|
||||
#################
|
||||
|
||||
# Adjust volume
|
||||
Key XF86AudioLowerVolume A N Exec exec /usr/local/bin/xvol down
|
||||
Key XF86AudioRaiseVolume A N Exec exec /usr/local/bin/xvol up
|
||||
Key XF86AudioMute A N Exec exec /usr/local/bin/xvol mute
|
||||
|
||||
# Adjust brightness
|
||||
Key XF86MonBrightnessUp A N Exec exec /usr/local/bin/xbrightness up
|
||||
Key XF86MonBrightnessDown A N Exec exec /usr/local/bin/xbrightness down
|
||||
|
||||
|
||||
##################
|
||||
### Menu items ###
|
||||
##################
|
||||
|
||||
# Set DPMS timeouts
|
||||
AddToMenu DPMS "DPMS timeout" Title
|
||||
+ "10 minutes" Exec exec xset s 600 600 dpms 600 600 600
|
||||
+ "20 minutes" Exec exec xset s 1200 1200 dpms 1200 1200 1200
|
||||
+ "30 minutes" Exec exec xset s 1800 1800 dpms 1800 1800 1800
|
||||
+ "1,5 hours" Exec exec xset s 5400 5400 dpms 5400 5400 5400
|
||||
+ "3 hours" Exec exec xset s 10800 10800 dpms 10800 10800 10800
|
||||
|
||||
# Battery settings
|
||||
AddToMenu Battery "Battery Config" Title
|
||||
+ "Show Info" Exec exec upower -i /org/freedesktop/UPower/devices/battery_BAT0 | xmessage -file -
|
||||
+ "Show Thresholds" Exec exec /usr/local/bin/battery-thresholds | xmessage -file -
|
||||
+ "Set Threshold 40, 70" Exec xterm -e 'sudo /usr/local/bin/set-batt-40-70'
|
||||
+ "Set Threshold 90, 100" Exec xterm -e 'sudo /usr/local/bin/set-batt-90-100'
|
||||
+ "Set Threshold 95, 100" Exec xterm -e 'sudo /usr/local/bin/set-batt-95-100'
|
||||
|
||||
# Set TearFree
|
||||
AddToMenu TearFree "Tear Free" Title
|
||||
+ "Set TearFree" Exec exec xrandr --output eDP --set TearFree on
|
||||
+ "Unset TearFree" Exec exec xrandr --output eDP --set TearFree off
|
||||
|
4
set-batt-40-70
Executable file
4
set-batt-40-70
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo 40 > /sys/class/power_supply/BAT0/charge_start_threshold
|
||||
echo 70 > /sys/class/power_supply/BAT0/charge_stop_threshold
|
||||
read -p "Thresholds set to 40 & 70"
|
4
set-batt-90-100
Executable file
4
set-batt-90-100
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo 90 > /sys/class/power_supply/BAT0/charge_start_threshold
|
||||
echo 100 > /sys/class/power_supply/BAT0/charge_stop_threshold
|
||||
read -p "Thresholds set to 90 & 100"
|
4
set-batt-95-100
Executable file
4
set-batt-95-100
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
echo 95 > /sys/class/power_supply/BAT0/charge_start_threshold
|
||||
echo 100 > /sys/class/power_supply/BAT0/charge_stop_threshold
|
||||
read -p "Thresholds set to 95 & 100"
|
14
xbrightness
Executable file
14
xbrightness
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $1 = "up" ]; then
|
||||
brightnessctl set +5% &> /dev/null
|
||||
brightnessctl | grep 'Current brightness' \
|
||||
| awk '{ print $4 }' | tr -d '()' \
|
||||
| xmessage -timeout 1 -geometry 120x80-0-0 -file - &> /dev/null
|
||||
elif [ $1 = "down" ]; then
|
||||
brightnessctl set 5%- &> /dev/null
|
||||
brightnessctl | grep 'Current brightness' \
|
||||
| awk '{ print $4 }' | tr -d '()' \
|
||||
| xmessage -timeout 1 -geometry 120x80-0-0 -file - &> /dev/null
|
||||
fi
|
||||
|
16
xvol
Executable file
16
xvol
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $1 = "up" ]; then
|
||||
pactl set-sink-mute 0 false ; pactl set-sink-volume 0 +5%
|
||||
pactl list sinks | grep "Volume" | head -n 1 | awk '{ print $5 }' \
|
||||
| xmessage -timeout 1 -geometry 120x80-0-0 -file - &> /dev/null
|
||||
elif [ $1 = "down" ]; then
|
||||
pactl set-sink-mute 0 false ; pactl set-sink-volume 0 -5%
|
||||
pactl list sinks | grep "Volume" | head -n 1 | awk '{ print $5 }' \
|
||||
| xmessage -timeout 1 -geometry 120x80-0-0 -file - &> /dev/null
|
||||
elif [ $1 = "mute" ]; then
|
||||
pactl set-sink-mute 0 toggle
|
||||
pactl list sinks | grep -i mute | head -n 1 | awk '{ print $2 }' \
|
||||
| xmessage -timeout 1 -geometry 120x80-0-0 -file - &> /dev/null
|
||||
fi
|
||||
|
Reference in New Issue
Block a user