mirror of
https://github.com/Keyitdev/dotfiles.git
synced 2026-09-24 01:52:09 +00:00
Update: Added listeners, and more shortcuts to i3 config.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#? Config file for btop v. 1.4.0
|
#? Config file for btop v. 1.4.4
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
@@ -50,14 +50,14 @@ graph_symbol_net = "default"
|
|||||||
graph_symbol_proc = "default"
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||||
shown_boxes = "proc"
|
shown_boxes = "proc cpu"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
update_ms = 2000
|
update_ms = 2000
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "threads"
|
proc_sorting = "cpu direct"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = False
|
||||||
@@ -150,7 +150,7 @@ background_update = True
|
|||||||
custom_cpu_name = ""
|
custom_cpu_name = ""
|
||||||
|
|
||||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||||
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
|
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
|
||||||
disks_filter = ""
|
disks_filter = ""
|
||||||
|
|
||||||
#* Show graphs instead of meters for memory values.
|
#* Show graphs instead of meters for memory values.
|
||||||
@@ -210,6 +210,9 @@ net_sync = True
|
|||||||
#* Starts with the Network Interface specified here.
|
#* Starts with the Network Interface specified here.
|
||||||
net_iface = ""
|
net_iface = ""
|
||||||
|
|
||||||
|
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
|
||||||
|
base_10_bitrate = "Auto"
|
||||||
|
|
||||||
#* Show battery stats in top right if battery is present.
|
#* Show battery stats in top right if battery is present.
|
||||||
show_battery = True
|
show_battery = True
|
||||||
|
|
||||||
@@ -226,6 +229,9 @@ log_level = "WARNING"
|
|||||||
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||||
nvml_measure_pcie_speeds = True
|
nvml_measure_pcie_speeds = True
|
||||||
|
|
||||||
|
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||||
|
rsmi_measure_pcie_speeds = True
|
||||||
|
|
||||||
#* Horizontally mirror the GPU graph.
|
#* Horizontally mirror the GPU graph.
|
||||||
gpu_mirror_graph = True
|
gpu_mirror_graph = True
|
||||||
|
|
||||||
|
|||||||
@@ -8,24 +8,27 @@ tiling_drag modifier titlebar
|
|||||||
font pango:Open sans 11
|
font pango:Open sans 11
|
||||||
exec --no-startup-id dex --autostart --environment i3
|
exec --no-startup-id dex --autostart --environment i3
|
||||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- lock --nofork
|
exec --no-startup-id xss-lock --transfer-sleep-lock -- lock --nofork
|
||||||
|
|
||||||
exec_always --no-startup-id xrandr --dpi 96
|
exec_always --no-startup-id xrandr --dpi 96
|
||||||
exec_always --no-startup-id feh --no-fehbg --bg-fill $HOME/Pictures/wallpapers/background.png
|
exec_always --no-startup-id feh --no-fehbg --bg-fill $HOME/Pictures/wallpapers/background.png
|
||||||
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
|
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
|
||||||
|
|
||||||
exec_always --no-startup-id dunst &
|
exec_always --no-startup-id dunst &
|
||||||
exec_always --no-startup-id /usr/lib/polkit-kde-authentication-agent-1 &
|
exec_always --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
|
||||||
|
exec_always --no-startup-id asus_fan_listener &
|
||||||
|
exec_always --no-startup-id battery_listener &
|
||||||
|
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id volume_control -s +5 -m 125 && volume_level
|
bindsym XF86AudioRaiseVolume exec --no-startup-id volume_control -s +5 -m 125 && volume_level
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id volume_control -s -5 -m 125 && volume_level
|
bindsym XF86AudioLowerVolume exec --no-startup-id volume_control -s -5 -m 125 && volume_level
|
||||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && volume_mute
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && volume_mute
|
||||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && microphone_mute
|
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && microphone_mute
|
||||||
|
bindsym Ctrl+F5 exec --no-startup-id asus_fan_toggle
|
||||||
bindsym XF86ScreenSaver exec --no-startup-id xset dpms force off
|
bindsym XF86ScreenSaver exec --no-startup-id xset dpms force off
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id brightness_control -s -2 && brightness_level
|
bindsym XF86MonBrightnessDown exec --no-startup-id brightness_control -s -2 && brightness_level
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id brightness_control -s +2 && brightness_level
|
bindsym XF86MonBrightnessUp exec --no-startup-id brightness_control -s +2 && brightness_level
|
||||||
bindsym XF86SplitScreen exec --no-startup-id touchpad_toggle
|
|
||||||
bindsym XF86TouchpadToggle exec --no-startup-id touchpad_toggle
|
bindsym XF86TouchpadToggle exec --no-startup-id touchpad_toggle
|
||||||
# bindsym XF86RFKill
|
# bindsym XF86RFKill
|
||||||
# bindsym XF86Calculator exec --no-startup-id nemo
|
# bindsym XF86Calculator exec --no-startup-id nemo
|
||||||
bindsym Ctrl+F5 exec --no-startup-id rofi -show drun
|
|
||||||
|
|
||||||
bindsym $mod+Return exec i3-sensible-terminal
|
bindsym $mod+Return exec i3-sensible-terminal
|
||||||
|
|
||||||
|
|||||||
Executable
+47
@@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# inotify-tools
|
||||||
|
|
||||||
|
# specify the path to the fan_boost_mode file
|
||||||
|
fan_boost_mode_file="/sys/devices/platform/asus-nb-wmi/throttle_thermal_policy"
|
||||||
|
|
||||||
|
# variable to store the previous fan boost mode
|
||||||
|
previous_mode=""
|
||||||
|
|
||||||
|
# kill previous instances
|
||||||
|
for pid in $(pidof -x asus_fan_listener); do
|
||||||
|
if [ "$pid" != $$ ]; then
|
||||||
|
kill -9 "$pid"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# function to get the label for a given mode
|
||||||
|
get_mode_label() {
|
||||||
|
case $1 in
|
||||||
|
0) echo "Performance" ;;
|
||||||
|
1) echo "Turbo" ;;
|
||||||
|
2) echo "Silent" ;;
|
||||||
|
*) echo "Unknown Mode" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# function to check and send a notification if the mode has changed
|
||||||
|
check_and_send_notification() {
|
||||||
|
current_mode=$(cat "$fan_boost_mode_file")
|
||||||
|
current_label=$(get_mode_label "$current_mode")
|
||||||
|
|
||||||
|
if [ "$current_mode" != "$previous_mode" ]; then
|
||||||
|
dunstify -a "Fan Mode" "Fan Mode" "$current_label" -r 100
|
||||||
|
previous_mode="$current_mode"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# monitor for changes in the fan_boost_mode file
|
||||||
|
while inotifywait -e modify "$fan_boost_mode_file"; do
|
||||||
|
check_and_send_notification
|
||||||
|
done
|
||||||
|
|
||||||
|
# or run always
|
||||||
|
# while true; do
|
||||||
|
# check_and_send_notification
|
||||||
|
# done
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 0 Performance
|
||||||
|
# 1 Turbo
|
||||||
|
# 2 Silent
|
||||||
|
|
||||||
|
fan_boost_mode_file="/sys/devices/platform/asus-nb-wmi/throttle_thermal_policy"
|
||||||
|
current_mode=$(cat "$fan_boost_mode_file")
|
||||||
|
|
||||||
|
if [ "$current_mode" -eq 0 ]; then
|
||||||
|
echo 1 | pkexec tee /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy
|
||||||
|
elif [ "$current_mode" -eq 1 ]; then
|
||||||
|
echo 2 | pkexec tee /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy
|
||||||
|
elif [ "$current_mode" -eq 2 ]; then
|
||||||
|
echo 0 | pkexec tee /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy
|
||||||
|
else
|
||||||
|
echo 0 | pkexec tee /sys/devices/platform/asus-nb-wmi/throttle_thermal_policy
|
||||||
|
fi
|
||||||
Executable
+37
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# upower
|
||||||
|
|
||||||
|
# kill previous instances
|
||||||
|
for pid in $(pidof -x battery); do
|
||||||
|
if [ "$pid" != $$ ]; then
|
||||||
|
kill -9 "$pid"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
dir_icons="/usr/local/bin/icons"
|
||||||
|
|
||||||
|
# notify when below this percentage
|
||||||
|
warning_level=20
|
||||||
|
|
||||||
|
# how often to check battery status, in seconds
|
||||||
|
check_interval=60
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
path_to_battery=$(upower -e | grep BAT)
|
||||||
|
battery_level=$(upower -i "$path_to_battery" | grep -E "percentage" | sed 's/[^0-9]//g')
|
||||||
|
discharging=$(upower -i "$path_to_battery" | grep -E "state" | grep -c "discharging")
|
||||||
|
time_to_empty=$(upower -i "$path_to_battery" | grep -E "time to empty" | sed 's/.*: *//')
|
||||||
|
|
||||||
|
# check if battery is low and discharging
|
||||||
|
if [ "$battery_level" -lt "$warning_level" ] && [ "$discharging" -eq 1 ]
|
||||||
|
then
|
||||||
|
dunstify -a "Battery" \
|
||||||
|
"Low battery: ${battery_level}%" \
|
||||||
|
"Battery is low ($time_to_empty left)" \
|
||||||
|
-r 100 \
|
||||||
|
-i $dir_icons/battery.svg
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep ${check_interval}s
|
||||||
|
done
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
touchad_id=$(xinput list | grep -i 'touchpad' | grep -oP 'id=\K\d+')
|
touchad_id=$(xinput list | grep -i 'touchpad' | grep -oP 'id=\K\d+')
|
||||||
|
|
||||||
@@ -9,7 +9,6 @@ fi
|
|||||||
|
|
||||||
state=$(xinput list-props "$touchad_id" | grep "Device Enabled" | grep -o "[01]$")
|
state=$(xinput list-props "$touchad_id" | grep "Device Enabled" | grep -o "[01]$")
|
||||||
|
|
||||||
# Przełącz stan touchpada
|
|
||||||
if [ "$state" -eq 1 ]; then
|
if [ "$state" -eq 1 ]; then
|
||||||
xinput disable "$touchad_id"
|
xinput disable "$touchad_id"
|
||||||
dunstify -a "Touchpad" "Touchpad" "Touchpad is disabled" -r 100
|
dunstify -a "Touchpad" "Touchpad" "Touchpad is disabled" -r 100
|
||||||
|
|||||||
Reference in New Issue
Block a user