Modularize Hyprland configuration

This commit is contained in:
DashieTM 2024-08-03 19:06:59 +02:00
parent 25eac3559f
commit bab352d00e
18 changed files with 543 additions and 472 deletions

View file

@ -10,15 +10,15 @@
device = 1;
};
hostname = "marmo";
colorscheme = "catppuccin-mocha";
};
mods = {
hyprland.monitor = [
# default
"DP-1,1920x1080@144,0x0,1"
# all others
",highrr,auto,1"
];
colorscheme = "catppuccin-mocha";
};
mods = {
amdgpu.enable = true;
kde_connect.enable = true;
xone.enable = true;

View file

@ -10,6 +10,9 @@
ironbar.modules = [
{ type = "upower"; class = "memory-usage"; }
];
colorscheme = "catppuccin-mocha";
};
mods = {
hyprland = {
monitor = [
# default
@ -20,9 +23,6 @@
];
extra_autostart = [ "hyprdock --server" ];
};
colorscheme = "catppuccin-mocha";
};
mods = {
amdgpu.enable = true;
kde_connect.enable = true;
bluetooth.enable = true;

View file

@ -15,6 +15,9 @@ in
};
streamdeck.enable = true;
hostname = "spaceship";
colorscheme = "catppuccin-mocha";
};
mods = {
hyprland = {
monitor = [
# default
@ -45,7 +48,7 @@ in
# monitor right
"3,monitor:HDMI-A-1, default:true"
];
hyprpaper = ''
hyprpaper.config = ''
#load
preload = /home/${username}/Pictures/backgrounds/shinobu_2k.jpg
preload = /home/${username}/Pictures/backgrounds/shino_wide.png
@ -59,9 +62,6 @@ in
'';
extra_autostart = [ "streamdeck -n" ];
};
colorscheme = "catppuccin-mocha";
};
mods = {
extraDrives = [
{
name = "drive2";

View file

@ -137,47 +137,6 @@
'';
};
hyprland = {
monitor = lib.mkOption {
default = [ ];
example = [
"DP-1,3440x1440@180,2560x0,1,vrr,0"
];
type = with lib.types; listOf str;
description = ''
The monitor configuration for hyprland.
'';
};
workspace = lib.mkOption {
default = [ ];
example = [
"2,monitor:DP-1, default:true"
];
type = with lib.types; listOf str;
description = ''
The workspace configuration for hyprland.
'';
};
hyprpaper = lib.mkOption {
default = '''';
example = ''
hyprpaper stuff
'';
type = lib.types.lines;
description = ''
hyprpaper
'';
};
extra_autostart = lib.mkOption {
default = [ ];
example = [ "your application" ];
type = lib.types.listOf lib.types.str;
description = ''
Extra exec_once.
'';
};
};
nvim-colorscheme = lib.mkOption {
default = { tokyonight = { enable = true; }; };
example = { catppuccin = { enable = true; }; };

View file

@ -16,5 +16,6 @@
./home_packages.nix
./media.nix
./flatpak.nix
./hyprland
];
}

View file

@ -12,17 +12,24 @@
};
};
config = lib.mkIf config.mods.gnome_services.enable (lib.optionalAttrs (options?services.gnome.gnome-keyring) {
programs.dconf.enable = true;
services = {
# needed for GNOME services outside of GNOME Desktop
dbus.packages = with pkgs; [
gcr
gnome.gnome-settings-daemon
];
config = lib.mkIf config.mods.gnome_services.enable (lib.optionalAttrs (options?services.gnome.gnome-keyring)
{
programs.dconf.enable = true;
services = {
# needed for GNOME services outside of GNOME Desktop
dbus.packages = with pkgs; [
gcr
gnome.gnome-settings-daemon
];
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
};
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
};
} // lib.optionalAttrs (options?home.packages) {
home.packages = with pkgs; [
nautilus
sushi
nautilus-python
];
});
}

View file

@ -0,0 +1,83 @@
{ lib, config, pkgs, options, inputs, ... }: {
options.mods = {
hyprland.anyrun = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enables anyrun";
};
};
};
config = lib.mkIf config.mods.hyprland.anyrun.enable
(lib.optionalAttrs (options?programs.anyrun) {
programs.anyrun = {
enable = true;
config = {
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
inputs.anyrun.packages.${pkgs.system}.rink
inputs.anyrun.packages.${pkgs.system}.translate
inputs.anyrun.packages.${pkgs.system}.websearch
];
#position = "center";
hideIcons = false;
width = { fraction = 0.3; };
y = { fraction = 0.5; };
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
};
extraCss = ''
#window {
border-radius: 10px;
background-color: none;
}
box#main {
border-radius: 10px;
}
list#main {
border-radius: 10px;
margin: 0px 10px 10px 10px;
}
list#plugin {
border-radius: 10px;
}
list#match {
border-radius: 10px;
}
entry#entry {
border: none;
border-radius: 10px;
margin: 10px 10px 0px 10px;
}
label#match-desc {
font-size: 12px;
border-radius: 10px;
}
label#match-title {
font-size: 12px;
border-radius: 10px;
}
label#plugin {
font-size: 16px;
border-radius: 10px;
}
* {
border-radius: 10px;
}
'';
};
});
}

View file

@ -0,0 +1,9 @@
{
imports = [
./hyprland.nix
./anyrun.nix
./ironbar.nix
./hyprlock.nix
./hyprpaper.nix
];
}

View file

@ -0,0 +1,324 @@
{ config, lib, options, pkgs, ... }: {
imports = [
];
options.mods = {
hyprland = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = ''
Enable Hyprland
'';
};
monitor = lib.mkOption {
default = [ ];
example = [
"DP-1,3440x1440@180,2560x0,1,vrr,0"
];
type = with lib.types; listOf str;
description = ''
The monitor configuration for hyprland.
'';
};
workspace = lib.mkOption {
default = [ ];
example = [
"2,monitor:DP-1, default:true"
];
type = with lib.types; listOf str;
description = ''
The workspace configuration for hyprland.
'';
};
extra_autostart = lib.mkOption {
default = [ ];
example = [ "your application" ];
type = lib.types.listOf lib.types.str;
description = ''
Extra exec_once.
'';
};
};
};
config = lib.mkIf config.mods.hyprland.enable
(lib.optionalAttrs (options?wayland.windowManager.hyprland)
{
# install Hyprland related packages
home.packages = with pkgs; [
xorg.xprop
grim
slurp
satty
xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
copyq
wl-clipboard
hyprcursor
hyprpicker
];
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
"source" = "/home/${config.conf.username}/.config/reset/keyboard.conf";
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bind = [
# screenshots
"$mod SUPER,S,exec,grim -g \"$(slurp)\" - | wl-copy"
"$mod SUPERSHIFTALT,S,exec, grim -g \"$(slurp)\" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy"
"$mod SUPERSHIFT,S,exec,grim -g \"$(slurp)\" - | satty -f -"
"$mod SUPERCONTROLSHIFT,S,exec,grim -c -g \"2560,0 3440x1440\" - | wl-copy"
# regular programs
"$mod SUPER,F,exec,firefox"
"$mod SUPER,T,exec,kitty -1"
"$mod SUPER,E,exec,nautilus -w"
"$mod SUPER,N,exec,neovide"
"$mod SUPER,M,exec,oxidash"
"$mod SUPER,R,exec,anyrun"
"$mod SUPER,G,exec,oxicalc"
"$mod SUPER,D,exec,oxishut"
"$mod SUPER,A,exec,oxipaste"
"$mod SUPERSHIFT,P,exec,hyprdock --gui"
"$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend"
"$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate"
# media keys
",XF86AudioMute,exec, $HOME/.config/scripts/audio_control.sh mute"
",XF86AudioLowerVolume,exec, $HOME/.config/scripts/audio_control.sh sink -5%"
",XF86AudioRaiseVolume,exec, $HOME/.config/scripts/audio_control.sh sink +5%"
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
",XF86MonBrightnessDown,exec, $HOME/.config/scripts/change-brightness brightness 10%-"
",XF86MonBrightnessUp,exec, $HOME/.config/scripts/change-brightness brightness +10%"
# hyprland keybinds
# misc
"$mod SUPER,V,togglefloating,"
"$mod SUPER,B,fullscreen,"
"$mod SUPER,C,togglesplit"
"$mod SUPER,Q,killactive,"
"$mod SUPERSHIFTALT,M,exit,"
"$mod SUPERSHIFT,W,togglespecialworkspace"
# move
"$mod SUPER,left,movewindow,l"
"$mod SUPER,right,movewindow,r"
"$mod SUPER,up,movewindow,u"
"$mod SUPER,down,movewindow,d"
# workspaces
"$mod SUPER,1,workspace,1"
"$mod SUPER,2,workspace,2"
"$mod SUPER,3,workspace,3"
"$mod SUPER,4,workspace,4"
"$mod SUPER,5,workspace,5"
"$mod SUPER,6,workspace,6"
"$mod SUPER,7,workspace,7"
"$mod SUPER,8,workspace,8"
"$mod SUPER,9,workspace,9"
"$mod SUPER,0,workspace,10"
# move to workspace
"$mod SUPERSHIFT,1,movetoworkspace,1"
"$mod SUPERSHIFT,2,movetoworkspace,2"
"$mod SUPERSHIFT,3,movetoworkspace,3"
"$mod SUPERSHIFT,4,movetoworkspace,4"
"$mod SUPERSHIFT,5,movetoworkspace,5"
"$mod SUPERSHIFT,6,movetoworkspace,6"
"$mod SUPERSHIFT,7,movetoworkspace,7"
"$mod SUPERSHIFT,8,movetoworkspace,8"
"$mod SUPERSHIFT,9,movetoworkspace,9"
"$mod SUPERSHIFT,0,movetoworkspace,10"
# move to workspace silent
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
"$mod SUPERSHIFTALT,3,movetoworkspacesilent,3"
"$mod SUPERSHIFTALT,4,movetoworkspacesilent,4"
"$mod SUPERSHIFTALT,5,movetoworkspacesilent,5"
"$mod SUPERSHIFTALT,6,movetoworkspacesilent,6"
"$mod SUPERSHIFTALT,7,movetoworkspacesilent,7"
"$mod SUPERSHIFTALT,8,movetoworkspacesilent,8"
"$mod SUPERSHIFTALT,9,movetoworkspacesilent,9"
"$mod SUPERSHIFTALT,0,movetoworkspacesilent,10"
# preselection
"$mod SUPERALT,j,layoutmsg,preselect l"
"$mod SUPERALT,k,layoutmsg,preselect d"
"$mod SUPERALT,l,layoutmsg,preselect u"
"$mod SUPERALT,semicolon,layoutmsg,preselect r"
"$mod SUPERALT,h,layoutmsg,preselect n"
];
binde = [
# hyprland keybinds
# focus
"$mod SUPER,J,movefocus,l"
"$mod SUPER,semicolon,movefocus,r"
"$mod SUPER,L,movefocus,u"
"$mod SUPER,K,movefocus,d"
# resize
"$mod SUPER,U,resizeactive,-20 0"
"$mod SUPER,P,resizeactive,20 0"
"$mod SUPER,O,resizeactive,0 -20"
"$mod SUPER,I,resizeactive,0 20"
];
general = {
gaps_out = "3,5,5,5";
border_size = 3;
"col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
# "col.inactive_border" = "0x66333333";
allow_tearing = true;
};
decoration = {
rounding = 4;
};
animations = {
bezier = "penguin,0.05,0.9,0.1,1.0";
animation = [
"windowsMove,1,4,default"
"windows,1,7,default,popin 70%"
"windowsOut,1,7,default,popin 70%"
"border,1,10,default"
"fade,1,7,default"
"workspaces,1,6,default"
"layers,1,3,default,popin"
];
};
dwindle = {
preserve_split = true;
pseudotile = 0;
permanent_direction_override = false;
};
input = {
kb_layout = "{config.mods.xkb.layout}";
kb_variant = "{config.mods.xkb.variant}";
repeat_delay = 200;
force_no_accel = true;
touchpad = {
natural_scroll = true;
tap-to-click = true;
tap-and-drag = true;
};
};
misc = {
animate_manual_resizes = 1;
enable_swallow = true;
disable_splash_rendering = true;
disable_hyprland_logo = true;
swallow_regex = "^(.*)(kitty)(.*)$";
initial_workspace_tracking = 1;
no_direct_scanout = false;
};
cursor = {
# conversion seems to be borked right now, i want a smooth bibata :(
enable_hyprcursor = false;
no_hardware_cursors = true;
no_break_fs_vrr = true;
};
gestures = {
workspace_swipe = true;
};
monitor = config.mods.hyprland.monitor;
workspace = config.mods.hyprland.workspace;
env = [
"GTK_CSD,0"
"TERM,\"kitty /bin/fish\""
"XDG_CURRENT_DESKTOP=Hyprland"
"XDG_SESSION_TYPE=wayland"
"XDG_SESSION_DESKTOP=Hyprland"
"HYPRCURSOR_THEME,Bibata-Modern-Classic"
"HYPRCURSOR_SIZE,24"
"XCURSOR_THEME,Bibata-Modern-Classic"
"XCURSOR_SIZE,24"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME,qt5ct"
"QT_WAYLAND_FORCE_DPI,96"
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_SCALE_FACTOR,1"
"EDITOR,\"neovide --novsync --nofork\""
"WLR_DRM_NO_ATOMIC,1"
"GTK_USE_PORTAL, 1"
];
layerrule = [
# layer rules
# mainly to disable animations within slurp and grim
"noanim, selection"
];
windowrule = [
# window rules
"tile,^(.*)(Spotify)(.*)$"
"float,^(.*)(OxiCalc)(.*)$"
"float,^(.*)(winecfg.exe)(.*)$"
"float,^(.*)(speed.exe)(.*)$"
"float,^(.*)(copyq)(.*)$"
"center,^(.*)(swappy)(.*)$"
"float,title:^(.*)(Spirit)(.*)$"
"float,title:^(.*)(reset)(.*)$"
"workspace 10 silent,^(.*)(steam)(.*)$"
"workspace 9 silent,^(.*)(dota)(.*)$"
"workspace 9 silent,^(.*)(battlebits)(.*)$"
"workspace 9 silent,^(.*)(aoe)(.*)$"
"suppressevent fullscreen maximize,^(.*)(neovide)(.*)$"
];
windowrulev2 = [
"immediate,class:^(.*)(Pal)$"
"immediate,class:^(.*)(dota2)$"
"immediate,class:^(.*)(needforspeedheat.exe)$"
];
exec-once = [
# environment
"systemctl --user import-environment"
"dbus-update-activation-environment --systemd --all"
"hyprctl setcursor Bibata-Modern-Classic 24"
# other programs
"hyprpaper"
"ironbar"
"firefox"
"oxipaste_daemon"
"nextcloud --background"
"oxinoti"
] ++ config.mods.hyprland.extra_autostart;
# plugin = {
# hyprspace = {
# bind = [
# "SUPER, W, overview:toggle, toggle"
# ];
# };
# };
};
# wayland.windowManager.hyprland.plugins = [
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
# ];
});
}

View file

@ -0,0 +1,48 @@
{ config, lib, options, pkgs, ... }: {
options.mods = {
hyprland.hyprlock = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enables Hyprlock";
};
};
};
config = lib.mkIf config.mods.hyprland.hyprlock.enable
(lib.optionalAttrs (options?xdg.configFile) {
home.packages = with pkgs; [ hyprlock ];
programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable {
enable = true;
settings = {
background = [
{
monitor = "";
path = "";
color = "rgba(26, 27, 38, 1.0)";
}
];
input-field = [
{
monitor = "${config.conf.monitor}";
placeholder_text = "password or something";
}
];
label = [
{
monitor = "${config.conf.monitor}";
text = "$TIME";
font_size = 50;
position = "0, 200";
valign = "center";
halign = "center";
}
];
};
};
});
}

View file

@ -0,0 +1,31 @@
{ config, lib, options, pkgs, ... }: {
options.mods = {
hyprland.hyprpaper = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enables Hyprpaper";
};
config = lib.mkOption {
default = '''';
example = ''
Hyprpaper config
'';
type = lib.types.lines;
description = ''
Hyprpaper config
'';
};
};
};
config = lib.mkIf config.mods.hyprland.hyprpaper.enable
(lib.optionalAttrs (options?xdg.configFile)
{
home.packages = with pkgs; [ hyprpaper ];
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable {
text = config.mods.hyprland.hyprpaper.config;
};
});
}

