lynnfavor

Untitled

Jan 25th, 2023
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.34 KB | None | 0 0
  1.  
  2. # Config for sway
  3. #
  4. # Read `man 5 sway` for a complete reference.
  5.  
  6. # user config directory
  7.  
  8. # only enable this if every app you use is compatible with wayland
  9. # xwayland disable
  10. # Default config for sway
  11. #
  12. # Copy this to ~/.config/sway/config and edit it to your liking.
  13. #
  14. # Read `man 5 sway` for a complete reference.
  15.  
  16. ### Variables
  17. #
  18. # Logo key. Use Mod1 for Alt.
  19. set $mod Mod4
  20. # Home row direction keys, like vim
  21. set $left h
  22. set $down j
  23. set $up k
  24. set $right l
  25. # Your preferred terminal emulator
  26. set $term alacritty
  27. # Your preferred application launcher
  28. # Note: pass the final command to swaymsg so that the resulting window can be opened
  29. # on the original workspace that the command was run on.
  30. #set $menu dmenu_path | dmenu | xargs swaymsg exec --
  31. set $menu wofi -c ~/.config/wofi/config -I
  32.  
  33.  
  34. ### Output configuration
  35. #
  36. # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
  37. #output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  38. output * bg $HOME/.config/garuda/garuda-wallpapers/src/garuda-wallpapers/Animated.png fill
  39.  
  40.  
  41. #
  42. # Example configuration:
  43. #
  44. # output HDMI-A-1 resolution 1920x1080 position 1920,0
  45. #
  46. # You can get the names of your outputs by running: swaymsg -t get_outputs
  47.  
  48. ### Idle configuration
  49. #
  50. # Example configuration:
  51. #
  52. # exec swayidle -w \
  53. # timeout 300 'swaylock -f -c 000000' \
  54. # timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
  55. # before-sleep 'swaylock -f -c 000000'
  56. #
  57. # This will lock your screen after 300 seconds of inactivity, then turn off
  58. # your displays after another 300 seconds, and turn your screens back on when
  59. # resumed. It will also lock your screen before your computer goes to sleep.
  60.  
  61. ### Input configuration
  62. #
  63. # Example configuration:
  64. #
  65. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  66. # dwt enabled
  67. # tap enabled
  68. # natural_scroll enabled
  69. # middle_emulation enabled
  70. # }
  71. #
  72. # You can get the names of your inputs by running: swaymsg -t get_inputs
  73. # Read `man 5 sway-input` for more information about this section.
  74.  
  75. ### Key bindings
  76. #
  77. # Basics:
  78. #
  79. # Start a terminal
  80. bindsym $mod+Return exec $term
  81.  
  82. # Kill focused window
  83. bindsym $mod+q kill
  84.  
  85. # Start your launcher
  86. bindsym $mod+d exec $menu
  87.  
  88. # Drag floating windows by holding down $mod and left mouse button.
  89. # Resize them with right mouse button + $mod.
  90. # Despite the name, also works for non-floating windows.
  91. # Change normal to inverse to use left mouse button for resizing and right
  92. # mouse button for dragging.
  93. floating_modifier $mod normal
  94.  
  95. # Reload the configuration file
  96. bindsym $mod+Shift+r reload
  97.  
  98. # Exit sway (logs you out of your Wayland session)
  99. #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'
  100. set $powermenu nwgbar
  101. bindsym $mod+Shift+e exec $powermenu
  102.  
  103. #
  104. # Moving around:
  105. #
  106. # Move your focus around
  107. #bindsym $mod+$left focus left
  108. #bindsym $mod+$down focus down
  109. #bindsym $mod+$up focus up
  110. #bindsym $mod+$right focus right
  111. # Or use $mod+[up|down|left|right]
  112. bindsym $mod+Left focus left
  113. bindsym $mod+Down focus down
  114. bindsym $mod+Up focus up
  115. bindsym $mod+Right focus right
  116.  
  117. # Move the focused window with the same, but add Shift
  118. #bindsym $mod+Shift+$left move left
  119. #bindsym $mod+Shift+$down move down
  120. #bindsym $mod+Shift+$up move up
  121. #bindsym $mod+Shift+$right move right
  122. # Ditto, with arrow keys
  123. bindsym $mod+Shift+Left move left
  124. bindsym $mod+Shift+Down move down
  125. bindsym $mod+Shift+Up move up
  126. bindsym $mod+Shift+Right move right
  127.  
  128. # Workspaces:
  129.  
  130. # icons can be found at the nerd fonts cheatsheet https://www.nerdfonts.com/cheat-sheet
  131. # Switch to workspace
  132. bindsym $mod+1 workspace number 1
  133. bindsym $mod+2 workspace number 2
  134. bindsym $mod+3 workspace number 3
  135. bindsym $mod+4 workspace number 4
  136. bindsym $mod+5 workspace number 5
  137. bindsym $mod+6 workspace number 6
  138. bindsym $mod+7 workspace number 7
  139. bindsym $mod+8 workspace number 8
  140. bindsym $mod+9 workspace number 9
  141. bindsym $mod+0 workspace 
  142. # Move focused container to workspace
  143. bindsym $mod+Shift+1 move container to workspace number 1
  144. bindsym $mod+Shift+2 move container to workspace number 2
  145. bindsym $mod+Shift+3 move container to workspace number 3
  146. bindsym $mod+Shift+4 move container to workspace number 4
  147. bindsym $mod+Shift+5 move container to workspace number 5
  148. bindsym $mod+Shift+6 move container to workspace number 6
  149. bindsym $mod+Shift+7 move container to workspace number 7
  150. bindsym $mod+Shift+8 move container to workspace number 8
  151. bindsym $mod+Shift+9 move container to workspace number 9
  152. bindsym $mod+Shift+0 move container to workspace number 10
  153. # Note: workspaces can have any name you want, not just numbers.
  154. # We just use 1-10 as the default.
  155.  
  156. # Layout stuff:
  157.  
  158. # You can "split" the current object of your focus with
  159. # $mod+b or $mod+v, for horizontal and vertical splits
  160. # respectively.
  161. bindsym $mod+h splith
  162. bindsym $mod+v splitv
  163.  
  164. # Switch the current container between different layout styles
  165. bindsym $mod+s layout stacking
  166. #bindsym $mod+w layout tabbed
  167. bindsym $mod+e layout toggle split
  168.  
  169. # Make the current focus fullscreen
  170. bindsym $mod+m fullscreen
  171.  
  172. # Toggle the current focus between tiling and floating mode
  173. bindsym $mod+Shift+space floating toggle
  174.  
  175. # Swap focus between the tiling area and the floating area
  176. bindsym $mod+space focus mode_toggle
  177.  
  178. # Move focus to the parent container
  179. bindsym $mod+a focus parent
  180.  
  181. # Scratchpad:
  182.  
  183. # Sway has a "scratchpad", which is a bag of holding for windows.
  184. # You can send windows there and get them back later.
  185.  
  186. # Move the currently focused window to the scratchpad
  187. bindsym $mod+Shift+minus move scratchpad
  188.  
  189. # Show the next scratchpad window or hide the focused scratchpad window.
  190. # If there are multiple scratchpad windows, this command cycles through them.
  191. bindsym $mod+minus scratchpad show
  192.  
  193. # Resizing containers:
  194.  
  195. mode "resize" {
  196. # left will shrink the containers width
  197. # right will grow the containers width
  198. # up will shrink the containers height
  199. # down will grow the containers height
  200. #bindsym $left resize shrink width 10px
  201. #bindsym $down resize grow height 10px
  202. #bindsym $up resize shrink height 10px
  203. #bindsym $right resize grow width 10px
  204.  
  205. # Ditto, with arrow keys
  206. bindsym Left resize shrink width 10px
  207. bindsym Down resize grow height 10px
  208. bindsym Up resize shrink height 10px
  209. bindsym Right resize grow width 10px
  210.  
  211. # Return to default mode
  212. bindsym Return mode "default"
  213. bindsym Escape mode "default"
  214. }
  215.  
  216. bindsym $mod+r mode "resize"
  217.  
  218. # Resize floating windows with mouse scroll:
  219. bindsym --whole-window --border $mod+button4 resize shrink height 5 px or 5 ppt
  220. bindsym --whole-window --border $mod+button5 resize grow height 5 px or 5 ppt
  221. bindsym --whole-window --border $mod+shift+button4 resize shrink width 5 px or 5 ppt
  222. bindsym --whole-window --border $mod+shift+button5 resize grow width 5 px or 5 ppt
  223.  
  224.  
  225. #
  226. # Volume
  227. #
  228. bindsym XF86AudioRaiseVolume exec pamixer -ui 2 && pamixer --get-volume > $SWAYSOCK.wob
  229. bindsym XF86AudioLowerVolume exec pamixer -ud 2 && pamixer --get-volume > $SWAYSOCK.wob
  230. bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) || pamixer --get-volume > $SWAYSOCK.wob
  231.  
  232. #
  233. # Player
  234. #
  235. bindsym XF86AudioPlay exec playerctl play
  236. bindsym XF86AudioPause exec playerctl pause
  237. bindsym XF86AudioNext exec playerctl next
  238. bindsym XF86AudioPrev exec playerctl previous
  239. #
  240. # Backlight
  241. #
  242. bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob
  243. bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob
  244. #
  245. # App shortcuts
  246. #
  247. bindsym $mod+f exec thunar
  248. #bindsym $mod+o exec /usr/bin/google-chrome-stable
  249.  
  250. bindsym $mod+w exec /usr/bin/google-chrome-stable
  251. #
  252. # Screenshots
  253. #
  254. #bindsym print exec /usr/share/sway/scripts/grimshot --notify save output
  255. bindsym Shift+print exec ~/.config/sway/scripts/screenshot.sh
  256. bindsym Alt+print exec /usr/share/sway/scripts/grimshot --notify copy area
  257.  
  258. # DONT SHOW THIS BAR FOR GARUDA SWAY
  259. # Status Bar:
  260.  
  261. # Read `man 5 sway-bar` for more information about this section.
  262. # bar {
  263. # position top
  264.  
  265. # # When the status_command prints a new line to stdout, swaybar updates.
  266. # # The default just shows the current date and time.
  267. # status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
  268.  
  269. # colors {
  270. # statusline #ffffff
  271. # background #323232
  272. # inactive_workspace #32323200 #32323200 #5c5c5c
  273. # }
  274. # }
  275.  
  276.  
  277. include $HOME/.config/sway/config.d/*
  278.  
  279.  
  280. output HDMI-A-1 mode [email protected] position 0,0
  281.  
  282. #exec wlsunset -l 50 -L 14
  283. exec wlsunset -t 3000
  284.  
  285. bindsym $mod+Tab workspace next
  286. bindsym $mod+Shift+Tab workspace prev
  287.  
  288.  
  289. for_window [app_id="flameshot"] floating enable, fullscreen disable, move absolute position 0 0, border pixel 0
  290.  
  291. bindsym print exec flameshot gui
  292.  
  293.  
  294.  
Advertisement
Add Comment
Please, Sign In to add comment