arc891

Hyprland config flles

May 2nd, 2024 (edited)
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.75 KB | Software | 0 0
  1. $ cd ~/.config/hypr/
  2. ------------------------------------------------------------------------------
  3. $ cat hyprland.conf
  4. # Source a file (multi-file configs)
  5. source = ~/.config/hypr/exec.conf
  6. source = ~/.config/hypr/system.conf
  7. source = ~/.config/hypr/windowrules.conf
  8. source = ~/.config/hypr/binds.conf
  9. source = ~/.config/hypr/monitors.conf
  10.  
  11. ------------------------------------------------------------------------------
  12. $ cat exec.conf
  13. # Execute your favorite apps at launch
  14. exec-once = ~/.config/hypr/scripts/xdg-portal-hyprland # Make sure the correct portal is running
  15. exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Wayland magic (screen sharing etc.)
  16. exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # More wayland magic (screen sharing etc.)
  17. exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # used for user sudo graphical elevation
  18. # exec-once = pulseaudio --start # Start the correct audio client
  19. exec-once = waybar # The top bar
  20. exec-once = polychromatic-tray-applet # polychromatic app
  21. exec-once = blueman-applet # Systray app for BT
  22. exec-once = nm-applet --indicator # Systray app for Network/Wifi
  23. exec-once = /usr/bin/greenclip daemon # Rofi Clipboard app
  24. exec-once = swww-daemon # Background images daemon
  25. exec-once = ~/.scripts/change_bg.sh # Run random background script
  26. # exec-once = ~/.config/hypr/scripts/bgaction # Sets the background based on theme
  27. exec = ~/.scripts/random_bg.sh # Changes the background to a random bg
  28. exec = ~/.config/hypr/scripts/set-monitor-conf # Set link to correct monitor conf file sourced at bottom
  29.  
  30.  
  31. ------------------------------------------------------------------------------
  32. $ cat system.conf
  33. # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
  34. input {
  35. kb_layout = us
  36. kb_variant =
  37. kb_model =
  38. kb_options =
  39. kb_rules =
  40.  
  41. follow_mouse = 1
  42.  
  43. touchpad {
  44. natural_scroll = no
  45. }
  46.  
  47. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
  48. }
  49.  
  50. general {
  51. # See https://wiki.hyprland.org/Configuring/Variables/ for more
  52.  
  53. gaps_in = 5
  54. gaps_out = 10
  55. border_size = 2
  56. #col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
  57. col.active_border=rgb(cdd6f4)
  58. col.inactive_border = rgba(595959aa)
  59.  
  60. layout = dwindle
  61. }
  62.  
  63. misc {
  64. disable_hyprland_logo = yes
  65. }
  66.  
  67. decoration {
  68. # See https://wiki.hyprland.org/Configuring/Variables/ for more
  69.  
  70. rounding = 5
  71.  
  72. blur {
  73. enabled = true
  74. size = 7
  75. passes = 4
  76. new_optimizations = true
  77. }
  78.  
  79. active_opacity = 0.9
  80. inactive_opacity = 0.8
  81.  
  82. blurls = lockscreen
  83.  
  84. drop_shadow = yes
  85. shadow_range = 4
  86. shadow_render_power = 3
  87. col.shadow = rgba(1a1a1aee)
  88. }
  89.  
  90. animations {
  91. enabled = yes
  92.  
  93. # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
  94. bezier = myBezier, 0.10, 0.9, 0.1, 1.05
  95.  
  96. animation = windows, 1, 10, myBezier, slide
  97. animation = windowsOut, 1, 7, myBezier, slide
  98. animation = border, 1, 10, default
  99. animation = fade, 1, 7, default
  100. animation = workspaces, 1, 6, default
  101. }
  102.  
  103. dwindle {
  104. # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
  105. pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
  106. preserve_split = yes # you probably want this
  107. }
  108.  
  109. master {
  110. # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
  111. new_is_master = true
  112. }
  113.  
  114. gestures {
  115. # See https://wiki.hyprland.org/Configuring/Variables/ for more
  116. workspace_swipe = on
  117. workspace_swipe_fingers = 3
  118. }
  119.  
  120. group {
  121. groupbar {
  122. #gradients = false
  123. #height = 20
  124.  
  125. }
  126. }
  127.  
  128. # Example per-device config
  129. # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
  130. device {
  131. name = elan0688:00-04f3:320b-touchpad
  132. sensitivity = 0.2
  133. }
  134. ------------------------------------------------------------------------------
  135.  
  136. $ cat windowrules.conf
  137. # Example windowrule v1
  138. windowrule = float, ^(kitty)$
  139. windowrule = float,^(pavucontrol)$
  140. windowrule = float,^(blueman-manager)$
  141. windowrule = float,^(nm-connection-editor)$
  142. windowrule = float,^(thunar)$
  143. windowrule = float, title:^(btop)$
  144. windowrule = float, title:^(update-sys)$
  145. windowrule = float, title:^(eureka)$
  146. windowrule = tile, class:^(Google-chrome)$
  147.  
  148. # Example windowrule v2
  149. # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
  150. # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
  151. # rules below would make the specific app transparent
  152. windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
  153. windowrulev2 = move 25% 25%,class:^(kitty)$
  154. windowrulev2 = size 50% 50%,class:^(kitty)$
  155. windowrulev2 = move 42% 40%,class:^(VirtualBoxVM)$ # VirtualBox pop-up windows
  156. windowrulev2 = animation popin,class:^(kitty)$ #,title:^(update-sys)$
  157. windowrulev2 = animation popin,class:^(thunar)$
  158. windowrulev2 = opacity 0.8 0.8,class:^(thunar)$
  159. windowrulev2 = opacity 0.8 0.8,class:^(Code)$
  160. windowrulev2 = opacity 0.85 override 0.85 override,class:^(Spotify)$
  161. windowrulev2 = opacity 1 override 1 override,class:^(Google-chrome)$
  162. windowrulev2 = opacity 1 override 1 override,class:^(Chromium)$
  163. windowrulev2 = animation popin,class:^(Google-chrome)$
  164. windowrulev2 = animation slide,class:^(wofi)$
  165. windowrulev2 = move 100%-433 53,class:^(wofi)$,title:^(clippick)$
  166. windowrulev2 = workspace 3,class:^(Spotify)$
  167. windowrulev2 = workspace 4,class:^(Google-chrome)$,title:^(Microsoft Teams)$
  168. windowrulev2 = workspace 4,class:^(Google-chrome)$,title:^(Outlook)$ #class:^(Chromium)$,
  169. windowrulev2 = workspace 5,class:^(Google-chrome)$
  170. windowrulev2 = workspace 8,class:^(Code)$
  171. windowrulev2 = workspace 8,class:^(Eclipse)$
  172. windowrulev2 = workspace 8,class:^(VirtualBox Manager)$
  173. windowrulev2 = workspace 9,class:^(VirtualBox Machine)$
  174. windowrulev2 = workspace special:special,class:^(kitty)$,title:^(update-sys)$
  175. windowrulev2 = workspace special:scratchpad,class:^(kitty)$,title:^(eureka)$
  176. windowrulev2 = workspace special:scratchpad,class:^(kitty)$,title:^(open_work_notes.sh)$
  177.  
  178. ------------------------------------------------------------------------------
  179. $ cat binds.conf
  180. # See https://wiki.hyprland.org/Configuring/Keywords/ for more
  181. $mainMod = SUPER
  182.  
  183. # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
  184. # -- APPS -- #
  185. bind = $mainMod, RETURN, exec, kitty # open the terminal
  186. bind = $mainMod CTRL, RETURN, exec, alacritty # open second terminal
  187. #bind = $mainMod, B, exec, firefox # Open browser
  188. bind = $mainMod, B, exec, google-chrome-stable # Open chrome browser
  189. bind = $mainMod, C, exec, code # Open VSCode
  190. bind = $mainMod, I, exec, kitty eureka
  191. bind = $mainMod, N, exec, thunar # Show the graphical file browser
  192. bind = $mainMod, S, exec, spotify # Open spotify
  193. bind = $mainMod, SPACE, exec, pkill wofi || wofi -n # Show the graphical app launcher
  194. bind = $mainMod CTRL, SPACE, exec, rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' # rofi clipboard manager
  195. bind = ALT, SPACE, exec, killall rofi || sh $HOME/.config/rofi/bin/launcher
  196. bind = , Print, exec, grim -g "$(slurp)" - | swappy -f - # take a screenshot
  197.  
  198. # -- SCRIPTS -- #
  199. bind = $mainMod SHIFT, I, exec, kitty $HOME/.scripts/open_work_notes.sh
  200. bind = $mainMod CTRL, W, exec, pkill waybar && waybar # restart waybar
  201. bind = $mainMod CTRL SHIFT, W, exec, pkill waybar || waybar # kill or start waybar
  202. bind = $mainMod ALT, W, exec, ~/.scripts/toggle_img_waybar.sh && pkill waybar && waybar # toggle image module waybar & restart
  203. bind = $mainMod CTRL, B, exec, ~/.scripts/change_bg.sh
  204. bind = $mainMod CTRL SHIFT, S, exec, xdg-open "https://search.nixos.org/packages"
  205.  
  206. # -- HYPRLAND -- #
  207. bind = $mainMod, L, exec, ~/.scripts/lock_screen.sh # Lock the screen
  208. bind = $mainMod CTRL, L, exit # Exit Hyprland
  209. bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
  210. bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
  211. bind = $mainMod CTRL, H, exec, ~/.config/hypr/hyprland.editor
  212. bind = $mainMod CTRL, S, exec, rm /run/user/1001/swww.socket && swww-daemon
  213.  
  214. # -- WINDOWS -- #
  215. bind = $mainMod, Q, killactive, # close the active window
  216. bind = $mainMod, V, togglefloating, # Allow a window to float
  217. bind = $mainMod, P, pseudo, # dwindle
  218. bind = $mainMod SHIFT, P, pin, # pin window to all workspaces
  219. bind = $mainMod, J, togglesplit, # dwindle
  220. bind = $mainMod SHIFT, A, movetoworkspace, special:special # move window to scratchpad workspace
  221. bind = $mainMod SHIFT, E, movetoworkspace, special:scratchpad # move window to scratchpad workspace
  222. bind = $mainMod, F, fullscreen, 1
  223. bind = $mainMod SHIFT, F, fullscreen, 0
  224. bind = $mainMod, G, togglegroup
  225. bind = $mainMod SHIFT, G, moveoutofgroup
  226.  
  227. # -- SYSTEM -- #
  228. bind = , XF86AudioMute, exec, pamixer --toggle-mute
  229. bind = CTRL, XF86AudioMute, exec, playerctl play-pause
  230. bind = , XF86AudioPause, exec, playerctl pause
  231. bind = , XF86AudioPlay, exec, playerctl play
  232. bind = , XF86AudioNext, exec, playerctl next
  233. bind = , XF86AudioPrev, exec, playerctl previous
  234. binde = $mainMod, XF86AudioLowerVolume, exec, pamixer --default-source --decrease 5
  235. binde = $mainMod, XF86AudioRaiseVolume, exec, pamixer --default-source --increase 5
  236. binde = CTRL, XF86AudioLowerVolume, exec, playerctl previous
  237. binde = CTRL, XF86AudioRaiseVolume, exec, playerctl next
  238. binde = , XF86AudioLowerVolume, exec, pamixer --decrease 5
  239. binde = , XF86AudioRaiseVolume, exec, pamixer --increase 5
  240. binde = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
  241. binde = , xF86MonBrightnessUp, exec, brightnessctl set 5%+
  242. binde = $mainMod, XF86MonBrightnessDown, exec, brightnessctl set 1- -d tpacpi::kbd_backlight
  243. binde = $mainMod, xF86MonBrightnessUp, exec, brightnessctl set 1+ -d tpacpi::kbd_backlight
  244.  
  245. # Move focus with mainMod + arrow keys
  246. bind = $mainMod, left, changegroupactive, b
  247. bind = $mainMod, right, changegroupactive, f
  248.  
  249. # Swap windows around
  250. bind = $mainMod CTRL SHIFT, left, swapwindow, l
  251. bind = $mainMod CTRL SHIFT, right, swapwindow, r
  252. bind = $mainMod CTRL SHIFT, up, swapwindow, u
  253. bind = $mainMod CTRL SHIFT, down, swapwindow, d
  254.  
  255. # Move focus with mainMod + arrow keys
  256. bind = $mainMod, left, movefocus, l
  257. bind = $mainMod, right, movefocus, r
  258. bind = $mainMod, up, movefocus, u
  259. bind = $mainMod, down, movefocus, d
  260.  
  261. # Switch workspaces with mainMod + [0-9]
  262. bind = $mainMod, 1, workspace, 1
  263. bind = $mainMod, 2, workspace, 2
  264. bind = $mainMod, 3, workspace, 3
  265. bind = $mainMod, 4, workspace, 4
  266. bind = $mainMod, 5, workspace, 5
  267. bind = $mainMod, 6, workspace, 6
  268. bind = $mainMod, 7, workspace, 7
  269. bind = $mainMod, 8, workspace, 8
  270. bind = $mainMod, 9, workspace, 9
  271. bind = $mainMod, 0, workspace, 10
  272. bind = $mainMod, A, togglespecialworkspace, special
  273. bind = $mainMod, E, togglespecialworkspace, scratchpad
  274.  
  275. # Move to next or previous workspace
  276. bind = $mainMod CTRL, left, workspace, e-1
  277. bind = $mainMod CTRL, right, workspace, e+1
  278. bind = $mainMod SHIFT, left, movetoworkspace, e-1
  279. bind = $mainMod SHIFT, right, movetoworkspace, e+1
  280.  
  281. # Move active window to a workspace with mainMod + SHIFT + [0-9]
  282. bind = $mainMod SHIFT, 1, movetoworkspace, 1
  283. bind = $mainMod SHIFT, 2, movetoworkspace, 2
  284. bind = $mainMod SHIFT, 3, movetoworkspace, 3
  285. bind = $mainMod SHIFT, 4, movetoworkspace, 4
  286. bind = $mainMod SHIFT, 5, movetoworkspace, 5
  287. bind = $mainMod SHIFT, 6, movetoworkspace, 6
  288. bind = $mainMod SHIFT, 7, movetoworkspace, 7
  289. bind = $mainMod SHIFT, 8, movetoworkspace, 8
  290. bind = $mainMod SHIFT, 9, movetoworkspace, 9
  291. bind = $mainMod SHIFT, 0, movetoworkspace, 10
  292.  
  293. # Scroll through existing workspaces with mainMod + scroll
  294. bind = $mainMod, mouse_down, workspace, e+1
  295. bind = $mainMod, mouse_up, workspace, e-1
  296.  
  297. # Alt - Tab to next/previous windows
  298. bind = ALT, Tab, exec, ~/.scripts/alttab.sh
  299. #bind = ALT SHIFT, Tab, cyclenext, prev
  300.  
  301. # Move/resize windows with mainMod + LMB/RMB and dragging
  302. bindm = $mainMod, mouse:272, movewindow
  303. bindm = $mainMod, mouse:273, resizewindow
  304.  
  305. # Move current workspace to monitor
  306. bind = ALT SHIFT, left, movecurrentworkspacetomonitor, l
  307. bind = ALT SHIFT, right, movecurrentworkspacetomonitor, r
  308. bind = ALT SHIFT, up, movecurrentworkspacetomonitor, u
  309. bind = ALT SHIFT, down, movecurrentworkspacetomonitor, d
  310.  
  311.  
  312. # Submaps
  313. bind = ALT, R, submap, move
  314.  
  315. # will start a submap called "move"
  316. submap = move
  317.  
  318. bind = , C, centerwindow,
  319.  
  320. # sets repeatable binds for moving the active window
  321. binde = , right, moveactive, 10 0
  322. binde = , left, moveactive, -10 0
  323. binde = , up, moveactive, 0 -10
  324. binde = , down, moveactive, 0 10
  325.  
  326. # sets repeatable binds for resizing the active window
  327. binde = SHIFT, right, resizeactive, 10 0
  328. binde = SHIFT, left, resizeactive, -10 0
  329. binde = SHIFT, up, resizeactive, 0 -10
  330. binde = SHIFT, down, resizeactive, 0 10
  331.  
  332. # sets repeatable binds for resizing the split ratio
  333. binde = ALT, left, splitratio, -0.02
  334. binde = ALT, up, splitratio, -0.02
  335. binde = ALT, right, splitratio, +0.02
  336. binde = ALT, down, splitratio, +0.02
  337.  
  338. # use reset to go back to the global submap
  339. bind = , escape, submap, reset
  340.  
  341. # will reset the submap, meaning end the current one and return to the global one
  342. submap = reset
  343.  
  344.  
  345. ------------------------------------------------------------------------------
  346. $ cat monitors.conf
  347. monitor=eDP-1,1920x1200@60,900x1080,1
  348. monitor=DP-10,1920x1080@240,0x0,1
  349. monitor=DP-7,2560x1080@60,1920x0,1
  350.  
  351. workspace = 1, monitor:eDP-1
  352. workspace = 2, monitor:eDP-1
  353. workspace = 3, monitor:eDP-1
  354. workspace = 4, monitor:eDP-1
  355. workspace = 5, monitor:DP-10
  356. workspace = 6, monitor:DP-10
  357. workspace = 7, monitor:DP-10
  358. workspace = 8, monitor:DP-7
  359. workspace = 9, monitor:DP-7
  360. workspace = 10, monitor:DP-7
Advertisement
Add Comment
Please, Sign In to add comment