From a05811a5aafee7c711889d4a43570ecf6a26be1a Mon Sep 17 00:00:00 2001 From: xbazzi Date: Sat, 1 Feb 2025 17:07:09 -0700 Subject: [PATCH] Customize kitty, yazi, and starship --- home/dconf.nix | 40 ++++++++++++++++++++++++ home/kitty.nix | 4 ++- home/starship.nix | 37 ++++++++++++---------- home/xbazzi_starship.toml | 64 +++++++++++++++++++++++++++++++++++++++ system/configuration.nix | 5 +-- 5 files changed, 131 insertions(+), 19 deletions(-) create mode 100644 home/xbazzi_starship.toml diff --git a/home/dconf.nix b/home/dconf.nix index c9c580d..038262d 100644 --- a/home/dconf.nix +++ b/home/dconf.nix @@ -4,6 +4,46 @@ dconf = { enable = true; settings = { + "org/gnome/settings-daemon/plugins/media-keys" = { + custom-keybindings = [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/" + ]; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + binding = "k"; + command = "kitty"; + name = "open-terminal"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { + binding = "c"; + command = "code"; + name = "open-vscode"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { + binding = "i"; + command = "thunderbird"; + name = "open-thunderbird"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { + binding = "f"; + command = "kitty -- zsh -c 'yazi; exec zsh'"; + name = "open-yazi"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = { + binding = "b"; + command = "kitty -- zsh -c 'btop; exec zsh'"; + name = "open-btop"; + }; + "org/gnome/shell" = { disable-user-extensions = false; # enables user extensions enabled-extensions = [ diff --git a/home/kitty.nix b/home/kitty.nix index 34fe6df..64d9145 100755 --- a/home/kitty.nix +++ b/home/kitty.nix @@ -12,7 +12,9 @@ window_padding_width = 5; background_opacity = "0.90"; background_blur = 5; - themeFile = "Alucard"; + background = "#17041c"; + hide_window_decorations = true; + # themeFile = "Alucard"; # symbol_map = # let # mappings = [ diff --git a/home/starship.nix b/home/starship.nix index 6f183f6..ce08c98 100755 --- a/home/starship.nix +++ b/home/starship.nix @@ -1,21 +1,26 @@ +{ inputs, pkgs, lib, config, ... }: + { programs.starship = { enable = true; - settings = { - username = { - style_user = "blue bold"; - style_root = "red bold"; - format = "[$user]($style) "; - disabled = false; - show_always = true; - }; - hostname = { - ssh_only = false; - ssh_symbol = "🌐 "; - format = "on [$hostname](bold red) "; - trim_at = ".local"; - disabled = false; - }; - }; + enableZshIntegration = true; + settings = pkgs.lib.importTOML ./xbazzi_starship.toml; + # username = { + # style_user = "blue bold"; + # style_root = "red bold"; + # format = "[$user]($style) "; + # disabled = false; + # show_always = true; + # }; + # hostname = { + # ssh_only = false; + # ssh_symbol = "🌐 "; + # format = "on [$hostname](bold red) "; + # trim_at = ".local"; + # disabled = false; + # }; }; + # home.sessionVariables = { + # STARSHIP_CONFIG = "/home/xbazzi/.config/starship.toml"; + # }; } diff --git a/home/xbazzi_starship.toml b/home/xbazzi_starship.toml new file mode 100644 index 0000000..4972a7b --- /dev/null +++ b/home/xbazzi_starship.toml @@ -0,0 +1,64 @@ +format = """ +[░▒▓](#a3aed2)\ +[  ](bg:#a3aed2 fg:#090c0c)\ +[](bg:#769ff0 fg:#a3aed2)\ +$directory\ +[](fg:#769ff0 bg:#394260)\ +$git_branch\ +$git_status\ +[](fg:#394260 bg:#212736)\ +$nodejs\ +$rust\ +$golang\ +$php\ +[](fg:#212736 bg:#1d2230)\ +$time\ +[ ](fg:#1d2230)\ +\n$character""" + +[directory] +style = "fg:#e3e5e5 bg:#769ff0" +format = "[ $path ]($style)" +truncation_length = 3 +truncation_symbol = "…/" + +[directory.substitutions] +"Documents" = "󰈙 " +"Downloads" = " " +"Music" = " " +"Pictures" = " " + +[git_branch] +symbol = "" +style = "bg:#394260" +format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)' + +[git_status] +style = "bg:#394260" +format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)' + +[nodejs] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[rust] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[golang] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[php] +symbol = "" +style = "bg:#212736" +format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' + +[time] +disabled = false +time_format = "%R" # Hour:Minute Format +style = "bg:#1d2230" +format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)' diff --git a/system/configuration.nix b/system/configuration.nix index 9417055..85b60a9 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -53,17 +53,18 @@ fonts.packages = with pkgs; [ nerd-fonts.fira-code + nerd-fonts.sauce-code-pro + # nerd-fonts._Oxproto nerd-fonts.space-mono nerd-fonts.droid-sans-mono noto-fonts-cjk-sans noto-fonts-emoji liberation_ttf - #fira-code fira-code-symbols mplus-outline-fonts.githubRelease dina-font proggyfonts - ]; + ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); # Zsh enable for all users programs.zsh = {