adding uwsm, ty fufexan. and quite a bit more

This commit is contained in:
cnst
2024-11-18 06:14:56 +01:00
parent 8d121fda97
commit edfc9767c7
17 changed files with 120 additions and 119 deletions

View File

@@ -2,11 +2,12 @@
config,
lib,
pkgs,
inputs,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types mkDefault;
inherit (lib) mkIf mkEnableOption mkDefault;
cfg = config.home.programs.hyprland;
hyprlandPkg = pkgs.hyprland;
hyprlandPkg = inputs.hyprland.packages.${pkgs.system}.default;
in {
imports = [
./appearance.nix
@@ -35,6 +36,7 @@ in {
enable = true;
package = hyprlandPkg;
systemd = {
enable = false;
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
@@ -42,5 +44,7 @@ in {
];
};
};
systemd.user.targets.tray.Unit.Requires = lib.mkForce ["graphical-session.target"];
};
}

View File

@@ -8,6 +8,12 @@
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.home.programs.hyprland;
host = osConfig.networking.hostName;
toggle = program: let
prog = builtins.substring 0 14 program;
in "pkill ${prog} || uwsm app -- ${program}";
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
in {
options = {
home.programs.hyprland.keybinds.enable = mkEnableOption "Enables keybind settings in Hyprland";
@@ -18,21 +24,21 @@ in {
wayland.windowManager.hyprland.settings = {
# Common Keybind Variables
"$fileManager" = "thunar";
"$passwordManager" = "keepassxc";
"$menu" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
"$menuw" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
"$yazi" = "alacritty -e yazi";
"$tuirun" = "tuirun-toggle.sh";
bind = [
"$mod, L, exec, ${runOnce "hyprlock"}"
"$mod SHIFT, B, exec, pkill -SIGUSR2 waybar"
"$mod, A, exec, pkill -SIGUSR1 waybar"
"$mod, T, exec, $terminal"
"$mod, T, exec, uwsm app -T"
"$mod, W, exec, $browser"
"$mod, K, exec, $passwordManager"
"$mod, K, exec, keepassxc"
"$mod SHIFT, W, exec, $browserinc"
"$mod, Q, killactive,"
"$mod, E, exec, $fileManager"
"$mod, E, exec, uwsm app -- $fileManager"
"$mod, R, exec, $tuirun"
"$mod SHIFT, E, exec, $yazi"
"$mod, F, fullscreen,"

View File

@@ -21,7 +21,7 @@ in {
# === TUIRUN SETTINGS ===
"size 600 300, initialTitle:^(tuirun)$"
"center, initialTitle:^(tuirun)$"
"workspace special:tuirun, initialTitle:^(tuirun)$"
# "workspace special:tuirun, initialTitle:^(tuirun)$"
"noborder, initialTitle:^(tuirun)$"
"float, initialTitle:^(tuirun)$"

View File

@@ -16,20 +16,20 @@ in {
{
wayland.windowManager.hyprland.settings = {
exec-once = [
"hyprlock"
"systemctl --user start polkit-gnome-authentication-agent-1"
"udiskie -Nt"
"wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+'"
"hyprctl dispatch exec 'sleep 5s && keepassxc'"
"uwsm finalize"
"uwsm app -- keepassxc'"
];
};
}
(mkIf (host == "cnix") {
wayland.windowManager.hyprland.settings.exec-once = [
"mullvad-vpn"
"blueman-applet"
"pamixer --set-volume 50"
"hyprctl dispatch exec 'sleep 3s && solaar -w hide'"
"uwsm app -- mullvad-vpn"
"uwsm app -- blueman-applet"
"uwsm app -- pamixer --set-volume 50"
"uwsm app -- solaar -w hide"
];
})

View File

@@ -1,5 +1,5 @@
{
# inputs,
inputs,
pkgs,
config,
lib,
@@ -8,8 +8,8 @@
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.hyprlock;
# hyprlockFlake = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
hyprlockPkg = pkgs.hyprlock;
hyprlockFlake = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
# hyprlockPkg = pkgs.hyprlock;
in {
options = {
home.programs.hyprlock.enable = mkEnableOption "Enables hyprlock";
@@ -17,7 +17,7 @@ in {
config = mkIf cfg.enable {
programs.hyprlock = {
enable = true;
package = hyprlockPkg;
package = hyprlockFlake;
settings = {
general = {
disable_loading_bar = true;

View File

@@ -38,7 +38,7 @@ in {
];
xdg.configFile."nwg-bar/style.css".text = ''
window {
background-color: rgba (0, 0, 0, 0.6)
background-color: rgba (60, 56, 54, 0.6)
}
/* Outer bar container, takes all the window width/height */
@@ -48,7 +48,7 @@ in {
/* Inner bar container, surrounds buttons */
#inner-box {
background-color: rgba (0, 0, 0, 0.85);
background-color: rgba (28, 28, 28, 0.85);
border-radius: 0px;
border-style: none;
border-width: 1px;
@@ -70,7 +70,7 @@ in {
}
button:hover {
background-color: rgba (255, 255, 255, 0.1)
background-color: rgba (255, 255, 255, 0.35)
}
'';
};