Add sway config
This commit is contained in:
		
							parent
							
								
									db15c95662
								
							
						
					
					
						commit
						cb3ea5254e
					
				
					 21 changed files with 347 additions and 3 deletions
				
			
		
							
								
								
									
										5
									
								
								.config/sway/config
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.config/sway/config
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
include ~/.config/sway/config.d/*.conf
 | 
			
		||||
 | 
			
		||||
bar swaybar_command waybar
 | 
			
		||||
 | 
			
		||||
exec_always autostart-manage run-wayland
 | 
			
		||||
							
								
								
									
										1
									
								
								.config/sway/config.d/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.config/sway/config.d/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
10-host.conf
 | 
			
		||||
							
								
								
									
										17
									
								
								.config/sway/config.d/00-defaults.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.config/sway/config.d/00-defaults.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
set $ws_01 01
 | 
			
		||||
set $ws_02 02
 | 
			
		||||
set $ws_03 03
 | 
			
		||||
set $ws_04 04
 | 
			
		||||
set $ws_05 05
 | 
			
		||||
set $ws_06 06
 | 
			
		||||
set $ws_07 07
 | 
			
		||||
set $ws_08 08
 | 
			
		||||
set $ws_09 09
 | 
			
		||||
set $ws_10 10
 | 
			
		||||
 | 
			
		||||
set $ws_web $ws_01
 | 
			
		||||
set $ws_terminal $ws_02
 | 
			
		||||
set $ws_focus $ws_07
 | 
			
		||||
set $ws_media $ws_08
 | 
			
		||||
set $ws_chat $ws_09
 | 
			
		||||
set $ws_messenger $ws_10
 | 
			
		||||
							
								
								
									
										1
									
								
								.config/sway/config.d/05-systemd.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.config/sway/config.d/05-systemd.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
exec "systemctl --user import-environment {,WAYLAND_}DISPLAY SWAYSOCK; systemctl --user start sway-session.target"
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
# monitors
 | 
			
		||||
set $monitor_primary DP-1
 | 
			
		||||
set $monitor_secondary HDMI-A-1
 | 
			
		||||
set $monitor $monitor_primary
 | 
			
		||||
 | 
			
		||||
output $monitor_primary enable
 | 
			
		||||
output $monitor_secondary disable
 | 
			
		||||
 | 
			
		||||
#output $monitor_primary pos 1920 0 res 2560x1440@144Hz
 | 
			
		||||
output $monitor_primary pos 1920 0 res 1920x1080@60Hz
 | 
			
		||||
 | 
			
		||||
include ~/.config/sway/lib/layout-10.conf
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
# monitors
 | 
			
		||||
set $monitor_primary DP-1
 | 
			
		||||
set $monitor_secondary HDMI-A-1
 | 
			
		||||
set $monitor $monitor_secondary
 | 
			
		||||
 | 
			
		||||
output $monitor_primary disable
 | 
			
		||||
output $monitor_secondary enable
 | 
			
		||||
 | 
			
		||||
output $monitor_secondary pos 0 0 res 1920x1080
 | 
			
		||||
 | 
			
		||||
include ~/.config/sway/lib/layout-10.conf
 | 
			
		||||
							
								
								
									
										12
									
								
								.config/sway/config.d/10-host.conf##hostname.portalo,default
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.config/sway/config.d/10-host.conf##hostname.portalo,default
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
# monitors
 | 
			
		||||
set $monitor_primary DP-1
 | 
			
		||||
set $monitor_secondary HDMI-A-1
 | 
			
		||||
 | 
			
		||||
output $monitor_primary enable
 | 
			
		||||
output $monitor_secondary enable
 | 
			
		||||
 | 
			
		||||
#output $monitor_primary pos 1920 0 res 2560x1440@144Hz
 | 
			
		||||
output $monitor_primary pos 1920 0 res 1920x1080@60Hz
 | 
			
		||||
output $monitor_secondary pos 0 0 res 1920x1080
 | 
			
		||||
 | 
			
		||||
include ~/.config/sway/lib/layout-7-3.conf
 | 
			
		||||
							
								
								
									
										40
									
								
								.config/sway/config.d/20-vars.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								.config/sway/config.d/20-vars.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,40 @@
 | 
			
		|||
# Logo key. Use Mod1 for Alt.
 | 
			
		||||
set $mod Mod4
 | 
			
		||||
# Home row direction keys, like vim
 | 
			
		||||
set $left h
 | 
			
		||||
set $down j
 | 
			
		||||
set $up k
 | 
			
		||||
set $right l
 | 
			
		||||
 | 
			
		||||
# Your preferred application launcher
 | 
			
		||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
 | 
			
		||||
# on the original workspace that the command was run on.
 | 
			
		||||
set $menu j4-dmenu-desktop --dmenu="$DMENU" | xargs swaymsg exec --
 | 
			
		||||
 | 
			
		||||
output * bg #1E1F29 solid_color
 | 
			
		||||
 | 
			
		||||
### Idle configuration
 | 
			
		||||
exec swayidle -w \
 | 
			
		||||
         timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
 | 
			
		||||
         timeout 600 'swaylock -f -c 000000' \
 | 
			
		||||
         before-sleep 'swaylock -f -c 000000'
 | 
			
		||||
 | 
			
		||||
### Input configuration
 | 
			
		||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
 | 
			
		||||
# Read `man 5 sway-input` for more information about this section.
 | 
			
		||||
input * {
 | 
			
		||||
    xkb_layout "de"
 | 
			
		||||
    xkb_numlock enable
 | 
			
		||||
    xkb_options "caps:none"
 | 
			
		||||
    accel_profile flat
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
mouse_warping none
 | 
			
		||||
focus_follows_mouse always
 | 
			
		||||
 | 
			
		||||
default_border pixel 1
 | 
			
		||||
default_floating_border pixel 1
 | 
			
		||||
 | 
			
		||||
smart_borders on
 | 
			
		||||
smart_gaps on
 | 
			
		||||
gaps inner 10
 | 
			
		||||
							
								
								
									
										145
									
								
								.config/sway/config.d/30-binds.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								.config/sway/config.d/30-binds.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,145 @@
 | 
			
		|||
### Key bindings
 | 
			
		||||
#
 | 
			
		||||
# Basics:
 | 
			
		||||
#
 | 
			
		||||
    # Start a terminal
 | 
			
		||||
    bindsym $mod+Return exec $TERMINAL
 | 
			
		||||
    bindsym $mod+Shift+Return exec $TERMINAL --class term-floating
 | 
			
		||||
 | 
			
		||||
    # Close focused window
 | 
			
		||||
    bindsym $mod+q kill
 | 
			
		||||
    # Kill focused window
 | 
			
		||||
    bindsym $mod+Shift+q exec swaymsg -t get_tree | \
 | 
			
		||||
        jq 'recurse(.nodes[], .floating_nodes[]) | select(.focused).pid' | \
 | 
			
		||||
        xargs -L 1 kill -9
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    # Start your launcher
 | 
			
		||||
    bindsym $mod+d exec $menu
 | 
			
		||||
 | 
			
		||||
    # Drag floating windows by holding down $mod and left mouse button.
 | 
			
		||||
    # Resize them with right mouse button + $mod.
 | 
			
		||||
    # Despite the name, also works for non-floating windows.
 | 
			
		||||
    # Change normal to inverse to use left mouse button for resizing and right
 | 
			
		||||
    # mouse button for dragging.
 | 
			
		||||
    floating_modifier $mod normal
 | 
			
		||||
 | 
			
		||||
    # Reload the configuration file
 | 
			
		||||
    bindsym $mod+Shift+r reload
 | 
			
		||||
 | 
			
		||||
    bindsym $mod+Pause exec menu-shutdown
 | 
			
		||||
 | 
			
		||||
    bindsym $mod+Print exec screenshot
 | 
			
		||||
    bindsym $mod+Ctrl+Print exec screenshot no_upload
 | 
			
		||||
 | 
			
		||||
    bindsym $mod+t exec ts-control
 | 
			
		||||
    bindsym $mod+m exec host-mode
 | 
			
		||||
 | 
			
		||||
    bindsym $mod+c exec $TERMINAL --class term-floating -e python
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Moving around:
 | 
			
		||||
#
 | 
			
		||||
    # Move your focus around
 | 
			
		||||
    bindsym $mod+$left focus left
 | 
			
		||||
    bindsym $mod+$down focus down
 | 
			
		||||
    bindsym $mod+$up focus up
 | 
			
		||||
    bindsym $mod+$right focus right
 | 
			
		||||
    # Or use $mod+[up|down|left|right]
 | 
			
		||||
    bindsym $mod+Left focus left
 | 
			
		||||
    bindsym $mod+Down focus down
 | 
			
		||||
    bindsym $mod+Up focus up
 | 
			
		||||
    bindsym $mod+Right focus right
 | 
			
		||||
 | 
			
		||||
    # Move the focused window with the same, but add Shift
 | 
			
		||||
    bindsym $mod+Shift+$left move left
 | 
			
		||||
    bindsym $mod+Shift+$down move down
 | 
			
		||||
    bindsym $mod+Shift+$up move up
 | 
			
		||||
    bindsym $mod+Shift+$right move right
 | 
			
		||||
    # Ditto, with arrow keys
 | 
			
		||||
    bindsym $mod+Shift+Left move left
 | 
			
		||||
    bindsym $mod+Shift+Down move down
 | 
			
		||||
    bindsym $mod+Shift+Up move up
 | 
			
		||||
    bindsym $mod+Shift+Right move right
 | 
			
		||||
#
 | 
			
		||||
# Workspaces:
 | 
			
		||||
#
 | 
			
		||||
    # Switch to workspace
 | 
			
		||||
    bindsym $mod+1 workspace $ws_01
 | 
			
		||||
    bindsym $mod+2 workspace $ws_02
 | 
			
		||||
    bindsym $mod+3 workspace $ws_03
 | 
			
		||||
    bindsym $mod+4 workspace $ws_04
 | 
			
		||||
    bindsym $mod+5 workspace $ws_05
 | 
			
		||||
    bindsym $mod+6 workspace $ws_06
 | 
			
		||||
    bindsym $mod+7 workspace $ws_07
 | 
			
		||||
    bindsym $mod+8 workspace $ws_08
 | 
			
		||||
    bindsym $mod+9 workspace $ws_09
 | 
			
		||||
    bindsym $mod+0 workspace $ws_10
 | 
			
		||||
    ## Move focused container to workspace
 | 
			
		||||
    bindsym $mod+Shift+1 move container to workspace $ws_01
 | 
			
		||||
    bindsym $mod+Shift+2 move container to workspace $ws_02
 | 
			
		||||
    bindsym $mod+Shift+3 move container to workspace $ws_03
 | 
			
		||||
    bindsym $mod+Shift+4 move container to workspace $ws_04
 | 
			
		||||
    bindsym $mod+Shift+5 move container to workspace $ws_05
 | 
			
		||||
    bindsym $mod+Shift+6 move container to workspace $ws_06
 | 
			
		||||
    bindsym $mod+Shift+7 move container to workspace $ws_07
 | 
			
		||||
    bindsym $mod+Shift+8 move container to workspace $ws_08
 | 
			
		||||
    bindsym $mod+Shift+9 move container to workspace $ws_09
 | 
			
		||||
    bindsym $mod+Shift+0 move container to workspace $ws_10
 | 
			
		||||
    # Note: workspaces can have any name you want, not just numbers.
 | 
			
		||||
    # We just use 1-10 as the default.
 | 
			
		||||
    
 | 
			
		||||
    bindsym $mod+dead_circumflex workspace $ws_focus
 | 
			
		||||
    bindsym $mod+Shift+dead_circumflex move container to workspace $ws_focus
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Layout stuff:
 | 
			
		||||
#
 | 
			
		||||
    # You can "split" the current object of your focus with
 | 
			
		||||
    # $mod+b or $mod+v, for horizontal and vertical splits
 | 
			
		||||
    # respectively.
 | 
			
		||||
    bindsym $mod+b splith
 | 
			
		||||
    bindsym $mod+v splitv
 | 
			
		||||
 | 
			
		||||
    # Make the current focus fullscreen
 | 
			
		||||
    bindsym $mod+f fullscreen
 | 
			
		||||
 | 
			
		||||
    # Toggle the current focus between tiling and floating mode
 | 
			
		||||
    bindsym $mod+s floating toggle
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Scratchpad:
 | 
			
		||||
#
 | 
			
		||||
    # Sway has a "scratchpad", which is a bag of holding for windows.
 | 
			
		||||
    # You can send windows there and get them back later.
 | 
			
		||||
 | 
			
		||||
    # Move the currently focused window to the scratchpad
 | 
			
		||||
    bindsym $mod+Shift+minus move scratchpad
 | 
			
		||||
 | 
			
		||||
    # Show the next scratchpad window or hide the focused scratchpad window.
 | 
			
		||||
    # If there are multiple scratchpad windows, this command cycles through them.
 | 
			
		||||
    bindsym $mod+minus scratchpad show
 | 
			
		||||
#
 | 
			
		||||
# Resizing containers:
 | 
			
		||||
#
 | 
			
		||||
mode "resize" {
 | 
			
		||||
    # left will shrink the containers width
 | 
			
		||||
    # right will grow the containers width
 | 
			
		||||
    # up will shrink the containers height
 | 
			
		||||
    # down will grow the containers height
 | 
			
		||||
    bindsym $left resize shrink width 10px
 | 
			
		||||
    bindsym $down resize grow height 10px
 | 
			
		||||
    bindsym $up resize shrink height 10px
 | 
			
		||||
    bindsym $right resize grow width 10px
 | 
			
		||||
 | 
			
		||||
    # Ditto, with arrow keys
 | 
			
		||||
    bindsym Left resize shrink width 10px
 | 
			
		||||
    bindsym Down resize grow height 10px
 | 
			
		||||
    bindsym Up resize shrink height 10px
 | 
			
		||||
    bindsym Right resize grow width 10px
 | 
			
		||||
 | 
			
		||||
    # Return to default mode
 | 
			
		||||
    bindsym Return mode "default"
 | 
			
		||||
    bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
bindsym $mod+r mode "resize"
 | 
			
		||||
							
								
								
									
										44
									
								
								.config/sway/config.d/40-window-rules.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								.config/sway/config.d/40-window-rules.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,44 @@
 | 
			
		|||
for_window [app_id="term-floating"] floating enable
 | 
			
		||||
 | 
			
		||||
assign [app_id="org.qutebrowser.qutebrowser"] $ws_web
 | 
			
		||||
assign [class="firefox"] $ws_web
 | 
			
		||||
 | 
			
		||||
for_window [class="jetbrains-*"] {
 | 
			
		||||
    move container to workspace $ws_focus
 | 
			
		||||
    focus
 | 
			
		||||
}
 | 
			
		||||
for_window [class="jetbrains-*" title="win0"] floating enable
 | 
			
		||||
 | 
			
		||||
for_window [app_id="(mpv|vlc|org.qutebrowser.qutebrowser-kiosk)"] {
 | 
			
		||||
    move container to workspace $ws_media
 | 
			
		||||
    fullscreen enable
 | 
			
		||||
    focus
 | 
			
		||||
}
 | 
			
		||||
for_window [class="(FreeTube|[Cc]hromium|Brave-browser)"] {
 | 
			
		||||
    move container to workspace $ws_media
 | 
			
		||||
    focus
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
assign [class="TeamSpeak 3"] $ws_chat
 | 
			
		||||
assign [class="discord"] $ws_chat
 | 
			
		||||
assign [class="Element"] $ws_chat
 | 
			
		||||
 | 
			
		||||
assign [class="(Signal)"] $ws_messenger
 | 
			
		||||
assign [app_id="([Tt]hunderbird)"] $ws_messenger
 | 
			
		||||
 | 
			
		||||
for_window [class="(xdg-desktop-portal-gtk|Pinentry-gtk*)"] {
 | 
			
		||||
    floating enable
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for_window [class="steam" title="Friends List"] {
 | 
			
		||||
    move container to workspace $ws_chat
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for_window [class="zenity" title="Progress"] {
 | 
			
		||||
    floating enable
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for_window [class="(steam_app_*|^cs2$)"] {
 | 
			
		||||
    move container to workspace $ws_focus
 | 
			
		||||
    fullscreen enable
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								.config/sway/config.d/99-dracula.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								.config/sway/config.d/99-dracula.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
  # class                 border  bground text    indicator child_border
 | 
			
		||||
client.focused          #6272A4 #6272A4 #F8F8F2 #6272A4   #6272A4
 | 
			
		||||
client.focused_inactive #44475A #44475A #F8F8F2 #44475A   #44475A
 | 
			
		||||
client.unfocused        #282A36 #282A36 #BFBFBF #282A36   #282A36
 | 
			
		||||
client.urgent           #44475A #FF5555 #F8F8F2 #FF5555   #FF5555
 | 
			
		||||
client.placeholder      #282A36 #282A36 #F8F8F2 #282A36   #282A36
 | 
			
		||||
 | 
			
		||||
client.background       #F8F8F2
 | 
			
		||||
							
								
								
									
										10
									
								
								.config/sway/lib/layout-10.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.config/sway/lib/layout-10.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
workspace $ws_01 output $monitor
 | 
			
		||||
workspace $ws_02 output $monitor
 | 
			
		||||
workspace $ws_03 output $monitor
 | 
			
		||||
workspace $ws_04 output $monitor
 | 
			
		||||
workspace $ws_05 output $monitor
 | 
			
		||||
workspace $ws_06 output $monitor
 | 
			
		||||
workspace $ws_07 output $monitor
 | 
			
		||||
workspace $ws_08 output $monitor
 | 
			
		||||
workspace $ws_09 output $monitor
 | 
			
		||||
workspace $ws_10 output $monitor
 | 
			
		||||
							
								
								
									
										11
									
								
								.config/sway/lib/layout-7-3.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								.config/sway/lib/layout-7-3.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
workspace $ws_01 output $monitor_primary
 | 
			
		||||
workspace $ws_02 output $monitor_primary
 | 
			
		||||
workspace $ws_03 output $monitor_primary
 | 
			
		||||
workspace $ws_04 output $monitor_primary
 | 
			
		||||
workspace $ws_05 output $monitor_primary
 | 
			
		||||
workspace $ws_06 output $monitor_primary
 | 
			
		||||
workspace $ws_07 output $monitor_primary
 | 
			
		||||
 | 
			
		||||
workspace $ws_08 output $monitor_secondary
 | 
			
		||||
workspace $ws_09 output $monitor_secondary
 | 
			
		||||
workspace $ws_10 output $monitor_secondary
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue