Add hyprland desktop config
This commit is contained in:
parent
12215d55a8
commit
5cc1a152b5
1 changed files with 54 additions and 2 deletions
|
@ -1,3 +1,55 @@
|
||||||
{
|
{ theme, ... }: {
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
settings = {
|
||||||
|
monitor = [
|
||||||
|
"DP-4, highrr, 2560x0, 1"
|
||||||
|
"DP-5, highrr, 0x0, 1"
|
||||||
|
];
|
||||||
|
env = [
|
||||||
|
"LIBVA_DRIVER_NAME,nvidia"
|
||||||
|
"XDG_SESSION_TYPE,wayland"
|
||||||
|
"GBM_BACKND,nvidia-drm"
|
||||||
|
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||||
|
"WLR_NO_HARDWARE_CURSORS,1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
# Set the custom launcher script
|
||||||
|
".config/hypr/start.sh" = {
|
||||||
|
enable = true;
|
||||||
|
executable = true;
|
||||||
|
text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# https://wiki.hyprland.org/FAQ/#some-of-my-apps-take-a-really-long-time-to-open
|
||||||
|
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
|
||||||
|
|
||||||
|
# Set the wallpaper
|
||||||
|
swww init
|
||||||
|
|
||||||
|
# Waybar
|
||||||
|
waybar &
|
||||||
|
|
||||||
|
# Set up the idle management daemon
|
||||||
|
swayidle -w \
|
||||||
|
timeout 120 'swaylock -f && playerctl pause' \
|
||||||
|
timeout 180 'hyprctl dispatch dpms off' \
|
||||||
|
timeout 300 'systemctl suspend-then-hibernate' \
|
||||||
|
resume 'hyprctl dispatch dpms on' \
|
||||||
|
before-sleep 'swaylock -f' \
|
||||||
|
before-sleep 'playerctl pause' &
|
||||||
|
|
||||||
|
# Automatic device mounting
|
||||||
|
udiskie &
|
||||||
|
|
||||||
|
DIR=/etc/nixos/git/wallpapers/${theme}
|
||||||
|
IMG=`ls $DIR | shuf -n 1`
|
||||||
|
swww img $DIR/$IMG -t random &
|
||||||
|
|
||||||
|
# Notification listener
|
||||||
|
mako
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue