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

@ -1,7 +1,7 @@
# Themes # Themes
Themes are defined in `themes`. Those themes define the colors, fonts, icons, etc, used by Hyprland and the apps/programs installed. Themes are defined in `themes`. Those themes define the colors, fonts, icons, etc, used by Hyprland and the apps/programs installed.
You can change the selected theme by changing the import statement of your host's variables.nix file. You can change the selected theme by changing the import statement of your host's configuration.nix file.
> [!TIP] > [!TIP]
> To apply the theme to DuckDuckGo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js` > To apply the theme to DuckDuckGo, follow the instructions in `$HOME/.duckduckgo-colorscheme.js`

View File

@ -2,8 +2,7 @@
feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] Hyprshade (replacement for gammastep) - [!] Qutebrowser Bitwarden integration (I need this.)
- [ ] !!! Qutebrowser Bitwarden integration (I need this.)
- [ ] Hyprland - [ ] Hyprland
- [ ] Fix screenshots (screenshot region's border shows up in the screenshot, hyprshot jq error?) and add in the scripts doc - [ ] Fix screenshots (screenshot region's border shows up in the screenshot, hyprshot jq error?) and add in the scripts doc

View File

@ -17,9 +17,9 @@ function getList() {
echo "$list" echo "$list"
} }
[[ -f "./home/system/hyprland/default.nix" ]] || (echo "File ./home/system/hyprland/default.nix not found" && exit 1) [[ -f "./home/system/hyprland/bindings.nix" ]] || (echo "File ./home/system/hyprland/bindings.nix not found" && exit 1)
config=$(cat "./home/system/hyprland/default.nix") config=$(cat "./home/system/hyprland/bindings.nix")
# Bind # Bind
bind=$(getList "$config" "bind") bind=$(getList "$config" "bind")

View File

@ -10,10 +10,9 @@
{ pkgs, ... }: { pkgs, ... }:
let let
default = "4000";
night-shift-on = pkgs.writeShellScriptBin "night-shift-on" '' 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" title="󰖔 Night-Shift Activated"
description="Night-Shift is now activated! Your screen will be warmer and easier on the eyes." 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" '' night-shift-off = pkgs.writeShellScriptBin "night-shift-off" ''
pkill gammastep ${pkgs.hyprshade}/bin/hyprshade off
title="󰖕 Night-Shift Deactivated" title="󰖕 Night-Shift Deactivated"
description="Night-Shift is now deactivated! Your screen will return to normal." description="Night-Shift is now deactivated! Your screen will return to normal."
@ -29,7 +28,7 @@ let
''; '';
night-shift = pkgs.writeShellScriptBin "night-shift" '' night-shift = pkgs.writeShellScriptBin "night-shift" ''
if pgrep gammastep; then if [[ $(${pkgs.hyprshade}/bin/hyprshade current) ]]; then
night-shift-off night-shift-off
else else
night-shift-on night-shift-on
@ -37,7 +36,7 @@ let
''; '';
night-shift-status = pkgs.writeShellScriptBin "night-shift-status" '' night-shift-status = pkgs.writeShellScriptBin "night-shift-status" ''
if [[ $(pgrep gammastep) ]]; then if [[ $(${pkgs.hyprshade}/bin/hyprshade current) ]]; then
echo "1" echo "1"
else else
echo "0" echo "0"
@ -46,15 +45,14 @@ let
night-shift-status-icon = night-shift-status-icon =
pkgs.writeShellScriptBin "night-shift-status-icon" '' pkgs.writeShellScriptBin "night-shift-status-icon" ''
if [[ $(pgrep gammastep) ]]; then if [[ $(hyprshade current) ]]; then
echo "󰖔" echo "󰖔"
else else
echo "󰖕" echo "󰖕"
fi fi
''; '';
in { in {
home.packages = [ home.packages = [
pkgs.gammastep
night-shift-on night-shift-on
night-shift-off night-shift-off
night-shift 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, ... }: { { pkgs, config, inputs, ... }: {
imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ./hyprpanel.nix ]; imports = [ ./animations.nix ./bindings.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
qt5.qtwayland qt5.qtwayland
qt6.qtwayland qt6.qtwayland
qt5ct qt5ct
qt6ct qt6ct
hyprshot hyprshot
hyprpicker hyprpicker
swappy swappy
@ -35,12 +34,7 @@
"$mod" = "SUPER"; "$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT"; "$shiftMod" = "SUPER_SHIFT";
exec-once = [ exec-once = [ "${pkgs.bitwarden}/bin/bitwarden" ];
"${pkgs.bitwarden}/bin/bitwarden"
"[[ ${
toString config.var.sops
} == 1 ]] && systemctl --user start sops-nix"
];
monitor = [ monitor = [
"eDP-2,highres,0x0,1" "eDP-2,highres,0x0,1"
@ -48,60 +42,6 @@
",prefered,auto,1" ",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 = [ env = [
"XDG_SESSION_TYPE,wayland" "XDG_SESSION_TYPE,wayland"
"XDG_CURRENT_DESKTOP,Hyprland" "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 = systemd.user.targets.hyprland-session.Unit.Wants =
[ "xdg-desktop-autostart.target" ]; [ "xdg-desktop-autostart.target" ];
} }

View File

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

View File

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

View File

@ -18,6 +18,7 @@
../../nixos/variables-config.nix ../../nixos/variables-config.nix
../../themes/nixy.nix ../../themes/nixy.nix
./hardware-configuration.nix ./hardware-configuration.nix
./variables.nix ./variables.nix
]; ];

View File

@ -19,6 +19,10 @@
# System (Desktop environment like stuff) # System (Desktop environment like stuff)
../../home/system/hyprland ../../home/system/hyprland
../../home/system/hypridle
../../home/system/hyprlock
../../home/system/hyprpanel
../../home/system/hyprpaper
../../home/system/gtk ../../home/system/gtk
../../home/system/wofi ../../home/system/wofi
../../home/system/batsignal ../../home/system/batsignal

View File

@ -15,4 +15,7 @@
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ]; systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
home.packages = with pkgs; [ sops age ]; home.packages = with pkgs; [ sops age ];
wayland.windowManager.hyprland.settings.exec-once =
[ "systemctl --user start sops-nix" ];
} }

View File

@ -21,11 +21,6 @@
autoUpgrade = false; autoUpgrade = false;
autoGarbageCollector = false; autoGarbageCollector = false;
# SOPS
# Sops is a tool to store secrets in git repositories encrypted with GPG.
# change the sops configuration if you want to enable that:
sops = true;
theme = { theme = {
rounding = 15; rounding = 15;
gaps-in = 10; gaps-in = 10;