Sway config in multiple files
This commit is contained in:
		
							parent
							
								
									6925eb624d
								
							
						
					
					
						commit
						6a9f632787
					
				
					 5 changed files with 332 additions and 344 deletions
				
			
		
							
								
								
									
										168
									
								
								config/sway/commands
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										168
									
								
								config/sway/commands
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,168 @@ | |||
| #  | ||||
| # ~/.config/sway/commands | ||||
| # Keybinds for sway | ||||
| #  | ||||
| 
 | ||||
| # Variables | ||||
| set { | ||||
|     $alt    Mod1 | ||||
|     $flag   Mod4 | ||||
|     $term   alacritty | ||||
| } | ||||
| 
 | ||||
| # Focus | ||||
| bindsym { | ||||
|     $flag+h     focus left | ||||
|     $flag+j     focus down | ||||
|     $flag+k     focus up | ||||
|     $flag+l     focus right | ||||
| 
 | ||||
|     $flag+Left  focus left | ||||
|     $flag+Down  focus down | ||||
|     $flag+Up    focus up | ||||
|     $flag+Right focus right | ||||
|      | ||||
|     $flag+m     focus mode_toggle | ||||
|     $flag+p     focus parent | ||||
| } | ||||
| 
 | ||||
| # Move windows | ||||
| bindsym { | ||||
|     $flag+Shift+h       move left | ||||
|     $flag+Shift+j       move down | ||||
|     $flag+Shift+k       move up | ||||
|     $flag+Shift+l       move right | ||||
| 
 | ||||
|     $flag+Shift+Left    move left | ||||
|     $flag+Shift+Down    move down | ||||
|     $flag+Shift+Up      move up | ||||
|     $flag+Shift+Right   move right | ||||
|      | ||||
|     $flag+Next          move scratchpad | ||||
|     $flag+Prior         scratchpad show | ||||
| } | ||||
| 
 | ||||
| # Layouts | ||||
| bindsym { | ||||
|     $flag+w layout toggle split | ||||
|     $flag+x layout tabbed | ||||
|     $flag+c split h | ||||
|     $flag+v split v | ||||
| 
 | ||||
|     $flag+f         floating enable, border normal 1 | ||||
|     $flag+Shift+f   floating disable, border pixel 1 | ||||
|      | ||||
|     $alt+Next       border pixel 1      # Show window title | ||||
|     $alt+Prior      border normal 1     # Hide window title | ||||
| 
 | ||||
|     $flag+s         sticky toggle | ||||
| } | ||||
| 
 | ||||
| # Workspaces | ||||
| set { | ||||
|     $ws1 "1:1" | ||||
|     $ws2 "2:2" | ||||
|     $ws3 "3:3" | ||||
|     $ws4 "4:4" | ||||
|     $ws5 "5:5" | ||||
|     $ws6 "6:6" | ||||
|     $ws7 "7:7" | ||||
|     $ws8 "8:8" | ||||
|     $ws9 "9:9" | ||||
|     $ws10 "10:10" | ||||
|     $ws0 "0:¯\_(ツ)_/¯" | ||||
| } | ||||
| 
 | ||||
| workspace $ws0 # Move to this workspace on startup | ||||
| 
 | ||||