View file

@ -1,11 +1,23 @@
{ config, ... }:
let
username = config.conf.username;
in
{ lib, config, pkgs, options, ... }:
let
username = config.conf.username;
in
{
options.mods = {
hyprland.ironbar = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enables ironbar";
};
};
};
config = lib.mkIf config.mods.hyprland.ironbar.enable
(lib.optionalAttrs (options?programs.ironbar)
{
programs.ironbar =
{
programs.ironbar = {
enable = true;
style = ''
@import url("/home/${username}/.config/gtk-3.0/gtk.css");
@ -258,4 +270,5 @@ in
};
};
};
});
}

View file

@ -32,7 +32,6 @@ in
home-manager.users.${config.conf.username} = {
imports = [
./hyprland/default.nix
./common.nix
./xdg.nix
./oxi/default.nix

View file

@ -1,69 +0,0 @@
{ inputs, pkgs, ... }: {
programs.anyrun = {
enable = true;
config = {
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
inputs.anyrun.packages.${pkgs.system}.rink
inputs.anyrun.packages.${pkgs.system}.translate
inputs.anyrun.packages.${pkgs.system}.websearch
];
#position = "center";
hideIcons = false;
width = { fraction = 0.3; };
y = { fraction = 0.5; };
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
};
extraCss = ''
#window {
border-radius: 10px;
background-color: none;
}
box#main {
border-radius: 10px;
}
list#main {
border-radius: 10px;
margin: 0px 10px 10px 10px;
}
list#plugin {
border-radius: 10px;
}
list#match {
border-radius: 10px;
}
entry#entry {
border: none;
border-radius: 10px;
margin: 10px 10px 0px 10px;
}
label#match-desc {
font-size: 12px;
border-radius: 10px;
}
label#match-title {
font-size: 12px;
border-radius: 10px;
}
label#plugin {
font-size: 16px;
border-radius: 10px;
}
* {
border-radius: 10px;
}
'';
};
}

