~lindsay/dotfiles

0d61993813dad0c9e83d0453e30a24767c4cc108 — Lindsay 2 months ago 0310bd3
split sway config
6 files changed, 243 insertions(+), 0 deletions(-)

A dot_config/sway/config.d/app_shortcuts.conf
A dot_config/sway/config.d/float.conf
R dot_config/sway/config.d/{input.conf => input_devices.conf}
A dot_config/sway/config.d/monitor.conf
A dot_config/sway/config.d/window.conf
A dot_config/sway/config.d/workspace.conf
A dot_config/sway/config.d/app_shortcuts.conf => dot_config/sway/config.d/app_shortcuts.conf +31 -0
@@ 0,0 1,31 @@
exec pactl upload-sample ~/.config/alert.ogg alert

bindsym $mod+Shift+q kill

# terminal
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec WAYLAND_DISPLAY= $term

# rofi
bindsym $mod+d exec "rofi -combi-modi drun,run -modi combi,ssh -show combi"
## pass
bindsym $mod+p exec "python ~/.config/rofi/scripts/pass.py -p "
bindsym $mod+Shift+p exec "python ~/.config/rofi/scripts/pass.py -o"

bindsym $mod+o mode "App"
mode "App" {
  bindsym c exec "emacsclient -nc", mode "default"
  bindsym Shift+c exec "code", mode "default"
  bindsym b exec "firefox", mode "default"
  
  bindsym e exec "alacritty -e 'lf'", mode "default"
  bindsym m exec "alacritty -e 'neomutt'", mode "default"
  bindsym d exec "alacritty -e 'sdcv'", mode "default"
  bindsym a exec "alacritty -e 'amfora'", mode "default"
  bindsym t exec "alacritty -e 'htop'", mode "default"
  bindsym s exec "~/.config/rofi/scripts/sink.py", mode "default"

  bindsym Escape mode "default"
  bindsym $mod+o mode "default"
  bindsym Return mode "default"
}

A dot_config/sway/config.d/float.conf => dot_config/sway/config.d/float.conf +106 -0
@@ 0,0 1,106 @@
# from https://github.com/Madic-/Sway-DE/blob/master/config/sway/sway.d/06_floating.conf