| bindsym { | ||||
|     $flag+ampersand     workspace $ws1 | ||||
|     $flag+eacute        workspace $ws2 | ||||
|     $flag+quotedbl      workspace $ws3 | ||||
|     $flag+apostrophe    workspace $ws4 | ||||
|     $flag+parenleft     workspace $ws5 | ||||
|     $flag+section       workspace $ws6 | ||||
|     $flag+egrave        workspace $ws7 | ||||
|     $flag+exclam        workspace $ws8 | ||||
|     $flag+ccedilla      workspace $ws9 | ||||
|     $flag+agrave        workspace $ws10 | ||||
|     $flag+parenright    workspace $ws0 | ||||
| 
 | ||||
|     $flag+Shift+ampersand   move container to workspace $ws1, workspace $ws1 | ||||
|     $flag+Shift+eacute      move container to workspace $ws2, workspace $ws2 | ||||
|     $flag+Shift+quotedbl    move container to workspace $ws3, workspace $ws3 | ||||
|     $flag+Shift+apostrophe  move container to workspace $ws4, workspace $ws4 | ||||
|     $flag+Shift+parenleft   move container to workspace $ws5, workspace $ws5 | ||||
|     $flag+Shift+section     move container to workspace $ws6, workspace $ws6 | ||||
|     $flag+Shift+egrave      move container to workspace $ws7, workspace $ws7 | ||||
|     $flag+Shift+exclam      move container to workspace $ws8, workspace $ws8 | ||||
|     $flag+Shift+ccedilla    move container to workspace $ws9, workspace $ws9 | ||||
|     $flag+Shift+agrave      move container to workspace $ws10, workspace $ws10 | ||||
|     $flag+Shift+parenright  move container to workspace $ws0, workspace $ws0 | ||||
| 
 | ||||
|     $flag+Control+h focus output 'eDP-1' | ||||
|     $flag+Control+j workspace prev_on_output | ||||
|     $flag+Control+k workspace next_on_output | ||||
|     $flag+Control+l focus output 'HDMI-A-1' | ||||
| 
 | ||||
|     $flag+Control+Down  focus output 'eDP-1' | ||||
|     $flag+Control+Right workspace prev_on_output | ||||
|     $flag+Control+Left  workspace next_on_output | ||||
|     $flag+Control+Up    focus output 'HDMI-A-1' | ||||
|     | ||||
|     $flag+Control+Shift+h   \ | ||||
|         move container to output 'eDP-1', focus output 'eDP-1' | ||||
|     $flag+Control+Shift+j   \ | ||||
|         move container to workspace prev_on_output, workspace prev_on_output | ||||
|     $flag+Control+Shift+k   \ | ||||
|         move container to workspace next_on_output, workspace next_on_output | ||||
|     $flag+Control+Shift+l   \ | ||||
|         move container to output 'HDMI-A-1', focus output 'HDMI-A-1' | ||||
|      | ||||
|     $flag+Control+Shift+Down    \ | ||||
|         move container to output 'eDP-1', focus output 'eDP-1' | ||||
|     $flag+Control+Shift+Left    \ | ||||
|         move container to workspace prev_on_output, workspace prev_on_output | ||||
|     $flag+Control+Shift+Right      \ | ||||
|         move container to workspace next_on_output, workspace next_on_output | ||||
|     $flag+Control+Shift+Up   \ | ||||
|         move container to output 'HDMI-A-1', focus output 'HDMI-A-1' | ||||
| } | ||||
| 
 | ||||
| # System | ||||
| bindsym --locked { | ||||
|     # Brightness | ||||
|     XF86MonBrightnessDown       exec brightnessctl -e s 5%- && $notify -b | ||||
|     XF86MonBrightnessUp         exec brightnessctl -e s +5% && $notify -b | ||||
| 
 | ||||
|     # Volume control | ||||
|     XF86AudioRaiseVolume        exec pulsemixer --change-volume +2 --max-volume 100 && $notify -v | ||||
|     XF86AudioLowerVolume        exec pulsemixer --change-volume -2 && $notify -v | ||||
|     XF86AudioMute               exec pulsemixer --toggle-mute && $notify -v | ||||
|     XF86AudioMicMute            exec pactl set-source-mute @DEFAULT_SOURCE@ toggle | ||||
| 
 | ||||
|     # Media control | ||||
|     F7                          exec playerctl play-pause | ||||
|     Shift+XF86AudioLowerVolume  exec playerctl previous | ||||
|     Shift+XF86AudioRaiseVolume  exec playerctl next | ||||
| } | ||||
| 
 | ||||
| # Special commands | ||||
| set $fzf ~/.scripts/fzf-jump | ||||
| bindsym { | ||||
|     # Reload sway | ||||
|     $alt+Shift+r    reload | ||||
| 
 | ||||
|     # Dialog to exit sway | ||||
|     $alt+Shift+e    exec swaynag -t warning -m 'Do you really want to exit sway?' \ | ||||
|         -B 'Yes, exit sway' 'swaymsg exit'   | ||||
| 
 | ||||
|     $flag+q kill                    # Kill focused window | ||||
|     $flag+Return exec $term         # Start a terminal | ||||
|     $flag+Delete exec swaylock      # Lockscreen | ||||
| 
 | ||||
|     # Start application launcher | ||||
|     $alt+space  exec $term --title 'FZF-Jump' -e $fzf/launcher.sh | ||||
|     # Window switcher | ||||
|     $alt+Tab    exec $term --title 'FZF-Jump' -e $fzf/standalone.sh $fzf/modules/windows.sh $fzf/modules/workspaces.sh | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue