diff --git a/common/base/default.nix b/common/base/default.nix index 5f62a9b..a644de7 100644 --- a/common/base/default.nix +++ b/common/base/default.nix @@ -46,6 +46,7 @@ # Misc p.strace + p.xxd (p.nixos-rebuild.override { nix = config.nix.package.out; }) ]; diff --git a/flake.lock b/flake.lock index e49c6ed..a83ccbb 100644 --- a/flake.lock +++ b/flake.lock @@ -377,7 +377,7 @@ "keydb": { "flake": false, "locked": { - "narHash": "sha256-iU2LljD8wcXe9szrjdAWybmre6ecNT3lAnqsmn73yiw=", + "narHash": "sha256-1a2vz2txAObF8qK72k4R+DsErPIqBQuwoCkmf7fAtpE=", "type": "file", "url": "https://github.com/anna328p/mirror/releases/latest/download/keydb_eng.zip" }, diff --git a/home/base/files/zsh/p10k.zsh b/home/base/files/zsh/p10k.zsh index a2b0b50..545e756 100644 --- a/home/base/files/zsh/p10k.zsh +++ b/home/base/files/zsh/p10k.zsh @@ -50,8 +50,8 @@ function base16 { typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( newline status # exit code of the last command - command_execution_time # duration of the last command background_jobs # presence of background jobs + command_execution_time # duration of the last command direnv # direnv status (https://direnv.net/) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) haskell_stack # haskell version from stack (https://haskellstack.org/) @@ -62,6 +62,9 @@ function base16 { time # current time ) + local misc_bg=$(base16 01 8) + local misc_fg=$(base16 04 7) + typeset -g POWERLEVEL9K_MODE=nerdfont-complete typeset -g POWERLEVEL9K_ICON_PADDING=none @@ -91,7 +94,7 @@ function base16 { if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE # ornaments defined above. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=$(base16 02 242) # Start filler from the edge of the screen if there are no left segments on the first line. typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' # End filler on the edge of the screen if there are no right segments on the first line. @@ -410,15 +413,15 @@ function base16 { # it will signify success by turning green. typeset -g POWERLEVEL9K_STATUS_OK=true typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=8 + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=$(base16 04 2) typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 # Status when some part of a pipe command fails but the overall exit status is zero. It may look # like this: 1|0. typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=8 - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='~' + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=0 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=1 # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as # it will signify error by turning red. @@ -444,8 +447,8 @@ function base16 { ###################[ command_execution_time: duration of the last command ]################### # Execution time color. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=$misc_bg # Show duration of the last command if takes at least this many seconds. typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=1 # Show this many fractional digits. Zero means round to seconds. @@ -459,29 +462,26 @@ function base16 { #######################[ background_jobs: presence of background jobs ]####################### # Background jobs color. - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=$(base16 00 0) - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=$(base16 03 8) + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=$misc_bg typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=true # Custom icon. typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⚙' #######################[ direnv: direnv status (https://direnv.net/) ]######################## # Direnv color. - typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 - typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=$misc_bg # Custom icon. # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## # Nix shell color. - typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=$misc_bg # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. - # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= - - # Custom icon. - # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + #typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### # Foreground color. @@ -501,14 +501,14 @@ function base16 { # ##################################[ context: user@hostname ]################################## # Context color when running with privileges. - typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 - typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=0 + typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=1 # Context color in SSH without privileges. - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=$misc_bg # Default context color (no privileges, no SSH). - typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 - typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=$misc_bg # Context format when running with privileges: user@hostname. typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' @@ -528,8 +528,8 @@ function base16 { ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### # Python virtual environment color. - typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 - typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=$misc_bg # Don't show Python version next to the virtual environment name. typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false # If set to "false", won't show virtualenv if pyenv is already shown. @@ -542,8 +542,8 @@ function base16 { ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### # Haskell color. - typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 - typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=$misc_fg + typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=$misc_bg # Hide haskell version if it doesn't come from one of these sources. # @@ -558,8 +558,8 @@ function base16 { # ####################################[ time: current time ]#################################### # Current time color. - typeset -g POWERLEVEL9K_TIME_FOREGROUND=$(base16 00 0) - typeset -g POWERLEVEL9K_TIME_BACKGROUND=$(base16 04 7) + typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 + typeset -g POWERLEVEL9K_TIME_BACKGROUND=4 # Format for the current time: 09:51:02. See `man 3 strftime`. typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' # If set to true, time will update when you hit enter. This way prompts for the past @@ -588,8 +588,8 @@ function base16 { typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true - typeset -g POWERLEVEL9K_HISTORY_FOREGROUND=0 - typeset -g POWERLEVEL9K_HISTORY_BACKGROUND=$(base16 03 grey50) + typeset -g POWERLEVEL9K_HISTORY_FOREGROUND=$(base16 05 0) + typeset -g POWERLEVEL9K_HISTORY_BACKGROUND=$(base16 02 grey50) # If p10k is already loaded, reload configuration. # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. diff --git a/systems/hermes/home/gtk.nix b/systems/hermes/home/gtk.nix index 80f828b..0169a4d 100644 --- a/systems/hermes/home/gtk.nix +++ b/systems/hermes/home/gtk.nix @@ -8,5 +8,16 @@ "Documents/Docs" "work" ]; + + global = [ + { + name = "/ on theseus"; + target = "sftp://theseus.zerotier.ap5.network/"; + } + { + name = "/home/anna on theseus"; + target = "sftp://theseus.zerotier.ap5.network/home/anna"; + } + ]; }; } \ No newline at end of file