Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
doryan | b0cc8aa400 | ||
doryan | 68b85312d7 | ||
doryan | 68b4546aec | ||
doryan | 8687a1496e |
|
@ -0,0 +1,100 @@
|
|||
#!/bin/sh
|
||||
# Default acpi script that takes an entry for all actions
|
||||
|
||||
# NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
|
||||
# modify it to not use /sys
|
||||
|
||||
# $1 should be + or - to step up or down the brightness.
|
||||
step_backlight() {
|
||||
for backlight in /sys/class/backlight/*/; do
|
||||
[ -d "$backlight" ] || continue
|
||||
step=$(( $(cat "$backlight/max_brightness") / 20 ))
|
||||
[ "$step" -gt "1" ] || step=1 #fallback if gradation is too low
|
||||
printf '%s' "$(( $(cat "$backlight/brightness") $1 step ))" >"$backlight/brightness"
|
||||
done
|
||||
}
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
minspeed="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
|
||||
maxspeed="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
|
||||
setspeed="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
|
||||
|
||||
|
||||
case "$1" in
|
||||
button/power)
|
||||
case "$2" in
|
||||
PBTN|PWRF)
|
||||
logger "PowerButton pressed: $2, shutting down..."
|
||||
shutdown -P now
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
button/sleep)
|
||||
case "$2" in
|
||||
SBTN|SLPB)
|
||||
# suspend-to-ram
|
||||
logger "Sleep Button pressed: $2, suspending..."
|
||||
su doryan -c -m "betterlockscreen -l" & sleep 0.5
|
||||
zzz
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
ac_adapter)
|
||||
case "$2" in
|
||||
AC|ACAD|ADP0)
|
||||
case "$4" in
|
||||
00000000)
|
||||
cat "$minspeed" >"$setspeed"
|
||||
#/etc/laptop-mode/laptop-mode start
|
||||
;;
|
||||
00000001)
|
||||
cat "$maxspeed" >"$setspeed"
|
||||
#/etc/laptop-mode/laptop-mode stop
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
battery)
|
||||
case "$2" in
|
||||
BAT0)
|
||||
case "$4" in
|
||||
00000000) #echo "offline" >/dev/tty5
|
||||
;;
|
||||
00000001) #echo "online" >/dev/tty5
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
CPU0)
|
||||
;;
|
||||
*) logger "ACPI action undefined: $2" ;;
|
||||
esac
|
||||
;;
|
||||
button/lid)
|
||||
case "$3" in
|
||||
close)
|
||||
# suspend-to-ram
|
||||
logger "LID closed, suspending..."
|
||||
su doryan -c -m "betterlockscreen -l" & sleep 0.5
|
||||
zzz
|
||||
;;
|
||||
open)
|
||||
logger "LID opened"
|
||||
;;
|
||||
*) logger "ACPI action undefined (LID): $2";;
|
||||
esac
|
||||
;;
|
||||
video/brightnessdown)
|
||||
step_backlight -
|
||||
;;
|
||||
video/brightnessup)
|
||||
step_backlight +
|
||||
;;
|
||||
*)
|
||||
logger "ACPI group/action undefined: $1 / $2"
|
||||
;;
|
||||
esac
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
bspc monitor DVI-I-1 -d I II III IV V
|
||||
bspc monitor HDMI-1 -d VI VII VIII IX X
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
pgrep -x polybar > /dev/null || polybar &
|
||||
|
||||
bspc config border_width 3
|
||||
bspc config window_gap 5
|
||||
|
@ -23,11 +23,11 @@ bspc config active_border_color "#E0A3B6"
|
|||
bspc config normal_border_color "#8393A1"
|
||||
bspc config focused_border_color "#93D4C5"
|
||||
|
||||
xhost +si:localuser:$USER &
|
||||
xmodmap ~/.Xmodmap
|
||||
|
||||
picom &
|
||||
feh --bg-fill ~/.bg/bg_5.png ~/.bg/bg_5.png &
|
||||
pipewire -v 2>/home/doryan/.config/bspwm/log&
|
||||
feh --bg-fill ~/.bg/bg_5.png &
|
||||
dunst &
|
||||
xmousepasteblock &
|
||||
xsetroot -cursor_name left_ptr &
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
pgrep -x polybar > /dev/null || polybar 2>/home/doryan/.config/bspwm/log&
|
||||
|
|
|
@ -257,7 +257,14 @@ rules = ({
|
|||
match = "window_type = 'dock' || window_type = 'desktop'";
|
||||
blur-background = false;
|
||||
corner-radius = 0;
|
||||
}, {
|
||||
},
|
||||
{
|
||||
match = "window_type = 'dock'";
|
||||
animations = ({
|
||||
triggers = ["open", "show", "close", "hide"],
|
||||
})
|
||||
},
|
||||
{
|
||||
match = "class_g *= 'i3lock' || _NET_WM_STATE@[1] = '_NET_WM_STATE_FULLSCREEN' || _NET_WM_STATE@[2] = '_NET_WM_STATE_FULLSCREEN' || _NET_WM_STATE@[3] = '_NET_WM_STATE_FULLSCREEN' || _NET_WM_STATE@[4] = '_NET_WM_STATE_FULLSCREEN'";
|
||||
shadow = false;
|
||||
corner-radius = 0;
|
||||
|
@ -346,7 +353,6 @@ animations = ({
|
|||
shadow-offset-x = "offset-x";
|
||||
shadow-offset-y = "offset-y";
|
||||
},
|
||||
|
||||
# Half Window Size Desktop Switch
|
||||
{
|
||||
triggers = ["workspace-out"];
|
||||
|
|
|
@ -116,6 +116,15 @@ super + ctrl + shift + space
|
|||
# move/resize
|
||||
#
|
||||
|
||||
{XF86AudioLowerVolume, XF86AudioRaiseVolume}
|
||||
pactl set-sink-volume @DEFAULT_SINK@ {-,+}5%
|
||||
|
||||
XF86AudioMute
|
||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
super + ctrl + XF86TouchpadToggle
|
||||
touchpad_toggle.sh
|
||||
|
||||
# expand a window by moving one of its side outward
|
||||
super + alt + {h,j,k,l}
|
||||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||
|
|
Loading…
Reference in New Issue