# Display window as floating. Find out wayland app_id with "swaymsg -t get_tree | jq '.' | grep app_id" and xorg class with xprop
for_window [window_role = "pop-up"] floating enable
for_window [window_role = "bubble"] floating enable
for_window [window_role = "dialog"] floating enable
for_window [window_type = "dialog"] floating enable
for_window [window_role = "task_dialog"] floating enable
for_window [window_type = "menu"] floating enable
for_window [app_id = "floating"] floating enable
for_window [app_id = "floating_update"] floating enable, resize set width 1000px height 600px
for_window [class = "(?i)pinentry"] floating enable
for_window [app_id = "Yad"] floating enable
for_window [app_id = "yad"] floating enable
for_window [title = ".*kdbx - KeePass"] floating enable, resize set 1276px 814px
for_window [class = "KeePass2"] floating enable
for_window [app_id = "nm-connection-editor"] floating enable
for_window [class = "KeyStore Explorer"] floating enable
for_window [app_id = "virt-manager"] floating enable
for_window [app_id = "xfce-polkit"] floating enable
for_window [instance = "origin.exe"] floating enable
for_window [title = "About Mozilla Firefox"] floating enable
for_window [window_role = "About"] floating enable
# Kill Firefox sharing indicator. It opens as an own container. Does not kill functionality
for_window [title = "Firefox - Sharing Indicator"] kill
for_window [title = "Firefox — Sharing Indicator"] kill
for_window [app_id="firefox" title="Library"] floating enable, border pixel 1, sticky enable
for_window [app_id = "pavucontrol"] floating enable
for_window [app_id = "blueberry.py"] floating enable
#for_window [title = "Thunderbird Preferences"] floating enable
#for_window [name = "*Reminder"] floating enable
for_window [title = "Manage KeeAgent.*"] floating enable
for_window [title = "Page Info - .*"] floating enable
for_window [class = "ConkyKeyboard"] floating enable
for_window [class = "Gufw.py"] floating enable
for_window [app_id = "keepassxc"] floating enable, resize set 1276px 814px
for_window [app_id = "blueman-manager"] floating enable
for_window [title = "^Open File$"] floating enable
for_window [class = "^zoom$"] floating enable
for_window [app_id = "avizo-service"] border pixel 0, sticky toggle
no_focus [app_id="avizo-service"]
for_window [window_role = "GtkFileChooserDialog"] resize set 590 340
for_window [window_role = "GtkFiileChooserDialog"] move position center
for_window [app_id = "tlp-ui"] floating enable
for_window [title = "mpvfloat"] floating enable
for_window [title = ".*Kee - Mozilla Firefox"] floating enable
for_window [app_id = "nm-openconnect-auth-dialog"] floating enable
for_window [class = "davmail-DavGateway"] floating enable
for_window [title = "Open Database File"] floating enable
for_window [app_id = "evolution-alarm-notify"] floating enable
for_window [app_id = "gnome-calculator"] floating enable
for_window [title = "TeamSpeak 3"] floating enable
for_window [app_id="(?i)Thunderbird" title=".*Reminder"] floating enable
for_window [class = "ATLauncher"] floating enable
for_window [instance="lxappearance"] floating enable
for_window [app_id="pamac-manager"] floating enable
for_window [title="File Operation Progress"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt
for_window [title="nmtui"] floating enable
for_window [title="Save File"] floating enable
for_window [app_id="wdisplays"] floating enable
for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt
for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable
for_window [app_id = "qt5ct"] floating enable
for_window [app_id = "gnome-tweaks"] floating enable
for_window [class = "Bluetooth-sendto" instance = "bluetooth-sendto"] floating enable
for_window [window_role = "Preferences"] floating enable
for_window [title = "Picture in picture"] floating enable, sticky enable
for_window [app_id = "flameshot"] floating enable
for_window [title = "Firefox - Choose User Profile" ] floating enable

# Zoom
for_window [app_id="zoom"] floating enable
for_window [app_id="zoom" title="Choose ONE of the audio conference options"] floating enable
for_window [app_id="zoom" title="zoom"] floating enable
for_window [app_id="zoom" title="Zoom Meeting"] floating disable
for_window [app_id="zoom" title="Zoom - Free Account"] floating disable

# https://github.com/ValveSoftware/steam-for-linux/issues/1040
for_window [class="^Steam$" title="^Friends$"] floating enable
for_window [class="^Steam$" title="Steam - News"] floating enable
for_window [class="^Steam$" title=".* - Chat"] floating enable
for_window [class="^Steam$" title="^Settings$"] floating enable
for_window [class="^Steam$" title=".* - event started"] floating enable
for_window [class="^Steam$" title=".* CD key"] floating enable
for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
for_window [title="^Steam Keyboard$"] floating enable

# Scratchpad terminal
for_window [title="(?i)$criteria"] floating enable, move absolute position 1500px 100px, resize set 1200px 700px, move to scratchpad, mark $criteria

# Waybar Tooltips don't steel focus
no_focus [app_id="waybar"]
for_window [app_id="waybar" floating] {
    move position cursor
    move down 60px # adjust if some menus still don't fit
}

# Titlebars get resized when text with a different height gets picked up.
# This includes emoji and Hangul. This neat hack makes all titlebars higher.
# See https://github.com/swaywm/sway/issues/4992
for_window [title=".*"] title_format %title゜

# Tag xwayland windows with [X]
for_window [shell="xwayland"] title_format "<span>[X] %title゜</span>"
\ No newline at end of file

R dot_config/sway/config.d/input.conf => dot_config/sway/config.d/input_devices.conf +0 -0
A dot_config/sway/config.d/monitor.conf => dot_config/sway/config.d/monitor.conf +15 -0
@@ 0,0 1,15 @@
#exec wlr-randr --output eDP-1 --off
output HDMI-A-1 mode  3840x2160 scale 1.3
output DP-1 mode  3840x2160 scale 1.3


exec swayidle -w \
  timeout 930 'swaylock -f --image $LOCKIMG' \
  timeout 900 'swaymsg "output * dpms off"' \
  resume 'swaymsg "output * dpms on"'

output * bg ~/Pictures/WallPaper.jpg fill


bindsym $mod+Shift+s exec 'grim -g "$(slurp)" $HOME/Pictures/ScreenShots/"$(date +%F_%T).png"'


A dot_config/sway/config.d/window.conf => dot_config/sway/config.d/window.conf +4 -0
@@ 0,0 1,4 @@
exec mako


for_window [app_id="pinentry-*"] floating enable

A dot_config/sway/config.d/workspace.conf => dot_config/sway/config.d/workspace.conf +87 -0
@@ 0,0 1,87 @@
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
  
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
  
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

set $ws1 number 1
set $ws2 number 2
set $ws3 number 3
set $ws4 number 4
set $ws5 number 5
set $ws6 number 6
set $ws7 number 7
set $ws8 number 8
set $ws9 number 9
set $ws10 number 10


bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10

bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
  
bindsym $mod+b splith
bindsym $mod+v splitv

bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
  
bindsym $mod+f fullscreen

  
bindsym $mod+Shift+space floating toggle
 
bindsym $mod+space focus mode_toggle

bindsym $mod+a focus parent

bindsym $mod+r mode "resize"
mode "resize" {
    bindsym $left resize shrink width 20px
    bindsym $down resize grow height 20px
    bindsym $up resize shrink height 20px
    bindsym $right resize grow width 20px

    bindsym Left resize shrink width 20px
    bindsym Down resize grow height 20px
    bindsym Up resize shrink height 20px
    bindsym Right resize grow width 20px

    # Return to default mode
    bindsym $mod+r mode "default"
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
\ No newline at end of file