update `sway` config
parent
eaca465bfb
commit
7bb5fa52ea
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
printf "{\"version\":1}\n"
|
||||||
|
printf "[\n"
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
printf [
|
||||||
|
printf "{\"full_text\":\"%s\"},"\
|
||||||
|
"$(swaymsg -t get_inputs | jq -Mcj '
|
||||||
|
[.[]
|
||||||
|
| select(.type == "keyboard")][0]
|
||||||
|
| .xkb_active_layout_name')"\
|
||||||
|
"$(cat /sys/class/power_supply/BAT0/capacity)"\
|
||||||
|
"$(date +%c)"
|
||||||
|
printf ],
|
||||||
|
timeout 1 swaymsg -t subscribe '["input"]' >/dev/null
|
||||||
|
done
|
||||||
|
|
|
@ -16,12 +16,29 @@ bindsym $mod+w exec firefox
|
||||||
bindsym $mod+shift+w exec thunderbird
|
bindsym $mod+shift+w exec thunderbird
|
||||||
# start menu
|
# start menu
|
||||||
bindsym $mod+space exec fuzzel
|
bindsym $mod+space exec fuzzel
|
||||||
bindsym $mod+home exec footclient nmtui
|
bindsym $mod+home exec nmcli -g "type,name,active" connection show \
|
||||||
bindsym $mod+o exec fuzzel_do.sh
|
| awk -P 'BEGIN{FS=":"}{printf($3=="yes")?"* %s\\n":" %s\\n",$2}' \
|
||||||
|
| fuzzel -d \
|
||||||
|
| awk -P '{printf($1=="*")?"nmcli connection down \\"%s\\"":"nmcli connection up \\"%s\\"",substr($0,3)}' \
|
||||||
|
| sh \
|
||||||
|
| xargs -tI{} notify-send "{}"
|
||||||
|
bindsym $mod+shift+home exec footclient nmtui
|
||||||
|
bindsym $mod+o exec find -not -path "*/.*" \
|
||||||
|
| fuzzel -d \
|
||||||
|
| xargs -I{} xdg-open "{}"
|
||||||
|
bindsym $mod+shift+o exec find -L -type d \
|
||||||
|
| fuzzel -d \
|
||||||
|
| xargs -I{} footclient -D "{}"
|
||||||
|
bindsym $mod+insert exec lsblk -nrpo"name,type,mountpoint" \
|
||||||
|
| awk -P '$2=="part"{printf"%-12s %s\\n",$1,$3}' \
|
||||||
|
| fuzzel -d \
|
||||||
|
| awk -P '{printf($2=="")?"udisksctl mount -b %s":"udisksctl unmount -b %s",$1}' \
|
||||||
|
| sh \
|
||||||
|
| xargs -I{} notify-send "{}"
|
||||||
# notifications
|
# notifications
|
||||||
bindsym $mod+x exec makoctl dismiss
|
bindsym $mod+x exec makoctl dismiss
|
||||||
bindsym $mod+shift+x exec makoctl dismiss -a
|
bindsym $mod+shift+x exec makoctl dismiss -a
|
||||||
bindsym $mod+z exec makoctl restore
|
bindsym --to-code $mod+z exec makoctl restore
|
||||||
# kill window
|
# kill window
|
||||||
bindsym $mod+q kill
|
bindsym $mod+q kill
|
||||||
# move focus
|
# move focus
|
||||||
|
@ -75,32 +92,32 @@ bindsym $mod+f fullscreen toggle
|
||||||
bindsym $mod+shift+f floating toggle
|
bindsym $mod+shift+f floating toggle
|
||||||
bindsym $mod+g focus mode_toggle
|
bindsym $mod+g focus mode_toggle
|
||||||
bindsym $mod+shift+g sticky toggle
|
bindsym $mod+shift+g sticky toggle
|
||||||
bindsym $mod+period move scratchpad
|
bindsym $mod+period scratchpad show
|
||||||
bindsym $mod+shift+period scratchpad show
|
bindsym $mod+shift+period move scratchpad
|
||||||
# mouse
|
# mouse
|
||||||
floating_modifier $mod normal
|
floating_modifier $mod normal
|
||||||
# laptop
|
# laptop
|
||||||
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\
|
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||||
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-;\
|
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-;\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||||
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;\
|
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||||
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle;\
|
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle;\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
|
||||||
bindsym XF86MonBrightnessUp exec brightnessctl set "+1%";\
|
bindsym XF86MonBrightnessUp exec brightnessctl set "+1%";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
bindsym XF86MonBrightnessDown exec brightnessctl set "1%-";\
|
bindsym XF86MonBrightnessDown exec brightnessctl set "1%-";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
bindsym shift+XF86MonBrightnessUp exec brightnessctl set "+10%";\
|
bindsym shift+XF86MonBrightnessUp exec brightnessctl set "+10%";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
bindsym shift+XF86MonBrightnessDown exec brightnessctl set "10%-";\
|
bindsym shift+XF86MonBrightnessDown exec brightnessctl set "10%-";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
# screenshots
|
# screenshots
|
||||||
bindsym print exec grim - | wl-copy
|
bindsym print exec grim - | wl-copy
|
||||||
|
|
||||||
# mark mode ####################################################################
|
# mark mode ####################################################################
|
||||||
set $mark_mode "mark"
|
set $mark_mode "mark [abc]"
|
||||||
mode $mark_mode {
|
mode $mark_mode {
|
||||||
bindsym a mark --toggle a, mode default
|
bindsym a mark --toggle a, mode default
|
||||||
bindsym b mark --toggle b, mode default
|
bindsym b mark --toggle b, mode default
|
||||||
|
@ -113,7 +130,7 @@ mode $mark_mode {
|
||||||
bindsym $mod+m mode $mark_mode
|
bindsym $mod+m mode $mark_mode
|
||||||
|
|
||||||
# tab mode #####################################################################
|
# tab mode #####################################################################
|
||||||
set $tab_mode "tab"
|
set $tab_mode "tab [abc]"
|
||||||
mode $tab_mode {
|
mode $tab_mode {
|
||||||
bindsym a [con_mark="a"] focus, mode default
|
bindsym a [con_mark="a"] focus, mode default
|
||||||
bindsym b [con_mark="b"] focus, mode default
|
bindsym b [con_mark="b"] focus, mode default
|
||||||
|
@ -151,6 +168,9 @@ output * {
|
||||||
adaptive_sync on
|
adaptive_sync on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# font
|
||||||
|
font monospace 13
|
||||||
|
|
||||||
# border
|
# border
|
||||||
default_border normal 1
|
default_border normal 1
|
||||||
default_floating_border normal 1
|
default_floating_border normal 1
|
||||||
|
@ -168,8 +188,7 @@ focus_wrapping yes
|
||||||
|
|
||||||
# statusbar ####################################################################
|
# statusbar ####################################################################
|
||||||
bar {
|
bar {
|
||||||
# status_command ~/src/swaystatus/build/swaystatus
|
status_command ~/.config/sway/bin/status.sh
|
||||||
status_command statusline.sh
|
|
||||||
separator_symbol " | "
|
separator_symbol " | "
|
||||||
colors {
|
colors {
|
||||||
background $bg
|
background $bg
|
||||||
|
|
Loading…
Reference in New Issue