Fix hyprland
This commit is contained in:
parent
b077da4998
commit
6f57594884
@ -76,6 +76,7 @@
|
|||||||
config.permittedInsecurePackages = [
|
config.permittedInsecurePackages = [
|
||||||
"olm-3.2.16"
|
"olm-3.2.16"
|
||||||
];
|
];
|
||||||
|
warn-dirty = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
@ -10,7 +10,10 @@
|
|||||||
./features/alacritty
|
./features/alacritty
|
||||||
./features/yazi
|
./features/yazi
|
||||||
./features/emacs
|
./features/emacs
|
||||||
./features/i3
|
# ./features/i3
|
||||||
|
|
||||||
|
./features/hyprland
|
||||||
|
|
||||||
./features/nix-helper
|
./features/nix-helper
|
||||||
./features/desktop
|
./features/desktop
|
||||||
|
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
{
|
{
|
||||||
services.gammastep = {
|
services.gammastep = {
|
||||||
enable = true;
|
enable = true;
|
||||||
latitude = 47.92;
|
provider = "geoclue2";
|
||||||
longitude = 10.12;
|
temperature = {
|
||||||
provider = "manual";
|
day = 6000;
|
||||||
|
night = 4600;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
general.adjustment-method = "wayland";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2,33 +2,68 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme})
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
|
||||||
palette
|
palette
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.hyprland.homeManagerModules.default
|
# inputs.hyprland.homeManagerModules.default
|
||||||
|
|
||||||
./waybar
|
./waybar
|
||||||
./wofi
|
./wofi
|
||||||
./mako
|
./mako
|
||||||
./hyprlock
|
# ./hyprlock
|
||||||
./wlogout
|
./wlogout
|
||||||
|
../gammastep
|
||||||
|
|
||||||
|
./swayidle.nix
|
||||||
|
./swaylock.nix
|
||||||
|
./zathura.nix
|
||||||
|
./waypipe.nix
|
||||||
|
|
||||||
|
./hyprbars.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
||||||
|
config.hyprland = {
|
||||||
|
default = [
|
||||||
|
"wlr"
|
||||||
|
"gtk"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.imv.enable = true; # TODO: what is that
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# hyprpicker # TODO
|
# hyprpicker # TODO
|
||||||
# hyprcursor # TODO
|
# hyprcursor # TODO
|
||||||
brightnessctl
|
brightnessctl
|
||||||
# grimblast
|
# grimblast
|
||||||
frajul.hyprshot-gui
|
frajul.hyprshot-gui
|
||||||
|
|
||||||
|
wf-recorder
|
||||||
|
wl-clipboard
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.cliphist = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.mimeApps.enable = true; # TODO: what is that?
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
LIBSEAT_BACKEND = "logind";
|
||||||
|
};
|
||||||
|
|
||||||
# services.hypridle = {
|
# services.hypridle = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# settings = {
|
# settings = {
|
||||||
@ -66,7 +101,29 @@ in
|
|||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
# Whether to enable Hyprland wayland compositor
|
# Whether to enable Hyprland wayland compositor
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.hyprland.packages."${pkgs.system}".hyprland; # does only work with nixos-unstable
|
# package = config.lib.nixGL.wrap (
|
||||||
|
# pkgs.hyprland.override {
|
||||||
|
# # nixgl needed?
|
||||||
|
# wrapRuntimeDeps = false;
|
||||||
|
# }
|
||||||
|
# );
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
# Same as default, but stop graphical-session too
|
||||||
|
extraCommands = lib.mkBefore [
|
||||||
|
"systemctl --user stop graphical-session.target"
|
||||||
|
"systemctl --user start hyprland-session.target"
|
||||||
|
];
|
||||||
|
variables = [
|
||||||
|
"DISPLAY"
|
||||||
|
"HYPRLAND_INSTANCE_SIGNATURE"
|
||||||
|
"WAYLAND_DISPLAY"
|
||||||
|
"XDG_CURRENT_DESKTOP"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# package = inputs.hyprland.packages."${pkgs.system}".hyprland; # does only work with nixos-unstable
|
||||||
|
|
||||||
# The hyprland package to use (simplifies use of plugins)
|
# The hyprland package to use (simplifies use of plugins)
|
||||||
# package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
# package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
@ -75,12 +132,12 @@ in
|
|||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
# Whether to enable hyprland-session.target on hyprland startup
|
# Whether to enable hyprland-session.target on hyprland startup
|
||||||
systemd.enable = true;
|
# systemd.enable = true;
|
||||||
# Make PATH available to systemd services
|
# Make PATH available to systemd services
|
||||||
systemd.variables = [ "--all" ];
|
# systemd.variables = [ "--all" ];
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars # does only work with nixos-unstable
|
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars # does only work with nixos-unstable
|
||||||
# hyprlandPlugins.hyprbars
|
# hyprlandPlugins.hyprbars
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -100,28 +157,28 @@ in
|
|||||||
|
|
||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
|
|
||||||
"col.active_border" = "0xff${palette.base0C} 0xff${palette.base0D} 270deg";
|
# "col.active_border" = "0xff${palette.base0C} 0xff${palette.base0D} 270deg";
|
||||||
"col.inactive_border" = "0xff${palette.base00}";
|
# "col.inactive_border" = "0xff${palette.base00}";
|
||||||
};
|
};
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
# power saving
|
# power saving
|
||||||
blur.enabled = false;
|
blur.enabled = false;
|
||||||
# power saving
|
# power saving
|
||||||
drop_shadow = false;
|
# drop_shadow = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Dwindle layout
|
# Dwindle layout
|
||||||
dwindle = {
|
dwindle = {
|
||||||
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
preserve_split = true; # You probably want this
|
preserve_split = true; # You probably want this
|
||||||
no_gaps_when_only = 2; # with border
|
# no_gaps_when_only = 2; # with border
|
||||||
};
|
};
|
||||||
|
|
||||||
# Master layout
|
# Master layout
|
||||||
master = {
|
master = {
|
||||||
new_status = "slave";
|
new_status = "slave";
|
||||||
no_gaps_when_only = 2; # with border
|
# no_gaps_when_only = 2; # with border
|
||||||
mfact = 0.5; # Do not make master bigger
|
mfact = 0.5; # Do not make master bigger
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -175,115 +232,136 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
# binds
|
# binds
|
||||||
bind = [
|
bind =
|
||||||
# compositor commands
|
[
|
||||||
"$mod, Space, focuswindow, floating"
|
# compositor commands
|
||||||
"$mod SHIFT, Space, togglefloating,"
|
"$mod, Space, focuswindow, floating"
|
||||||
"$mod, F, fullscreen,"
|
"$mod SHIFT, Space, togglefloating,"
|
||||||
"$mod, X, killactive,"
|
"$mod, F, fullscreen,"
|
||||||
|
"$mod, X, killactive,"
|
||||||
|
|
||||||
"$mod, O, togglesplit," # dwindle
|
"$mod, O, togglesplit," # dwindle
|
||||||
|
|
||||||
# opening applications
|
# opening applications
|
||||||
"$mod, D, exec, wofi --show drun,run"
|
"$mod, D, exec, wofi --show drun,run"
|
||||||
"$mod, E, exec, pcmanfm"
|
"$mod, E, exec, pcmanfm"
|
||||||
"$mod, Return, exec, kitty"
|
"$mod, Return, exec, kitty"
|
||||||
"$mod, B, exec, firefox"
|
"$mod, B, exec, firefox"
|
||||||
"$mod, C, exec, qalculate-gtk"
|
"$mod, C, exec, qalculate-gtk"
|
||||||
|
|
||||||
# other commands
|
# other commands
|
||||||
"$mod SHIFT, E, exec, wlogout -p layer-shell"
|
"$mod SHIFT, E, exec, wlogout -p layer-shell"
|
||||||
"$mod, Escape, exec, wlogout -p layer-shell"
|
"$mod, Escape, exec, wlogout -p layer-shell"
|
||||||
"$mod, TAB, exec, hyprlock"
|
"$mod SHIFT, R, exec, hyprctl reload"
|
||||||
"$mod SHIFT, R, exec, hyprctl reload"
|
", Print, exec, hyprshot-gui"
|
||||||
", Print, exec, hyprshot-gui"
|
|
||||||
|
|
||||||
# "$mod SHIFT, E, exec, pkill Hyprland"
|
# "$mod SHIFT, E, exec, pkill Hyprland"
|
||||||
# "$mod, G, togglegroup,"
|
# "$mod, G, togglegroup,"
|
||||||
# "$mod SHIFT, N, changegroupactive, f"
|
# "$mod SHIFT, N, changegroupactive, f"
|
||||||
# "$mod SHIFT, P, changegroupactive, b"
|
# "$mod SHIFT, P, changegroupactive, b"
|
||||||
# "$mod ALT, ,resizeactive,"
|
# "$mod ALT, ,resizeactive,"
|
||||||
|
|
||||||
# media keys
|
# media keys
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
", XF86AudioPlay, exec, playerctl play-pause"
|
", XF86AudioPlay, exec, playerctl play-pause"
|
||||||
", XF86AudioPause, exec, playerctl pause"
|
", XF86AudioPause, exec, playerctl pause"
|
||||||
", XF86AudioStop, exec, playerctl stop"
|
", XF86AudioStop, exec, playerctl stop"
|
||||||
", XF86AudioNext, exec, playerctl next"
|
", XF86AudioNext, exec, playerctl next"
|
||||||
", XF86AudioPrev, exec, playerctl previous"
|
", XF86AudioPrev, exec, playerctl previous"
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
", XF86MonBrightnessUp, exec, brightnessctl --class backlight set 5%+"
|
", XF86MonBrightnessUp, exec, brightnessctl --class backlight set 5%+"
|
||||||
", XF86MonBrightnessDown, exec, brightnessctl --class backlight set 5%-"
|
", XF86MonBrightnessDown, exec, brightnessctl --class backlight set 5%-"
|
||||||
|
|
||||||
# move focus
|
# move focus
|
||||||
"$mod, left, movefocus, l"
|
"$mod, left, movefocus, l"
|
||||||
"$mod, H, movefocus, l"
|
"$mod, H, movefocus, l"
|
||||||
"$mod, right, movefocus, r"
|
"$mod, right, movefocus, r"
|
||||||
"$mod, L, movefocus, r"
|
"$mod, L, movefocus, r"
|
||||||
"$mod, up, movefocus, u"
|
"$mod, up, movefocus, u"
|
||||||
"$mod, K, movefocus, u"
|
"$mod, K, movefocus, u"
|
||||||
"$mod, down, movefocus, d"
|
"$mod, down, movefocus, d"
|
||||||
"$mod, J, movefocus, d"
|
"$mod, J, movefocus, d"
|
||||||
|
|
||||||
# move window
|
# move window
|
||||||
"$mod SHIFT, left, movewindow, l"
|
"$mod SHIFT, left, movewindow, l"
|
||||||
"$mod SHIFT, H, movewindow, l"
|
"$mod SHIFT, H, movewindow, l"
|
||||||
"$mod SHIFT, right, movewindow, r"
|
"$mod SHIFT, right, movewindow, r"
|
||||||
"$mod SHIFT, L, movewindow, r"
|
"$mod SHIFT, L, movewindow, r"
|
||||||
"$mod SHIFT, up, movewindow, u"
|
"$mod SHIFT, up, movewindow, u"
|
||||||
"$mod SHIFT, K, movewindow, u"
|
"$mod SHIFT, K, movewindow, u"
|
||||||
"$mod SHIFT, down, movewindow, d"
|
"$mod SHIFT, down, movewindow, d"
|
||||||
"$mod SHIFT, J, movewindow, d"
|
"$mod SHIFT, J, movewindow, d"
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [0-9]
|
# Switch workspaces with mainMod + [0-9]
|
||||||
"$mod, 1, workspace, 1"
|
"$mod, 1, workspace, 1"
|
||||||
"$mod, 2, workspace, 2"
|
"$mod, 2, workspace, 2"
|
||||||
"$mod, 3, workspace, 3"
|
"$mod, 3, workspace, 3"
|
||||||
"$mod, 4, workspace, 4"
|
"$mod, 4, workspace, 4"
|
||||||
"$mod, 5, workspace, 5"
|
"$mod, 5, workspace, 5"
|
||||||
"$mod, 6, workspace, 6"
|
"$mod, 6, workspace, 6"
|
||||||
"$mod, 7, workspace, 7"
|
"$mod, 7, workspace, 7"
|
||||||
"$mod, 8, workspace, 8"
|
"$mod, 8, workspace, 8"
|
||||||
"$mod, 9, workspace, 9"
|
"$mod, 9, workspace, 9"
|
||||||
"$mod, 0, workspace, 10"
|
"$mod, 0, workspace, 10"
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||||
|
|
||||||
# Move active window to a workspace without following with mainMod + CTRL + [0-9]
|
# Move active window to a workspace without following with mainMod + CTRL + [0-9]
|
||||||
"$mod CTRL, 1, movetoworkspacesilent, 1"
|
"$mod CTRL, 1, movetoworkspacesilent, 1"
|
||||||
"$mod CTRL, 2, movetoworkspacesilent, 2"
|
"$mod CTRL, 2, movetoworkspacesilent, 2"
|
||||||
"$mod CTRL, 3, movetoworkspacesilent, 3"
|
"$mod CTRL, 3, movetoworkspacesilent, 3"
|
||||||
"$mod CTRL, 4, movetoworkspacesilent, 4"
|
"$mod CTRL, 4, movetoworkspacesilent, 4"
|
||||||
"$mod CTRL, 5, movetoworkspacesilent, 5"
|
"$mod CTRL, 5, movetoworkspacesilent, 5"
|
||||||
"$mod CTRL, 6, movetoworkspacesilent, 6"
|
"$mod CTRL, 6, movetoworkspacesilent, 6"
|
||||||
"$mod CTRL, 7, movetoworkspacesilent, 7"
|
"$mod CTRL, 7, movetoworkspacesilent, 7"
|
||||||
"$mod CTRL, 8, movetoworkspacesilent, 8"
|
"$mod CTRL, 8, movetoworkspacesilent, 8"
|
||||||
"$mod CTRL, 9, movetoworkspacesilent, 9"
|
"$mod CTRL, 9, movetoworkspacesilent, 9"
|
||||||
"$mod CTRL, 0, movetoworkspacesilent, 10"
|
"$mod CTRL, 0, movetoworkspacesilent, 10"
|
||||||
];
|
]
|
||||||
|
++
|
||||||
|
# Screen lock
|
||||||
|
(
|
||||||
|
let
|
||||||
|
swaylock = lib.getExe config.programs.swaylock.package;
|
||||||
|
in
|
||||||
|
lib.optionals config.programs.swaylock.enable [
|
||||||
|
"$mod,TAB,exec,${swaylock} -S --grace 2 --grace-no-mouse"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
++
|
||||||
|
# Notification manager
|
||||||
|
(
|
||||||
|
let
|
||||||
|
makoctl = lib.getExe' config.services.mako.package "makoctl";
|
||||||
|
in
|
||||||
|
lib.optionals config.services.mako.enable [
|
||||||
|
"$mod,w,exec,${makoctl} dismiss"
|
||||||
|
"$mod SHIFT,W,exec,${makoctl} restore"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
plugin = {
|
# plugin = {
|
||||||
hyprbars = {
|
# hyprbars = {
|
||||||
bar_text_size = 10;
|
# bar_text_size = 10;
|
||||||
bar_height = 16;
|
# bar_height = 16;
|
||||||
bar_text_font = "Ubuntu Nerd Font";
|
# bar_text_font = "Ubuntu Nerd Font";
|
||||||
bar_precedence_over_border = true;
|
# bar_precedence_over_border = true;
|
||||||
bar_color = "rgb(${palette.base01})";
|
# bar_color = "rgb(${palette.base01})";
|
||||||
|
|
||||||
hyprbars-button = [ "rgb(${palette.base03}), 14, , hyprctl dispatch killactive" ];
|
# hyprbars-button = [ "rgb(${palette.base03}), 14, , hyprctl dispatch killactive" ];
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
80
homes/julian/features/hyprland/hyprbars.nix
Normal file
80
homes/julian/features/hyprland/hyprbars.nix
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
getHostname = x: lib.last (lib.splitString "@" x);
|
||||||
|
# remoteColorschemes = lib.mapAttrs' (n: v: {
|
||||||
|
# name = getHostname n;
|
||||||
|
# value = v.config.colorscheme.rawColorscheme.colors.${config.colorscheme.mode};
|
||||||
|
# }) outputs.homeConfigurations;
|
||||||
|
rgb = color: "rgb(${lib.removePrefix "#" color})";
|
||||||
|
rgba = color: alpha: "rgba(${lib.removePrefix "#" color}${alpha})";
|
||||||
|
|
||||||
|
hyprbars =
|
||||||
|
(pkgs.hyprlandPlugins.hyprbars.override {
|
||||||
|
# Make sure it's using the same hyprland package as we are
|
||||||
|
hyprland = config.wayland.windowManager.hyprland.package;
|
||||||
|
}).overrideAttrs
|
||||||
|
(old: {
|
||||||
|
# Yeet the initialization notification (I hate it)
|
||||||
|
postPatch =
|
||||||
|
(old.postPatch or "")
|
||||||
|
+ ''
|
||||||
|
${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
plugins = [ hyprbars ];
|
||||||
|
settings = {
|
||||||
|
"plugin:hyprbars" = {
|
||||||
|
bar_height = 25;
|
||||||
|
# bar_color = rgba config.colorscheme.colors.surface "dd";
|
||||||
|
# "col.text" = rgb config.colorscheme.colors.primary;
|
||||||
|
# bar_text_font = config.fontProfiles.regular.name;
|
||||||
|
# bar_text_size = config.fontProfiles.regular.size;
|
||||||
|
bar_part_of_window = true;
|
||||||
|
bar_precedence_over_border = true;
|
||||||
|
hyprbars-button =
|
||||||
|
let
|
||||||
|
closeAction = "hyprctl dispatch killactive";
|
||||||
|
|
||||||
|
isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null'';
|
||||||
|
moveToSpecial = "hyprctl dispatch movetoworkspacesilent special";
|
||||||
|
moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')";
|
||||||
|
minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}";
|
||||||
|
|
||||||
|
maximizeAction = "hyprctl dispatch fullscreen 1";
|
||||||
|
in
|
||||||
|
[
|
||||||
|
# Red close button
|
||||||
|
# "${rgb config.colorscheme.colors.red},12,,${closeAction}"
|
||||||
|
# # Yellow "minimize" (send to special workspace) button
|
||||||
|
# "${rgb config.colorscheme.colors.yellow},12,,${minimizeAction}"
|
||||||
|
# # Green "maximize" (fullscreen) button
|
||||||
|
# "${rgb config.colorscheme.colors.green},12,,${maximizeAction}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# windowrulev2 =
|
||||||
|
# [
|
||||||
|
# "plugin:hyprbars:bar_color ${rgba config.colorscheme.colors.primary "ee"}, focus:1"
|
||||||
|
# "plugin:hyprbars:title_color ${rgb config.colorscheme.colors.on_primary}, focus:1"
|
||||||
|
# ]
|
||||||
|
# ++ (lib.flatten (
|
||||||
|
# lib.mapAttrsToList (name: colors: [
|
||||||
|
# "plugin:hyprbars:bar_color ${rgba colors.primary_container "dd"}, title:\\[${name}\\].*"
|
||||||
|
# "plugin:hyprbars:title_color ${rgb colors.on_primary_container}, title:\\[${name}\\].*"
|
||||||
|
|
||||||
|
# "plugin:hyprbars:bar_color ${rgba colors.primary "ee"}, title:\\[${name}\\].*, focus:1"
|
||||||
|
# "plugin:hyprbars:title_color ${rgb colors.on_primary}, title:\\[${name}\\].*, focus:1"
|
||||||
|
# ]) remoteColorschemes
|
||||||
|
# ));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
|
||||||
palette
|
palette
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
|
||||||
palette
|
palette
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
@ -17,13 +17,13 @@ in
|
|||||||
services.mako = {
|
services.mako = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultTimeout = 5000; # milliseconds, can be overwritten by notification sender
|
defaultTimeout = 5000; # milliseconds, can be overwritten by notification sender
|
||||||
backgroundColor = "#${palette.base00}";
|
# backgroundColor = "#${palette.base00}"; TODO fix
|
||||||
textColor = "#${palette.base05}";
|
# textColor = "#${palette.base05}";
|
||||||
borderColor = "#${palette.base0D}";
|
# borderColor = "#${palette.base0D}";
|
||||||
progressColor = "over #${palette.base02}";
|
# progressColor = "over #${palette.base02}";
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
[urgency=high]
|
# [urgency=high]
|
||||||
border-color=#${palette.base09}
|
# border-color=#${palette.base09}
|
||||||
'';
|
# '';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
63
homes/julian/features/hyprland/swayidle.nix
Normal file
63
homes/julian/features/hyprland/swayidle.nix
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
|
||||||
|
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||||
|
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||||
|
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
|
||||||
|
swaymsg = "${config.wayland.windowManager.sway.package}/bin/swaymsg";
|
||||||
|
|
||||||
|
isLocked = "${pgrep} -x ${swaylock}";
|
||||||
|
lockTime = 4 * 60; # TODO: configurable desktop (10 min)/laptop (4 min)
|
||||||
|
|
||||||
|
# Makes two timeouts: one for when the screen is not locked (lockTime+timeout) and one for when it is.
|
||||||
|
afterLockTimeout =
|
||||||
|
{
|
||||||
|
timeout,
|
||||||
|
command,
|
||||||
|
resumeCommand ? null,
|
||||||
|
}:
|
||||||
|
[
|
||||||
|
{
|
||||||
|
timeout = lockTime + timeout;
|
||||||
|
inherit command resumeCommand;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${isLocked} && ${command}";
|
||||||
|
inherit resumeCommand timeout;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
systemdTarget = "graphical-session.target";
|
||||||
|
timeouts =
|
||||||
|
# Lock screen
|
||||||
|
[
|
||||||
|
{
|
||||||
|
timeout = lockTime;
|
||||||
|
# command = "${swaylock} -i ${config.wallpaper} --daemonize --grace 15 --grace-no-mouse";
|
||||||
|
command = "${swaylock} --daemonize --grace 15 --grace-no-mouse";
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++
|
||||||
|
# Turn off displays (hyprland)
|
||||||
|
(lib.optionals config.wayland.windowManager.hyprland.enable (afterLockTimeout {
|
||||||
|
timeout = 300;
|
||||||
|
command = "${hyprctl} dispatch dpms off";
|
||||||
|
resumeCommand = "${hyprctl} dispatch dpms on";
|
||||||
|
}))
|
||||||
|
++
|
||||||
|
# Turn off displays (sway)
|
||||||
|
(lib.optionals config.wayland.windowManager.sway.enable (afterLockTimeout {
|
||||||
|
timeout = 300;
|
||||||
|
command = "${swaymsg} 'output * dpms off'";
|
||||||
|
resumeCommand = "${swaymsg} 'output * dpms on'";
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
}
|
48
homes/julian/features/hyprland/swaylock.nix
Normal file
48
homes/julian/features/hyprland/swaylock.nix
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (config.colorscheme) colors;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.swaylock-effects;
|
||||||
|
settings = {
|
||||||
|
effect-blur = "20x3";
|
||||||
|
fade-in = 0.1;
|
||||||
|
|
||||||
|
# font = config.fontProfiles.regular.name;
|
||||||
|
# font-size = config.fontProfiles.regular.size + 3;
|
||||||
|
|
||||||
|
line-uses-inside = true;
|
||||||
|
disable-caps-lock-text = true;
|
||||||
|
indicator-caps-lock = true;
|
||||||
|
indicator-radius = 40;
|
||||||
|
indicator-idle-visible = true;
|
||||||
|
indicator-y-position = 1000;
|
||||||
|
|
||||||
|
# TODO customize
|
||||||
|
# ring-color = "${colors.surface_bright}";
|
||||||
|
# inside-wrong-color = "${colors.on_error}";
|
||||||
|
# ring-wrong-color = "${colors.error}";
|
||||||
|
# key-hl-color = "${colors.tertiary}";
|
||||||
|
# bs-hl-color = "${colors.on_tertiary}";
|
||||||
|
# ring-ver-color = "${colors.secondary}";
|
||||||
|
# inside-ver-color = "${colors.on_secondary}";
|
||||||
|
# inside-color = "${colors.surface}";
|
||||||
|
# text-color = "${colors.on_surface}";
|
||||||
|
# text-clear-color = "${colors.on_surface_variant}";
|
||||||
|
# text-ver-color = "${colors.on_secondary}";
|
||||||
|
# text-wrong-color = "${colors.on_surface_variant}";
|
||||||
|
# text-caps-lock-color = "${colors.on_surface_variant}";
|
||||||
|
# inside-clear-color = "${colors.surface}";
|
||||||
|
# ring-clear-color = "${colors.primary}";
|
||||||
|
# inside-caps-lock-color = "${colors.on_tertiary}";
|
||||||
|
# ring-caps-lock-color = "${colors.surface}";
|
||||||
|
# separator-color = "${colors.surface}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -7,9 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
|
palette = (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name}).palette;
|
||||||
palette
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
|
30
homes/julian/features/hyprland/waypipe.nix
Normal file
30
homes/julian/features/hyprland/waypipe.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.waypipe ];
|
||||||
|
systemd.user.services = {
|
||||||
|
waypipe-client = {
|
||||||
|
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
|
||||||
|
Service = {
|
||||||
|
ExecStartPre = "${lib.getExe' pkgs.coreutils "mkdir"} %h/.waypipe -p";
|
||||||
|
ExecStart = "${lib.getExe (config.lib.nixGL.wrap pkgs.waypipe)} --socket %h/.waypipe/client.sock client";
|
||||||
|
ExecStopPost = "${lib.getExe' pkgs.coreutils "rm"} -f %h/.waypipe/client.sock";
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
waypipe-server = {
|
||||||
|
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStartPre = "${lib.getExe' pkgs.coreutils "mkdir"} %h/.waypipe -p";
|
||||||
|
ExecStart = "${lib.getExe (config.lib.nixGL.wrap pkgs.waypipe)} --socket %h/.waypipe/server.sock --title-prefix '[%H] ' --login-shell --display wayland-waypipe server -- ${lib.getExe' pkgs.coreutils "sleep"} infinity";
|
||||||
|
ExecStopPost = "${lib.getExe' pkgs.coreutils "rm"} -f %h/.waypipe/server.sock %t/wayland-waypipe";
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
|
||||||
palette
|
palette
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.colorscheme.name})
|
||||||
palette
|
palette
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
|
35
homes/julian/features/hyprland/zathura.nix
Normal file
35
homes/julian/features/hyprland/zathura.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.colorscheme) colors;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.zathura = {
|
||||||
|
enable = true;
|
||||||
|
options = {
|
||||||
|
selection-clipboard = "clipboard";
|
||||||
|
# TODO fix
|
||||||
|
# font = "${config.fontProfiles.regular.name} ${toString config.fontProfiles.regular.size}";
|
||||||
|
# recolor = true;
|
||||||
|
# default-bg = "${colors.surface}";
|
||||||
|
# default-fg = "${colors.surface_bright}";
|
||||||
|
# statusbar-bg = "${colors.surface_container}";
|
||||||
|
# statusbar-fg = "${colors.on_surface_variant}";
|
||||||
|
# inputbar-bg = "${colors.surface}";
|
||||||
|
# inputbar-fg = "${colors.on_secondary}";
|
||||||
|
# notification-bg = "${colors.surface}";
|
||||||
|
# notification-fg = "${colors.on_secondary}";
|
||||||
|
# notification-error-bg = "${colors.error}";
|
||||||
|
# notification-error-fg = "${colors.on_error}";
|
||||||
|
# notification-warning-bg = "${colors.error}";
|
||||||
|
# notification-warning-fg = "${colors.on_error}";
|
||||||
|
# highlight-color = "${colors.tertiary}";
|
||||||
|
# highlight-active-color = "${colors.secondary}";
|
||||||
|
# completion-bg = "${colors.surface_bright}";
|
||||||
|
# completion-fg = "${colors.on_surface}";
|
||||||
|
# completions-highlight-bg = "${colors.secondary}";
|
||||||
|
# completions-highlight-fg = "${colors.on_secondary}";
|
||||||
|
# recolor-lightcolor = "${colors.surface}";
|
||||||
|
# recolor-darkcolor = "${colors.inverse_surface}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -7,13 +7,14 @@
|
|||||||
# Apply overlays
|
# Apply overlays
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = builtins.attrValues outputs.overlays;
|
overlays = builtins.attrValues outputs.overlays;
|
||||||
# config = {
|
config = {
|
||||||
# allowUnfree = true;
|
allowUnfree = true;
|
||||||
# allowUnfreePredicate = _: true; # TODO: what is this
|
allowUnfreePredicate = _: true; # TODO: what is this
|
||||||
# permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
# "olm-3.2.16"
|
"olm-3.2.16"
|
||||||
# ];
|
];
|
||||||
# };
|
warn-dirty = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setup binary caches
|
# Setup binary caches
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@ -12,20 +13,24 @@
|
|||||||
../common/users/julian
|
../common/users/julian
|
||||||
|
|
||||||
# ../common/optional/openssh.nix
|
# ../common/optional/openssh.nix
|
||||||
# ../common/optional/greetd.nix
|
|
||||||
../common/optional/pipewire.nix
|
../common/optional/pipewire.nix
|
||||||
../common/optional/remote-builder.nix
|
../common/optional/remote-builder.nix
|
||||||
../common/optional/boot-efi.nix
|
../common/optional/boot-efi.nix
|
||||||
../common/optional/pcmanfm.nix
|
../common/optional/pcmanfm.nix
|
||||||
../common/optional/i3.nix
|
|
||||||
../common/optional/gdm.nix
|
# ../common/optional/i3.nix
|
||||||
|
# ../common/optional/gdm.nix
|
||||||
|
../common/optional/greetd.nix
|
||||||
|
|
||||||
../common/optional/redshift.nix
|
../common/optional/redshift.nix
|
||||||
../common/optional/virtualbox.nix
|
../common/optional/virtualbox.nix
|
||||||
../common/optional/xdg-portal.nix
|
../common/optional/xdg-portal.nix # TODO: not needed?
|
||||||
../common/optional/polkit.nix # TODO: maybe not needed!
|
../common/optional/polkit.nix # TODO: maybe not needed!
|
||||||
../common/optional/keyring.nix # TODO: maybe not needed!
|
../common/optional/keyring.nix # TODO: maybe not needed!
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# programs.hyprland.enable = true;
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
boot.blacklistedKernelModules = [ "pcspkr" ]; # Disables "beep"
|
boot.blacklistedKernelModules = [ "pcspkr" ]; # Disables "beep"
|
||||||
|
|
||||||
|
@ -19,4 +19,6 @@
|
|||||||
layout = "de";
|
layout = "de";
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.keyMap = "de";
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
allowUnfreePredicate = _: true; # TODO: what is this
|
allowUnfreePredicate = _: true; # TODO: what is this
|
||||||
|
warn-dirty = false;
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
"olm-3.2.16"
|
"olm-3.2.16"
|
||||||
];
|
];
|
||||||
|
@ -33,14 +33,14 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = julianCfg.gtk.iconTheme;
|
iconTheme = julianCfg.gtk.iconTheme;
|
||||||
theme = julianCfg.gtk.theme;
|
theme = julianCfg.gtk.theme;
|
||||||
font = julianCfg.fontProfiles.regular;
|
# font = julianCfg.fontProfiles.regular; # TODO: do
|
||||||
cursorTheme = {
|
# cursorTheme = {
|
||||||
inherit (julianCfg.gtk.cursorTheme) name package;
|
# inherit (julianCfg.gtk.cursorTheme) name package;
|
||||||
};
|
# }; # TODO: fix
|
||||||
settings.background = {
|
# settings.background = {
|
||||||
path = julianCfg.wallpaper;
|
# path = julianCfg.wallpaper;
|
||||||
fit = "Cover";
|
# fit = "Cover";
|
||||||
};
|
# }; # TODO: fix
|
||||||
};
|
};
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -42,4 +42,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.julian = import ../../../../homes/julian/${config.networking.hostName}.nix;
|
home-manager.users.julian = import ../../../../homes/julian/${config.networking.hostName}.nix;
|
||||||
|
|
||||||
|
security.pam.services.swaylock = { }; # Make swaylock unlocking work
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user