nixos/home/hyprland/hyprland_gunter.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

350 lines
9.9 KiB
Nix
Raw Normal View History

2024-02-29 08:27:26 +00:00
{
pkgs,
lib,
config,
...
}:
{
2024-02-27 20:52:14 +00:00
options.hyprland.enable = lib.mkEnableOption "Hyprland";
config = {
2024-03-03 04:31:33 +00:00
home.packages = with pkgs; [
2024-03-02 20:16:23 +00:00
dunst
rofi-wayland
slurp
swww
waybar
wl-clipboard
2024-03-03 07:12:58 +00:00
catppuccin-cursors.macchiatoLavender
bibata-cursors
2024-03-04 15:15:04 +00:00
# For potentially fixing some issues
libsForQt5.qt5.qtwayland
libsForQt5.qt5ct
2024-03-02 20:16:23 +00:00
];
2024-02-27 20:52:14 +00:00
2024-11-20 20:06:17 +00:00
services.hyprpaper = {
enable = true;
settings = {
splash = false;
};
};
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "hyprlock";
before_sleep_cmd = "lockhelper";
ignore_dbus_inhibit = false;
};
listener = {
timeout = 240;
on-timeout = "lockhelper";
};
};
};
programs.hyprlock = {
enable = true;
settings = {
background = [
{
monitor = "DP-5";
path = "/tmp/lockscreen/DP-5.png";
blur_passes = 3;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
}
{
monitor = "DP-6";
path = "/tmp/lockscreen/DP-6.png";
blur_passes = 3;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
}
{
monitor = "DP-7";
path = "/tmp/lockscreen/DP-7.png";
blur_passes = 3;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
}
{
monitor = "DP-8";
path = "/tmp/lockscreen/DP-8.png";
blur_passes = 3;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
}
];
general = {
no_fade_in = false;
grace = 0;
disable_loading_bar = true;
};
input-field = [
{
size = "250, 60";
outline_thickness = 2;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.5)";
font_color = "rgb(200, 200, 200)";
fade_on_empty = false;
font_family = "JetBrains Mono Nerd Font Mono";
placeholder_text = "<i><span foreground=\"##cdd6f4\">Input Password...</span></i>";
hide_input = false;
position = "0, -120";
halign = "center";
valign = "center";
}
];
label = [
{
text = "cmd[update:2000] echo \"$(date +\"%b %d %H:%M\")\"";
color = "rgba(255, 255, 255, 0.6)";
font_size = 120;
font_family = "JetBrains Mono Nerd Font Mono ExtraBold";
position = "0, -300";
halign = "center";
valign = "top";
}
];
};
};
# streamcontroller service
systemd.user.services = {
streamcontroller = {
Unit = {
Description = "Streamcontroller service";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
Requisite = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.streamcontroller}/bin/streamcontroller -b";
Restart = "on-failure";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
2024-02-27 20:52:14 +00:00
wayland.windowManager.hyprland = {
enable = true;
2024-05-26 22:57:10 +00:00
package = pkgs.hyprland;
2024-02-27 20:52:14 +00:00
settings = {
"$mainMod" = "SUPER";
2024-03-02 23:03:22 +00:00
"$shiftMainMod" = "SUPER_SHIFT";
2024-03-02 21:20:09 +00:00
"$term" = "kitty";
2024-02-27 20:52:14 +00:00
2024-03-04 15:15:04 +00:00
# monitors
"$mon_top" = "desc:BNQ G2420HDBL T2B04424SL000";
"$mon_left" = "desc:Samsung Electric Company LS27A600U HNMT502389";
"$mon_center" = "desc:Acer Technologies XB271HU #ASPVEKfgZ8Dd";
"$mon_right" = "desc:Samsung Electric Company LS27A600U HNMT502390";
2024-03-03 04:31:33 +00:00
monitor = [
2024-03-04 22:56:22 +00:00
# "$mon_top,1920x1080@60,2560x0,1" # top T2B04424SL000
"DP-6,1920x1080@60,2560x0,1" # top T2B04424SL000 60
# "$mon_left,2560x1440@75,0x1080,1" # left
2024-03-06 07:53:55 +00:00
"DP-8,2560x1440@75,0x1080,1" # left 75hz
2024-03-04 22:56:22 +00:00
# "$mon_center,2560x1440@120,2560x1080,1" # main #ASPVEKfgZ8Dd
2024-05-31 10:53:58 +00:00
"DP-5,2560x1440@144,2560x1080,1" # main #ASPVEKfgZ8Dd 120hz
2024-03-04 22:56:22 +00:00
# "$mon_right,2560x1440@75,5120x1080,1" # right
2024-03-06 07:53:55 +00:00
"DP-7,2560x1440@75,5120x1080,1" # right 75hz
2024-03-02 20:16:23 +00:00
];
2024-02-27 21:20:00 +00:00
input = {
kb_layout = "no";
follow_mouse = 1;
};
2024-02-27 20:52:14 +00:00
2024-10-10 21:16:21 +00:00
cursor = {
no_hardware_cursors = true;
};
2024-03-02 20:16:23 +00:00
env = [
2024-05-23 22:00:47 +00:00
"LIBVA_DRIVER_NAME,nvidia"
2024-03-02 22:25:58 +00:00
"XDG_SESSION_TYPE,wayland"
2024-05-23 22:00:47 +00:00
"GBM_BACKEND,nvidia-drm"
# "__GLX_VENDOR_LIBRARY_NAME,nvidia"
2024-03-02 20:16:23 +00:00
"WLR_NO_HARDWARE_CURSORS,1"
];
2024-02-27 21:20:00 +00:00
decoration = {
2024-06-13 10:02:11 +00:00
rounding = 10;
2024-11-20 20:06:17 +00:00
# shadow = {
# enable = true;
# range = 4;
# render_power = 3;
# };
2024-02-27 21:20:00 +00:00
blur = {
enabled = true;
size = 3;
passes = 1;
xray = true;
};
};
2024-02-27 20:52:14 +00:00
2024-02-27 21:20:00 +00:00
general = {
gaps_in = 4;
gaps_out = 10;
border_size = 2;
layout = "dwindle";
};
2024-02-27 20:52:14 +00:00
2024-02-27 21:20:00 +00:00
animations = {
enabled = true;
2024-07-22 18:43:37 +00:00
bezier = [
"myBezier, 0.05, 0.9, 0.1, 1.05"
"easeInB, 0.6, -0.28, 0.735, 0.045"
];
2024-02-27 21:20:00 +00:00
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
2024-07-22 18:43:37 +00:00
"workspaces, 1, 6, easeInB, slidefadevert"
2024-06-13 10:02:11 +00:00
"specialWorkspace, 1, 4, default, fade"
2024-02-27 21:20:00 +00:00
];
};
dwindle = {
pseudotile = true;
preserve_split = true;
2024-06-13 10:02:11 +00:00
special_scale_factor = 0.85;
2024-02-27 21:20:00 +00:00
};
2024-06-29 09:28:00 +00:00
master = {
new_status = "master";
};
2024-05-31 10:53:58 +00:00
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
2024-02-27 20:52:14 +00:00
2024-02-29 08:27:26 +00:00
windowrulev2 = [
2024-03-02 20:16:23 +00:00
"opacity 0.95 override 0.7 override,class:^(Alacritty)$"
"opacity 0.95 override 0.7 override,class:^(kitty)$"
];
2024-03-04 15:15:04 +00:00
workspace = [
2024-07-22 18:43:37 +00:00
"name:T1, monitor:$mon_top, persistent:true, default:true"
2024-07-27 22:06:08 +00:00
"name:T2, monitor:$mon_top, persistent:true, default:false"
2024-07-22 18:43:37 +00:00
"name:L1, monitor:$mon_left, persistent:true, default:true"
2024-07-27 22:06:08 +00:00
"name:L2, monitor:$mon_left, persistent:true, default:false"
2024-07-22 18:43:37 +00:00
"name:R1, monitor:$mon_right, persistent:true, default:true"
2024-07-27 22:06:08 +00:00
"name:R2, monitor:$mon_right, persistent:true, default:false"
2024-05-31 10:53:58 +00:00
"name:c1, monitor:$mon_center, persistent:true, default:true"
2024-07-27 22:06:08 +00:00
"name:c2, monitor:$mon_center, persistent:true, default:false"
"name:c3, monitor:$mon_center, persistent:true, default:false"
"name:c4, monitor:$mon_center, persistent:true, default:false"
2024-06-13 10:02:11 +00:00
"special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false"
2024-03-04 15:15:04 +00:00
];
2024-07-25 21:04:43 +00:00
bindm = [
"$mainMod,mouse:272,movewindow"
"$shiftMainMod,mouse:272,resizewindow"
];
2024-03-02 20:16:23 +00:00
bindr = [
# mumble ptt release
2024-03-03 11:57:13 +00:00
# ",code:202,exec,mumble rpc stoptalking"
2024-03-04 10:51:51 +00:00
# ",code:202,exec,pamixer --source 63 -m"
2024-03-09 19:31:18 +00:00
# ",code:202,exec,sleep 0.5 && pamixer --default-source -m"
2024-02-29 08:27:26 +00:00
];
2024-02-27 21:20:00 +00:00
bind = [
# term
"$mainMod,Return,exec,$term"
2024-03-03 05:33:49 +00:00
2024-04-22 20:34:14 +00:00
# hyprlock
2024-06-10 22:53:59 +00:00
"$shiftMainMod,l,exec,lockhelper"
2024-04-22 20:34:14 +00:00
2024-02-27 21:20:00 +00:00
# rofi
2024-03-03 05:33:49 +00:00
"$mainMod,D,exec,rofi-launcher"
"$mainMod,P,exec,rofi-rbw"
2024-02-27 21:20:00 +00:00
# hyprland
"$mainMod,Q,killactive,"
"CTRLALT,Delete,exit,"
"$mainMod,Space,togglefloating,"
"$mainMod,F,fullscreen,"
2024-02-27 20:52:14 +00:00
2024-02-27 21:20:00 +00:00
# focus
"$mainMod,l,movefocus,l"
"$mainMod,h,movefocus,r"
"$mainMod,k,movefocus,u"
"$mainMod,j,movefocus,d"
2024-02-27 20:52:14 +00:00
2024-02-27 21:20:00 +00:00
# move
"$mainMod,h,movewindow,l"
"$mainMod,l,movewindow,r"
"$mainMod,k,movewindow,u"
"$mainMod,j,movewindow,d"
2024-03-02 20:16:23 +00:00
2024-03-02 23:03:22 +00:00
# Force opacity
"$shiftMainMod,o,exec, hl-no-opacity"
2024-06-09 20:16:29 +00:00
# grimblast
"$mainMod,Print,exec,grimblast save active ~/tmp/$(date -Iseconds).png"
2024-06-13 20:02:05 +00:00
"$shiftMainMod,Print,exec,grimblast copy area"
2024-06-09 20:16:29 +00:00
",Print,exec,grimblast copy active"
2024-03-02 20:16:23 +00:00
# mumble ptt click
2024-03-03 11:57:13 +00:00
# ",code:202,exec,mumble rpc starttalking"
2024-03-09 19:31:18 +00:00
#",code:202,pass,^(info\.mumble\.Mumble)$"
# ",code:202,exec,pamixer --default-source -u"
2024-03-20 01:53:23 +00:00
",code:202,pass,^discord$"
2024-03-02 20:16:23 +00:00
2024-08-13 05:46:23 +00:00
# Paste to wtype
2024-08-13 09:08:40 +00:00
"$mainMod,v,exec,sleep 0.5s && wl-paste | wtype -"
2024-08-13 05:46:23 +00:00
2024-03-04 22:56:22 +00:00
# worspace switching
2024-05-31 10:53:58 +00:00
"$mainMod,1,workspace,name:c1"
"$mainMod,2,workspace,name:c2"
"$mainMod,3,workspace,name:c3"
"$mainMod,4,workspace,name:c4"
2024-03-04 22:56:22 +00:00
"$mainMod,5,workspace,5"
"$mainMod,6,workspace,6"
2024-05-31 10:53:58 +00:00
2024-06-20 18:17:54 +00:00
# Move window to workspace
"$shiftMainMod,1,movetoworkspace,name:c1"
"$shiftMainMod,2,movetoworkspace,name:c2"
"$shiftMainMod,3,movetoworkspace,name:c3"
"$shiftMainMod,4,movetoworkspace,name:c4"
"$shiftMainMod,5,movetoworkspace,5"
"$shiftMainMod,6,movetoworkspace,6"
2024-05-31 10:53:58 +00:00
# Special workspace
"$mainMod,c,togglespecialworkspace"
"$shiftMainMod,c,movetoworkspace, special"
2024-03-04 22:56:22 +00:00
];
2024-03-03 04:31:33 +00:00
exec-once = [
2024-03-02 20:16:23 +00:00
"waybar"
2024-11-20 20:06:17 +00:00
# "hyprpaper & sleep 10 && randomwp"
# "easyeffects --gapplication-service"
# "hypridle"
# "streamcontroller -b"
2024-03-02 20:16:23 +00:00
# "dunst"
];
2024-02-27 20:52:14 +00:00
};
};
};
}