This commit is contained in:
Hadi
2024-10-07 20:27:07 +02:00
parent d37504de7c
commit d11cf580f9
16 changed files with 135 additions and 144 deletions

View File

@@ -10,10 +10,9 @@
{ pkgs, ... }:
let
default = "4000";
night-shift-on = pkgs.writeShellScriptBin "night-shift-on" ''
${pkgs.hyprland}/bin/hyprctl dispatch exec "${pkgs.gammastep}/bin/gammastep -O ${default}"
${pkgs.hyprshade}/bin/hyprshade on blue-light-filter
title="󰖔 Night-Shift Activated"
description="Night-Shift is now activated! Your screen will be warmer and easier on the eyes."
@@ -21,7 +20,7 @@ let
'';
night-shift-off = pkgs.writeShellScriptBin "night-shift-off" ''
pkill gammastep
${pkgs.hyprshade}/bin/hyprshade off
title="󰖕 Night-Shift Deactivated"
description="Night-Shift is now deactivated! Your screen will return to normal."
@@ -29,7 +28,7 @@ let
'';
night-shift = pkgs.writeShellScriptBin "night-shift" ''
if pgrep gammastep; then
if [[ $(${pkgs.hyprshade}/bin/hyprshade current) ]]; then
night-shift-off
else
night-shift-on
@@ -37,7 +36,7 @@ let
'';
night-shift-status = pkgs.writeShellScriptBin "night-shift-status" ''
if [[ $(pgrep gammastep) ]]; then
if [[ $(${pkgs.hyprshade}/bin/hyprshade current) ]]; then
echo "1"
else
echo "0"
@@ -46,15 +45,14 @@ let
night-shift-status-icon =
pkgs.writeShellScriptBin "night-shift-status-icon" ''
if [[ $(pgrep gammastep) ]]; then
echo "󰖔"
else
echo "󰖕"
fi
if [[ $(hyprshade current) ]]; then
echo "󰖔"
else
echo "󰖕"
fi
'';
in {
home.packages = [
pkgs.gammastep
night-shift-on
night-shift-off
night-shift

View File

@@ -0,0 +1,52 @@
{ config, ... }: {
wayland.windowManager.hyprland.settings = {
animations = let
animationSpeed = config.var.theme.animation-speed;
animationDuration = if animationSpeed == "slow" then
"4"
else if animationSpeed == "medium" then
"2.5"
else
"1.5";
borderDuration = if animationSpeed == "slow" then
"10"
else if animationSpeed == "medium" then
"6"
else
"3";
in {
enabled = true;
bezier = [
"linear, 0, 0, 1, 1"
"md3_standard, 0.2, 0, 0, 1"
"md3_decel, 0.05, 0.7, 0.1, 1"
"md3_accel, 0.3, 0, 0.8, 0.15"
"overshot, 0.05, 0.9, 0.1, 1.1"
"crazyshot, 0.1, 1.5, 0.76, 0.92"
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.38, 0.04, 1, 0.07"
"easeInOutCirc, 0.85, 0, 0.15, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutExpo, 0.16, 1, 0.3, 1"
"softAcDecel, 0.26, 0.26, 0.15, 1"
"md2, 0.4, 0, 0.2, 1"
];
animation = [
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
"border, 1, ${borderDuration}, default"
"fade, 1, ${animationDuration}, md3_decel"
"layersIn, 1, ${animationDuration}, menu_decel, slide"
"layersOut, 1, ${animationDuration}, menu_accel"
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
"workspaces, 1, ${animationDuration}, menu_decel, slide"
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
];
};
};
}

View File

@@ -0,0 +1,58 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland.settings = {
bind = [
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser" # Qutebrowser
"$mod, K, exec, ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod, X, exec, powermenu" # Powermenu
"$mod, SPACE, exec, menu" # Launcher
"$shiftMod, SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, Q, killactive," # Close window
"$mod, T, togglefloating," # Toggle Floating
"$mod, F, fullscreen" # Toggle Fullscreen
"$mod, left, movefocus, l" # Move focus left
"$mod, right, movefocus, r" # Move focus Right
"$mod, up, movefocus, u" # Move focus Up
"$mod, down, movefocus, d" # Move focus Down
"$shiftMod, left, layoutmsg, addmaster" # Add to master
"$shiftMod, right, layoutmsg, removemaster" # Remove from master
"$mod, PRINT, exec, screenshot window" # Screenshot window
", PRINT, exec, screenshot monitor" # Screenshot monitor
"$shiftMod, PRINT, exec, screenshot region" # Screenshot region
"ALT, PRINT, exec, screenshot region swappy" # Screenshot region then edit
"$shiftMod, S, exec, ${pkgs.qutebrowser}/bin/qutebrowser :open $(wofi --show dmenu -L 1 -p ' Search on internet')" # Search on internet with wofi
"$shiftMod, C, exec, clipboard" # Clipboard picker with wofi
"$shiftMod, E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi
"$mod, F2, exec, night-shift" # Toggle night shift
"$mod, F3, exec, night-shift" # Toggle night shift
] ++ (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)
"$mod, R, resizewindow" # Resize Window (mouse)
];
bindl = [
",XF86AudioMute, exec, sound-toggle" # Toggle Mute
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
];
bindle = [
", XF86AudioRaiseVolume, exec, sound-up" # Sound Up
", XF86AudioLowerVolume, exec, sound-down" # Sound Down
", XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
", XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
];
};
}

