Initial commit
This commit is contained in:
		
							
								
								
									
										89
									
								
								config/hypr/bindings.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								config/hypr/bindings.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,89 @@
 | 
			
		||||
source = ./bindings/media.conf
 | 
			
		||||
source = ./bindings/tiling.conf
 | 
			
		||||
source = ./bindings/utilities.conf
 | 
			
		||||
 | 
			
		||||
## Tiling
 | 
			
		||||
#
 | 
			
		||||
#bindd = SUPER SHIFT, left, Swap window to the left, swapwindow, l
 | 
			
		||||
#bindd = SUPER SHIFT, right, Swap window to the right, swapwindow, r
 | 
			
		||||
#bindd = SUPER SHIFT, up, Swap window up, swapwindow, u
 | 
			
		||||
#bindd = SUPER SHIFT, down, Swap window down, swapwindow, d
 | 
			
		||||
 | 
			
		||||
# Applications
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Keywords/
 | 
			
		||||
$mainMod = SUPER # Sets "Windows" key as main modifier
 | 
			
		||||
 | 
			
		||||
bindd = $mainMod, B, Launch Browser, exec, flatpak run app.zen_browser.zen
 | 
			
		||||
bindd = $mainMod, T, System Monitor, exec, $terminal btop
 | 
			
		||||
bindd = $mainMod, U, Todoist, exec, todoist
 | 
			
		||||
bindd = $mainMod, I, Notion, exec, notion-app
 | 
			
		||||
bindd = $mainMod, G, Telegram, exec, Telegram
 | 
			
		||||
bindd = $mainMod SHIFT, G, Signal, exec, signal-desktop
 | 
			
		||||
bindd = $mainMod, F, WhatsApp, exec, gtk-launch WebApp-WhatsAppWeb7770.desktop
 | 
			
		||||
 | 
			
		||||
bind = $mainMod, return, exec, $terminal
 | 
			
		||||
bind = $mainMod, Q, killactive,
 | 
			
		||||
bind = $mainMod SHIFT ALT, Q, exit,
 | 
			
		||||
bind = $mainMod, E, exec, $fileManager
 | 
			
		||||
#bind = $mainMod, V, togglefloating,
 | 
			
		||||
bind = $mainMod, R, exec, $menu
 | 
			
		||||
bind = $mainMod, P, pseudo, # dwindle
 | 
			
		||||
#bind = $mainMod, J, togglesplit, # dwindle
 | 
			
		||||
bindd = $mainMod, L, Lock screen, exec, ~/.config/hypr/scripts/lock-screen
 | 
			
		||||
 | 
			
		||||
## Move focus with mainMod + arrow keys
 | 
			
		||||
#bind = $mainMod, left, movefocus, l
 | 
			
		||||
#bind = $mainMod, right, movefocus, r
 | 
			
		||||
#bind = $mainMod, up, movefocus, u
 | 
			
		||||
#bind = $mainMod, down, movefocus, d
 | 
			
		||||
#
 | 
			
		||||
## Switch workspaces with mainMod + [0-9]
 | 
			
		||||
#bind = $mainMod, 1, workspace, 1
 | 
			
		||||
#bind = $mainMod, 2, workspace, 2
 | 
			
		||||
#bind = $mainMod, 3, workspace, 3
 | 
			
		||||
#bind = $mainMod, 4, workspace, 4
 | 
			
		||||
#bind = $mainMod, 5, workspace, 5
 | 
			
		||||
#bind = $mainMod, 6, workspace, 6
 | 
			
		||||
#bind = $mainMod, 7, workspace, 7
 | 
			
		||||
#bind = $mainMod, 8, workspace, 8
 | 
			
		||||
#bind = $mainMod, 9, workspace, 9
 | 
			
		||||
#bind = $mainMod, 0, workspace, 10
 | 
			
		||||
#
 | 
			
		||||
## Move active window to a workspace with mainMod + SHIFT + [0-9]
 | 
			
		||||
#bind = $mainMod SHIFT, 1, movetoworkspace, 1
 | 
			
		||||
#bind = $mainMod SHIFT, 2, movetoworkspace, 2
 | 
			
		||||
#bind = $mainMod SHIFT, 3, movetoworkspace, 3
 | 
			
		||||
#bind = $mainMod SHIFT, 4, movetoworkspace, 4
 | 
			
		||||
#bind = $mainMod SHIFT, 5, movetoworkspace, 5
 | 
			
		||||
#bind = $mainMod SHIFT, 6, movetoworkspace, 6
 | 
			
		||||
#bind = $mainMod SHIFT, 7, movetoworkspace, 7
 | 
			
		||||
#bind = $mainMod SHIFT, 8, movetoworkspace, 8
 | 
			
		||||
#bind = $mainMod SHIFT, 9, movetoworkspace, 9
 | 
			
		||||
#bind = $mainMod SHIFT, 0, movetoworkspace, 10
 | 
			
		||||
#
 | 
			
		||||
## Example special workspace (scratchpad)
 | 
			
		||||
#bind = $mainMod, S, togglespecialworkspace, magic
 | 
			
		||||
#bind = $mainMod SHIFT, S, movetoworkspace, special:magic
 | 
			
		||||
#
 | 
			
		||||
## Scroll through existing workspaces with mainMod + scroll
 | 
			
		||||
#bind = $mainMod, mouse_down, workspace, e+1
 | 
			
		||||
#bind = $mainMod, mouse_up, workspace, e-1
 | 
			
		||||
#
 | 
			
		||||
## Move/resize windows with mainMod + LMB/RMB and dragging
 | 
			
		||||
#bindm = $mainMod, mouse:272, movewindow
 | 
			
		||||
#bindm = $mainMod, mouse:273, resizewindow
 | 
			
		||||
#
 | 
			
		||||
## Laptop multimedia keys for volume and LCD brightness
 | 
			
		||||
#bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
 | 
			
		||||
#bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
 | 
			
		||||
#bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
 | 
			
		||||
#bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
 | 
			
		||||
#bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
 | 
			
		||||
#bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
 | 
			
		||||
#
 | 
			
		||||
## Requires playerctl
 | 
			
		||||
#bindl = , XF86AudioNext, exec, playerctl next
 | 
			
		||||
#bindl = , XF86AudioPause, exec, playerctl play-pause
 | 
			
		||||
#bindl = , XF86AudioPlay, exec, playerctl play-pause
 | 
			
		||||
#bindl = , XF86AudioPrev, exec, playerctl previous
 | 
			
		||||
							
								
								
									
										25
									
								
								config/hypr/bindings/media.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								config/hypr/bindings/media.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
# Only display the OSD on the currently focused monitor
 | 
			
		||||
$osdclient = swayosd-client --monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
 | 
			
		||||
 | 
			
		||||
# Laptop multimedia keys for volume and LCD brightness (with OSD)
 | 
			
		||||
bindeld = ,XF86AudioRaiseVolume, Volume up, exec, $osdclient --output-volume raise
 | 
			
		||||
bindeld = ,XF86AudioLowerVolume, Volume down, exec, $osdclient --output-volume lower
 | 
			
		||||
bindeld = ,XF86AudioMute, Mute, exec, $osdclient --output-volume mute-toggle
 | 
			
		||||
bindeld = ,XF86AudioMicMute, Mute microphone, exec, $osdclient --input-volume mute-toggle
 | 
			
		||||
bindeld = ,XF86MonBrightnessUp, Brightness up, exec, $osdclient --brightness raise
 | 
			
		||||
bindeld = ,XF86MonBrightnessDown, Brightness down, exec, $osdclient --brightness lower
 | 
			
		||||
 | 
			
		||||
# Precise 1% multimedia adjustments with Alt modifier
 | 
			
		||||
bindeld = ALT, XF86AudioRaiseVolume, Volume up precise, exec, $osdclient --output-volume +1
 | 
			
		||||
bindeld = ALT, XF86AudioLowerVolume, Volume down precise, exec, $osdclient --output-volume -1
 | 
			
		||||
bindeld = ALT, XF86MonBrightnessUp, Brightness up precise, exec, $osdclient --brightness +1
 | 
			
		||||
bindeld = ALT, XF86MonBrightnessDown, Brightness down precise, exec, $osdclient --brightness -1
 | 
			
		||||
 | 
			
		||||
# Requires playerctl
 | 
			
		||||
bindld = , XF86AudioNext, Next track, exec, $osdclient --playerctl next
 | 
			
		||||
bindld = , XF86AudioPause, Pause, exec, $osdclient --playerctl play-pause
 | 
			
		||||
bindld = , XF86AudioPlay, Play, exec, $osdclient --playerctl play-pause
 | 
			
		||||
bindld = , XF86AudioPrev, Previous track, exec, $osdclient --playerctl previous
 | 
			
		||||
 | 
			
		||||
# Switch audio output with Super + Mute
 | 
			
		||||
bindld = SUPER, XF86AudioMute, Switch audio output, exec, omarchy-cmd-audio-switch
 | 
			
		||||
							
								
								
									
										73
									
								
								config/hypr/bindings/tiling.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								config/hypr/bindings/tiling.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
			
		||||
# Close windows
 | 
			
		||||
bindd = SUPER, Q, Close active window, killactive,
 | 
			
		||||
#bindd = CTRL ALT, DELETE, Close all Windows, exec, omarchy-cmd-close-all-windows
 | 
			
		||||
 | 
			
		||||
# Control tiling
 | 
			
		||||
bindd = SUPER, J, Toggle split, togglesplit, # dwindle
 | 
			
		||||
bindd = SUPER, P, Pseudo window, pseudo, # dwindle
 | 
			
		||||
bindd = SUPER, V, Toggle floating, togglefloating,
 | 
			
		||||
bindd = SHIFT, F11, Force full screen, fullscreen, 0
 | 
			
		||||
bindd = ALT, F11, Full width, fullscreen, 1
 | 
			
		||||
bindd = SUPER SHIFT, RETURN, Full width, fullscreen, 1
 | 
			
		||||
bindd = SUPER, numbersign, 1:1 split, splitratio, exact 1
 | 
			
		||||
 | 
			
		||||
# Move focus with SUPER + arrow keys
 | 
			
		||||
bindd = SUPER, left, Move focus left, movefocus, l
 | 
			
		||||
bindd = SUPER, right, Move focus right, movefocus, r
 | 
			
		||||
bindd = SUPER, up, Move focus up, movefocus, u
 | 
			
		||||
bindd = SUPER, down, Move focus down, movefocus, d
 | 
			
		||||
 | 
			
		||||
# Switch workspaces with SUPER + [0-9]
 | 
			
		||||
bindd = SUPER, code:10, Switch to workspace 1, workspace, 1
 | 
			
		||||
bindd = SUPER, code:11, Switch to workspace 2, workspace, 2
 | 
			
		||||
bindd = SUPER, code:12, Switch to workspace 3, workspace, 3
 | 
			
		||||
bindd = SUPER, code:13, Switch to workspace 4, workspace, 4
 | 
			
		||||
bindd = SUPER, code:14, Switch to workspace 5, workspace, 5
 | 
			
		||||
bindd = SUPER, code:15, Switch to workspace 6, workspace, 6
 | 
			
		||||
bindd = SUPER, code:16, Switch to workspace 7, workspace, 7
 | 
			
		||||
bindd = SUPER, code:17, Switch to workspace 8, workspace, 8
 | 
			
		||||
bindd = SUPER, code:18, Switch to workspace 9, workspace, 9
 | 
			
		||||
bindd = SUPER, code:19, Switch to workspace 10, workspace, 10
 | 
			
		||||
 | 
			
		||||
# Move active window to a workspace with SUPER + SHIFT + [0-9]
 | 
			
		||||
bindd = SUPER SHIFT, code:10, Move window to workspace 1, movetoworkspace, 1
 | 
			
		||||
