171 lines
		
	
	
	
		
			5.2 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			171 lines
		
	
	
	
		
			5.2 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| ### Variables
 | |
| #include /etc/sway/config.d/*
 | |
| include ~/.config/sway/config.d/*
 | |
| #
 | |
| # 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
 | |
| set $term kitty
 | |
| set $menu rofi -show drun | xargs swaymsg exec --
 | |
| set $browser firefox
 | |
| set $wallpaper "~/pics/wp_vaporwave.jpg"
 | |
| set $wp_locked "~/pics/wp_vaporwave_blurred.jpg"
 | |
| 
 | |
| ### Output configuration
 | |
| #
 | |
| output * bg $wallpaper fill
 | |
| 
 | |
| ### Idle configuration
 | |
| #
 | |
| exec_always swayidle -w \
 | |
|          before-sleep 'swaylock -f -i $wp_locked --inside-color $base03'
 | |
|          # timeout 600 'swaylock -f -i $wp_locked --inside-color $base03' \
 | |
|          # timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
 | |
| #
 | |
| # lock screen after 600s (10min) of inactivity, then turn off displays after
 | |
| # another 300s (5min), and turn your screens back on when resumed.
 | |
| # It will also lock screen before your computer goes to sleep.
 | |
| 
 | |
| ### Input configuration
 | |
| #
 | |
| input "type:touchpad" {
 | |
|     dwt enabled
 | |
|     tap enabled
 | |
|     natural_scroll enabled
 | |
|     middle_emulation enabled
 | |
| }
 | |
| input "type:keyboard" {
 | |
|     xkb_layout "us"
 | |
|     #xkb_variant "altgr-intl"
 | |
|     xkb_options "compose:ralt"
 | |
| }
 | |
| 
 | |
| ### Key bindings
 | |
| #
 | |
| # Basics:
 | |
| #
 | |
| 	bindsym $mod+Backspace exec makoctl dismiss --all
 | |
| 	# Start applications
 | |
|     bindsym $mod+d exec $menu
 | |
| 	#bindsym $mod+b exec $browser
 | |
|     bindsym $mod+Return exec $term
 | |
|     bindsym $mod+Shift+q kill
 | |
| 
 | |
|     floating_modifier $mod normal
 | |
| 
 | |
|     bindsym $mod+Shift+c reload
 | |
|     bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
 | |
| 
 | |
| 	# Volume
 | |
| 	bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
 | |
| 	bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
 | |
| 	bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
 | |
| 	bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
 | |
| 
 | |
| 	# Control Brightness
 | |
| 	bindsym --locked XF86MonBrightnessDown exec light -T 0.72
 | |
| 	bindsym --locked XF86MonBrightnessUp exec light -T 1.4
 | |
| 	# bindsym --locked XF86MonBrightnessDown exec light -U 5
 | |
| 	# bindsym --locked XF86MonBrightnessUp exec light -A 5
 | |
| 
 | |
| 	# Take a screenshot
 | |
| 	bindsym $mod+p exec grim -g "$(slurp)" - | swappy -f -
 | |
| 	bindsym Print exec grim -g "$(slurp)"
 | |
| #
 | |
| # 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
 | |
| 
 | |
|     # 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
 | |
| #
 | |
| # Workspaces:
 | |
| #
 | |
|     # Switch to workspace
 | |
|     bindsym $mod+1 workspace number 1
 | |
|     bindsym $mod+2 workspace number 2
 | |
|     bindsym $mod+3 workspace number 3
 | |
|     bindsym $mod+4 workspace number 4
 | |
|     bindsym $mod+5 workspace number 5
 | |
|     bindsym $mod+6 workspace number 6
 | |
|     bindsym $mod+7 workspace number 7
 | |
|     bindsym $mod+8 workspace number 8
 | |
|     bindsym $mod+9 workspace number 9
 | |
|     bindsym $mod+0 workspace number 10
 | |
|     # Move focused container to workspace
 | |
|     bindsym $mod+Shift+1 move container to workspace number 1
 | |
|     bindsym $mod+Shift+2 move container to workspace number 2
 | |
|     bindsym $mod+Shift+3 move container to workspace number 3
 | |
|     bindsym $mod+Shift+4 move container to workspace number 4
 | |
|     bindsym $mod+Shift+5 move container to workspace number 5
 | |
|     bindsym $mod+Shift+6 move container to workspace number 6
 | |
|     bindsym $mod+Shift+7 move container to workspace number 7
 | |
|     bindsym $mod+Shift+8 move container to workspace number 8
 | |
|     bindsym $mod+Shift+9 move container to workspace number 9
 | |
|     bindsym $mod+Shift+0 move container to workspace number 10
 | |
|     # Note: workspaces can have any name you want, not just numbers.
 | |
|     # We just use 1-10 as the default.
 | |
|     bindsym $mod+m move workspace to output right
 | |
| #
 | |
| # Layout stuff:
 | |
| #
 | |
| 	for_window [class="PacketTracer"] floating enable
 | |
| 	for_window [class="VirtualBox"] floating enable
 | |
| 
 | |
|     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
 | |
| #
 | |
| # 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" {
 | |
|     bindsym $left resize shrink width 10px
 | |
|     bindsym $right resize grow width 10px
 | |
|     bindsym $up resize shrink height 10px
 | |
|     bindsym $down resize grow height 10px
 | |
| 
 | |
|     # Return to default mode
 | |
|     bindsym Return mode "default"
 | |
|     bindsym Escape mode "default"
 | |
| }
 | |
| bindsym $mod+r mode "resize"
 | |
| 
 | |
| #
 | |
| # Status Bar:
 | |
| #
 | |
| 
 | |
| bar swaybar_command waybar
 | |
| 
 | |
| default_border pixel
 | |
| gaps inner 20
 |