Update zsh
This commit is contained in:
10
files/.zshrc
10
files/.zshrc
@@ -15,18 +15,22 @@ precmd_functions+=( precmd_vcs_info )
|
|||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
|
||||||
LN=$'\n'
|
LN=$'\n'
|
||||||
|
|
||||||
#ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ"
|
#ICON="%(?.%{$fg[green]%}.%{$fg[red]%})λ"
|
||||||
ICON="%(?.%{$fg[green]%}.%{$fg[red]%})➜"
|
ICON="%(?.%{$fg[green]%}.%{$fg[red]%})➜"
|
||||||
DIR="%{$fg[blue]%}%~"
|
DIR="%{$fg[blue]%}%~"
|
||||||
GIT_ICON=""
|
GIT_ICON=""
|
||||||
GIT="%{$fg[red]%}\$vcs_info_msg_0_"
|
GIT="%{$fg[red]%}\$vcs_info_msg_0_"
|
||||||
|
LINE1="╭"
|
||||||
|
LINE2="╰─"
|
||||||
|
|
||||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||||
NAME="%{$fg[yellow]%}%m "
|
NAME=" %{$fg[yellow]%}%m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export PROMPT="${NAME}${DIR}${GIT} ${ICON} %{$reset_color%}"
|
FIRST_ROW="${LINE1}${NAME} ${DIR}${GIT}%{$reset_color%}"
|
||||||
|
SECOND_ROW="${LINE2}%{$reset_color%}"
|
||||||
|
|
||||||
|
export PROMPT="${FIRST_ROW}${LN}${SECOND_ROW} "
|
||||||
zstyle ':vcs_info:git:*' formats '|%b '
|
zstyle ':vcs_info:git:*' formats '|%b '
|
||||||
|
|
||||||
# ============================== Exports
|
# ============================== Exports
|
||||||
|
|||||||
22
files/scripts/dmenu-power.sh
Executable file
22
files/scripts/dmenu-power.sh
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
FONT="Product Sans:pixelsize=15:antialias=true:rgba=rgb"
|
||||||
|
BGCOL="#000000"
|
||||||
|
FGCOL="#ffffff"
|
||||||
|
SELBGCOL="#98c379"
|
||||||
|
SELFGCOL="#000000"
|
||||||
|
|
||||||
|
COMMANDS="
|
||||||
|
poweroff\n
|
||||||
|
reboot\n
|
||||||
|
lock\n
|
||||||
|
"
|
||||||
|
|
||||||
|
command=$(echo -e $COMMANDS | \
|
||||||
|
dmenu -fn "$FONT" -nb $BGCOL -nf $FGCOL -sb $SELBGCOL -sf $SELFGCOL)
|
||||||
|
[ "$command" = "" ] && exit 1
|
||||||
|
if [ "$command" = "lock" ]; then
|
||||||
|
lock.sh && exit 0
|
||||||
|
else
|
||||||
|
systemctl $command && exit 0
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user