bindd = SUPER SHIFT, code:11, Move window to workspace 2, movetoworkspace, 2
 | 
			
		||||
bindd = SUPER SHIFT, code:12, Move window to workspace 3, movetoworkspace, 3
 | 
			
		||||
bindd = SUPER SHIFT, code:13, Move window to workspace 4, movetoworkspace, 4
 | 
			
		||||
bindd = SUPER SHIFT, code:14, Move window to workspace 5, movetoworkspace, 5
 | 
			
		||||
bindd = SUPER SHIFT, code:15, Move window to workspace 6, movetoworkspace, 6
 | 
			
		||||
bindd = SUPER SHIFT, code:16, Move window to workspace 7, movetoworkspace, 7
 | 
			
		||||
bindd = SUPER SHIFT, code:17, Move window to workspace 8, movetoworkspace, 8
 | 
			
		||||
bindd = SUPER SHIFT, code:18, Move window to workspace 9, movetoworkspace, 9
 | 
			
		||||
bindd = SUPER SHIFT, code:19, Move window to workspace 10, movetoworkspace, 10
 | 
			
		||||
 | 
			
		||||
# Tab between workspaces
 | 
			
		||||
bindd = SUPER, TAB, Next workspace, workspace, e+1
 | 
			
		||||
bindd = SUPER SHIFT, TAB, Previous workspace, workspace, e-1
 | 
			
		||||
bindd = SUPER CTRL, TAB, Former workspace, workspace, previous
 | 
			
		||||
 | 
			
		||||
# Swap active window with the one next to it with SUPER + SHIFT + arrow keys
 | 
			
		||||
bindd = SUPER SHIFT, left, Swap window to the left, swapwindow, l
 | 
			
		||||
bindd = SUPER SHIFT, right, Swap window to the right, swapwindow, r
 | 
			
		||||
bindd = SUPER SHIFT, up, Swap window up, swapwindow, u
 | 
			
		||||
bindd = SUPER SHIFT, down, Swap window down, swapwindow, d
 | 
			
		||||
 | 
			
		||||
# Cycle through applications on active workspace
 | 
			
		||||
bindd = ALT, Tab, Cycle to next window, cyclenext
 | 
			
		||||
bindd = ALT SHIFT, Tab, Cycle to prev window, cyclenext, prev
 | 
			
		||||
bindd = ALT, Tab, Reveal active window on top, bringactivetotop
 | 
			
		||||
bindd = ALT SHIFT, Tab, Reveal active window on top, bringactivetotop
 | 
			
		||||
 | 
			
		||||
# Resize active window
 | 
			
		||||
bindd = SUPER, code:20, Expand window left, resizeactive, -100 0    # - key
 | 
			
		||||
bindd = SUPER, code:21, Shrink window left, resizeactive, 100 0     # = key
 | 
			
		||||
bindd = SUPER SHIFT, code:20, Shrink window up, resizeactive, 0 -100
 | 
			
		||||
bindd = SUPER SHIFT, code:21, Expand window down, resizeactive, 0 100
 | 
			
		||||
 | 
			
		||||
# Scroll through existing workspaces with SUPER + scroll
 | 
			
		||||
bindd = SUPER, mouse_down, Scroll active workspace forward, workspace, e+1
 | 
			
		||||
bindd = SUPER, mouse_up, Scroll active workspace backward, workspace, e-1
 | 
			
		||||
 | 
			
		||||
# Move/resize windows with mainMod + LMB/RMB and dragging
 | 
			
		||||
bindmd = SUPER, mouse:272, Move window, movewindow
 | 
			
		||||
bindmd = SUPER, mouse:273, Resize window, resizewindow
 | 
			
		||||
							
								
								
									
										49
									
								
								config/hypr/bindings/utilities.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								config/hypr/bindings/utilities.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
# Menus
 | 
			
		||||
bindd = SUPER, SPACE, Launch apps, exec, walker -p "Start…"
 | 
			
		||||
bindd = SUPER CTRL, E, Emoji picker, exec, walker -m Emojis
 | 
			
		||||
bindd = SUPER ALT, SPACE, Omarchy menu, exec, omarchy-menu
 | 
			
		||||
bindd = SUPER, ESCAPE, Power menu, exec, omarchy-menu system
 | 
			
		||||
bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system
 | 
			
		||||
bindd = SUPER, K, Show key bindings, exec, omarchy-menu-keybindings
 | 
			
		||||
bindd = , XF86Calculator, Calculator, exec, gnome-calculator
 | 
			
		||||
 | 
			
		||||
bindd = SUPER, N, Notification center, exec, swaync-client -op
 | 
			
		||||
 | 
			
		||||
# Aesthetics
 | 
			
		||||
bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, omarchy-toggle-waybar
 | 
			
		||||
bindd = SUPER CTRL, SPACE, Next background in theme, exec, omarchy-theme-bg-next
 | 
			
		||||
bindd = SUPER SHIFT CTRL, SPACE, Pick new theme, exec, omarchy-menu theme
 | 
			
		||||
bindd = SUPER, BACKSPACE, Toggle window transparency, exec, hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle
 | 
			
		||||
 | 
			
		||||
# Notifications
 | 
			
		||||
bindd = SUPER, COMMA, Dismiss last notification, exec, makoctl dismiss
 | 
			
		||||
bindd = SUPER SHIFT, COMMA, Dismiss all notifications, exec, makoctl dismiss --all
 | 
			
		||||
bindd = SUPER CTRL, COMMA, Toggle silencing notifications, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications"
 | 
			
		||||
 | 
			
		||||
# Toggle idling
 | 
			
		||||
bindd = SUPER CTRL, I, Toggle locking on idle, exec, omarchy-toggle-idle
 | 
			
		||||
 | 
			
		||||
# Toggle nightlight
 | 
			
		||||
bindd = SUPER CTRL, N, Toggle nightlight, exec, omarchy-toggle-nightlight
 | 
			
		||||
 | 
			
		||||
# Control Apple Display brightness
 | 
			
		||||
