diff --git a/.config/sway/config b/.config/sway/config index 4195fe1..ba4b903 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -318,6 +318,37 @@ for_window [class="Xreader"] resize set width 40ppt for_window [app_id="org.pwmt.zathura"] resize set width 40ppt for_window [app_id="gnome-calendar"] floating enable +#===============================# +# Startup app # +#===============================# + +exec nextcloud + +#===============================# +# Dropdown terminal # +#===============================# +# source: +#https://www.reddit.com/r/swaywm/comments/goxsce/comment/inrdg0k + +# Start with specific app_id/class +set $ddterm-id dropdown-terminal +set $ddterm $term --class $ddterm-id +set $ddterm-resize resize set 100ppt 100ppt, move position 0 0 + +# resize/move new dropdown terminal windows +for_window [app_id="$ddterm-id"] { + floating enable + $ddterm-resize + move to scratchpad + scratchpad show +} + +# show existing or start new dropdown terminal +bindsym Ctrl+Escape exec swaymsg '[app_id="$ddterm-id"] scratchpad show' \ + || $ddterm -e tmuxinator start default \ + && sleep .1 && swaymsg '[app_id="$ddterm-id"] $ddterm-resize' +# ^-- resize again, case moving to different output + #======# # Misc # #======#