config 6.6 KB

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