Compare commits
8 Commits
5f363c0709
...
6da0978779
Author | SHA1 | Date |
---|---|---|
Mateusz Słodkowicz | 6da0978779 | |
Mateusz Słodkowicz | e442af49ba | |
Mateusz Słodkowicz | cb65f9b455 | |
Mateusz Słodkowicz | b299e40e3a | |
Mateusz Słodkowicz | 8691fcd211 | |
Mateusz Słodkowicz | b91142f643 | |
Mateusz Słodkowicz | 8870c0e7e7 | |
Mateusz Słodkowicz | 9a18e2a37e |
|
@ -285,10 +285,10 @@
|
|||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
enableSSHSupport = false;
|
||||
enableBrowserSocket = true;
|
||||
};
|
||||
programs.ssh.startAgent = false;
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
};
|
||||
environment.variables = {
|
||||
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
||||
XCURSOR_THEME = "breeze_cursors";
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.plasma6.enableQt5Integration = true;
|
||||
|
|
|
@ -63,6 +63,7 @@ in
|
|||
KWIN_DRM_USE_MODIFIERS = "0";
|
||||
KWIN_DRM_NO_DIRECT_SCANOUT = "1";
|
||||
QT_PLUGIN_PATH = [ "${pkgs.qt6.qtimageformats}/${pkgs.qt6.qtbase.qtPluginPrefix}" ];
|
||||
XCURSOR_THEME = "breeze_cursors";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.ark
|
||||
|
|
|
@ -40,6 +40,7 @@ let
|
|||
rev = "v1.20.0";
|
||||
sha256 = "sha256-ES5vJXHjAKw/VHjWs8Au/3R+/aotSbY7PWnWAMzCR8E=";
|
||||
});
|
||||
sudo = makePlugin "sudo" "sudo.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/sudo";
|
||||
|
||||
};
|
||||
in
|
||||
|
@ -70,6 +71,11 @@ in
|
|||
|
||||
|
||||
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_PROMPT" cfg.prompt}
|
||||
${makeEnv "__MATERUS_HM_ZSH_PRIVATE" "0"}
|
||||
|
@ -84,6 +90,9 @@ in
|
|||
if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then
|
||||
source "${extraPlugins.powerlevel10k.fullPath}"
|
||||
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}
|
||||
}
|
||||
|
||||
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" ''
|
||||
if zmodload zsh/terminfo && (( terminfo[colors] >= 256 )); then
|
||||
if [[ "$__MATERUS_HM_ZSH_256COLORS" = "1" ]] ; then
|
||||
[[ ! -f ${p10kcfg}/fullcolor.zsh ]] || source ${p10kcfg}/fullcolor.zsh
|
||||
else
|
||||
[[ ! -f ${p10kcfg}/compatibility.zsh ]] || source ${p10kcfg}/compatibility.zsh
|
||||
|
@ -139,6 +156,7 @@ in
|
|||
'' + makeIfVar "__MATERUS_HM_ZSH_PRIVATE" "1" ''
|
||||
unset HISTFILE
|
||||
${lib.optionalString config.programs.zsh.history.share "unsetopt SHARE_HISTORY"}
|
||||
alias -- 'zsh'="__MATERUS_HM_ZSH_PRIVATE=0 zsh "
|
||||
''
|
||||
|
||||
;
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# cpu_arch # CPU architecture
|
||||
private
|
||||
time # current time
|
||||
# ip # ip address and bandwidth usage for a specified network interface
|
||||
# public_ip # public IP address
|
||||
|
@ -1575,7 +1576,11 @@
|
|||
function prompt_example() {
|
||||
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
|
||||
# is to generate the prompt segment for display in instant prompt. See
|
||||
# https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# cpu_arch # CPU architecture
|
||||
private
|
||||
time # current time
|
||||
# ip # ip address and bandwidth usage for a specified network interface
|
||||
# public_ip # public IP address
|
||||
|
@ -178,8 +179,8 @@
|
|||
|
||||
#################################[ os_icon: os identifier ]##################################
|
||||
# OS identifier color.
|
||||
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232
|
||||
typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7
|
||||
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=11
|
||||
typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=54
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
|
||||
|
||||
|
@ -208,19 +209,19 @@
|
|||
|
||||
##################################[ dir: current directory ]##################################
|
||||
# Current directory background color.
|
||||
typeset -g POWERLEVEL9K_DIR_BACKGROUND=4
|
||||
typeset -g POWERLEVEL9K_DIR_BACKGROUND=11
|
||||
# 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
|
||||
# prefix. The shortened directory can be tab-completed to the original.
|
||||
typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
|
||||
# Replace removed segment suffixes with this symbol.
|
||||
typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
|
||||
# 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
|
||||
# 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.
|
||||
typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
|
||||
# Don't shorten directories that contain any of these files. They are anchors.
|
||||
|
@ -348,7 +349,7 @@
|
|||
#####################################[ vcs: git status ]######################################
|
||||
# Version control background colors.
|
||||
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_CONFLICTED_BACKGROUND=3
|
||||
typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8
|
||||
|
@ -1672,7 +1673,7 @@
|
|||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# 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
|
||||
# prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
|
||||
|
@ -1680,8 +1681,10 @@
|
|||
# greeting the user.
|
||||
#
|
||||
# Type `p10k help segment` for documentation and a more sophisticated example.
|
||||
function prompt_example() {
|
||||
p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n'
|
||||
function prompt_private() {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue