From 2080a872f881b508de905638d5c9f43d2bdd7cf2 Mon Sep 17 00:00:00 2001 From: foglar Date: Sun, 23 Mar 2025 21:52:43 +0100 Subject: [PATCH] system update --- flake.nix | 4 +- kogami/configuration.nix | 9 ++-- nixos/home/desktop/hyprland/dependencies.nix | 6 +++ nixos/home/desktop/hyprland/hyprland.nix | 5 +++ nixos/home/desktop/hyprland/hyprlock.nix | 47 ++++++++++---------- nixos/home/packages/packages.nix | 10 ++--- nixos/home/packages/programming/code.nix | 9 ++++ nixos/home/packages/tools/fastfetch.nix | 25 +++++++---- 8 files changed, 72 insertions(+), 43 deletions(-) diff --git a/flake.nix b/flake.nix index 0e66795..459411e 100644 --- a/flake.nix +++ b/flake.nix @@ -16,12 +16,14 @@ editor = "neovim"; # neovim, vscode # List all themes: $ nix build nixpkgs#base16-schemes && ls result/share/themes - theme = "catppuccin-mocha"; # catppuccin-mocha, tokyo-night-dark, one-dark + theme = "tokyo-night-dark"; # catppuccin-mocha, tokyo-night-dark, one-dark background = if userSettings.theme == "catppuccin-mocha" then "aurora_borealis.png" else if "evangelion-blood" == userSettings.theme then "evangelion.jpg" + else if "tokyo-night-dark" == userSettings.theme + then "lain.png" else "aurora_borealis.png"; resolution = { diff --git a/kogami/configuration.nix b/kogami/configuration.nix index 7ef20fd..791a67d 100644 --- a/kogami/configuration.nix +++ b/kogami/configuration.nix @@ -35,7 +35,9 @@ bootloader.plymouth.enable = true; #bootloader.systemd-boot.enable = true; desktop = { - steamdeck.enable = true; + hyprland.enable = true; + gnome.enable = true; + steamdeck.enable = false; }; fonts.packages = true; locales.enable = true; @@ -84,7 +86,7 @@ kdeconnect.enable = true; wireshark.enable = true; auto-cpufreq.enable = - if config.sys.desktop.plasma.enable + if config.sys.desktop.plasma.enable || config.sys.desktop.gnome.enable then false else true; nix-ld.dev.enable = true; @@ -96,9 +98,10 @@ inputs.zen-browser.packages.${system}.default pkgs.gcc + pkgs.corefonts ]; - #services.twingate.enable = true; + #services.twingate.enable = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; diff --git a/nixos/home/desktop/hyprland/dependencies.nix b/nixos/home/desktop/hyprland/dependencies.nix index 6c2e880..33c9be9 100644 --- a/nixos/home/desktop/hyprland/dependencies.nix +++ b/nixos/home/desktop/hyprland/dependencies.nix @@ -6,6 +6,12 @@ # Keyboard image for keyboard switch layout home.file = { ".local/share/icons/kogami/keyboard.svg".source = ../../../../config/icons/keyboard.svg; + + ".config/swappy/config".text = '' + [Default] + save_dir=$HOME/Pictures/Screenshots + save_filename_format=swappy-%Y%m%d-%H%M%S.png + ''; }; #services.mpd = { diff --git a/nixos/home/desktop/hyprland/hyprland.nix b/nixos/home/desktop/hyprland/hyprland.nix index 256f601..ac01bee 100644 --- a/nixos/home/desktop/hyprland/hyprland.nix +++ b/nixos/home/desktop/hyprland/hyprland.nix @@ -93,6 +93,11 @@ "force_no_accel" = "1"; }; + general = { + gaps_in = "5"; + gaps_out = "15"; + }; + gestures = { "workspace_swipe" = "true"; "workspace_swipe_fingers" = "3"; diff --git a/nixos/home/desktop/hyprland/hyprlock.nix b/nixos/home/desktop/hyprland/hyprlock.nix index cc117db..981af8f 100644 --- a/nixos/home/desktop/hyprland/hyprlock.nix +++ b/nixos/home/desktop/hyprland/hyprlock.nix @@ -95,16 +95,16 @@ get_cover() { DOWNLOAD_PATH="$HOME/.cache/cover.png" FALLBACK_PATH="./images/music.png" # Change this to your static image path - + # Get the image URL from playerctl URL=$(playerctl metadata mpris:artUrl 2>/dev/null) - + # If the URL is empty or playerctl fails, return the fallback path if [[ -z "$URL" ]]; then echo "$FALLBACK_PATH" return fi - + # Try downloading the image if curl -s -o "$DOWNLOAD_PATH" "$URL"; then echo "$DOWNLOAD_PATH" @@ -116,7 +116,7 @@ get_watched_length() { total_length=$(playerctl metadata --format "{{ duration(mpris:length) }}" | awk -F: '{ print ($1 * 60) + $2 }') current_position=$(playerctl metadata --format "{{ duration(position) }}" | awk -F: '{ print ($1 * 60) + $2 }') - + if [[ "$total_length" -gt 0 ]]; then percentage=$(awk "BEGIN { printf \"%.2f\", ($current_position / $total_length) * 100 }") echo "$percentage" @@ -275,14 +275,13 @@ label = [ { monitor = ""; - text = "$TIME"; + text = "$TIME "; color = "$text"; - font_size = 40; - #font_family = "Monaspace Xenon"; + font_size = 12; - position = "0, 80"; - halign = "center"; - valign = "center"; + position = "-37, 29"; + halign = "right"; + valign = "bottom"; } # Battery percentage { @@ -292,7 +291,7 @@ color = "$accent"; font_size = 12; - position = "-37, 29"; + position = "-207, 29"; halign = "right"; valign = "bottom"; zindex = 5; @@ -340,19 +339,19 @@ } # PLAYER STATUS SYMBOL - { - monitor = ""; - text = "cmd[update:1000] echo (playerctl-hyprlock --status-symbol)"; - - color = "$fg0"; - font_size = 16; - font_family = "$font-symbol"; - - position = "700, -370"; - halign = "left"; - valign = "center"; - zindex = 5; - } + #{ + # monitor = ""; + # text = "cmd[update:1000] playerctl-hyprlock --status-symbol"; +# + # color = "$fg0"; + # font_size = 16; + # font_family = "$font-symbol"; +# + # position = "700, -370"; + # halign = "left"; + # valign = "bottom"; + # zindex = 5; + #} # PLAYER ALBUM #{ diff --git a/nixos/home/packages/packages.nix b/nixos/home/packages/packages.nix index 6be9116..7b1be6f 100644 --- a/nixos/home/packages/packages.nix +++ b/nixos/home/packages/packages.nix @@ -20,7 +20,6 @@ ./applications/vencord.nix ./applications/qutebrowser.nix - ./tools/oh-my-posh.nix ./tools/shell.nix ./tools/kitty.nix @@ -118,11 +117,8 @@ ]; home.file = { - ".prettierrc".text = '' - { - "tabWidth": 4, - "useTabs": true - } - ''; + ".config/godot/text_editor_themes/Catppuccin_Macchiato.tet".source = ../../../config/Catppuccin_Macchiato.tet; + ".config/themes/heroic".source = ../../../config/heroic; + ".gitkraken/themes/catppuccin-mocha.jsonc".source = ../../../config/gitkraken/catppuccin-mocha.jsonc; }; } diff --git a/nixos/home/packages/programming/code.nix b/nixos/home/packages/programming/code.nix index 1915971..59ab1f8 100644 --- a/nixos/home/packages/programming/code.nix +++ b/nixos/home/packages/programming/code.nix @@ -28,6 +28,15 @@ vscode ]; + home.file = { + ".prettierrc".text = '' + { + "tabWidth": 4, + "useTabs": true + } + ''; + }; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ # VSCODE diff --git a/nixos/home/packages/tools/fastfetch.nix b/nixos/home/packages/tools/fastfetch.nix index a210ea9..3792c90 100644 --- a/nixos/home/packages/tools/fastfetch.nix +++ b/nixos/home/packages/tools/fastfetch.nix @@ -1,6 +1,7 @@ { lib, config, + userSettings, ... }: { options = { @@ -9,21 +10,29 @@ config = lib.mkIf config.program.fastfetch.enable { home.file = { - ".config/fastfetch/logo.png".source = ../../../../config/asuka.png; + ".config/fastfetch/logo.png".source = + if userSettings.theme == "evangelion-blood" + then ../../../../config/asuka.png + else ../../../../config/lain.jpeg; }; programs.fastfetch = { enable = true; settings = { "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; - "logo" = { - "source" = "/home/shinya/.config/fastfetch/logo.png"; - "width" = 34; - "height" = 18; - "padding" = { - "top" = 1; + "logo" = + if userSettings.theme == "evangelion-blood" || userSettings.theme == "tokyo-night-dark" + then { + "source" = "/home/shinya/.config/fastfetch/logo.png"; + "width" = 42; + "height" = 19; + "padding" = { + "top" = 1; + }; + } + else { + "source" = "default"; }; - }; "modules" = [ "break" {