Advertisement
Guest User

Untitled

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