feat: add Escape bind to close opened eww widgets
This commit is contained in:
parent
99464bed6e
commit
7f4bf28974
4 changed files with 24 additions and 4 deletions
|
@ -28,7 +28,7 @@
|
||||||
.cal-box {
|
.cal-box {
|
||||||
font-family: Product Sans;
|
font-family: Product Sans;
|
||||||
background-color: $bg;
|
background-color: $bg;
|
||||||
border-radius: 4px;
|
border-radius: 15px;
|
||||||
padding: 0 1rem .2rem;
|
padding: 0 1rem .2rem;
|
||||||
color: $fg;
|
color: $fg;
|
||||||
background-color: $contrastbg;
|
background-color: $contrastbg;
|
||||||
|
|
13
eww/scripts/esc.sh
Normal file
13
eww/scripts/esc.sh
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
### this is a WIP
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
if [[ $(eww state) ]]; then
|
||||||
|
read -s -n1 key
|
||||||
|
|
||||||
|
case $key in
|
||||||
|
$'\e') break;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
eww close-all
|
|
@ -143,6 +143,9 @@ dim_inactive_colors.urgent #900000FF
|
||||||
# Logout on closed lid
|
# Logout on closed lid
|
||||||
bindswitch --reload --locked lid:on exec swaylock
|
bindswitch --reload --locked lid:on exec swaylock
|
||||||
|
|
||||||
|
# Kill all eww widgets
|
||||||
|
bindsym Escape exec $scripts/esc.sh
|
||||||
|
|
||||||
# Kill focused window
|
# Kill focused window
|
||||||
bindsym $mod+c kill
|
bindsym $mod+c kill
|
||||||
|
|
||||||
|
@ -161,7 +164,7 @@ dim_inactive_colors.urgent #900000FF
|
||||||
|
|
||||||
# Exit sway (logs you out of your Wayland session)
|
# Exit sway (logs you out of your Wayland session)
|
||||||
#bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
#bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
||||||
bindsym $mod+Shift+e exec "eww open powermenu && eww open powermenu-closer"
|
bindsym $mod+Shift+e exec "eww open powermenu && eww open closer"
|
||||||
#
|
#
|
||||||
# Moving around:
|
# Moving around:
|
||||||
#
|
#
|
||||||
|
@ -208,8 +211,8 @@ dim_inactive_colors.urgent #900000FF
|
||||||
# Workspaces:
|
# Workspaces:
|
||||||
#
|
#
|
||||||
# Allow switching between workspaces with left and right swipes
|
# Allow switching between workspaces with left and right swipes
|
||||||
bindgesture swipe:right exec $HOME/.config/sway/scripts/gestures.sh prev #workspace prev
|
bindgesture swipe:right exec $scripts/gestures.sh prev
|
||||||
bindgesture swipe:left exec $HOME/.config/sway/scripts/gestures.sh next #workspace next
|
bindgesture swipe:left exec $scripts/gestures.sh next
|
||||||
|
|
||||||
# Switch to workspace
|
# Switch to workspace
|
||||||
bindsym --no-repeat $mod+z exec "echo 1 > $SOVSOCK"
|
bindsym --no-repeat $mod+z exec "echo 1 > $SOVSOCK"
|
||||||
|
|
4
sway/scripts/esc.sh
Executable file
4
sway/scripts/esc.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [[ $(eww state) ]]; then
|
||||||
|
eww close-all
|
||||||
|
fi
|
Loading…
Reference in a new issue