sway change layout handler
This commit is contained in:
parent
3574ec7f6e
commit
d439428671
@ -13,7 +13,7 @@ git:.config/git .local/bin/ga
|
|||||||
ranger:.config/ranger
|
ranger:.config/ranger
|
||||||
gpg:
|
gpg:
|
||||||
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3blocks .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot .local/bin/i3_swap_workspaces .local/bin/i3blocks_helper .local/bin/switch-layout %pomodoro
|
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3blocks .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot .local/bin/i3_swap_workspaces .local/bin/i3blocks_helper .local/bin/switch-layout %pomodoro
|
||||||
sway:.config/sway .config/i3blocks .config/mako .config/mimeapps.list .local/bin/screenshot .local/bin/i3blocks_helper %pomodoro
|
sway:.config/sway .config/i3blocks .config/mako .config/mimeapps.list .local/bin/screenshot .local/bin/i3blocks_helper .local/bin/layout_change_handler .Xresources %pomodoro
|
||||||
pomodoro:
|
pomodoro:
|
||||||
bat:.config/bat
|
bat:.config/bat
|
||||||
font:
|
font:
|
||||||
|
|||||||
@ -53,8 +53,7 @@ signal=10
|
|||||||
|
|
||||||
[language]
|
[language]
|
||||||
command=i3blocks_helper language
|
command=i3blocks_helper language
|
||||||
interval=1
|
signal=1
|
||||||
signal=11
|
|
||||||
|
|
||||||
[time]
|
[time]
|
||||||
command=i3blocks_helper time
|
command=i3blocks_helper time
|
||||||
|
|||||||
@ -2,10 +2,12 @@
|
|||||||
# Sway autostart
|
# Sway autostart
|
||||||
|
|
||||||
exec swayidle -w \
|
exec swayidle -w \
|
||||||
timeout 1800 'swaylock -f' \
|
timeout 1800 'swaylock --ignore-empty-password --show-failed-attempts -f' \
|
||||||
timeout 1805 'swaymsg "output * power off"' \
|
timeout 1805 'swaymsg "output * power off"' \
|
||||||
resume 'swaymsg "output * power on"'
|
resume 'swaymsg "output * power on"'
|
||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
#systemctl --user enable --now dbus.service
|
#systemctl --user enable --now dbus.service
|
||||||
exec --no-startup-id mako
|
exec --no-startup-id mako
|
||||||
|
|
||||||
|
exec --no-startup-id layout_change_handler
|
||||||
|
|||||||
@ -99,7 +99,7 @@ mode $exitmode {
|
|||||||
bindsym --to-code r exec reboot
|
bindsym --to-code r exec reboot
|
||||||
bindsym --to-code s exec shutdown -h now
|
bindsym --to-code s exec shutdown -h now
|
||||||
bindsym --to-code u exec systemctl suspend; mode "default"
|
bindsym --to-code u exec systemctl suspend; mode "default"
|
||||||
bindsym --to-code l exec $i3lock_cmd; mode "default"
|
bindsym --to-code l exec swaylock --ignore-empty-password --show-failed-attempts; mode "default"
|
||||||
bindsym --to-code b exec magick canvas:none PNG:- | feh -YFx -; mode "default"
|
bindsym --to-code b exec magick canvas:none PNG:- | feh -YFx -; mode "default"
|
||||||
|
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
|
|||||||
@ -29,3 +29,7 @@ bar {
|
|||||||
position bottom
|
position bottom
|
||||||
status_command i3blocks
|
status_command i3blocks
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output * bg "$(find ~/.wallpaper -type f | shuf -n 1)" fill
|
||||||
|
|
||||||
|
exec_always test -f ~/.Xresources && xrdb -merge ~/.Xresources
|
||||||
|
|||||||
8
home/user/.local/bin/layout_change_handler
Executable file
8
home/user/.local/bin/layout_change_handler
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
swaymsg -m -t SUBSCRIBE "['input']" | \
|
||||||
|
jq --unbuffered -r '.change' | while read -r line; do
|
||||||
|
if echo "${line}" | grep -q "xkb_layout"; then
|
||||||
|
pkill -RTMIN+1 i3blocks
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
x
Reference in New Issue
Block a user