diff --git a/homes/x86_64-linux/alejandro@carbon/default.nix b/homes/x86_64-linux/alejandro@carbon/default.nix index ff94de1..514d61c 100644 --- a/homes/x86_64-linux/alejandro@carbon/default.nix +++ b/homes/x86_64-linux/alejandro@carbon/default.nix @@ -1,8 +1,6 @@ -{ lib, ... }: +{ ... }: { aa.isHeadless = false; aa.windowManagers.sway.clamshell.enable = true; aa.programs.opencode.enable = true; - aa.windowManagers.hyprland.enable = true; - aa.windowManagers.sway.enable = lib.mkForce false; } diff --git a/modules/home/programs/hyprlock/default.nix b/modules/home/programs/hyprlock/default.nix deleted file mode 100644 index 50de37c..0000000 --- a/modules/home/programs/hyprlock/default.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ - config, - pkgs, - lib, - namespace, - ... -}: -let - inherit (lib) - mkIf - mkEnableOption - mkOption - types - ; - - cfg = config.${namespace}.programs.hyprlock; -in -{ - options.${namespace}.programs.hyprlock = { - enable = mkEnableOption "hyprlock"; - - backgroundPath = mkOption { - type = types.str; - default = "screenshot"; - description = '' - Path to background image or "screenshot" to use desktop screenshot - ''; - }; - - settings = mkOption { - type = types.attrs; - default = { }; - description = '' - Additional hyprlock configuration settings - ''; - }; - }; - - config = mkIf cfg.enable { - home.packages = [ pkgs.hyprlock ]; - - catppuccin.hyprlock.enable = true; - - programs.hyprlock = { - enable = true; - settings = lib.mkMerge [ - { - general = { - hide_cursor = false; - ignore_empty_input = false; - text_trim = true; - fractional_scaling = 2; - fail_timeout = 2000; - }; - - auth = { - pam = { - enabled = true; - module = "hyprlock"; - }; - fingerprint = { - enabled = false; - ready_message = "(Scan fingerprint to unlock)"; - present_message = "Scanning fingerprint"; - }; - }; - - background = [ - { - monitor = ""; - path = cfg.backgroundPath; - color = "rgba(17, 17, 17, 1.0)"; - blur_passes = 2; - blur_size = 7; - noise = 0.0117; - contrast = 0.8916; - brightness = 0.8172; - vibrancy = 0.1696; - vibrancy_darkness = 0.05; - } - ]; - - # Time label - label = [ - { - monitor = ""; - text = "cmd[update:1000] echo \"$(date +\"%H:%M\")\""; - color = "$text"; - font_size = 120; - font_family = "Hack Nerd Font"; - position = "0, 300"; - halign = "center"; - valign = "center"; - } - # Date label - { - monitor = ""; - text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; - color = "$text"; - font_size = 24; - font_family = "Hack Nerd Font"; - position = "0, 200"; - halign = "center"; - valign = "center"; - } - ]; - } - cfg.settings - ]; - }; - }; -} diff --git a/modules/home/programs/waybar/default.nix b/modules/home/programs/waybar/default.nix index 2a95a36..bb318f1 100644 --- a/modules/home/programs/waybar/default.nix +++ b/modules/home/programs/waybar/default.nix @@ -31,7 +31,7 @@ in programs.waybar = { enable = true; - # systemd.enable = true; + systemd.enable = true; style = builtins.readFile ./waybar_style.css; @@ -40,10 +40,7 @@ in layer = "top"; position = "bottom"; height = 20; - modules-left = [ - "sway/workspaces" - "hyprland/workspaces" - ]; + modules-left = [ "sway/workspaces" ]; modules-center = [ "clock" ]; modules-right = [ "idle_inhibitor" @@ -58,22 +55,6 @@ in "tray" ]; - "hyprland/workspaces" = { - disable-scroll = false; - all-outputs = true; - format = "{icon}"; - format-icons = { - "1" = "q"; - "2" = "w"; - "3" = "e"; - "4" = "r"; - "5" = "t"; - "6" = "y"; - "7" = "u"; - "8" = "i"; - "9" = "o"; - }; - }; "sway/workspaces" = { disable-scroll = false; all-outputs = true; diff --git a/modules/home/programs/waybar/waybar_style.css b/modules/home/programs/waybar/waybar_style.css index 66f2cc1..6c9c523 100644 --- a/modules/home/programs/waybar/waybar_style.css +++ b/modules/home/programs/waybar/waybar_style.css @@ -50,7 +50,6 @@ window#waybar.hidden { background-color: rgba(0, 0, 0, 1) } -#workspaces button.active, #workspaces button.focused { color: @yellow; } diff --git a/modules/home/services/hypridle/default.nix b/modules/home/services/hypridle/default.nix deleted file mode 100644 index d0aa75f..0000000 --- a/modules/home/services/hypridle/default.nix +++ /dev/null @@ -1,110 +0,0 @@ -{ - config, - pkgs, - lib, - namespace, - ... -}: -let - inherit (lib) - mkIf - mkEnableOption - mkOption - types - ; - - cfg = config.${namespace}.services.hypridle; -in -{ - options.${namespace}.services.hypridle = { - enable = mkEnableOption "hypridle"; - - lockTimeout = mkOption { - type = types.int; - default = 300; - description = '' - Timeout in seconds before locking the screen - ''; - }; - - displayTimeout = mkOption { - type = types.int; - default = 330; - description = '' - Timeout in seconds before turning off the display - ''; - }; - - suspendTimeout = mkOption { - type = types.int; - default = 1800; - description = '' - Timeout in seconds before suspending the system - ''; - }; - - brightnessTimeout = mkOption { - type = types.int; - default = 150; - description = '' - Timeout in seconds before dimming screen brightness - ''; - }; - - lockCommand = mkOption { - type = types.str; - default = "${pkgs.hyprlock}/bin/hyprlock"; - description = '' - Command to run when locking the screen - ''; - }; - }; - - config = mkIf cfg.enable { - home.packages = [ pkgs.hypridle ]; - - services.hypridle = { - enable = true; - settings = { - general = { - lock_cmd = "pidof hyprlock || ${cfg.lockCommand}"; - before_sleep_cmd = "loginctl lock-session"; - after_sleep_cmd = "hyprctl dispatch dpms on"; - ignore_dbus_inhibit = false; - ignore_systemd_inhibit = false; - }; - - listener = [ - # Dim screen brightness - { - timeout = cfg.brightnessTimeout; - on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10"; - on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; - } - # Turn off keyboard backlight (if available) - { - timeout = cfg.brightnessTimeout; - on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -sd rgb:kbd_backlight set 0"; - on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -rd rgb:kbd_backlight"; - } - # Lock screen - { - timeout = cfg.lockTimeout; - on-timeout = "loginctl lock-session"; - } - # Turn off display - { - timeout = cfg.displayTimeout; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on && ${pkgs.brightnessctl}/bin/brightnessctl -r"; - } - # Suspend system - { - timeout = cfg.suspendTimeout; - on-timeout = "systemctl suspend"; - } - ]; - }; - }; - }; -} diff --git a/modules/home/windowManagers/hyprland/default.nix b/modules/home/windowManagers/hyprland/default.nix deleted file mode 100644 index a0d96c1..0000000 --- a/modules/home/windowManagers/hyprland/default.nix +++ /dev/null @@ -1,260 +0,0 @@ -{ - config, - pkgs, - lib, - namespace, - ... -}: -let - inherit (lib) - mkEnableOption - mkOption - mkIf - types - ; - - cfg = config.${namespace}.windowManagers.hyprland; - left = "h"; - right = "l"; - up = "k"; - down = "j"; - modifier = "SUPER"; - - menu = "${pkgs.fuzzel}/bin/fuzzel"; - emoji_picker = "${pkgs.bemoji}/bin/bemoji -t"; - terminal = "${pkgs.kitty}/bin/kitty"; - - generate_grim_command = target: '' - exec mkdir -p ~/screenshots \ - && ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" \ - ~/screenshots/"$(date -u --iso-8601=seconds)".png && \ - ${pkgs.libnotify}/bin/notify-send "Screenshot saved" - ''; -in -{ - options.${namespace}.windowManagers.hyprland = { - enable = mkEnableOption "Hyprland"; - - wallpaperPath = mkOption { - type = types.str; - default = "hyprland/wallpaper.jpg"; - description = '' - Path to wallpaper, relative to xdg.dataHome - ''; - }; - - monitor = mkOption { - type = types.listOf types.str; - default = [ - "eDP-1,preferred,auto,1.6" - ",preferred,auto,1" - ]; - description = '' - Monitor configuration for Hyprland - ''; - }; - }; - - config = mkIf cfg.enable { - ${namespace} = { - fonts.enable = true; - programs = { - kitty.enable = true; - fuzzel.enable = true; - waybar.enable = true; - hyprlock.enable = true; - }; - services = { - gammastep.enable = true; - playerctld.enable = true; - swaync.enable = true; - hypridle.enable = true; - }; - }; - - home.packages = with pkgs; [ - grim - slurp - wl-clipboard - wtype - xdg-utils - libnotify - ]; - - catppuccin.cursors = { - enable = true; - accent = "dark"; - }; - catppuccin.gtk.icon.enable = true; - catppuccin.kvantum = { - enable = true; - apply = true; - }; - - xdg.dataFile.${cfg.wallpaperPath}.source = ./wallpaper.jpg; - - catppuccin.hyprland.enable = true; - wayland.windowManager.hyprland = { - enable = true; - systemd.variables = [ "--all" ]; - - settings = { - "$mod" = modifier; - - # Monitor configuration - monitor = cfg.monitor; - - # General settings - general = { - gaps_in = 5; - gaps_out = 20; - border_size = 2; - "col.active_border" = "$lavender"; - "col.inactive_border" = "$overlay0"; - layout = "dwindle"; - allow_tearing = false; - }; - - # Decoration - decoration = { - rounding = 10; - blur = { - enabled = true; - size = 3; - passes = 1; - }; - }; - - # Animations - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; - }; - - # Dwindle layout - dwindle = { - pseudotile = true; - preserve_split = true; - }; - - # Window rules - windowrulev2 = [ - "suppressevent maximize, class:.*" - "idleinhibit fullscreen, class:.*" - ]; - - # Startup - exec-once = [ - "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" - "${pkgs.swaynotificationcenter}/bin/swaync" - "${pkgs.waybar}/bin/waybar" - "hyprpaper" - ]; - - # Keybindings - bind = [ - # Applications - "$mod, Return, exec, ${terminal}" - "$mod, c, killactive" - "$mod, p, exec, ${menu}" - "$mod, d, exec, ${emoji_picker}" - "$mod, z, exec, hyprctl reload" - - # Focus - "$mod, ${left}, movefocus, l" - "$mod, ${down}, movefocus, d" - "$mod, ${up}, movefocus, u" - "$mod, ${right}, movefocus, r" - - # Move windows - "$mod SHIFT, ${left}, movewindow, l" - "$mod SHIFT, ${down}, movewindow, d" - "$mod SHIFT, ${up}, movewindow, u" - "$mod SHIFT, ${right}, movewindow, r" - - # Workspaces (qwertyuio) - "$mod, q, workspace, 1" - "$mod, w, workspace, 2" - "$mod, e, workspace, 3" - "$mod, r, workspace, 4" - "$mod, t, workspace, 5" - "$mod, y, workspace, 6" - "$mod, u, workspace, 7" - "$mod, i, workspace, 8" - "$mod, o, workspace, 9" - - # Move to workspaces - "$mod SHIFT, q, movetoworkspace, 1" - "$mod SHIFT, w, movetoworkspace, 2" - "$mod SHIFT, e, movetoworkspace, 3" - "$mod SHIFT, r, movetoworkspace, 4" - "$mod SHIFT, t, movetoworkspace, 5" - "$mod SHIFT, y, movetoworkspace, 6" - "$mod SHIFT, u, movetoworkspace, 7" - "$mod SHIFT, i, movetoworkspace, 8" - "$mod SHIFT, o, movetoworkspace, 9" - - # Layout - "$mod, v, togglesplit" - "$mod, f, fullscreen" - "$mod SHIFT, f, togglefloating" - # "$mod, space, focusmode, toggle" - # "$mod, a, focusparent" - - # Screenshots - "$mod, period, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" ~/screenshots/\"$(date -u --iso-8601=seconds)\".png && ${pkgs.libnotify}/bin/notify-send \"Screenshot saved\"" - "$mod SHIFT, period, exec, ${pkgs.grim}/bin/grim ~/screenshots/\"$(date -u --iso-8601=seconds)\".png && ${pkgs.libnotify}/bin/notify-send \"Screenshot saved\"" - - # Notifications - "$mod SHIFT, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" - "$mod SHIFT, d, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw" - - "$mod SHIFT, x, exec, hyprctl dispatch exit" - "$mod, x, exec, ${pkgs.hyprlock}/bin/hyprlock" - - # Scratchpad - "$mod SHIFT, minus, movetoworkspace, special:magic" - "$mod, minus, togglespecialworkspace, magic" - ]; - - # Media keys - bindl = [ - ", XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer --increase 5" - ", XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer --decrease 5" - ", XF86AudioMute, exec, ${pkgs.pamixer}/bin/pamixer --toggle-mute" - ", XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous" - ", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next" - ", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause" - ", XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -U 5" - ", XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 5" - ]; - }; - }; - - # Hyprpaper configuration for wallpaper - services.hyprpaper = { - enable = true; - settings = { - ipc = "on"; - splash = false; - splash_offset = 2.0; - - preload = [ - "${config.xdg.dataHome}/${cfg.wallpaperPath}" - ]; - - wallpaper = [ - ",${config.xdg.dataHome}/${cfg.wallpaperPath}" - ]; - }; - }; - }; -} diff --git a/modules/home/windowManagers/hyprland/wallpaper.jpg b/modules/home/windowManagers/hyprland/wallpaper.jpg deleted file mode 100644 index dbb7322..0000000 Binary files a/modules/home/windowManagers/hyprland/wallpaper.jpg and /dev/null differ diff --git a/packages/catppuccin-swaync/default.nix b/packages/catppuccin-swaync/default.nix index f1ef1b2..e5d38ad 100644 --- a/packages/catppuccin-swaync/default.nix +++ b/packages/catppuccin-swaync/default.nix @@ -7,7 +7,7 @@ }: stdenv.mkDerivation rec { pname = "catppuccin-swaync"; - version = "1.0.0"; + version = "0.2.3"; src = fetchurl { url = "https://github.com/catppuccin/swaync/releases/download/v${version}/${flavor}.css";