update laptop configuration

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-07-16 20:14:43 +02:00
parent 72e4be86eb
commit 59ae3d5f9d
50 changed files with 479 additions and 1009 deletions

View File

@@ -1,19 +1,18 @@
{ config, ... }:
let
{config, ...}: let
animationSpeed = config.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";
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 {
wayland.windowManager.hyprland.settings = {
animations = {

View File

@@ -1,45 +1,48 @@
{ pkgs, ... }: {
{pkgs, ...}: {
wayland.windowManager.hyprland.settings = {
bind = [
"$mod,RETURN, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Kitty
"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod,B, exec, uwsm app -- zen-beta" # Zen Browser
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,X, exec, powermenu" # Powermenu
"$mod,SPACE, exec, menu" # Launcher
"$mod,C, exec, quickmenu" # Quickmenu
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
# "$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
bind =
[
"$mod,RETURN, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Kitty
"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod,B, exec, uwsm app -- zen-beta" # Zen Browser
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,X, exec, powermenu" # Powermenu
"$mod,SPACE, exec, menu" # Launcher
"$mod,C, exec, quickmenu" # Quickmenu
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
# "$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
"$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,up, focusmonitor, -1" # Focus previous monitor
"$shiftMod,down, focusmonitor, 1" # Focus next monitor
"$shiftMod,left, layoutmsg, addmaster" # Add to master
"$shiftMod,right, layoutmsg, removemaster" # Remove from master
"$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,up, focusmonitor, -1" # Focus previous monitor
"$shiftMod,down, focusmonitor, 1" # Focus next monitor
"$shiftMod,left, layoutmsg, addmaster" # Add to master
"$shiftMod,right, layoutmsg, removemaster" # Remove from master
"$mod,PRINT, exec, screenshot region" # Screenshot region
",PRINT, exec, screenshot monitor" # Screenshot monitor
"$shiftMod,PRINT, exec, screenshot window" # Screenshot window
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
"$mod,PRINT, exec, screenshot region" # Screenshot region
",PRINT, exec, screenshot monitor" # Screenshot monitor
"$shiftMod,PRINT, exec, screenshot window" # Screenshot window
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
"$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));
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
"$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)
@@ -60,6 +63,5 @@
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
];
};
}

View File

@@ -1,6 +1,10 @@
# So best window tiling manager
{ pkgs, config, inputs, lib, ... }:
let
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
{
pkgs,
config,
lib,
...
}: let
border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in;
gaps-out = config.theme.gaps-out;
@@ -11,12 +15,11 @@ let
keyboardLayout = config.var.keyboardLayout;
background = "rgb(" + config.lib.stylix.colors.base00 + ")";
in {
imports = [
./animations.nix
./bindings.nix
./polkitagent.nix
./keyboard-backlight.nix # CHANGEME: This is for my laptop only
./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
./hyprspace.nix
];
@@ -122,7 +125,10 @@ in {
render_power = 3;
};
blur = {
enabled = if blur then "true" else "false";
enabled =
if blur
then "true"
else "false";
size = 18;
};
};
@@ -133,7 +139,7 @@ in {
mfact = 0.5;
};
gestures = { workspace_swipe = true; };
gestures = {workspace_swipe = true;};
misc = {
vfr = true;
@@ -178,7 +184,7 @@ in {
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
];
layerrule = [ "noanim, launcher" "noanim, ^ags-.*" ];
layerrule = ["noanim, launcher" "noanim, ^ags-.*"];
input = {
kb_layout = keyboardLayout;
@@ -195,7 +201,6 @@ in {
clickfinger_behavior = true;
};
};
};
};
}

View File

@@ -1,7 +1,11 @@
# Hyprspace is a hyprland plugin that provides a workspaces overview (three-finger swipe up) and a workspace switcher (three-finger down).
{ inputs, pkgs, ... }: {
{
inputs,
pkgs,
...
}: {
wayland.windowManager.hyprland = {
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ];
plugins = [inputs.hyprspace.packages.${pkgs.system}.Hyprspace];
settings = {
plugin = {
overview = {

View File

@@ -1,6 +1,10 @@
# Turn the keyboard red/off when the battery is low
{ pkgs, config, ... }:
let
# Include this one only if you have a omen laptop with RGB keyboard
{
pkgs,
config,
...
}: let
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
function set_keyboard_backlight {
local color=$1
@@ -31,4 +35,4 @@ let
'';
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
in { wayland.windowManager.hyprland.settings.exec-once = [ command ]; }
in {wayland.windowManager.hyprland.settings.exec-once = [command];}

View File

@@ -1,7 +1,6 @@
# HyprPolkitAgent is a simple polkit agent for wayland compositors
{ pkgs, ... }: {
home.packages = with pkgs; [ hyprpolkitagent ];
{pkgs, ...}: {
home.packages = with pkgs; [hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once =
[ "systemctl --user start hyprpolkitagent" ];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}