View file

@ -1,265 +0,0 @@
{ config
, lib
, ...
}:
{
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
"source" = "/home/${config.conf.username}/.config/reset/keyboard.conf";
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bind = [
# screenshots
"$mod SUPER,S,exec,grim -g \"$(slurp)\" - | wl-copy"
"$mod SUPERSHIFTALT,S,exec, grim -g \"$(slurp)\" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy"
"$mod SUPERSHIFT,S,exec,grim -g \"$(slurp)\" - | satty -f -"
"$mod SUPERCONTROLSHIFT,S,exec,grim -c -g \"2560,0 3440x1440\" - | wl-copy"
# regular programs
"$mod SUPER,F,exec,firefox"
"$mod SUPER,T,exec,kitty -1"
"$mod SUPER,E,exec,nautilus -w"
"$mod SUPER,N,exec,neovide"
"$mod SUPER,M,exec,oxidash"
"$mod SUPER,R,exec,anyrun"
"$mod SUPER,G,exec,oxicalc"
"$mod SUPER,D,exec,oxishut"
"$mod SUPER,A,exec,oxipaste"
"$mod SUPERSHIFT,P,exec,hyprdock --gui"
"$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl suspend"
"$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate"
# media keys
",XF86AudioMute,exec, $HOME/.config/scripts/audio_control.sh mute"
",XF86AudioLowerVolume,exec, $HOME/.config/scripts/audio_control.sh sink -5%"
",XF86AudioRaiseVolume,exec, $HOME/.config/scripts/audio_control.sh sink +5%"
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
",XF86MonBrightnessDown,exec, $HOME/.config/scripts/change-brightness brightness 10%-"
",XF86MonBrightnessUp,exec, $HOME/.config/scripts/change-brightness brightness +10%"
# hyprland keybinds
# misc
"$mod SUPER,V,togglefloating,"
"$mod SUPER,B,fullscreen,"
"$mod SUPER,C,togglesplit"
"$mod SUPER,Q,killactive,"
"$mod SUPERSHIFTALT,M,exit,"
"$mod SUPERSHIFT,W,togglespecialworkspace"
# move
"$mod SUPER,left,movewindow,l"
"$mod SUPER,right,movewindow,r"
"$mod SUPER,up,movewindow,u"
"$mod SUPER,down,movewindow,d"
# workspaces
"$mod SUPER,1,workspace,1"
"$mod SUPER,2,workspace,2"
"$mod SUPER,3,workspace,3"
"$mod SUPER,4,workspace,4"
"$mod SUPER,5,workspace,5"
"$mod SUPER,6,workspace,6"
"$mod SUPER,7,workspace,7"
"$mod SUPER,8,workspace,8"
"$mod SUPER,9,workspace,9"
"$mod SUPER,0,workspace,10"
# move to workspace
"$mod SUPERSHIFT,1,movetoworkspace,1"
"$mod SUPERSHIFT,2,movetoworkspace,2"
"$mod SUPERSHIFT,3,movetoworkspace,3"
"$mod SUPERSHIFT,4,movetoworkspace,4"
"$mod SUPERSHIFT,5,movetoworkspace,5"
"$mod SUPERSHIFT,6,movetoworkspace,6"
"$mod SUPERSHIFT,7,movetoworkspace,7"
"$mod SUPERSHIFT,8,movetoworkspace,8"
"$mod SUPERSHIFT,9,movetoworkspace,9"
"$mod SUPERSHIFT,0,movetoworkspace,10"
# move to workspace silent
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
"$mod SUPERSHIFTALT,3,movetoworkspacesilent,3"
"$mod SUPERSHIFTALT,4,movetoworkspacesilent,4"
"$mod SUPERSHIFTALT,5,movetoworkspacesilent,5"
"$mod SUPERSHIFTALT,6,movetoworkspacesilent,6"
"$mod SUPERSHIFTALT,7,movetoworkspacesilent,7"
"$mod SUPERSHIFTALT,8,movetoworkspacesilent,8"
"$mod SUPERSHIFTALT,9,movetoworkspacesilent,9"
"$mod SUPERSHIFTALT,0,movetoworkspacesilent,10"
# preselection
"$mod SUPERALT,j,layoutmsg,preselect l"
"$mod SUPERALT,k,layoutmsg,preselect d"
"$mod SUPERALT,l,layoutmsg,preselect u"
"$mod SUPERALT,semicolon,layoutmsg,preselect r"
"$mod SUPERALT,h,layoutmsg,preselect n"
];
binde = [
# hyprland keybinds
# focus
"$mod SUPER,J,movefocus,l"
"$mod SUPER,semicolon,movefocus,r"
"$mod SUPER,L,movefocus,u"
"$mod SUPER,K,movefocus,d"
# resize
"$mod SUPER,U,resizeactive,-20 0"
"$mod SUPER,P,resizeactive,20 0"
"$mod SUPER,O,resizeactive,0 -20"
"$mod SUPER,I,resizeactive,0 20"
];
general = {
gaps_out = "3,5,5,5";
border_size = 3;
"col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
# "col.inactive_border" = "0x66333333";
allow_tearing = true;
};
decoration = {
rounding = 4;
};
animations = {
bezier = "penguin,0.05,0.9,0.1,1.0";
animation = [
"windowsMove,1,4,default"
"windows,1,7,default,popin 70%"
"windowsOut,1,7,default,popin 70%"
"border,1,10,default"
"fade,1,7,default"
"workspaces,1,6,default"
"layers,1,3,default,popin"
];
};
dwindle = {
preserve_split = true;
pseudotile = 0;
permanent_direction_override = false;
};
input = {
kb_layout = "{config.mods.xkb.layout}";
kb_variant = "{config.mods.xkb.variant}";
repeat_delay = 200;
force_no_accel = true;
touchpad = {
natural_scroll = true;
tap-to-click = true;
tap-and-drag = true;
};
};
misc = {
animate_manual_resizes = 1;
enable_swallow = true;
disable_splash_rendering = true;
disable_hyprland_logo = true;
swallow_regex = "^(.*)(kitty)(.*)$";
initial_workspace_tracking = 1;
no_direct_scanout = false;
};
cursor = {
# conversion seems to be borked right now, i want a smooth bibata :(
enable_hyprcursor = false;
no_hardware_cursors = true;
no_break_fs_vrr = true;
};
gestures = {
workspace_swipe = true;
};
monitor = config.conf.hyprland.monitor;
workspace = config.conf.hyprland.workspace;
env = [
"GTK_CSD,0"
"TERM,\"kitty /bin/fish\""
"XDG_CURRENT_DESKTOP=Hyprland"
"XDG_SESSION_TYPE=wayland"
"XDG_SESSION_DESKTOP=Hyprland"
"HYPRCURSOR_THEME,Bibata-Modern-Classic"
"HYPRCURSOR_SIZE,24"
"XCURSOR_THEME,Bibata-Modern-Classic"
"XCURSOR_SIZE,24"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME,qt5ct"
"QT_WAYLAND_FORCE_DPI,96"
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_SCALE_FACTOR,1"
"EDITOR,\"neovide --novsync --nofork\""
"WLR_DRM_NO_ATOMIC,1"
"GTK_USE_PORTAL, 1"
];
layerrule = [
# layer rules
# mainly to disable animations within slurp and grim
"noanim, selection"
];
windowrule = [
# window rules
"tile,^(.*)(Spotify)(.*)$"
"float,^(.*)(OxiCalc)(.*)$"
"float,^(.*)(winecfg.exe)(.*)$"
"float,^(.*)(speed.exe)(.*)$"
"float,^(.*)(copyq)(.*)$"
"center,^(.*)(swappy)(.*)$"
"float,title:^(.*)(Spirit)(.*)$"
"float,title:^(.*)(reset)(.*)$"
"workspace 10 silent,^(.*)(steam)(.*)$"
"workspace 9 silent,^(.*)(dota)(.*)$"
"workspace 9 silent,^(.*)(battlebits)(.*)$"
"workspace 9 silent,^(.*)(aoe)(.*)$"
"suppressevent fullscreen maximize,^(.*)(neovide)(.*)$"
];
windowrulev2 = [
"immediate,class:^(.*)(Pal)$"
"immediate,class:^(.*)(dota2)$"
"immediate,class:^(.*)(needforspeedheat.exe)$"
];
exec-once = [
# environment
"systemctl --user import-environment"
"dbus-update-activation-environment --systemd --all"
"hyprctl setcursor Bibata-Modern-Classic 24"
# other programs
"hyprpaper"
"ironbar"
"firefox"
"oxipaste_daemon"
"nextcloud --background"
"oxinoti"
] ++ config.conf.hyprland.extra_autostart;
# plugin = {
# hyprspace = {
# bind = [
# "SUPER, W, overview:toggle, toggle"
# ];
# };
# };
};
# wayland.windowManager.hyprland.plugins = [
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
# ];
}

View file

@ -1,28 +0,0 @@
{ pkgs
, ...
}: {
imports = [
./anyrun.nix
./config.nix
./ironbar.nix
./hyprpaper.nix
./hyprlock.nix
];
home.packages = with pkgs; [
xorg.xprop
grim
slurp
satty
xdg-desktop-portal-gtk
# xdg-desktop-portal-hyprland
copyq
nautilus
sushi
nautilus-python
wl-clipboard
hyprcursor
hyprpaper
hyprpicker
];
}

View file

@ -1,36 +0,0 @@
{ config
, ...
}:
{
programs.hyprlock = {
enable = true;
settings = {
background = [
{
monitor = "";
path = "";
color = "rgba(26, 27, 38, 1.0)";
}
];
input-field = [
{
monitor = "${config.conf.monitor}";
placeholder_text = "password or something";
}
];
label = [
{
monitor = "${config.conf.monitor}";
text = "$TIME";
font_size = 50;
position = "0, 200";
valign = "center";
halign = "center";
}
];
};
};
}

View file

@ -1,5 +0,0 @@
{ config, ... }: {
xdg.configFile."hypr/hyprpaper.conf" = {
text = config.conf.hyprland.hyprpaper;
};
}