bindd = CTRL, F1, Apple Display brightness down, exec, omarchy-cmd-apple-display-brightness -5000
 | 
			
		||||
bindd = CTRL, F2, Apple Display brightness up, exec, omarchy-cmd-apple-display-brightness +5000
 | 
			
		||||
bindd = SHIFT CTRL, F2, Apple Display full brightness, exec, omarchy-cmd-apple-display-brightness +60000
 | 
			
		||||
 | 
			
		||||
# Screenshots
 | 
			
		||||
bindd = , PRINT, Screenshot of region, exec, ~/.config/hypr/scripts/cmd-screenshot region
 | 
			
		||||
bindd = SHIFT, PRINT, Screenshot of window, exec, ~/.config/hypr/scripts/cmd-screenshot windows
 | 
			
		||||
bindd = CTRL, PRINT, Screenshot of display, exec, ~/.config/hypr/scripts/cmd-screenshot fullscreen
 | 
			
		||||
 | 
			
		||||
# Screen recordings
 | 
			
		||||
bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord region
 | 
			
		||||
bindd = ALT SHIFT, PRINT, Screen record a region with audio, exec, omarchy-cmd-screenrecord region audio
 | 
			
		||||
bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord output
 | 
			
		||||
bindd = CTRL ALT SHIFT, PRINT, Screen record display with audio, exec, omarchy-cmd-screenrecord output audio
 | 
			
		||||
 | 
			
		||||
# Color picker
 | 
			
		||||
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
 | 
			
		||||
 | 
			
		||||
# File sharing
 | 
			
		||||
bindd = CTRL SUPER, S, Share, exec, omarchy-menu share
 | 
			
		||||
							
								
								
									
										22
									
								
								config/hypr/hypridle.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								config/hypr/hypridle.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
