config 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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. ### Variables
  7. #
  8. # Logo key. Use Mod1 for Alt.
  9. set $mod Mod4
  10. # Home row direction keys, like vim
  11. set $left h
  12. set $down j
  13. set $up k
  14. set $right l
  15. # Your preferred terminal emulator
  16. set $term alacritty
  17. # Your preferred application launcher
  18. # Note: pass the final command to swaymsg so that the resulting window can be opened
  19. # on the original workspace that the command was run on.
  20. set $menu dmenu_path | dmenu | xargs swaymsg exec --
  21. ### Output configuration
  22. #
  23. # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
  24. # resumed. It will also lock your screen before your computer goes to sleep.
  25. ### Input configuration
  26. #
  27. # Example configuration:
  28. #
  29. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  30. # dwt enabled
  31. # tap enabled
  32. # natural_scroll enabled
  33. # middle_emulation enabled
  34. # }
  35. #
  36. # You can get the names of your inputs by running: swaymsg -t get_inputs
  37. # Read `man 5 sway-input` for more information about this section.
  38. ### Key bindings
  39. #
  40. # Basics:
  41. #
  42. # Start a terminal
  43. bindsym $mod+Return exec $term
  44. # Kill focused window
  45. bindsym $mod+Shift+q kill
  46. # Start your launcher
  47. bindsym $mod+d exec $menu
  48. # Drag floating windows by holding down $mod and left mouse button.
  49. # Resize them with right mouse button + $mod.
  50. # Despite the name, also works for non-floating windows.
  51. # Change normal to inverse to use left mouse button for resizing and right
  52. # mouse button for dragging.
  53. floating_modifier $mod normal
  54. # Reload the configuration file
  55. bindsym $mod+Shift+c reload
  56. # Exit sway (logs you out of your Wayland session)
  57. 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'
  58. #
  59. # Moving around:
  60. #
  61. # Move your focus around
  62. bindsym $mod+Shift+$left focus left
  63. bindsym $mod+Shift+$down focus down
  64. bindsym $mod+Shift+$up focus up
  65. bindsym $mod+Shift+$right focus right
  66. # Or use $mod+[up|down|left|right]
  67. bindsym $mod+Shift+Left focus left
  68. bindsym $mod+Shift+Down focus down
  69. bindsym $mod+Shift+Up focus up
  70. bindsym $mod+Shift+Right focus right
  71. # Move the focused window with the same, but add Shift
  72. # bindsym $mod+Shift+$left move left
  73. # bindsym $mod+Shift+$down move down
  74. # bindsym $mod+Shift+$up move up
  75. # bindsym $mod+Shift+$right move right
  76. # Ditto, with arrow keys
  77. # bindsym $mod+Shift+Left move left
  78. # bindsym $mod+Shift+Down move down
  79. # bindsym $mod+Shift+Up move up
  80. # bindsym $mod+Shift+Right move right
  81. #
  82. # Workspaces:
  83. #
  84. # Switch to workspace
  85. bindsym $mod+1 workspace number 1
  86. bindsym $mod+2 workspace number 2
  87. bindsym $mod+3 workspace number 3
  88. bindsym $mod+4 workspace number 4
  89. bindsym $mod+5 workspace number 5
  90. bindsym $mod+6 workspace number 6
  91. bindsym $mod+7 workspace number 7
  92. bindsym $mod+8 workspace number 8
  93. bindsym $mod+9 workspace number 9
  94. bindsym $mod+0 workspace number 10
  95. bindsym $mod+Left workspace prev
  96. bindsym $mod+Right workspace next
  97. # Move focused container to workspace
  98. bindsym $mod+Shift+1 move container to workspace number 1
  99. bindsym $mod+Shift+2 move container to workspace number 2
  100. bindsym $mod+Shift+3 move container to workspace number 3
  101. bindsym $mod+Shift+4 move container to workspace number 4
  102. bindsym $mod+Shift+5 move container to workspace number 5
  103. bindsym $mod+Shift+6 move container to workspace number 6
  104. bindsym $mod+Shift+7 move container to workspace number 7
  105. bindsym $mod+Shift+8 move container to workspace number 8
  106. bindsym $mod+Shift+9 move container to workspace number 9
  107. bindsym $mod+Shift+0 move container to workspace number 10
  108. # Note: workspaces can have any name you want, not just numbers.
  109. # We just use 1-10 as the default.
  110. #
  111. # Layout stuff:
  112. #
  113. # You can "split" the current object of your focus with
  114. # $mod+b or $mod+v, for horizontal and vertical splits
  115. # respectively.
  116. bindsym $mod+b splith
  117. bindsym $mod+v splitv
  118. # Switch the current container between different layout styles
  119. bindsym $mod+s layout stacking
  120. bindsym $mod+w layout tabbed
  121. bindsym $mod+e layout toggle split
  122. # Make the current focus fullscreen
  123. bindsym $mod+f fullscreen
  124. # Toggle the current focus between tiling and floating mode
  125. bindsym $mod+Shift+space floating toggle
  126. # Swap focus between the tiling area and the floating area
  127. bindsym $mod+space focus mode_toggle
  128. # Move focus to the parent container
  129. bindsym $mod+a focus parent
  130. #
  131. # Scratchpad:
  132. #
  133. # Sway has a "scratchpad", which is a bag of holding for windows.
  134. # You can send windows there and get them back later.
  135. # Move the currently focused window to the scratchpad
  136. bindsym $mod+Shift+minus move scratchpad
  137. # Show the next scratchpad window or hide the focused scratchpad window.
  138. # If there are multiple scratchpad windows, this command cycles through them.
  139. bindsym $mod+minus scratchpad show
  140. #
  141. # Resizing containers:
  142. #
  143. mode "resize" {
  144. # left will shrink the containers width
  145. # right will grow the containers width
  146. # up will shrink the containers height
  147. # down will grow the containers height
  148. bindsym $left resize shrink width 10px
  149. bindsym $down resize grow height 10px
  150. bindsym $up resize shrink height 10px
  151. bindsym $right resize grow width 10px
  152. # Ditto, with arrow keys
  153. bindsym Left resize shrink width 10px
  154. bindsym Down resize grow height 10px
  155. bindsym Up resize shrink height 10px
  156. bindsym Right resize grow width 10px
  157. # Return to default mode
  158. bindsym Return mode "default"
  159. bindsym Escape mode "default"
  160. }
  161. bindsym $mod+r mode "resize"
  162. #
  163. # Status Bar:
  164. #
  165. # Read `man 5 sway-bar` for more information about this section.
  166. bar {
  167. position top
  168. # When the status_command prints a new line to stdout, swaybar updates.
  169. # The default just shows the current date and time.
  170. status_command while date +[$(cat /sys/class/power_supply/BAT0/capacity)%]'[%Y-%m-%d %I:%M:%S %p]'; do sleep 1; done
  171. colors {
  172. statusline #ffffff
  173. background #323232
  174. inactive_workspace #32323200 #32323200 #5c5c5c
  175. }
  176. }
  177. include /etc/sway/config.d/*
  178. output "*" bg ~/Pictures/wallpapers/wallpaper.jpeg fill