add Desktop Environment (hypr) settings

This commit is contained in:
fbachus
2024-11-08 18:53:43 +01:00
parent 6ea752e214
commit c8163e23b4
14 changed files with 1293 additions and 0 deletions

8
.config/hypr/apps.conf Normal file
View File

@@ -0,0 +1,8 @@
# Set programs that you use
# $terminal = alacritty -e tmux
$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun
$appLauncher = tofi-drun | xargs hyprctl dispatch exec --
$lockscreen = hyprlock
$nextcloud = nextcloud --background

29
.config/hypr/autostart Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/bash
# variables
config=$HOME/.config/hypr
# wallpaper
hyprpaper &
# notification daemon
dunst &
# secrets manager
kwalletd6 &
# waybar
waybar &
# syncronisation
syncthing &
nextcloud --background &
# network-manager tray icon
NetworkManager &
nm-applet &
# other
polkit-kde-authentication-agent-1 &
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
hypridle &
polkit-qt6 &

View File

@@ -0,0 +1,2 @@
$w1 = hyprctl hyprpaper wallpaper "DP-1, ~/Pictures/backgrounds/transistor.jpg"
$w1 = hyprctl hyprpaper wallpaper "DP-2, ~/Pictures/backgrounds/transistor.jpg"

14
.config/hypr/gamemode.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$HYPRGAMEMODE" = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
exit
fi
hyprctl reload

View File

@@ -0,0 +1,144 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
source = ~/.config/hypr/apps.conf
$mainMod = SUPER
# Switch Keyboard Layout
# bind = $mainMod ALT_L, K, exec, hyprctl switchxkblayout holtek-usb-hid-keyboard next && hyprctl switchxkblayout at-translated-set-2-keyboard next
bind = $mainMod ALT_L, K, exec, hyprctl switchxkblayout holtek-usb-hid-keyboard next; hyprctl switchxkblayout holtek-usb-hid-keyboard-1 next; hyprctl switchxkblayout at-translated-set-2-keyboard next
# change volume with Volume Keys
# units: None(1% increases), dB, %(works as you'd expect on laptop, but on PC↓)
# percent increases (1%+-) lead to jumps to 10% or 90% on PC with Sharkoon
# keyboard, depending on whether you pressed VolUp or VolDown
# % is needed for the DragonFly, because it is too finegrained with 65k steps
binde = ,XF86AudioLowerVolume, exec, amixer -M -- set Master Playback Switch 1%-
binde = ,XF86AudioRaiseVolume, exec, amixer -M -- set Master Playback Switch 1%+
# Reduce effects for performance
bind = WIN, F1, exec, ~/.config/hypr/gamemode.sh
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal
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, C, killactive,
bind = $mainMod, D, togglesplit, # dwindle
bind = ALT_L, F4, killactive
bind = ALT_L, SPACE, exec, $appLauncher
bind = ALT_L, F11, fullscreenstate, 0
bind = $mainMod, F11, fullscreenstate, 2 # maximize # fullscreen window w/o fullscreen mode
bind = $mainMod, up, fullscreenstate, 3 # maximize # fullscreen window w/o fullscreen mode
bind = ALT_L, TAB, cyclenext
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, j, movefocus, d
bind = $mainMod, k, movefocus, u
bind = $mainMod, l, movefocus, r
# Maximise / Minimise workaround
#bind = $mainMod, up, movetoworkspace, empty
bind = $mainMod, O, fullscreenstate, 1
# lock
bind = $mainMod, F12, exec, $lockscreen
# Move window in direction
bind = $mainMod SHIFT, h, swapwindow, l
bind = $mainMod SHIFT, j, swapwindow, d
bind = $mainMod SHIFT, k, swapwindow, u
bind = $mainMod SHIFT, l, swapwindow, r
# Move window to other screen
bind = $mainMod SHIFT, left, movewindow, mon:-1
bind = $mainMod SHIFT, right, movewindow, mon:+1
# Resize Window in direction
binde = $mainMod CTRL, h, resizeactive, -25 0
binde = $mainMod CTRL, j, resizeactive, 0 25
binde = $mainMod CTRL, k, resizeactive, 0 -25
binde = $mainMod CTRL, l, resizeactive, 25 0
# 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
# Move Window to new virtual workspace/ desktop
bind = $mainMod ALT_L, h, movetoworkspace, r-1
bind = $mainMod ALT_L, l, movetoworkspace, r+1
# Switch to next/previous virtual workspace/ desktop, ignore empty
bind = ALT_L, h, workspace, e-1
bind = ALT_L, l, workspace, e+1
# ----
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, S
bind = $mainMod SHIFT, S, movetoworkspace, special:S
bind = $mainMod, A, togglespecialworkspace, A
bind = $mainMod SHIFT, A, movetoworkspace, special:A
bind = $mainMod, X, togglespecialworkspace, X
bind = $mainMod SHIFT, X, movetoworkspace, special:X
# ----
# 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
bind = SHIFT_LALT_L, h, changegroupactive, b
bind = SHIFT_LALT_L, l, changegroupactive, f
#--------------------
# will switch to a submap called groups
bind = $mainMod, G, submap, groups
# will start a submap called "groups"
submap = groups
# move window into a group according to vim-motion key
bind = , h, moveintogroup, l
bind = , j, moveintogroup, d
bind = , k, moveintogroup, u
bind = , l, moveintogroup, r
# get window out of group
bind = , G, moveoutofgroup,
# Toggle a group on the current window
bind = $mainMod, t, togglegroup
# lock window group
bind = , L, lockactivegroup
# use reset to go backc to the global submap
bind = , escape, submap, reset
# will reset the submap, which will return to the global submap
submap = reset
#--------------------