general {
 | 
			
		||||
    lock_cmd = ~/.config/hypr/scripts/lock-screen                         # lock screen and 1password
 | 
			
		||||
    before_sleep_cmd = loginctl lock-session               # lock before suspend.
 | 
			
		||||
    after_sleep_cmd = hyprctl dispatch dpms on             # to avoid having to press a key twice to turn on the display.
 | 
			
		||||
    inhibit_sleep = 3                                     # wait until screen is locked
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
listener {
 | 
			
		||||
    timeout = 600                      # 5min
 | 
			
		||||
    on-timeout = loginctl lock-session # lock screen when timeout has passed
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
listener {
 | 
			
		||||
    timeout = 630                                            # 5.5min
 | 
			
		||||
    on-timeout = hyprctl dispatch dpms off                   # screen off when timeout has passed
 | 
			
		||||
    on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
listener {
 | 
			
		||||
    timeout = 1800 # 30 minutes
 | 
			
		||||
    on-timeout = ~/.config/hypr/scripts/suspend_on_battery
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										290
									
								
								config/hypr/hyprland.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										290
									
								
								config/hypr/hyprland.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,290 @@
 | 
			
		||||
$terminal = kitty
 | 
			
		||||
$fileManager = nautilus
 | 
			
		||||
$menu = wofi --show drun
 | 
			
		||||
 | 
			
		||||
source = ~/.config/hypr/bindings.conf
 | 
			
		||||
source = ~/.config/hypr/monitors.conf
 | 
			
		||||
source = ~/.config/hypr/rules.conf
 | 
			
		||||
 | 
			
		||||
#env = XDG_CURRENT_DESKTOP,GNOME
 | 
			
		||||
 | 
			
		||||
exec-once = hyprpaper
 | 
			
		||||
exec-once = waybar
 | 
			
		||||
exec-once = hypridle
 | 
			
		||||
exec-once = systemctl --user start hyprpolkitagent
 | 
			
		||||
exec-once = eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
 | 
			
		||||
#exec-once = gnome-keyring-daemon --unlock --components=pkcs11,secrets,ssh && dbus-update-activation-environment --all
 | 
			
		||||
#exec-once = gnome-keyring-daemon --start --components=pkcs11
 | 
			
		||||
#exec-once = gnome-keyring-daemon --start --components=secrets
 | 
			
		||||
#exec-once = gnome-keyring-daemon --start --components=ssh
 | 
			
		||||
 | 
			
		||||
exec-once = swayosd-server
 | 
			
		||||
exec-once = elephant & walker --gapplication-service
 | 
			
		||||
 | 
			
		||||
#############################
 | 
			
		||||
### ENVIRONMENT VARIABLES ###
 | 
			
		||||
#############################
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Environment-variables/
 | 
			
		||||
 | 
			
		||||
env = XCURSOR_SIZE,24
 | 
			
		||||
env = HYPRCURSOR_SIZE,24
 | 
			
		||||
 | 
			
		||||
###################
 | 
			
		||||
### PERMISSIONS ###
 | 
			
		||||
###################
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Permissions/
 | 
			
		||||
# Please note permission changes here require a Hyprland restart and are not applied on-the-fly
 | 
			
		||||
# for security reasons
 | 
			
		||||
 | 
			
		||||
# ecosystem {
 | 
			
		||||
#   enforce_permissions = 1
 | 
			
		||||
# }
 | 
			
		||||
 | 
			
		||||
# permission = /usr/(bin|local/bin)/grim, screencopy, allow
 | 
			
		||||
# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
 | 
			
		||||
# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#####################
 | 
			
		||||
### LOOK AND FEEL ###
 | 
			
		||||
#####################
 | 
			
		||||
 | 
			
		||||
# Refer to https://wiki.hypr.land/Configuring/Variables/
 | 
			
		||||
 | 
			
		||||
# https://wiki.hypr.land/Configuring/Variables/#general
 | 
			
		||||
general {
 | 
			
		||||
    gaps_in = 4
 | 
			
		||||
    gaps_out = 8
 | 
			
		||||
    border_size = 2
 | 
			
		||||
 | 
			
		||||
    # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors
 | 
			
		||||
#    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
 | 
			
		||||
    col.active_border = rgba(33ccffee) rgba(f50087ee) 45deg
 | 
			
		||||
    col.inactive_border = rgba(595959aa)
 | 
			
		||||
 | 
			
		||||
    # Set to true enable resizing windows by clicking and dragging on borders and gaps
 | 
			
		||||
    resize_on_border = false
 | 
			
		||||
 | 
			
		||||
    # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on
 | 
			
		||||
    allow_tearing = false
 | 
			
		||||
 | 
			
		||||
    layout = dwindle
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dwindle {
 | 
			
		||||
    force_split = 2
 | 
			
		||||
    smart_resizing = false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# https://wiki.hypr.land/Configuring/Variables/#decoration
 | 
			
		||||
decoration {
 | 
			
		||||
    rounding = 4
 | 
			
		||||
    rounding_power = 2
 | 
			
		||||
 | 
			
		||||
    # Change transparency of focused and unfocused windows
 | 
			
		||||
    active_opacity = 1.0
 | 
			
		||||
    inactive_opacity = 0.8
 | 
			
		||||
 | 
			
		||||
    shadow {
 | 
			
		||||
        enabled = true
 | 
			
		||||
        range = 3
 | 
			
		||||
        render_power = 3
 | 
			
		||||
        color = rgba(1a1a1aee)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # https://wiki.hypr.land/Configuring/Variables/#blur
 | 
			
		||||
    blur {
 | 
			
		||||
        enabled = true
 | 
			
		||||
        size = 8
 | 
			
		||||
        passes = 2
 | 
			
		||||
 | 
			
		||||
        vibrancy = 0.1696
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# https://wiki.hypr.land/Configuring/Variables/#animations
 | 
			
		||||
animations {
 | 
			
		||||
    enabled = yes, please :)
 | 
			
		||||
 | 
			
		||||
    # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
 | 
			
		||||
    #        NAME,           X0,   Y0,   X1,   Y1
 | 
			
		||||
    bezier = easeOutQuint,   0.23, 1,    0.32, 1
 | 
			
		||||
    bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
 | 
			
		||||
    bezier = linear,         0,    0,    1,    1
 | 
			
		||||
    bezier = almostLinear,   0.5,  0.5,  0.75, 1
 | 
			
		||||
    bezier = quick,          0.15, 0,    0.1,  1
 | 
			
		||||
 | 
			
		||||
    # Default animations, see https://wiki.hypr.land/Configuring/Animations/
 | 
			
		||||
    #           NAME,          ONOFF, SPEED, CURVE,        [STYLE]
 | 
			
		||||
    animation = global,        1,     10,    default
 | 
			
		||||
    animation = border,        1,     5.39,  easeOutQuint
 | 
			
		||||
    animation = borderangle,   1,     20,    quick
 | 
			
		||||
    animation = windows,       1,     4.79,  easeOutQuint
 | 
			
		||||
    animation = windowsIn,     1,     4.1,   easeOutQuint, popin 87%
 | 
			
		||||
    animation = windowsOut,    1,     1.49,  linear,       popin 87%
 | 
			
		||||
    animation = fadeIn,        1,     1.73,  almostLinear
 | 
			
		||||
    animation = fadeOut,       1,     1.46,  almostLinear
 | 
			
		||||
    animation = fade,          1,     3.03,  quick
 | 
			
		||||
    animation = layers,        1,     3.81,  easeOutQuint
 | 
			
		||||
    animation = layersIn,      1,     4,     easeOutQuint, fade
 | 
			
		||||
    animation = layersOut,     1,     1.5,   linear,       fade
 | 
			
		||||
    animation = fadeLayersIn,  1,     1.79,  almostLinear
 | 
			
		||||
    animation = fadeLayersOut, 1,     1.39,  almostLinear
 | 
			
		||||
    animation = workspaces,    1,     1.94,  almostLinear, fade
 | 
			
		||||
    animation = workspacesIn,  1,     1.21,  almostLinear, fade
 | 
			
		||||
    animation = workspacesOut, 1,     1.94,  almostLinear, fade
 | 
			
		||||
    animation = zoomFactor,    1,     7,     quick
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
 | 
			
		||||
# "Smart gaps" / "No gaps when only"
 | 
			
		||||
# uncomment all if you wish to use that.
 | 
			
		||||
# workspace = w[tv1], gapsout:0, gapsin:0
 | 
			
		||||
# workspace = f[1], gapsout:0, gapsin:0
 | 
			
		||||
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
 | 
			
		||||
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
 | 
			
		||||
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
 | 
			
		||||
# windowrule = rounding 0, floating:0, onworkspace:f[1]
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
 | 
			
		||||
dwindle {
 | 
			
		||||
    pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
 | 
			
		||||
    preserve_split = true # You probably want this
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Master-Layout/ for more
 | 
			
		||||
master {
 | 
			
		||||
    new_status = master
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# https://wiki.hypr.land/Configuring/Variables/#misc
 | 
			
		||||
misc {
 | 
			
		||||
    force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers
 | 
			
		||||
    disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#############
 | 
			
		||||
### INPUT ###
 | 
			
		||||
#############
 | 
			
		||||
 | 
			
		||||
# https://wiki.hypr.land/Configuring/Variables/#input
 | 
			
		||||
input {
 | 
			
		||||
    kb_layout = de
 | 
			
		||||
    kb_variant =
 | 
			
		||||
    kb_model =
 | 
			
		||||
    kb_options =
 | 
			
		||||
    kb_rules =
 | 
			
		||||
 | 
			
		||||
    follow_mouse = 1
 | 
			
		||||
 | 
			
		||||
    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
 | 
			
		||||
 | 
			
		||||
    touchpad {
 | 
			
		||||
        natural_scroll = true
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Gestures
 | 
			
		||||
gesture = 3, horizontal, workspace
 | 
			
		||||
 | 
			
		||||
# Example per-device config
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
 | 
			
		||||
device {
 | 
			
		||||
    name = epic-mouse-v1
 | 
			
		||||
    sensitivity = -0.5
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
###################
 | 
			
		||||
### KEYBINDINGS ###
 | 
			
		||||
###################
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Keywords/
 | 
			
		||||
#$mainMod = SUPER # Sets "Windows" key as main modifier
 | 
			
		||||
#
 | 
			
		||||
#bindd = $mainMod, B, Launch Browser, exec, flatpak run app.zen_browser.zen
 | 
			
		||||
#
 | 
			
		||||
## Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
 | 
			
		||||
#bind = $mainMod, return, exec, $terminal
 | 
			
		||||
#bind = $mainMod, Q, killactive,
 | 
			
		||||
#bind = $mainMod, M, exit,
 | 
			
		||||
#bind = $mainMod, E, exec, $fileManager
 | 
			
		||||
#bind = $mainMod, V, togglefloating,
 | 
			
		||||
#bind = $mainMod, R, exec, $menu
 | 
			
		||||
#bind = $mainMod, P, pseudo, # dwindle
 | 
			
		||||
#bind = $mainMod, J, togglesplit, # dwindle
 | 
			
		||||
#
 | 
			
		||||
## Move focus with mainMod + arrow keys
 | 
			
		||||
#bind = $mainMod, left, movefocus, l
 | 
			
		||||
#bind = $mainMod, right, movefocus, r
 | 
			
		||||
#bind = $mainMod, up, movefocus, u
 | 
			
		||||
#bind = $mainMod, down, movefocus, d
 | 
			
		||||
#
 | 
			
		||||
## Switch workspaces with mainMod + [0-9]
 | 
			
		||||
#bind = $mainMod, 1, workspace, 1
 | 
			
		||||
#bind = $mainMod, 2, workspace, 2
 | 
			
		||||
#bind = $mainMod, 3, workspace, 3
 | 
			
		||||
#bind = $mainMod, 4, workspace, 4
 | 
			
		||||
#bind = $mainMod, 5, workspace, 5
 | 
			
		||||
#bind = $mainMod, 6, workspace, 6
 | 
			
		||||
#bind = $mainMod, 7, workspace, 7
 | 
			
		||||
#bind = $mainMod, 8, workspace, 8
 | 
			
		||||
#bind = $mainMod, 9, workspace, 9
 | 
			
		||||
#bind = $mainMod, 0, workspace, 10
 | 
			
		||||
#
 | 
			
		||||
## Move active window to a workspace with mainMod + SHIFT + [0-9]
 | 
			
		||||
#bind = $mainMod SHIFT, 1, movetoworkspace, 1
 | 
			
		||||
#bind = $mainMod SHIFT, 2, movetoworkspace, 2
 | 
			
		||||
#bind = $mainMod SHIFT, 3, movetoworkspace, 3
 | 
			
		||||
#bind = $mainMod SHIFT, 4, movetoworkspace, 4
 | 
			
		||||
#bind = $mainMod SHIFT, 5, movetoworkspace, 5
 | 
			
		||||
#bind = $mainMod SHIFT, 6, movetoworkspace, 6
 | 
			
		||||
#bind = $mainMod SHIFT, 7, movetoworkspace, 7
 | 
			
		||||
#bind = $mainMod SHIFT, 8, movetoworkspace, 8
 | 
			
		||||
#bind = $mainMod SHIFT, 9, movetoworkspace, 9
 | 
			
		||||
#bind = $mainMod SHIFT, 0, movetoworkspace, 10
 | 
			
		||||
#
 | 
			
		||||
## Example special workspace (scratchpad)
 | 
			
		||||
#bind = $mainMod, S, togglespecialworkspace, magic
 | 
			
		||||
#bind = $mainMod SHIFT, S, movetoworkspace, special:magic
 | 
			
		||||
#
 | 
			
		||||
## Scroll through existing workspaces with mainMod + scroll
 | 
			
		||||
#bind = $mainMod, mouse_down, workspace, e+1
 | 
			
		||||
#bind = $mainMod, mouse_up, workspace, e-1
 | 
			
		||||
#
 | 
			
		||||
## Move/resize windows with mainMod + LMB/RMB and dragging
 | 
			
		||||
#bindm = $mainMod, mouse:272, movewindow
 | 
			
		||||
#bindm = $mainMod, mouse:273, resizewindow
 | 
			
		||||
#
 | 
			
		||||
## Laptop multimedia keys for volume and LCD brightness
 | 
			
		||||
#bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
 | 
			
		||||
#bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
 | 
			
		||||
#bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
 | 
			
		||||
#bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
 | 
			
		||||
#bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
 | 
			
		||||
#bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
 | 
			
		||||
#
 | 
			
		||||
## Requires playerctl
 | 
			
		||||
#bindl = , XF86AudioNext, exec, playerctl next
 | 
			
		||||
#bindl = , XF86AudioPause, exec, playerctl play-pause
 | 
			
		||||
#bindl = , XF86AudioPlay, exec, playerctl play-pause
 | 
			
		||||
#bindl = , XF86AudioPrev, exec, playerctl previous
 | 
			
		||||
 | 
			
		||||
##############################
 | 
			
		||||
### WINDOWS AND WORKSPACES ###
 | 
			
		||||
##############################
 | 
			
		||||
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Window-Rules/ for more
 | 
			
		||||
# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
 | 
			
		||||
 | 
			
		||||
# Example windowrule
 | 
			
		||||
# windowrule = float,class:^(kitty)$,title:^(kitty)$
 | 
			
		||||
 | 
			
		||||
# Ignore maximize requests from apps. You'll probably like this.
 | 
			
		||||
windowrule = suppressevent maximize, class:.*
 | 
			
		||||
 | 
			
		||||
# Fix some dragging issues with XWayland
 | 
			
		||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
 | 
			
		||||
							
								
								
									
										91
									
								
								config/hypr/hyprlock.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										91
									
								
								config/hypr/hyprlock.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,91 @@
 | 
			
		||||
$font = Mononoki Nerd Font
 | 
			
		||||
 | 
			
		||||
general {
 | 
			
		||||
    hide_cursor = false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
auth {
 | 
			
		||||
    fingerprint {
 | 
			
		||||
        enabled = true
 | 
			
		||||
        ready_message = Scan fingerprint to unlock
 | 
			
		||||
        present_message = Scanning...
 | 
			
		||||
        retry_delay = 250 # in milliseconds
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
animations {
 | 
			
		||||
    enabled = true
 | 
			
		||||
    bezier = linear, 1, 1, 0, 0
 | 
			
		||||
    animation = fadeIn, 1, 5, linear
 | 
			
		||||
    animation = fadeOut, 1, 5, linear
 | 
			
		||||
    animation = inputFieldDots, 1, 1, linear
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
background {
 | 
			
		||||
    monitor =
 | 
			
		||||
    path = screenshot
 | 
			
		||||
    blur_passes = 4
 | 
			
		||||
    brightness = 0.68
 | 
			
		||||
    vibrancy = 0.18
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
input-field {
 | 
			
		||||
    monitor =
 | 
			
		||||
    size = 420, 56
 | 
			
		||||
    outline_thickness = 3
 | 
			
		||||
    inner_color = rgba(0, 0, 0, 0.0) # no fill
 | 
			
		||||
 | 
			
		||||
    outer_color = rgba(33ccffee) rgba(f50087ee) 335deg
 | 
			
		||||
    check_color = rgba(33ccffee) rgba(f50087ee) 180deg
 | 
			
		||||
    fail_color = rgba(f50087ee)
 | 
			
		||||
 | 
			
		||||
    font_color = rgb(255, 255, 255)
 | 
			
		||||
    fade_on_empty = false
 | 
			
		||||
    rounding = 4
 | 
			
		||||
 | 
			
		||||
    font_family = $font
 | 
			
		||||
    placeholder_text = Passwort
 | 
			
		||||
    fail_text = $PAMFAIL
 | 
			
		||||
 | 
			
		||||
    dots_spacing = 0.3
 | 
			
		||||
 | 
			
		||||
    position = 0, -72
 | 
			
		||||
    halign = center
 | 
			
		||||
    valign = center
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Fingerprint messages
 | 
			
		||||
label {
 | 
			
		||||
    monitor =
 | 
			
		||||
    text = $FPRINTPROMPT
 | 
			
		||||
    font_size = 12
 | 
			
		||||
    font_family = $font
 | 
			
		||||
    position = 0, -192
 | 
			
		||||
    halign = center
 | 
			
		||||
    valign = center
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# TIME
 | 
			
		||||
label {
 | 
			
		||||
    monitor =
 | 
			
		||||
    text = $TIME
 | 
			
		||||
    font_size = 72
 | 
			
		||||
    font_family = $font
 | 
			
		||||
 | 
			
		||||
    position = 0, 148
 | 
			
		||||
    halign = center
 | 
			
		||||
    valign = center
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# DATE
 | 
			
		||||
label {
 | 
			
		||||
    monitor =
 | 
			
		||||
    text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds
 | 
			
		||||
    font_size = 24
 | 
			
		||||
    font_family = $font
 | 
			
		||||
 | 
			
		||||
    position = 0, 48
 | 
			
		||||
    halign = center
 | 
			
		||||
    valign = center
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								config/hypr/hyprpaper.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								config/hypr/hyprpaper.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
preload = /home/vektron/Bilder/wallpaper/omarchy/3-Milad-Fakurian-Abstract-Purple-Blue.jpg
 | 
			
		||||
wallpaper = , /home/vektron/Bilder/wallpaper/omarchy/3-Milad-Fakurian-Abstract-Purple-Blue.jpg
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										20
									
								
								config/hypr/monitors.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								config/hypr/monitors.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
# See https://wiki.hyprland.org/Configuring/Monitors/
 | 
			
		||||
# List current monitors and resolutions possible: hyprctl monitors
 | 
			
		||||
# Format: monitor = [port], resolution, position, scale
 | 
			
		||||
# You must relaunch Hyprland after changing any envs (use Super+Esc, then Relaunch)
 | 
			
		||||
 | 
			
		||||
env = GDK_SCALE,1
 | 
			
		||||
monitor=eDP-1,1920x1080,auto,1
 | 
			
		||||
monitor=,preferred,auto,auto
 | 
			
		||||
 | 
			
		||||
# Good compromise for 27" or 32" 4K monitors (but fractional!)
 | 
			
		||||
# env = GDK_SCALE,1.75
 | 
			
		||||
# monitor=,preferred,auto,1.666667
 | 
			
		||||
 | 
			
		||||
# Straight 1x setup for low-resolution displays like 1080p or 1440p
 | 
			
		||||
# env = GDK_SCALE,1
 | 
			
		||||
# monitor=,preferred,auto,1
 | 
			
		||||
 | 
			
		||||
# Example for Framework 13 w/ 6K XDR Apple display
 | 
			
		||||
# monitor = DP-5, 6016x3384@60, auto, 2
 | 
			
		||||
# monitor = eDP-1, 2880x1920@120, auto, 2
 | 
			
		||||
							
								
								
									
										14
									
								
								config/hypr/rules.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								config/hypr/rules.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
layerrule = blur, waybar
 | 
			
		||||
layerrule = blurpopups, waybar
 | 
			
		||||
layerrule = ignorezero, waybar
 | 
			
		||||
layerrule = blur, swaync-control-center
 | 
			
		||||
layerrule = blur, swaync-notification-window
 | 
			
		||||
layerrule = ignorezero, swaync-control-center
 | 
			
		||||
layerrule = ignorezero, swaync-notification-window
 | 
			
		||||
layerrule = ignorealpha 0.5, swaync-control-center
 | 
			
		||||
layerrule = ignorealpha 0.5, swaync-notification-window
 | 
			
		||||
layerrule = blur, swayosd
 | 
			
		||||
layerrule = ignorezero, swayosd
 | 
			
		||||
layerrule = blur, walker
 | 
			
		||||
layerrule = ignorezero, walker
 | 
			
		||||
layerrule = ignorealpha 0.5, walker
 | 
			
		||||
							
								
								
									
										83
									
								
								config/hypr/scripts/cmd-screenshot
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										83
									
								
								config/hypr/scripts/cmd-screenshot
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,83 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
 | 
			
		||||
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
 | 
			
		||||
 | 
			
		||||
if [[ ! -d "$OUTPUT_DIR" ]]; then
 | 
			
		||||
  notify-send "Screenshot directory does not exist: $OUTPUT_DIR" -u critical -t 3000
 | 
			
		||||
  exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
pkill slurp && exit 0
 | 
			
		||||
 | 
			
		||||
MODE="${1:-smart}"
 | 
			
		||||
PROCESSING="${2:-slurp}"
 | 
			
		||||
 | 
			
		||||
get_rectangles() {
 | 
			
		||||
  local active_workspace=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .activeWorkspace.id')
 | 
			
		||||
  hyprctl monitors -j | jq -r --arg ws "$active_workspace" '.[] | select(.activeWorkspace.id == ($ws | tonumber)) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"'
 | 
			
		||||
  hyprctl clients -j | jq -r --arg ws "$active_workspace" '.[] | select(.workspace.id == ($ws | tonumber)) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Select based on mode
 | 
			
		||||
case "$MODE" in
 | 
			
		||||
  region)
 | 
			
		||||
    wayfreeze & PID=$!
 | 
			
		||||
    sleep .1
 | 
			
		||||
    SELECTION=$(slurp 2>/dev/null)
 | 
			
		||||
    kill $PID 2>/dev/null
 | 
			
		||||
    ;;
 | 
			
		||||
  windows)
 | 
			
		||||
    wayfreeze & PID=$!
 | 
			
		||||
    sleep .1
 | 
			
		||||
    SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
 | 
			
		||||
    kill $PID 2>/dev/null
 | 
			
		||||
    ;;
 | 
			
		||||
  fullscreen)
 | 
			
		||||
    SELECTION=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"')
 | 
			
		||||
    ;;
 | 
			
		||||
  smart|*)
 | 
			
		||||
    RECTS=$(get_rectangles)
 | 
			
		||||
    wayfreeze & PID=$!
 | 
			
		||||
    sleep .1
 | 
			
		||||
    SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
 | 
			
		||||
    kill $PID 2>/dev/null
 | 
			
		||||
 | 
			
		||||
    # If the selction area is L * W < 20, we'll assume you were trying to select whichever
 | 
			
		||||
    # window or output it was inside of to prevent accidental 2px snapshots
 | 
			
		||||
    if [[ "$SELECTION" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+)$ ]]; then
 | 
			
		||||
      if (( ${BASH_REMATCH[3]} * ${BASH_REMATCH[4]} < 20 )); then
 | 
			
		||||
        click_x="${BASH_REMATCH[1]}"
 | 
			
		||||
        click_y="${BASH_REMATCH[2]}"
 | 
			
		||||
 | 
			
		||||
        while IFS= read -r rect; do
 | 
			
		||||
          if [[ "$rect" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+) ]]; then
 | 
			
		||||
            rect_x="${BASH_REMATCH[1]}"
 | 
			
		||||
            rect_y="${BASH_REMATCH[2]}"
 | 
			
		||||
            rect_width="${BASH_REMATCH[3]}"
 | 
			
		||||
            rect_height="${BASH_REMATCH[4]}"
 | 
			
		||||
 | 
			
		||||
            if (( click_x >= rect_x && click_x < rect_x+rect_width && click_y >= rect_y && click_y < rect_y+rect_height )); then
 | 
			
		||||
              SELECTION="${rect_x},${rect_y} ${rect_width}x${rect_height}"
 | 
			
		||||
              break
 | 
			
		||||
            fi
 | 
			
		||||
          fi
 | 
			
		||||
        done <<< "$RECTS"
 | 
			
		||||
      fi
 | 
			
		||||
    fi
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
[ -z "$SELECTION" ] && exit 0
 | 
			
		||||
 | 
			
		||||
if [[ $PROCESSING == "slurp" ]]; then
 | 
			
		||||
grim -g "$SELECTION" - |
 | 
			
		||||
  satty --filename - \
 | 
			
		||||
    --output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \
 | 
			
		||||
    --early-exit \
 | 
			
		||||
    --actions-on-enter save-to-clipboard \
 | 
			
		||||
    --save-after-copy \
 | 
			
		||||
    --copy-command 'wl-copy'
 | 
			
		||||
else
 | 
			
		||||
  grim -g "$SELECTION" - | wl-copy
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										4
									
								
								config/hypr/scripts/lock-screen
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								config/hypr/scripts/lock-screen
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Lock the screen
 | 
			
		||||
pidof hyprlock || hyprlock &
 | 
			
		||||
							
								
								
									
										22
									
								
								config/hypr/scripts/suspend_on_battery
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								config/hypr/scripts/suspend_on_battery
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# Find all battery devices (BAT0, BAT1, etc.)
 | 
			
		||||
BATTERY_DEVICES=$(upower -e | grep 'BAT')
 | 
			
		||||
ON_BATTERY=false
 | 
			
		||||
 | 
			
		||||
# Iterate through all detected batteries
 | 
			
		||||
for DEVICE in $BATTERY_DEVICES; do
 | 
			
		||||
    # Get the state for the current battery device
 | 
			
		||||
    STATE=$(upower -i $DEVICE | grep "state" | awk '{print $2}')
 | 
			
		||||
    
 | 
			
		||||
    # Check if the state is 'discharging' for ANY battery
 | 
			
		||||
    if [ "$STATE" = "discharging" ]; then
 | 
			
		||||
        ON_BATTERY=true
 | 
			
		||||
        break # Exit the loop as soon as one is found to be discharging
 | 
			
		||||
    fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Check the final condition and suspend if true
 | 
			
		||||
if $ON_BATTERY; then
 | 
			
		||||
    systemctl suspend
 | 
			
		||||
fi
 | 
			
		||||
		Reference in New Issue
	
	Block a user