View File

@@ -1,13 +1,12 @@
{ pkgs, config, inputs, ... }: {
imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ./hyprpanel.nix ];
imports = [ ./animations.nix ./bindings.nix ];
home.packages = with pkgs; [
qt5.qtwayland
qt6.qtwayland
qt5ct
qt6ct
hyprshot
hyprpicker
swappy
@@ -35,12 +34,7 @@
"$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
exec-once = [
"${pkgs.bitwarden}/bin/bitwarden"
"[[ ${
toString config.var.sops
} == 1 ]] && systemctl --user start sops-nix"
];
exec-once = [ "${pkgs.bitwarden}/bin/bitwarden" ];
monitor = [
"eDP-2,highres,0x0,1"
@@ -48,60 +42,6 @@
",prefered,auto,1"
];
bind = [
"$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
"$mod, E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser" # Qutebrowser
"$mod, K, exec, ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod, X, exec, powermenu" # Powermenu
"$mod, SPACE, exec, menu" # Launcher
"$shiftMod, SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, Q, killactive," # Close window
"$mod, T, togglefloating," # Toggle Floating
"$mod, F, fullscreen" # Toggle Fullscreen
"$mod, left, movefocus, l" # Move focus left
"$mod, right, movefocus, r" # Move focus Right
"$mod, up, movefocus, u" # Move focus Up
"$mod, down, movefocus, d" # Move focus Down
"$shiftMod, left, layoutmsg, addmaster" # Add to master
"$shiftMod, right, layoutmsg, removemaster" # Remove from master
"$mod, PRINT, exec, screenshot window" # Screenshot window
", PRINT, exec, screenshot monitor" # Screenshot monitor
"$shiftMod, PRINT, exec, screenshot region" # Screenshot region
"ALT, PRINT, exec, screenshot region swappy" # Screenshot region then edit
"$shiftMod, S, exec, ${pkgs.qutebrowser}/bin/qutebrowser :open $(wofi --show dmenu -L 1 -p ' Search on internet')" # Search on internet with wofi
"$shiftMod, C, exec, clipboard" # Clipboard picker with wofi
"$shiftMod, E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi
"$mod, F2, exec, night-shift-off" # Turn off night shift
"$mod, F3, exec, night-shift-on" # Turn on night shift
] ++ (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)
"$mod, R, resizewindow" # Resize Window (mouse)
];
bindl = [
",XF86AudioMute, exec, sound-toggle" # Toggle Mute
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
];
bindle = [
", XF86AudioRaiseVolume, exec, sound-up" # Sound Up
", XF86AudioLowerVolume, exec, sound-down" # Sound Down
", XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
", XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
];
env = [
"XDG_SESSION_TYPE,wayland"
"XDG_CURRENT_DESKTOP,Hyprland"
@@ -191,68 +131,8 @@
};
};
windowrulev2 = [
"float, class:floating"
"size 40% 40%, class:floating"
"move 30% 30%, class:floating"
"float, title:Bluetooth Devices"
"move 20% 20%, title:Bluetooth Devices"
"size 60% 60%, title:Bluetooth Devices"
];
animations = let
animationSpeed = config.var.theme.animation-speed;
animationDuration = if animationSpeed == "slow" then
"4"
else if animationSpeed == "medium" then
"2.5"
else
"1.5";
borderDuration = if animationSpeed == "slow" then
"10"
else if animationSpeed == "medium" then
"6"
else
"3";
in {
enabled = true;
bezier = [
"linear, 0, 0, 1, 1"
"md3_standard, 0.2, 0, 0, 1"
"md3_decel, 0.05, 0.7, 0.1, 1"
"md3_accel, 0.3, 0, 0.8, 0.15"
"overshot, 0.05, 0.9, 0.1, 1.1"
"crazyshot, 0.1, 1.5, 0.76, 0.92"
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.38, 0.04, 1, 0.07"
"easeInOutCirc, 0.85, 0, 0.15, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutExpo, 0.16, 1, 0.3, 1"
"softAcDecel, 0.26, 0.26, 0.15, 1"
"md2, 0.4, 0, 0.2, 1"
];
animation = [
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
"border, 1, ${borderDuration}, default"
"fade, 1, ${animationDuration}, md3_decel"
"layersIn, 1, ${animationDuration}, menu_decel, slide"
"layersOut, 1, ${animationDuration}, menu_accel"
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
"workspaces, 1, ${animationDuration}, menu_decel, slide"
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
];
};
};
};
systemd.user.targets.hyprland-session.Unit.Wants =
[ "xdg-desktop-autostart.target" ];
}

View File

@@ -74,7 +74,7 @@ in {
font_color = foreground;
fade_on_empty = false;
font_family = config.stylix.fonts.serif.name + " Bold";
placeholder_text = "<i>🔒 Enter Pass</i>";
placeholder_text = "<i>🔒 Enter Password</i>";
hide_input = false;
position = "0, -250";
halign = "center";

View File

@@ -55,6 +55,7 @@
#input {
background-color: #${config.lib.stylix.colors.base00};
border: 0px solid #${config.lib.stylix.colors.base0D};
color: #${config.lib.stylix.colors.base05};
padding: 8px 12px;
}