View File

@@ -0,0 +1,34 @@
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
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.
}
listener {
timeout = 300 # 5min.
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restor.
}
# turn off keyboard backlight, uncomment this section if have keyboard backlight.
listener {
timeout = 60 # 1min.
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
}
listener {
timeout = 900 # 15min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 1800 # 30min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
}
listener {
timeout = 2800 # 45min
on-timeout = systemctl suspend-then-hibernate # suspend pc, hibernate with delay
}

184
.config/hypr/hyprland.conf Normal file
View File

@@ -0,0 +1,184 @@
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
autogenerated = 0 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=name,resolution,offset, scale
#offset scales with scale XC
#monitor=DP-2,3840x2160,-2560x0,auto, bitdepth, 10, vrr, 1
#monitor=DP-1,3840x2160@144,auto,auto, bitdepth, 10, vrr, 1
monitor=DP-1,3840x2160@60,320x-1440,auto, bitdepth, 10, vrr, 1 #320=(2560-1920)/2
monitor=DP-1,3840x2160@144,auto,auto, bitdepth, 10, vrr, 1
monitor=DP-2,3840x2160,-2560x0,auto, bitdepth, 10, vrr, 1
monitor=eDP-1,1920x1080,0x0,1
monitor=HDMI-A-1,2560x1440@60.00,0x-1440,1
monitor=HDMI-A-2,1920x1080@74.97,0x-1080,1
#monitor=HDMI-A-2,2560x1440@60.00,0x-1440,1
#monitor=HDMI-A-2,3840x2160@60.00,0x-2160,auto
#monitor=HDMI-A-2,3840x2160,0x-1080,2,bitdepth, 10, vrr, 1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & dunst & syncthing & $nextcloud & $terminal
exec-once = $HOME/.config/hypr/autostart
exec-once = /usr/lib/polkit-kde-authentication-agent-1
exec-once = gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" # for GTK3 apps
exec-once = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" # for GTK4 apps
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
source = ~/.config/hypr/background.conf
source = ~/.config/hypr/hyprbindings.conf
source = ~/.config/hypr/apps.conf
# Some default env vars.
env = XCURSOR_SIZE,32
env = QT_QPA_PLATFORM,wayland # here for calibre, with debatable effect
env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt6ct if you have that
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = GSK_RENDERER,ngl
env = GTK_THEME,Adwaita-dark
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = gb,de
#kb_layout = de,gb
kb_variant = nodeadkeys
kb_model = pc105
kb_options = caps:escape
kb_rules =
numlock_by_default = true
repeat_rate = 35
repeat_delay = 300
# Follow mouse 1 2 3 :
follow_mouse = 2
touchpad {
natural_scroll = yes
}
scroll_factor = 1.0
# PC with mouse: now as device specific setting
# sensitivity = -0.4 # -1.0 - 1.0, 0 means no modification.
# accel_profile = flat
# Laptop with touchpad
sensitivity = 0
accel_profile = adaptive
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 2
gaps_out = 1
border_size = 1
col.active_border = rgba(33ccffee) rgba(00ff99ee) 30deg
col.inactive_border = rgba(595959aa)
layout = dwindle
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 3
blur {
enabled = true
size = 1
passes = 3
popups = true
vibrancy = 0.3
vibrancy_darkness = 0.8
}
drop_shadow = no
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
group {
groupbar{
enabled = true
font_family = "Hurmit Nerd Font Regular"
font_size = 11
gradients = false
scrolling = false
col.active = rgba(ea1d4e77)
}
col.border_active = rgba(ea1d4ebb) rgba(fd7000bb) 45deg
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 5, myBezier
animation = windowsOut, 1, 5, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 5, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
# new_status = master
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
}
misc {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device {
name = roccat-roccat-leadr-mouse
sensitivity = -0.4
accel_profile = flat
}
device {
name = razer-razer-taipan-1
sensitivity = 0.4
accel_profile = flat
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# now invalid: # windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
windowrule = float, pinned, ^(dunst)$
windowrule = float, pinned, ^(notification)$
windowrulev2 = float, pinned, title:^(Nextcloud)$
windowrulev2 = float, title:^(Volume Control)$
windowrulev2 = float, title:^(Network Connections)$
windowrulev2 = float, stayfocused, dimaround, fullscreenstate, 0, title:^(Bitwarden - Vivaldi)$
windowrulev2 = float, pin, workspace unset, noinitialfocus, suppressevents [fullscreen, maximize, activate, activatefocus], title:^(notificationtoasts)
windowrulev2 = workspace 6, noinitialfocus, class:^(steam)$
windowrulev2 = noinitialfocus, class: ^(steam)$

View File

@@ -0,0 +1,57 @@
disable_loading_bar = false
background {
monitor = # empty for all monitors
#path = /home/felix/Pictures/backgrounds/arch_linux_bg.png
path = screenshot
# color = rgba(20,20,20,80)
blur_passes = 3
blur_size = 1
noise = 0.2117
contrast = 0.8916
brightness = 0.5172
vibrancy = 0.1696
vibrancy_darkness = 1.0
}
input-field {
monitor =
size = 600, 50
outline_thickness = 1
dots_size = 0.25 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgba(15, 15, 15, 180)
inner_color = rgba(30, 30, 30, 180)
font_color = rgb(200, 200, 200)
fade_on_empty = true
fade_timeout = 500 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgba(204, 136, 34, 80)
fail_color = rgba(204, 34, 34, 80) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
position = 0, -250
halign = center
valign = center
}
label {
monitor =
text = $TIME '
color = hsla(50, 60%, 50%, 0.8)
font_size = 35
font_family = Z003
position = 0, 250
halign = center
valign = center
}

View File

@@ -0,0 +1,6 @@
preload=~/Pictures/backgrounds/transistor.jpg
preload=~/Pictures/backgrounds/pexels-eberhardgross-lakemountainstars.jpg
#wallpaper=,~/Pictures/backgrounds/transistor.jpg
#wallpaper=,~/Pictures/backgrounds/pexels-eberhardgross.jpg
wallpaper=,~/Pictures/backgrounds/pexels-eberhardgross-lakemountainstars.jpg

33
.config/hypr/monitors.rep Normal file
View File

@@ -0,0 +1,33 @@
Monitor DP-1 (ID 0):
3840x2160@143.98199 at 0x0
description: Advanced Micro Peripherals Ltd ES07D03 EVE213400622 (DP-1)
make: Advanced Micro Peripherals Ltd
model: ES07D03
serial: EVE213400622
active workspace: 1 (1)
special workspace: 0 ()
reserved: 0 0 0 0
scale: 1.50
transform: 0
focused: yes
dpmsStatus: 1
vrr: 0
activelyTearing: false
Monitor DP-2 (ID 1):
3840x2160@59.99700 at 2560x0
description: Iiyama North America PLG2888UH 0x01010101 (DP-2)
make: Iiyama North America
model: PLG2888UH
serial: 0x01010101
active workspace: 2 (2)
special workspace: 0 ()
reserved: 0 0 0 0
scale: 1.50
transform: 0
focused: no
dpmsStatus: 1
vrr: 0
activelyTearing: false