diff --git a/flake.nix b/flake.nix index 0c41540..5a73b4e 100644 --- a/flake.nix +++ b/flake.nix @@ -14,9 +14,10 @@ Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; hyprswitch = { url = "github:h3rmt/hyprswitch/release"; }; - yazi.url = "github:sxyazi/yazi"; + yazi.url = "github:sxyazi/yazi"; yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; }; - zen-browser.url = "github:MarceColl/zen-browser-flake"; + zen-browser.url = "github:MarceColl/zen-browser-flake"; + ghostty.url = "github:ghostty-org/ghostty"; }; outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let diff --git a/home-modules/fish.nix b/home-modules/fish.nix index 0307a45..b3dfcc1 100755 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, rice, user, ... }: +{ pkgs, ... }: { home.packages = with pkgs; [ fish @@ -24,11 +24,11 @@ $(echo -e "$logo" | sed -n 4p): ''${XDG_CURRENT_DESKTOP^} $(echo -e "$logo" | sed -n 5p): ''${TERM^} $(echo -e "$logo" | sed -n 6p): $(bash --version | head --lines 1 | cut -f -4 -d' ' | sed -E 's-(.*?), version (.*?)\(.*-\1 \2-g') - $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev) + $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev | sed 's/./\U&/') $(echo -e "$logo" | sed -n 8p): ''$(uname -r) - $(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g') + $(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g' | sed 's/./\U&/') $(echo -e "$logo" | sed -n 10p): $(yazi --version | sed -E 's-(.*?) \(.*-\1-g') - $(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1) + $(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1 | sed 's/./\U&/') " echo -e "$msg" '') diff --git a/home-modules/ghostty.nix b/home-modules/ghostty.nix new file mode 100644 index 0000000..5dffc84 --- /dev/null +++ b/home-modules/ghostty.nix @@ -0,0 +1,54 @@ +{ config, rice, inputs, system, ... }: +{ + home = { + packages = [ inputs.ghostty.packages.${system}.default ]; + file."${config.xdg.configHome}/ghostty/config".text = with rice.color; /* ini */ '' + font-family="${rice.font.code.name}" + clipboard-read=allow + # clipboard-write=allow + # clipboard-read=deny + # clipboard-write=deny + clipboard-trim-trailing-spaces=true + clipboard-paste-protection=false + + window-decoration=false + confirm-close-surface=false + + window-padding-x=5 + window-padding-y=5 + + keybind=ctrl+comma=reload_config + keybind=ctrl+equal=increase_font_size:1 + keybind=ctrl+minus=decrease_font_size:1 + keybind=ctrl+shift+v=paste_from_clipboard + + background=${background} + foreground=${foreground} + + background-opacity=${builtins.toString rice.transparency} + + cursor-color=${special.bright} + cursor-opacity=0.8 + + palette=0=${black.base} + palette=8=${black.bright} + palette=1=${red.base} + palette=9=${red.bright} + palette=2=${green.base} + palette=10=${green.bright} + palette=3=${yellow.base} + palette=11=${yellow.bright} + palette=4=${blue.base} + palette=12=${blue.bright} + palette=5=${magenta.base} + palette=13=${magenta.bright} + palette=6=${cyan.base} + palette=14=${cyan.bright} + palette=7=${white.base} + palette=15=${white.bright} + + selection-background=${accent.base} + selection-foreground=${background} + ''; + }; +} diff --git a/home-modules/hyprland-autoname-workspaces.nix b/home-modules/hyprland-autoname-workspaces.nix index 4f33622..4621dd2 100755 --- a/home-modules/hyprland-autoname-workspaces.nix +++ b/home-modules/hyprland-autoname-workspaces.nix @@ -31,6 +31,7 @@ chatterino = "" libreoffice-writer = "" kitty = "" + "com.michellh.ghostty" = "󰊠" "cyberpunk2077.exe" = "󰾲" KiCad = "" "[tT]hunar" = "" diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index a213d6a..f587c57 100755 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -2,6 +2,8 @@ let animation-speed = "5"; transparency = builtins.toString rice.transparency; + terminal = "ghostty"; + terminal-exec = "ghostty --command="; monitors = { xps = { main = { @@ -258,7 +260,6 @@ in { windowrulev2 = [ "opacity ${transparency},class:^(com.chatterino.*)$" - "opacity ${transparency},class:^(chatterino)$" "bordercolor rgba(${rice.lib.nohash rice.color.magenta.bright}ff), pinned:1" "noanim, class:^(presenter)$" # sent "float, class:^(presenter)$" # sent @@ -282,7 +283,7 @@ in { "opacity ${transparency}, obsidian" # "opacity ${transparency}, zathura" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty" - # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Kitty" + # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), ${terminal}" "opacity ${transparency}, discord" "opacity ${transparency}, vesktop" "opacity ${transparency}, Element" @@ -342,8 +343,8 @@ in { # "SUPER, F4," "SUPER, F5, exec, nx_gcal_event force-lookup" "SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate" - "SUPER, F6, exec, kitty -e 'htop'" - "SUPER, F7, exec, kitty -e 'nmtui'" + "SUPER, F6, exec, ${terminal} -e 'htop'" + "SUPER, F7, exec, ${terminal} -e 'nmtui'" ''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs -d '\n' swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 --transition-duration 2'' "SUPER, F9, execr, waybar_mode set '󰸉 '" "SUPER, F9, submap, color" @@ -397,19 +398,19 @@ in { "SUPER, R, exec, rofi -show drun" # "SUPER, T, exec, alacritty" # "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace"" - "SUPER, T, exec, SESSION_FROM_DE=TRUE kitty" - "SUPER SHIFT, T, exec, kitty -e sh -c 'ssh nxace'" + "SUPER, T, exec, SESSION_FROM_DE=TRUE ${terminal}" + "SUPER SHIFT, T, exec, ${terminal-exec} sh -c 'ssh nxace'" "SUPER, Z, exec, waybar_mode set ' '" "SUPER, Z, submap, tuda" "SUPER, U, exec, thunderbird " - "SUPER, I, exec, kitty -e fish -c 'hx ~/nix-dots/ && fish'" - "SUPER SHIFT, I, exec, kitty -e fish -c 'nh home switch || read'" - "SUPER CTRL, I, exec, kitty -e fish -c 'nh os switch || read'" + "SUPER, I, exec, ${terminal-exec}'hx ~/nix-dots/ && fish'" + "SUPER SHIFT, I, exec, ${terminal-exec}'nh home switch || read'" + "SUPER CTRL, I, exec, ${terminal-exec}'nh os switch || read'" "SUPER, O, exec, obsidian " "SUPER, P, pin " # "SUPER, Ü," # "SUPER, +," - "SUPER, Enter, exec, SESSION_FROM_DE=TRUE kitty" + "SUPER, Enter, exec, SESSION_FROM_DE=TRUE ${terminal}" ########################################################################### diff --git a/home.nix b/home.nix index ec727e0..ff7b659 100644 --- a/home.nix +++ b/home.nix @@ -14,6 +14,7 @@ # ./home-modules/foot.nix ./home-modules/games.nix ./home-modules/gestures.nix + ./home-modules/ghostty.nix ./home-modules/gimp.nix ./home-modules/git.nix ./home-modules/gpg.nix