diff --git a/.config/sway/config b/.config/sway/config index 6737fb4..2dafc76 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -32,8 +32,6 @@ set $wsp 9:p:top set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend (h)ibernate re(b)oot (p)oweroff" set $layout_mode "layout: split(h) split(v) (s)tacking (t)abbed" -set $find_exclude_expr \( -path "$HOME/.cache" -o -path "$HOME/.mozilla" -o -path "$HOME/.thunderbird" -o -name .git \) - # commands set $swaylock swaylock -f \ --color=$black \ @@ -51,7 +49,7 @@ set $swaylock swaylock -f \ # bar ########################################################################## bar { separator_symbol " | " - status_command status.sh + status_command exec status.sh strip_workspace_numbers yes wrap_scroll yes colors { @@ -158,30 +156,26 @@ bindsym $mod+semicolon scratchpad show bindsym $mod+shift+g sticky toggle # exec -bindsym --to-code { - $mod+return exec "$TERMINAL" - $mod+space exec fuzzel - $mod+slash exec find "$HOME" $find_exclude_expr -prune -o -print | fuzzel -dp'open > ' | xargs -r xdg-open - $mod+question exec find "$HOME" $find_exclude_expr -prune -o -type f -print0 | xargs -0r grep -in "$(wl-paste)" 2>/dev/null | awk -F: '{ printf("%8s %-62s\t%-80s\\n","+"$2,"\\""$1"\\"",$3) }' | fuzzel -dw160 -p"open > " | cut -f1 | xargs -r "$TERMINAL" "$EDITOR" - $mod+apostrophe exec swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.nodes==[] and .type=="con" and .focused==false) | (.id|tostring) + "\t" + .name' | fuzzel -dp'focus > ' | cut -f1 | xargs -rI{} swaymsg [con_id={}] focus - $mod+home exec "$TERMINAL" nmtui connect - $mod+shift+home exec "$TERMINAL" nmtui - $mod+end exec devmon -c - $mod+n exec makoctl dismiss - $mod+shift+n exec makoctl restore - print exec grim - | wl-copy +bindsym { + $mod+return exec exec "$TERMINAL" + $mod+home exec exec "$TERMINAL" -Tnmtui nmtui connect + $mod+end exec devmon -c + $mod+n exec makoctl dismiss + print exec grim - | wl-copy + $mod+space exec fuzzel + $mod+shift+space exec find "$HOME" \( -path "$HOME/.cache" -o -path "$HOME/.mozilla" -o -path "$HOME/.thunderbird" -o -name .git \) -prune -o -print | fuzzel -dp'open > ' | xargs -rI{} swaymsg -q exec 'exec xdg-open "{}"' } # exec (laptop) bindsym { - XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" - XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" - XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" - XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)" - XF86MonBrightnessUp exec brightnessctl -n set +1%, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" - XF86MonBrightnessDown exec brightnessctl -n set 1%-, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" - shift+XF86MonBrightnessUp exec brightnessctl -n set +10%, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" - shift+XF86MonBrightnessDown exec brightnessctl -n set 10%-, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" + XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" + XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" + XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" + XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)" + XF86MonBrightnessUp exec brightnessctl -qn set +1%, notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" + XF86MonBrightnessDown exec brightnessctl -qn set 1%-, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" + shift+XF86MonBrightnessUp exec brightnessctl -qn set +10%, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" + shift+XF86MonBrightnessDown exec brightnessctl -qn set 10%-, exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)" } # resize @@ -227,17 +221,17 @@ exec { systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP hash dbus-update-activation-environment 2>/dev/null && \ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway - swayidle -w \ + exec swayidle -w \ timeout 300 'brightnessctl -s set 1%' resume 'brightnessctl -r' \ timeout 600 '$swaylock' \ - timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + timeout 900 'swaymsg -q "output * power off"' resume 'swaymsg -q "output * power on"' \ timeout 1800 'systemctl suspend-then-hibernate' \ before-sleep '$swaylock' - wlsunset -l 45 -L 15 - mako --max-visible=0 - devmon --exec-on-drive 'notify-send "Mounted %f at %d"' --exec-on-unmount 'notify-send "Unmounted %f"' - foot -s - wayneko --layer overlay --type inu --background-colour 0xe2e2e2 --outline-colour 0x856cff + exec wlsunset -l 45 -L 15 + exec mako --max-visible=0 + exec devmon --exec-on-drive 'notify-send "Mounted %f at %d"' --exec-on-unmount 'notify-send "Unmounted %f"' + exec foot -s + exec wayneko --type inu --background-colour 0xe2e2e2 --outline-colour 0x856cff --layer top --follow-pointer false } @@ -251,8 +245,7 @@ font monospace 13 # keyboard input "type:keyboard" { - xkb_layout us,si - xkb_options caps:escape,grp:alt_shift_toggle,compose:ralt + xkb_options caps:escape,compose:ralt repeat_delay 200 repeat_rate 30 }