Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-04 20:40:09 +02:00
parent e805c868a7
commit d71c9d8169
61 changed files with 672 additions and 343 deletions
+64 -15
View File
@@ -1,10 +1,22 @@
{
programs.caelestia.settings = {
session.commands = {
shutdown = ["systemctl" "poweroff"];
logout = ["loginctl" "lock-session"];
hibernate = ["systemctl" "hibernate"];
reboot = ["systemctl" "reboot"];
shutdown = [
"systemctl"
"poweroff"
];
logout = [
"loginctl"
"lock-session"
];
hibernate = [
"systemctl"
"hibernate"
];
reboot = [
"systemctl"
"reboot"
];
};
launcher = {
actionPrefix = "/";
@@ -13,7 +25,10 @@
name = "Calculator";
icon = "calculate";
description = "Do simple math equations (powered by Qalc)";
command = ["autocomplete" "calc"];
command = [
"autocomplete"
"calc"
];
enabled = true;
dangerous = false;
}
@@ -21,7 +36,10 @@
name = "Shutdown";
icon = "power_settings_new";
description = "Shutdown the system";
command = ["systemctl" "poweroff"];
command = [
"systemctl"
"poweroff"
];
enabled = true;
dangerous = true;
}
@@ -29,7 +47,10 @@
name = "Reboot";
icon = "cached";
description = "Reboot the system";
command = ["systemctl" "reboot"];
command = [
"systemctl"
"reboot"
];
enabled = true;
dangerous = true;
}
@@ -37,7 +58,11 @@
name = "Logout";
icon = "exit_to_app";
description = "Log out of the current session";
command = ["loginctl" "terminate-user" ""];
command = [
"loginctl"
"terminate-user"
""
];
enabled = true;
dangerous = true;
}
@@ -45,7 +70,10 @@
name = "Lock";
icon = "lock";
description = "Lock the current session";
command = ["loginctl" "lock-session"];
command = [
"loginctl"
"lock-session"
];
enabled = true;
dangerous = false;
}
@@ -53,7 +81,10 @@
name = "Sleep";
icon = "bedtime";
description = "Suspend then hibernate";
command = ["systemctl" "suspend-then-hibernate"];
command = [
"systemctl"
"suspend-then-hibernate"
];
enabled = true;
dangerous = false;
}
@@ -61,7 +92,12 @@
name = "Restart caelestia";
icon = "cached";
description = "Restart caelestia";
command = ["hyprctl" "dispatch" "exec" "caelestia-shell kill | sleep 1 | caelestia-shell"];
command = [
"hyprctl"
"dispatch"
"exec"
"caelestia-shell kill | sleep 1 | caelestia-shell"
];
enabled = true;
dangerous = false;
}
@@ -69,7 +105,11 @@
name = "Emoji Picker";
icon = "mood";
description = "Toggle the emoji picker";
command = ["caelestia" "emoji" "-p"];
command = [
"caelestia"
"emoji"
"-p"
];
enabled = true;
dangerous = false;
}
@@ -77,7 +117,10 @@
name = "Clipboard History";
icon = "content_paste";
description = "Toggle the clipboard history";
command = ["caelestia" "clipboard"];
command = [
"caelestia"
"clipboard"
];
enabled = true;
dangerous = false;
}
@@ -85,7 +128,10 @@
name = "Delete from Clipboard History";
icon = "content_paste_off";
description = "Delete a line from the clipboard history";
command = ["caelestia" "clipboard"];
command = [
"caelestia"
"clipboard"
];
enabled = true;
dangerous = false;
}
@@ -101,7 +147,10 @@
name = "Hyprpicker";
icon = "colorize";
description = "Pick an hex color";
command = ["hyprpicker" "-a"];
command = [
"hyprpicker"
"-a"
];
enabled = true;
dangerous = false;
}
+10 -8
View File
@@ -122,14 +122,16 @@
colorsHash = builtins.hashString "sha256" (builtins.toJSON colors);
customCli = inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs (oldAttrs: {
name = "${oldAttrs.name or "caelestia-cli"}-themed-${colorsHash}";
postUnpack = ''
mkdir -p $sourceRoot/src/caelestia/data/schemes/custom/main
cp ${customSchemeFile} $sourceRoot/src/caelestia/data/schemes/custom/main/dark.txt
echo "Custom scheme added to source"
'';
});
customCli =
inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs
(oldAttrs: {
name = "${oldAttrs.name or "caelestia-cli"}-themed-${colorsHash}";
postUnpack = ''
mkdir -p $sourceRoot/src/caelestia/data/schemes/custom/main
cp ${customSchemeFile} $sourceRoot/src/caelestia/data/schemes/custom/main/dark.txt
echo "Custom scheme added to source"
'';
});
in {
programs.caelestia.cli.package = customCli;
}
+23 -15
View File
@@ -7,9 +7,8 @@
colors = config.lib.stylix.colors;
mkMenu = menu: let
configFile =
pkgs.writeText "config.yaml"
(lib.generators.toYAML {} {
configFile = pkgs.writeText "config.yaml" (
lib.generators.toYAML {} {
anchor = "bottom-right";
border = "#${colors.base0D}80";
background = "#${colors.base01}EE";
@@ -19,7 +18,8 @@
rows_per_column = 5;
inherit menu;
});
}
);
in
pkgs.writeShellScriptBin "menu" ''
exec ${lib.getExe pkgs.wlr-which-key} ${configFile}
@@ -32,7 +32,8 @@ in {
bind =
[
# Applications
("$shiftMod, A, exec, "
(
"$shiftMod, A, exec, "
+ lib.getExe (mkMenu [
{
key = "a";
@@ -84,14 +85,16 @@ in {
desc = "Qutebrowser (Temp session)";
cmd = "${pkgs.qutebrowser}/bin/qutebrowser --temp-basedir";
}
]))
])
)
# Web links
"$mod,B, exec, uwsm app -- ${pkgs.qutebrowser}/bin/qutebrowser" # Browser (Qutebrowser)
# Power
"$mod, X, global, caelestia:session" # Powermenu
("$shiftMod, X, exec, "
(
"$shiftMod, X, exec, "
+ lib.getExe (mkMenu [
{
key = "l";
@@ -123,7 +126,8 @@ in {
desc = "Restart caelestia";
cmd = "hyprctl dispatch exec 'caelestia-shell kill | sleep 1 | caelestia-shell'";
}
]))
])
)
# Quick launch
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
@@ -154,13 +158,17 @@ in {
", Print, global, caelestia:screenshotFreeze" # Capture region (freeze)
"$shiftMod+Alt, S, global, caelestia:screenshot" # Capture region
]
++ (builtins.concatLists (builtins.genList (i: let
ws = i + 1;
in [
"$mod,code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
])
9));
++ (builtins.concatLists (
builtins.genList (
i: let
ws = i + 1;
in [
"$mod,code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
]
)
9
));
bindm = [
"$mod,mouse:272, movewindow" # Move Window (mouse)
+3 -1
View File
@@ -39,4 +39,6 @@
'';
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
in {wayland.windowManager.hyprland.settings.exec-once = [command];}
in {
wayland.windowManager.hyprland.settings.exec-once = [command];
}
+1 -2
View File
@@ -8,8 +8,7 @@
splash = false;
};
};
systemd.user.services.hyprpaper.Unit.After =
lib.mkForce "graphical-session.target";
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
wayland.windowManager.hyprland.settings.exec-once = [
"systemctl --user enable --now hyprpaper.service"
+7 -4
View File
@@ -117,14 +117,17 @@ with lib; let
desktopName = "Neovim (Ghostty)";
exec = ''ghostty --title="Neovim Editor" -e nvim %F'';
terminal = false;
categories = ["Development" "TextEditor"];
categories = [
"Development"
"TextEditor"
];
mimeTypes = mimeMap.code ++ mimeMap.text;
};
associations = with lists;
listToAttrs (flatten (mapAttrsToList
(key: map (type: attrsets.nameValuePair type defaultApps."${key}"))
mimeMap));
listToAttrs (
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
);
in {
home.packages = [nvim-ghostty];