File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2- fastfetch
2+
3+
4+ FASTFETCH_SHOWN=0
5+
6+ function hyprland_is_single_window() {
7+ command -v hyprctl > /dev/null || return 1
8+
9+ local ws windows
10+ ws=$( hyprctl activeworkspace -j 2> /dev/null | jq -r ' .id' )
11+ windows=$( hyprctl clients -j 2> /dev/null | jq " [.[] | select(.workspace.id == $ws )] | length" )
12+
13+ [[ " $windows " -eq 1 ]]
14+ }
15+
16+ function show_fastfetch_once() {
17+ [[ $FASTFETCH_SHOWN -eq 1 ]] && return
18+
19+
20+ hyprland_is_single_window || return
21+
22+ FASTFETCH_SHOWN=1
23+ sleep 0.1
24+ clear
25+ fastfetch
26+ }
27+
28+ autoload -Uz add-zsh-hook
29+ add-zsh-hook precmd show_fastfetch_once
330
431[[ $- != * i* ]] && return
532
@@ -79,10 +106,10 @@ git_prompt() {
79106 out=" %F{213} ${branch} %f"
80107
81108 # Show staged count
82- (( staged > 0 )) && out+=" %F{82}${staged} %f"
109+ (( staged > 0 )) && out+=" %F{82} ${staged} %f"
83110
84111 # Show unstaged / untracked count
85- (( unstaged > 0 )) && out+=" %F{226}${unstaged} %f"
112+ (( unstaged > 0 )) && out+=" %F{226} ${unstaged} %f"
86113
87114 print -P " $out "
88115}
You can’t perform that action at this time.
0 commit comments