Alucard

sway

Mar 15th, 2021
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.45 KB | None | 0 0
  1. ### Variables
  2.  
  3. set $mod Mod1
  4. set $term termite
  5. set $screenshot grim ~/Pictures/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
  6. set $screenclip slurp | grim -g - ~/Pictures/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png
  7. set $menu wofi --show run --allow-images --exec-search --prompt "Run Command" | xargs swaymsg exec --
  8. set $appmenu wofi --show drun --prompt "Application Launcher" | xargs swaymsg exec --
  9.  
  10. ### Output configuration
  11.  
  12. output HDMI-A-1 bg /usr/share/backgrounds/sway/arch.png fill
  13. output HDMI-A-2 bg /usr/share/backgrounds/sway/arch.png fill
  14. output HDMI-A-1 resolution 1920x1080 position 1920,0 transform 90 subpixel rgb
  15. #output HDMI-A-2 resolution 3840x2160 position 3840,0 subpixel rgb
  16.  
  17. ### Idle configuration
  18.  
  19. exec swayidle -w \
  20. timeout 500 'swaylock -f -c 000000' \
  21. timeout 510 'swaymsg "output * dpms off"' \
  22. resume 'swaymsg "output * dpms on"' \
  23. before-sleep 'swaylock -f -c 000000'
  24.  
  25. ### Input configuration
  26.  
  27. input 9390:8211:RAPOO_Rapoo_2.4G_Wireless_Device {
  28. xkb_layout hu
  29. xkb_capslock disable
  30. }
  31.  
  32. input 1133:8209:Logitech_K520 {
  33. xkb_model logicd
  34. xkb_layout hu
  35. xkb_capslock disable
  36. xkb_numlock enable
  37. }
  38.  
  39. ### Key bindings
  40.  
  41. ## Basics:
  42.  
  43. # Start a terminal
  44. bindsym $mod+Return exec $term
  45.  
  46. # Kill focused window
  47. bindsym $mod+Shift+q kill
  48.  
  49. # Start your launcher
  50. bindsym $mod+d exec $menu
  51. bindsym $mod+Shift+d exec $appmenu
  52.  
  53. # Reload the configuration file
  54. bindsym $mod+Shift+c reload
  55.  
  56. # Log out, Reboot, Poweroff
  57.  
  58. mode "(L)ogout, (R)eboot, (P)oweroff" {
  59.  
  60. bindsym l exit
  61. bindsym r exec systemctl reboot
  62. bindsym p exec systemctl poweroff
  63.  
  64. # Return to default mode
  65. bindsym Return mode "default"
  66. bindsym Escape mode "default"
  67. }
  68. bindsym $mod+Shift+e mode "(L)ogout, (R)eboot, (P)oweroff"
  69.  
  70. ## Moving around:
  71.  
  72. # Move your focus around
  73.  
  74. bindsym $mod+Left focus left
  75. bindsym $mod+Down focus down
  76. bindsym $mod+Up focus up
  77. bindsym $mod+Right focus right
  78.  
  79. # Move the focused window with the same, but add Shift
  80.  
  81. bindsym $mod+Shift+Left move left
  82. bindsym $mod+Shift+Down move down
  83. bindsym $mod+Shift+Up move up
  84. bindsym $mod+Shift+Right move right
  85.  
  86. ## Workspaces:
  87.  
  88. # Switch to workspace
  89. bindsym $mod+1 workspace number 1
  90. bindsym $mod+2 workspace number 2
  91. bindsym $mod+3 workspace number 3
  92. bindsym $mod+4 workspace number 4
  93. bindsym $mod+5 workspace number 5
  94.  
  95. # Move focused container to workspace
  96. bindsym $mod+Shift+1 move container to workspace number 1
  97. bindsym $mod+Shift+2 move container to workspace number 2
  98. bindsym $mod+Shift+3 move container to workspace number 3
  99. bindsym $mod+Shift+4 move container to workspace number 4
  100. bindsym $mod+Shift+5 move container to workspace number 5
  101.  
  102. # Orientation for new workspaces
  103. default_orientation vertical
  104.  
  105. ## Layout stuff
  106.  
  107. # You can "split" the current object of your focus with
  108. bindsym $mod+b splith
  109. bindsym $mod+v splitv
  110.  
  111. # Switch the current container between different layout styles
  112. bindsym $mod+s layout stacking
  113. bindsym $mod+w layout tabbed
  114. bindsym $mod+e layout toggle split
  115.  
  116. # Make the current focus fullscreen
  117. bindsym $mod+f fullscreen
  118.  
  119. # Toggle floating/tiling
  120. bindsym $mod+t floating toggle
  121.  
  122. # Toggle the current focus between tiling and floating mode
  123. bindsym $mod+Shift+space floating toggle
  124.  
  125. # Swap focus between the tiling area and the floating area
  126. bindsym $mod+space focus mode_toggle
  127.  
  128. # Move focus to the parent container
  129. bindsym $mod+a focus parent
  130.  
  131. # Floating modifier
  132. floating_modifier $mod normal
  133.  
  134. ## Window config
  135.  
  136. #for_window [app_id=pcmanfm] floating enable
  137. for_window [app_id=pavucontrol] floating enable
  138. for_window [title="feh"] floating enable
  139. for_window [title="imv"] floating enable
  140. #for_window [app_id=".*"] border pixel
  141.  
  142. ## Scratchpad
  143.  
  144. # Move the currently focused window to the scratchpad
  145. bindsym $mod+Shift+minus move scratchpad
  146.  
  147. # Show the next scratchpad window or hide the focused scratchpad window.
  148. bindsym $mod+minus scratchpad show
  149.  
  150. ## Resizing containers
  151.  
  152. # Resize window
  153.  
  154. mode "resize" {
  155.  
  156. # Resizing 1 px
  157. bindsym $mod+Ctrl+Right resize shrink width 10 px
  158. bindsym $mod+Ctrl+Up resize grow height 10 px
  159. bindsym $mod+Ctrl+Down resize shrink height 10 px
  160. bindsym $mod+Ctrl+Left resize grow width 10 px
  161.  
  162. # Resizing 10 px
  163. bindsym $mod+Ctrl+Shift+Right resize shrink width 1 px
  164. bindsym $mod+Ctrl+Shift+Up resize grow height 1 px
  165. bindsym $mod+Ctrl+Shift+Down resize shrink height 1 px
  166. bindsym $mod+Ctrl+Shift+Left resize grow width 1 px
  167.  
  168. # Return to default mode
  169. bindsym Return mode "default"
  170. bindsym Escape mode "default"
  171. }
  172. bindsym $mod+r mode "resize"
  173.  
  174. ## Status Bar
  175.  
  176. bar {
  177. swaybar_command waybar
  178. }
  179.  
  180. ### Appearance
  181.  
  182. ## Color
  183.  
  184. # class border bground text indicator child_border
  185. client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4
  186. client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
  187. client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
  188. client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
  189. client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
  190. client.background #F8F8F2
  191.  
  192. ## Font
  193.  
  194. font pango:Hack 10
  195.  
  196. ## Theme
  197.  
  198. set $gnome-schema org.gnome.desktop.interface
  199.  
  200. exec_always {
  201. gsettings set $gnome-schema gtk-theme 'Dracula'
  202. gsettings set $gnome-schema icon-theme 'Dracula'
  203. gsettings set $gnome-schema cursor-theme 'Your cursor Theme'
  204. gsettings set $gnome-schema font-name 'Roboto 10'
  205. }
  206.  
  207. ## Borders
  208.  
  209. default_border pixel 2
  210. default_floating_border pixel 2
  211. hide_edge_borders smart
  212. smart_borders on
  213.  
  214. ## Gaps
  215.  
  216. gaps inner 6
  217. gaps outer 6
  218.  
  219. ### Modes
  220.  
  221. ## Screenshot
  222.  
  223. bindsym $mod+P exec $screenshot
  224. bindsym $mod+Shift+P exec $screenclip
  225.  
  226. ## Run services
  227.  
  228. exec wl-paste -t text --watch clipman store
  229. #exec mako
  230.  
  231. ## Multimedia
  232.  
  233. bindsym --locked XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%
  234. bindsym --locked XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%
  235. bindsym --locked XF86AudioMute exec --no-startup-id pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle
  236. bindsym --locked XF86AudioPlay exec playerctl play-pause
  237. bindsym --locked XF86AudioNext exec playerctl next
  238. bindsym --locked XF86AudioPrev exec playerctl previous
  239.  
  240. ## Custom keybindings
  241.  
  242. bindsym $mod+F1 exec chromium
  243.  
  244. #xwayland disabled
  245.  
  246. include /etc/sway/config.d/*
Advertisement
Add Comment
Please, Sign In to add comment