Advertisement
Guest User

Untitled

a guest
Jun 29th, 2025
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.70 KB | None | 0 0
  1. # Default config for sway
  2. #
  3. # Copy this to ~/.config/sway/config and edit it to your liking.
  4. #
  5. # Read `man 5 sway` for a complete reference.
  6.  
  7. ### Variables
  8. #
  9. # Logo key. Use Mod1 for Alt.
  10. set $mod Alt_L
  11. # Home row direction keys, like vim
  12. set $left h
  13. set $down j
  14. set $up k
  15. set $right l
  16. # Your preferred terminal emulator
  17. set $term ghostty
  18. # Your preferred application launcher
  19. set $menu fuzzel
  20.  
  21. ### Output configuration
  22. #
  23. # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
  24. output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  25. #
  26. # Example configuration:
  27. #
  28. # output HDMI-A-1 resolution 1920x1080 position 1920,0
  29. #
  30. # You can get the names of your outputs by running: swaymsg -t get_outputs
  31.  
  32. ### Idle configuration
  33. #
  34. # Example configuration:
  35. #
  36. # exec swayidle -w \
  37. # timeout 300 'swaylock -f -c 000000' \
  38. # timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
  39. # before-sleep 'swaylock -f -c 000000'
  40. #
  41. # This will lock your screen after 300 seconds of inactivity, then turn off
  42. # your displays after another 300 seconds, and turn your screens back on when
  43. # resumed. It will also lock your screen before your computer goes to sleep.
  44.  
  45. ### Input configuration
  46. #
  47. # Example configuration:
  48. #
  49. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  50. # dwt enabled
  51. # tap enabled
  52. # natural_scroll enabled
  53. # middle_emulation enabled
  54. # }
  55. #
  56. # You can get the names of your inputs by running: swaymsg -t get_inputs
  57. # Read `man 5 sway-input` for more information about this section.
  58.  
  59. ### Key bindings
  60. #
  61. # Basics:
  62. #
  63. # Start a terminal
  64. bindsym $mod+Return exec $term
  65.  
  66. # Kill focused window
  67. bindsym $mod+Shift+q kill
  68.  
  69. # Start your launcher
  70. bindsym $mod+d exec $menu
  71.  
  72. # Drag floating windows by holding down $mod and left mouse button.
  73. # Resize them with right mouse button + $mod.
  74. # Despite the name, also works for non-floating windows.
  75. # Change normal to inverse to use left mouse button for resizing and right
  76. # mouse button for dragging.
  77. floating_modifier $mod normal
  78.  
  79. # Reload the configuration file
  80. bindsym $mod+Shift+c reload
  81.  
  82. # Exit sway (logs you out of your Wayland session)
  83. 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'
  84. #
  85. # Moving around:
  86. #
  87. # Move your focus around
  88. bindsym $mod+$left focus left
  89. bindsym $mod+$down focus down
  90. bindsym $mod+$up focus up
  91. bindsym $mod+$right focus right
  92. # Or use $mod+[up|down|left|right]
  93. bindsym $mod+Left focus left
  94. bindsym $mod+Down focus down
  95. bindsym $mod+Up focus up
  96. bindsym $mod+Right focus right
  97.  
  98. # Move the focused window with the same, but add Shift
  99. bindsym $mod+Shift+$left move left
  100. bindsym $mod+Shift+$down move down
  101. bindsym $mod+Shift+$up move up
  102. bindsym $mod+Shift+$right move right
  103. # Ditto, with arrow keys
  104. bindsym $mod+Shift+Left move left
  105. bindsym $mod+Shift+Down move down
  106. bindsym $mod+Shift+Up move up
  107. bindsym $mod+Shift+Right move right
  108. #
  109. # Workspaces:
  110. #
  111. # Switch to workspace
  112. bindsym $mod+1 workspace number 1
  113. bindsym $mod+2 workspace number 2
  114. bindsym $mod+3 workspace number 3
  115. bindsym $mod+4 workspace number 4
  116. bindsym $mod+5 workspace number 5
  117. bindsym $mod+6 workspace number 6
  118. bindsym $mod+7 workspace number 7
  119. bindsym $mod+8 workspace number 8
  120. bindsym $mod+9 workspace number 9
  121. bindsym $mod+0 workspace number 10
  122. # Move focused container to workspace
  123. bindsym $mod+Shift+1 move container to workspace number 1
  124. bindsym $mod+Shift+2 move container to workspace number 2
  125. bindsym $mod+Shift+3 move container to workspace number 3
  126. bindsym $mod+Shift+4 move container to workspace number 4
  127. bindsym $mod+Shift+5 move container to workspace number 5
  128. bindsym $mod+Shift+6 move container to workspace number 6
  129. bindsym $mod+Shift+7 move container to workspace number 7
  130. bindsym $mod+Shift+8 move container to workspace number 8
  131. bindsym $mod+Shift+9 move container to workspace number 9
  132. bindsym $mod+Shift+0 move container to workspace number 10
  133. # Note: workspaces can have any name you want, not just numbers.
  134. # We just use 1-10 as the default.
  135. #
  136. # Layout stuff:
  137. #
  138. # You can "split" the current object of your focus with
  139. # $mod+b or $mod+v, for horizontal and vertical splits
  140. # respectively.
  141. bindsym $mod+b splith
  142. bindsym $mod+v splitv
  143.  
  144. # Switch the current container between different layout styles
  145. bindsym $mod+s layout stacking
  146. bindsym $mod+w layout tabbed
  147. bindsym $mod+e layout toggle split
  148.  
  149. # Make the current focus fullscreen
  150. bindsym $mod+f fullscreen
  151.  
  152. # Toggle the current focus between tiling and floating mode
  153. bindsym $mod+Shift+space floating toggle
  154.  
  155. # Swap focus between the tiling area and the floating area
  156. bindsym $mod+space focus mode_toggle
  157.  
  158. # Move focus to the parent container
  159. bindsym $mod+a focus parent
  160. #
  161. # Scratchpad:
  162. #
  163. # Sway has a "scratchpad", which is a bag of holding for windows.
  164. # You can send windows there and get them back later.
  165.  
  166. # Move the currently focused window to the scratchpad
  167. bindsym $mod+Shift+minus move scratchpad
  168.  
  169. # Show the next scratchpad window or hide the focused scratchpad window.
  170. # If there are multiple scratchpad windows, this command cycles through them.
  171. bindsym $mod+minus scratchpad show
  172. #
  173. # Resizing containers:
  174. #
  175. mode "resize" {
  176. # left will shrink the containers width
  177. # right will grow the containers width
  178. # up will shrink the containers height
  179. # down will grow the containers height
  180. bindsym $left resize shrink width 10px
  181. bindsym $down resize grow height 10px
  182. bindsym $up resize shrink height 10px
  183. bindsym $right resize grow width 10px
  184.  
  185. # Ditto, with arrow keys
  186. bindsym Left resize shrink width 10px
  187. bindsym Down resize grow height 10px
  188. bindsym Up resize shrink height 10px
  189. bindsym Right resize grow width 10px
  190.  
  191. # Return to default mode
  192. bindsym Return mode "default"
  193. bindsym Escape mode "default"
  194. }
  195. bindsym $mod+r mode "resize"
  196. #
  197. # Utilities:
  198. #
  199. # Special keys to adjust volume via PulseAudio
  200. bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
  201. bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
  202. bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
  203. bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
  204. # Special keys to adjust brightness via brightnessctl
  205. bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
  206. bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
  207. # Special key to take a screenshot with grim
  208. bindsym Print exec grimshot copy area
  209.  
  210.  
  211.  
  212. #
  213. # Status Bar:
  214. #
  215. # Read `man 5 sway-bar` for more information about this section.
  216. bar {
  217. position top
  218.  
  219. # When the status_command prints a new line to stdout, swaybar updates.
  220. # The default just shows the current date and time.
  221. status_command while date +'%Y-%m-%d %X'; do sleep 1; done
  222.  
  223. colors {
  224. statusline #ffffff
  225. background #323232
  226. inactive_workspace #32323200 #32323200 #5c5c5c
  227. }
  228. }
  229.  
  230. exec_always {
  231. export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/$USER/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share/applications
  232.  
  233. }
  234.  
  235.  
  236.  
  237. include /etc/sway/config.d/*
  238.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement