Compare commits

..

8 Commits

6 changed files with 42 additions and 14 deletions

View File

@ -285,10 +285,10 @@
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = false;
enableBrowserSocket = true; enableBrowserSocket = true;
}; };
programs.ssh.startAgent = false; programs.ssh.startAgent = true;
# List services that you want to enable: # List services that you want to enable:

View File

@ -14,6 +14,7 @@
}; };
environment.variables = { environment.variables = {
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ]; QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
XCURSOR_THEME = "breeze_cursors";
}; };
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enableQt5Integration = true; services.desktopManager.plasma6.enableQt5Integration = true;

View File

@ -63,6 +63,7 @@ in
KWIN_DRM_USE_MODIFIERS = "0"; KWIN_DRM_USE_MODIFIERS = "0";
KWIN_DRM_NO_DIRECT_SCANOUT = "1"; KWIN_DRM_NO_DIRECT_SCANOUT = "1";
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ]; QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
XCURSOR_THEME = "breeze_cursors";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
kdePackages.ark kdePackages.ark

View File

@ -40,6 +40,7 @@ let
rev = "v1.20.0"; rev = "v1.20.0";
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E="; sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
}); });
sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo";
}; };
in in
@ -70,6 +71,11 @@ in
envExtra = '' envExtra = ''
if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-1}"; else
__MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-0}";
fi
${makeEnv "__MATERUS_HM_ZSH" "1"} ${makeEnv "__MATERUS_HM_ZSH" "1"}
${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt} ${makeEnv "__MATERUS_HM_ZSH_PROMPT" cfg.prompt}
${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"} ${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"}
@ -84,6 +90,9 @@ in
if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then
source "${extraPlugins.powerlevel10k.fullPath}" source "${extraPlugins.powerlevel10k.fullPath}"
fi fi
if [[ -f "${extraPlugins.sudo.fullPath}" ]]; then
source "${extraPlugins.sudo.fullPath}"
fi
'' ''
}''; }'';
@ -128,10 +137,18 @@ in
__MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package} __MATERUS_HM_ZSH_PRIVATE=1 ${lib.getExe config.programs.zsh.package}
} }
myip() {
${lib.getExe pkgs.wget} -qO- https://wtfismyip.com/text
}
speedtest() {
${lib.getExe pkgs.curl} -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | ${lib.getExe pkgs.python3}
}
'' + '' +
makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" '' makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" ''
if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh [[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
else else
[[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh [[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh
@ -139,6 +156,7 @@ in
'' + makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" '' '' + makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" ''
unset HISTFILE unset HISTFILE
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"} ${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"}
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh "
'' ''
; ;

View File

@ -97,6 +97,7 @@
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# cpu_arch # CPU architecture # cpu_arch # CPU architecture
private
time # current time time # current time
# ip # ip address and bandwidth usage for a specified network interface # ip # ip address and bandwidth usage for a specified network interface
# public_ip # public IP address # public_ip # public IP address
@ -1575,7 +1576,11 @@
function prompt_example() { function prompt_example() {
p10k segment -f 2 -i '*' -t 'hello, %n' p10k segment -f 2 -i '*' -t 'hello, %n'
} }
function prompt_private() {
if [ $__MATERUS_HM_ZSH_PRIVATE = "1" ]; then
p10k segment -f 5 -t 'PRIVATE'
fi
}
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
# is to generate the prompt segment for display in instant prompt. See # is to generate the prompt segment for display in instant prompt. See
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.

View File

@ -99,6 +99,7 @@
timewarrior # timewarrior tracking status (https://timewarrior.net/) timewarrior # timewarrior tracking status (https://timewarrior.net/)
taskwarrior # taskwarrior task count (https://taskwarrior.org/) taskwarrior # taskwarrior task count (https://taskwarrior.org/)
# cpu_arch # CPU architecture # cpu_arch # CPU architecture
private
time # current time time # current time
# ip # ip address and bandwidth usage for a specified network interface # ip # ip address and bandwidth usage for a specified network interface
# public_ip # public IP address # public_ip # public IP address
@ -178,8 +179,8 @@
#################################[ os_icon: os identifier ]################################## #################################[ os_icon: os identifier ]##################################
# OS identifier color. # OS identifier color.
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=11
typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=54
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
@ -208,19 +209,19 @@
##################################[ dir: current directory ]################################## ##################################[ dir: current directory ]##################################
# Current directory background color. # Current directory background color.
typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 typeset -g POWERLEVEL9K_DIR_BACKGROUND=11
# Default current directory foreground color. # Default current directory foreground color.
typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 typeset -g POWERLEVEL9K_DIR_FOREGROUND=54
# If directory is too long, shorten some of its segments to the shortest possible unique # If directory is too long, shorten some of its segments to the shortest possible unique
# prefix. The shortened directory can be tab-completed to the original. # prefix. The shortened directory can be tab-completed to the original.
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
# Replace removed segment suffixes with this symbol. # Replace removed segment suffixes with this symbol.
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
# Color of the shortened directory segments. # Color of the shortened directory segments.
typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=54
# Color of the anchor directory segments. Anchor segments are never shortened. The first # Color of the anchor directory segments. Anchor segments are never shortened. The first
# segment is always an anchor. # segment is always an anchor.
typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=54
# Display anchor directory segments in bold. # Display anchor directory segments in bold.
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
# Don't shorten directories that contain any of these files. They are anchors. # Don't shorten directories that contain any of these files. They are anchors.
@ -348,7 +349,7 @@
#####################################[ vcs: git status ]###################################### #####################################[ vcs: git status ]######################################
# Version control background colors. # Version control background colors.
typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=50
typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2
typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3
typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8
@ -1672,7 +1673,7 @@
# Custom icon. # Custom icon.
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Custom prefix. # Custom prefix.
typeset -g POWERLEVEL9K_TIME_PREFIX='at ' typeset -g POWERLEVEL9K_TIME_PREFIX=''
# Example of a user-defined prompt segment. Function prompt_example will be called on every # Example of a user-defined prompt segment. Function prompt_example will be called on every
# prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
@ -1680,8 +1681,10 @@
# greeting the user. # greeting the user.
# #
# Type `p10k help segment` for documentation and a more sophisticated example. # Type `p10k help segment` for documentation and a more sophisticated example.
function prompt_example() { function prompt_private() {
p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' if [ $__MATERUS_HM_ZSH_PRIVATE = "1" ]; then
p10k segment -b 54 -f 11 -i '󰗹' -t 'PRIVATE'
fi
} }
# User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job