(hyprland) added config for hyprland, adjust waybar config for use with hyprland

This commit is contained in:
zegonix
2025-07-13 23:30:49 +02:00
parent 83b758bdcd
commit 8698cf5048
7 changed files with 317 additions and 8 deletions

View File

@@ -0,0 +1,4 @@
$image = ~/dotfiles/images/dungeon_forest.jpg
preload = $image
wallpaper = , $image

View File

@@ -0,0 +1,5 @@
$main_display = DP-2
$secondary_display = DP-3
monitor = $main_display, 1920x1080@144, 0x0, 1
monitor = $secondary_display, 1920x1080@60, 1920x0, 1

View File

@@ -0,0 +1,27 @@
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on
}
listener {
timeout = 120
on-timeout = loginctl lock-session
}
listener {
timeout = 150
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}
listener {
timeout = 3600
on-timeout = systemctl suspend
}
listener {
timeout = 30
on-timeout = pidof hyprlock && hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
}

View File

@@ -0,0 +1,246 @@
##################################
# zegonix hyprland configuration #
##################################
# monitors setup
## this is separated into its own file in order to
## be able to maintain multiple configurations
source = ~/.config/hypr/monitors.conf
# programs
$screenlocker = hyprlock
$terminal = foot
$menu = fuzzel
# setup environment
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
exec-once = tmux setenv -g HYPRLAND_INSTANCE_SIGNATURE "$HYPRLAND_INSTANCE_SIGNATURE"
exec-once = hyprpaper
exec-once = hypridle
exec-once = waybar
# keybindings
$Mod = SUPER
bind = $Mod, Escape, exec, $screenlocker
bind = $Mod, Return, exec, $terminal
bind = $Mod, d, exec, $menu
bind = $Mod, q, killactive,
bind = $Mod SHIFT, q, forcekillactive
bind = $Mod, a, exec, audio-sink-switcher.sh
bind = $Mod SHIFT, m, exec, hyprctl switchxkblayout all next
## move focus
bind = $Mod, h, movefocus, l
bind = $Mod, j, movefocus, d
bind = $Mod, k, movefocus, u
bind = $Mod, l, movefocus, r
bind = $Mod, left, movefocus, l
bind = $Mod, down, movefocus, d
bind = $Mod, up, movefocus, u
bind = $Mod, right, movefocus, r
## move focused window
bind = $Mod SHIFT, h, movewindow, l
bind = $Mod SHIFT, j, movewindow, d
bind = $Mod SHIFT, k, movewindow, u
bind = $Mod SHIFT, l, movewindow, r
bind = $Mod SHIFT, left, movewindow, l
bind = $Mod SHIFT, down, movewindow, d
bind = $Mod SHIFT, up, movewindow, u
bind = $Mod SHIFT, right, movewindow, r
## switch to numbered workspace
bind = $Mod, 1, workspace, 1
bind = $Mod, 2, workspace, 2
bind = $Mod, 3, workspace, 3
bind = $Mod, 4, workspace, 4
bind = $Mod, 5, workspace, 5
bind = $Mod, 6, workspace, 6
bind = $Mod, 7, workspace, 7
bind = $Mod, 8, workspace, 8
bind = $Mod, 9, workspace, 9
bind = $Mod, 0, workspace, 10
## move active window to numbered workspace
bind = $Mod SHIFT, 1, movetoworkspacesilent, 1
bind = $Mod SHIFT, 2, movetoworkspacesilent, 2
bind = $Mod SHIFT, 3, movetoworkspacesilent, 3
bind = $Mod SHIFT, 4, movetoworkspacesilent, 4
bind = $Mod SHIFT, 5, movetoworkspacesilent, 5
bind = $Mod SHIFT, 6, movetoworkspacesilent, 6
bind = $Mod SHIFT, 7, movetoworkspacesilent, 7
bind = $Mod SHIFT, 8, movetoworkspacesilent, 8
bind = $Mod SHIFT, 9, movetoworkspacesilent, 9
bind = $Mod SHIFT, 0, movetoworkspacesilent, 10
## move active window and switch to workspace
bind = $Mod ALT, 1, movetoworkspace, 1
bind = $Mod ALT, 2, movetoworkspace, 2
bind = $Mod ALT, 3, movetoworkspace, 3
bind = $Mod ALT, 4, movetoworkspace, 4
bind = $Mod ALT, 5, movetoworkspace, 5
bind = $Mod ALT, 6, movetoworkspace, 6
bind = $Mod ALT, 7, movetoworkspace, 7
bind = $Mod ALT, 8, movetoworkspace, 8
bind = $Mod ALT, 9, movetoworkspace, 9
bind = $Mod ALT, 0, movetoworkspace, 10
# .. alt + tab ..
bind = ALT SHIFT, Tab, workspace, e-1
bind = ALT, Tab, workspace, e+1
# move focused workspace to output
bind = $Mod, u, movecurrentworkspacetomonitor, l
bind = $Mod, i, movecurrentworkspacetomonitor, d
bind = $Mod, o, movecurrentworkspacetomonitor, u
bind = $Mod, p, movecurrentworkspacetomonitor, r
## make window fullscreen
bind = $Mod, f, fullscreen
## mouse integration for moving and resizing windows
bindm = $Mod, mouse:272, movewindow
bindm = $Mod, mouse:273, resizewindow
## volume control
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
## play/pause events
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
# screenshot utility
$screenshot_directory = $HOME/Pictures/screenshots/
exec = mkdir -p $screenshot_directory
bind = $Mod, s, exec, slurp | grim -g - - | wl-copy
bind = $Mod SHIFT, s, exec, slurp | grim -g - "$screenshot_directory/$(date '+%Y%m%d_%H%M%S')_screenshot.png"
#FIX:############
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
###################
### PERMISSIONS ###
###################
# See https://wiki.hyprland.org/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
input {
# keyboard
kb_layout = us, us
kb_variant = basic, intl
# mouse
sensitivity = 0.5
accel_profile = flat
# cursor
follow_mouse = 2
}
# general settings
general {
# layout
layout = master
# borders
border_size = 1
no_border_on_floating = false
gaps_in = 6
gaps_out = 12
col.inactive_border = rgba(00000000)
col.active_border = rgba(15D7E5FF)
col.nogroup_border = rgba(00000000)
col.nogroup_border_active = rgba(15D7E5FF)
# behaviour
no_focus_fallback = false
resize_on_border = true
extend_border_grab_area = 8
hover_icon_on_border = true
resize_corner = 0
# tearing
# potentially exclude games from buffering?
allow_tearing = false
}
# layout settings
master {
mfact = 0.5
new_status = slave
new_on_active = after
orientation = left
}
# visual settings
decoration {
# corners
rounding = 0
rounding_power = 2
# transparency
active_opacity = 1.0
inactive_opacity = 1.0
fullscreen_opacity = 1.0
# misc
dim_inactive = false
border_part_of_window = true
shadow:enabled = false
blur:enabled = false
}
# this and that
misc {
disable_hyprland_logo = true
font_family = JetBrainsMonoNerdFont
splash_font_family = JetBrainsMonoNerdFont
mouse_move_enables_dpms = false
key_press_enables_dpms = true
focus_on_activate = false
allow_session_lock_restore = true
background_color = rgba(202020FF)
new_window_takes_over_fullscreen = 2
middle_click_paste = false
}
# bääh
animations:enabled = false
# window rules
windowrule = idleinhibit always, class:steam_app.*
windowrule = opacity 0.9, class:foot
windowrule = opacity 0.93, class:SpeedCrunch

