Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

247 rader
7.9 KiB

  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: it's recommended that you pass the final command to sway
  19. #set $menu dmenu_path | dmenu | xargs swaymsg exec
  20. set $menu rofi -show combi
  21. ### Output configuration
  22. #
  23. # Default wallpaper (more resolutions are available in __DATADIR__/backgrounds/sway/)
  24. output * bg /home/levans/wallpaper.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. output eDP-1 scale 2 pos 0 0
  32. output DP-1 pos 1280 0
  33. ### Idle configuration
  34. #
  35. # Example configuration:
  36. #
  37. #exec swayidle \
  38. # timeout 300 'swaylock -c 000000' \
  39. # timeout 600 'swaymsg "output * dpms off"' \
  40. # resume 'swaymsg "output * dpms on"' \
  41. # before-sleep 'swaylock -c 000000'
  42. #
  43. # This will lock your screen after 300 seconds of inactivity, then turn off
  44. # your displays after another 600 seconds, and turn your screens back on when
  45. # resumed. It will also lock your screen before your computer goes to sleep.
  46. ### Input configuration
  47. #
  48. # Example configuration:
  49. #
  50. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  51. # dwt enabled
  52. # tap enabled
  53. # natural_scroll enabled
  54. # middle_emulation enabled
  55. # }
  56. #
  57. # You can get the names of your inputs by running: swaymsg -t get_inputs
  58. # Read `man 5 sway-input` for more information about this section.
  59. input "1267:8307:ELAN_Touchscreen" map_to_output eDP-1
  60. ### Key bindings
  61. #
  62. # Basics:
  63. #
  64. # start a terminal
  65. bindsym $mod+Return exec $term
  66. # kill focused window
  67. bindsym $mod+Shift+q kill
  68. # start your launcher
  69. bindsym $mod+x exec $menu
  70. # Drag floating windows by holding down $mod and left mouse button.
  71. # Resize them with right mouse button + $mod.
  72. # Despite the name, also works for non-floating windows.
  73. # Change normal to inverse to use left mouse button for resizing and right
  74. # mouse button for dragging.
  75. floating_modifier $mod normal
  76. # reload the configuration file
  77. bindsym $mod+Shift+c reload
  78. # exit sway (logs you out of your Wayland session)
  79. 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'
  80. #
  81. # Moving around:
  82. #
  83. # Move your focus around
  84. bindsym $mod+$left focus left
  85. bindsym $mod+$down focus down
  86. bindsym $mod+$up focus up
  87. bindsym $mod+$right focus right
  88. # or use $mod+[up|down|left|right]
  89. bindsym $mod+Left focus left
  90. bindsym $mod+Down focus down
  91. bindsym $mod+Up focus up
  92. bindsym $mod+Right focus right
  93. # _move_ the focused window with the same, but add Shift
  94. bindsym $mod+Shift+$left move left
  95. bindsym $mod+Shift+$down move down
  96. bindsym $mod+Shift+$up move up
  97. bindsym $mod+Shift+$right move right
  98. # ditto, with arrow keys
  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. #
  104. # Workspaces:
  105. #
  106. # switch to workspace
  107. bindsym $mod+ampersand workspace 1
  108. bindsym $mod+eacute workspace 2
  109. bindsym $mod+quotedbl workspace 3
  110. bindsym $mod+apostrophe workspace 4
  111. bindsym $mod+parenleft workspace 5
  112. bindsym $mod+minus workspace 6
  113. bindsym $mod+egrave workspace 7
  114. bindsym $mod+underscore workspace 8
  115. bindsym $mod+ccedilla workspace 9
  116. bindsym $mod+agrave workspace 10
  117. # move focused container to workspace
  118. bindsym $mod+Shift+ampersand move container to workspace 1
  119. bindsym $mod+Shift+eacute move container to workspace 2
  120. bindsym $mod+Shift+quotedbl move container to workspace 3
  121. bindsym $mod+Shift+apostrophe move container to workspace 4
  122. bindsym $mod+Shift+parenleft move container to workspace 5
  123. bindsym $mod+Shift+minus move container to workspace 6
  124. bindsym $mod+Shift+egrave move container to workspace 7
  125. bindsym $mod+Shift+underscore move container to workspace 8
  126. bindsym $mod+Shift+ccedilla move container to workspace 9
  127. bindsym $mod+Shift+agrave move container to workspace 10
  128. # Note: workspaces can have any name you want, not just numbers.
  129. # We just use 1-10 as the default.
  130. #
  131. # Layout stuff:
  132. #
  133. # You can "split" the current object of your focus with
  134. # $mod+b or $mod+v, for horizontal and vertical splits
  135. # respectively.
  136. bindsym $mod+b splith
  137. bindsym $mod+v splitv
  138. # Switch the current container between different layout styles
  139. bindsym $mod+s layout stacking
  140. bindsym $mod+w layout tabbed
  141. bindsym $mod+e layout toggle split
  142. # Make the current focus fullscreen
  143. bindsym $mod+f fullscreen
  144. # Toggle the current focus between tiling and floating mode
  145. bindsym $mod+Shift+space floating toggle
  146. # Swap focus between the tiling area and the floating area
  147. bindsym $mod+space focus mode_toggle
  148. # move focus to the parent container
  149. bindsym $mod+a focus parent
  150. #
  151. # Scratchpad:
  152. #
  153. # Sway has a "scratchpad", which is a bag of holding for windows.
  154. # You can send windows there and get them back later.
  155. # Move the currently focused window to the scratchpad
  156. bindsym $mod+Shift+equal move scratchpad
  157. # Show the next scratchpad window or hide the focused scratchpad window.
  158. # If there are multiple scratchpad windows, this command cycles through them.
  159. bindsym $mod+equal scratchpad show
  160. #
  161. # Resizing containers:
  162. #
  163. mode "resize" {
  164. # left will shrink the containers width
  165. # right will grow the containers width
  166. # up will shrink the containers height
  167. # down will grow the containers height
  168. bindsym $left resize shrink width 10px
  169. bindsym $down resize grow height 10px
  170. bindsym $up resize shrink height 10px
  171. bindsym $right resize grow width 10px
  172. # ditto, with arrow keys
  173. bindsym Left resize shrink width 10px
  174. bindsym Down resize grow height 10px
  175. bindsym Up resize shrink height 10px
  176. bindsym Right resize grow width 10px
  177. # return to default mode
  178. bindsym Return mode "default"
  179. bindsym Escape mode "default"
  180. }
  181. bindsym $mod+r mode "resize"
  182. #
  183. # Brightness and volume control
  184. #
  185. bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%
  186. bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%
  187. bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
  188. bindsym XF86MonBrightnessDown exec sudo ybacklight -dec 5
  189. bindsym XF86MonBrightnessUp exec sudo ybacklight -inc 5
  190. #
  191. # General shortcuts
  192. #
  193. bindsym --no-warn $mod+l exec swaylock -c 000000
  194. bindsym $mod+q exec firefox
  195. bindsym Print exec /home/levans/.local/bin/grim /home/levans/screenshot.png
  196. #
  197. # Look & colors
  198. #
  199. set $bg-color #2f343f
  200. set $inactive-bg-color #2f343f
  201. set $text-color #f3f4f5
  202. set $inactive-text-color #676E7D
  203. set $urgent-bg-color #E53935
  204. set $indicator-color #2f343f
  205. # window colors
  206. # border background text indicator child_border
  207. client.focused $bg-color $bg-color $text-color $indicator-color $bg-color
  208. client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color $bg-color
  209. client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $indicator-color $bg-color
  210. client.urgent $urgent-bg-color $urgent-bg-color $text-color $indicator-color $bg-color
  211. #
  212. # User programs
  213. #
  214. exec waybar
  215. exec nm-applet --indicator
  216. exec blueman-applet
  217. #exec /home/levans/.local/bin/monitor_accel
  218. #exec nextcloud