mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-10-05 11:18:24 +02:00
@@ -46,63 +46,6 @@ in {
|
||||
|
||||
bind =
|
||||
[
|
||||
# Applications
|
||||
(
|
||||
"$shiftMod, A, exec, "
|
||||
+ lib.getExe (mkMenu [
|
||||
{
|
||||
key = "a";
|
||||
desc = "Proton Authenticator";
|
||||
cmd = "env WEBKIT_DISABLE_COMPOSITING_MODE=1 ${pkgs.proton-authenticator}/bin/proton-authenticator";
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "Proton Pass";
|
||||
cmd = "${pkgs.proton-pass}/bin/proton-pass";
|
||||
}
|
||||
{
|
||||
key = "v";
|
||||
desc = "Proton VPN";
|
||||
cmd = "${pkgs.proton-vpn}/bin/protonvpn-app";
|
||||
}
|
||||
{
|
||||
key = "c";
|
||||
desc = "Proton Calendar";
|
||||
cmd = "${config.programs.helium.package}/bin/helium 'https://calendar.proton.me/'";
|
||||
}
|
||||
{
|
||||
key = "m";
|
||||
desc = "Proton Mail";
|
||||
cmd = "${config.programs.helium.package}/bin/helium 'https://mail.proton.me/'";
|
||||
}
|
||||
{
|
||||
key = "o";
|
||||
desc = "Obsidian";
|
||||
cmd = "${pkgs.obsidian}/bin/obsidian";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Signal";
|
||||
cmd = "${pkgs.signal-desktop}/bin/signal-desktop";
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
desc = "TickTick";
|
||||
cmd = "${pkgs.ticktick}/bin/ticktick";
|
||||
}
|
||||
{
|
||||
key = "b";
|
||||
desc = "Helium";
|
||||
cmd = "${config.programs.helium.package}/bin/helium";
|
||||
}
|
||||
{
|
||||
key = "i";
|
||||
desc = "Helium (Incognito)";
|
||||
cmd = "${config.programs.helium.package}/bin/helium --incognito";
|
||||
}
|
||||
])
|
||||
)
|
||||
|
||||
"$mod,B, exec, uwsm app -- ${config.programs.helium.package}/bin/helium" # Browser
|
||||
|
||||
# Power
|
||||
@@ -112,22 +55,22 @@ in {
|
||||
{
|
||||
key = "l";
|
||||
desc = "Lock";
|
||||
cmd = "${pkgs.hyprlock}/bin/hyprlock";
|
||||
cmd = config.xdg.desktopEntries.lock.exec;
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Suspend";
|
||||
cmd = "systemctl suspend";
|
||||
cmd = config.xdg.desktopEntries.suspend.exec;
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
desc = "Reboot";
|
||||
cmd = "systemctl reboot";
|
||||
cmd = config.xdg.desktopEntries.reboot.exec;
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "Power Off";
|
||||
cmd = "systemctl poweroff";
|
||||
cmd = config.xdg.desktopEntries.shutdown.exec;
|
||||
}
|
||||
])
|
||||
)
|
||||
@@ -159,8 +102,8 @@ in {
|
||||
"$shiftMod, S, movetoworkspace, special:scratch" # Move to scratch workspace
|
||||
|
||||
# Utilities
|
||||
", Print, exec, ${pkgs.hyprshot}/bin/hyprshot -m region" # Capture region
|
||||
"$shiftMod, Print, exec, ${pkgs.hyprshot}/bin/hyprshot -m output" # Capture screen
|
||||
", Print, exec, ${config.xdg.desktopEntries.screenshot-region.exec}" # Capture region
|
||||
"$shiftMod, Print, exec, ${config.xdg.desktopEntries.screenshot-screen.exec}" # Capture screen
|
||||
]
|
||||
++ (builtins.concatLists (
|
||||
builtins.genList (
|
||||
|
||||
@@ -21,6 +21,7 @@ in {
|
||||
./bindings.nix
|
||||
./polkitagent.nix
|
||||
./hyprpaper.nix
|
||||
./scripts.nix
|
||||
];
|
||||
|
||||
home.packages =
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# Compositor-level scripts: focus mode (temporarily flattens Hyprland's
|
||||
# animations/gaps/decoration) and night shift (hyprsunset).
|
||||
{
|
||||
pkgs,
|
||||
scripts,
|
||||
...
|
||||
}: {
|
||||
scripts.focus-toggle = pkgs.writeShellScriptBin "focus-toggle" ''
|
||||
if test -f "$XDG_RUNTIME_DIR/hypr-focus-mode"; then
|
||||
rm "$XDG_RUNTIME_DIR/hypr-focus-mode"
|
||||
OSD_TEXT=" Focus Off"
|
||||
${scripts.waybar-osd}/bin/waybar-osd "$OSD_TEXT"
|
||||
${pkgs.hyprland}/bin/hyprctl reload
|
||||
${pkgs.hyprland}/bin/hyprctl dispatch exec waybar
|
||||
else
|
||||
touch "$XDG_RUNTIME_DIR/hypr-focus-mode"
|
||||
OSD_TEXT=" Focus On"
|
||||
${scripts.waybar-osd}/bin/waybar-osd "$OSD_TEXT"
|
||||
${pkgs.procps}/bin/pkill waybar || true
|
||||
${pkgs.hyprland}/bin/hyprctl keyword animations:enabled false
|
||||
${pkgs.hyprland}/bin/hyprctl keyword general:gaps_in 0
|
||||
${pkgs.hyprland}/bin/hyprctl keyword general:gaps_out 0
|
||||
${pkgs.hyprland}/bin/hyprctl keyword decoration:active_opacity 1
|
||||
${pkgs.hyprland}/bin/hyprctl keyword decoration:inactive_opacity 1
|
||||
${pkgs.hyprland}/bin/hyprctl keyword decoration:rounding 0
|
||||
fi
|
||||
'';
|
||||
|
||||
scripts.nightshift-toggle = pkgs.writeShellScriptBin "nightshift-toggle" ''
|
||||
if ${pkgs.procps}/bin/pidof "hyprsunset" > /dev/null; then
|
||||
pkill hyprsunset
|
||||
OSD_TEXT=" Night Shift Off"
|
||||
else
|
||||
${pkgs.hyprsunset}/bin/hyprsunset -t 4500 &
|
||||
OSD_TEXT=" Night Shift On"
|
||||
fi
|
||||
${scripts.waybar-osd}/bin/waybar-osd "$OSD_TEXT"
|
||||
'';
|
||||
|
||||
home.packages = [scripts.focus-toggle scripts.nightshift-toggle];
|
||||
|
||||
xdg.desktopEntries = {
|
||||
focus-toggle = {
|
||||
name = "Focus Mode";
|
||||
exec = "${scripts.focus-toggle}/bin/focus-toggle";
|
||||
icon = "do-not-disturb-symbolic";
|
||||
comment = "Toggle focus mode";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
nightshift-toggle = {
|
||||
name = "Night Shift";
|
||||
exec = "${scripts.nightshift-toggle}/bin/nightshift-toggle";
|
||||
icon = "night-light-symbolic";
|
||||
comment = "Toggle night shift";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user