View File

@@ -0,0 +1,27 @@
# hyprlock configuration
general {
hide_cursor = true
ignore_empty_input = true
fail_timeout = 2000
}
background {
path = $HOME/dotfiles/images/sand_city.png
color = rgba(181C28FF)
}
input-field {
size = 30%,8%
outline_thickness = 3
dots_center = true
outer_color = rgba(BC7F15FF)
inner_color = rgba(E9C586FF)
font_family = JetBrainsMonoNerdFont
fade_on_empty = false
placeholder_text = \(^o^)/
rounding = 4
check_color = rgba(0066FFFF)
fail_color = rgba(FF8800FF)
halign = center
valign = center
}

View File

@@ -2,15 +2,15 @@
"name": "foobar", "name": "foobar",
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"height": 36, "height": 30,
"mode": "dock", "mode": "dock",
"exclusive": true, "exclusive": true,
"spacing": 16, "spacing": 16,
"reload_style_on_change": true, "reload_style_on_change": true,
"modules-left": ["sway/workspaces", "sway/window"], "modules-left": ["hyprland/workspaces", "hyprland/window"],
"modules-right": ["sway/language", "cpu", "pulseaudio", "clock#date", "clock#time"], "modules-right": ["hyprland/language", "cpu", "pulseaudio", "clock#date", "clock#time"],
"sway/workspaces": { "hyprland/workspaces": {
"format": "{name}", "format": "{name}",
"on-click": "activate", "on-click": "activate",
"all-output": true, "all-output": true,
@@ -19,11 +19,11 @@
"sort-by-name": false, "sort-by-name": false,
"sort-by-coordinates": true "sort-by-coordinates": true
}, },
"sway/window": { "hyprland/window": {
"max-length": 50 "max-length": 50
}, },
"sway/language": { "hyprland/language": {
"format": " {short} {variant}", "format": " {short} {variant}",
"tooltip": true "tooltip": true
}, },

View File

@@ -12,7 +12,7 @@
window#waybar { window#waybar {
font-family: JetBrainsMonoNerdFont; font-family: JetBrainsMonoNerdFont;
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 16px;
background: @--black; background: @--black;
color: @--white; color: @--white;
} }
@@ -37,7 +37,7 @@ window#waybar {
color: @--cyan; color: @--cyan;
} }
#workspaces button.focused { #workspaces button.active {
background: @--dark-grey; background: @--dark-grey;
border-bottom: 2px solid @--cyan; border-bottom: 2px solid @--cyan;
} }