add zsh config, switch from fish
This commit is contained in:
parent
0cbfd510eb
commit
9860dc42b1
@ -159,7 +159,7 @@ bindsym $mod+r mode "resize"
|
|||||||
set $mode_cmd [c st] [F firefox] [H hibernate] [L suspend]
|
set $mode_cmd [c st] [F firefox] [H hibernate] [L suspend]
|
||||||
|
|
||||||
mode "$mode_cmd" {
|
mode "$mode_cmd" {
|
||||||
bindsym c exec st -e /usr/bin/fish; mode "default"
|
bindsym c exec st; mode "default"
|
||||||
bindsym Shift+f exec "firefox"; mode "default"
|
bindsym Shift+f exec "firefox"; mode "default"
|
||||||
bindsym --release Shift+h exec "systemctl hibernate"; mode "default"
|
bindsym --release Shift+h exec "systemctl hibernate"; mode "default"
|
||||||
bindsym --release Shift+l exec "systemctl suspend"; mode "default"
|
bindsym --release Shift+l exec "systemctl suspend"; mode "default"
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
(setf *time-modeline-string* "%k:%M")
|
(setf *time-modeline-string* "%k:%M")
|
||||||
|
|
||||||
(define-key *root-map* (kbd ";") "colon")
|
(define-key *root-map* (kbd ";") "colon")
|
||||||
(define-key *root-map* (kbd "c") "exec st -e /usr/bin/fish")
|
(define-key *root-map* (kbd "c") "exec st")
|
||||||
(define-key *root-map* (kbd "C-c") "exec st -e /usr/bin/fish")
|
(define-key *root-map* (kbd "C-c") "exec st")
|
||||||
(define-key *root-map* (kbd "s-TAB") "gother")
|
(define-key *root-map* (kbd "s-TAB") "gother")
|
||||||
(define-key *root-map* (kbd "H") "exec systemctl hibernate")
|
(define-key *root-map* (kbd "H") "exec systemctl hibernate")
|
||||||
(define-key *root-map* (kbd "L") "exec systemctl suspend")
|
(define-key *root-map* (kbd "L") "exec systemctl suspend")
|
||||||
|
6
.config/zsh/.zprofile
Normal file
6
.config/zsh/.zprofile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# start X at login on first console or otherwise source ~/.profile
|
||||||
|
if [[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null; then
|
||||||
|
exec sx ~/.xsession
|
||||||
|
else
|
||||||
|
source ~/.profile
|
||||||
|
fi
|
42
.config/zsh/.zshrc
Normal file
42
.config/zsh/.zshrc
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Path to oh-my-zsh installation.
|
||||||
|
export ZSH="/home/lupan/.config/zsh/oh-my-zsh"
|
||||||
|
|
||||||
|
# Set name of the theme to load.
|
||||||
|
ZSH_THEME="gentoo"
|
||||||
|
|
||||||
|
# Disable auto-update checks.
|
||||||
|
DISABLE_AUTO_UPDATE="true"
|
||||||
|
|
||||||
|
# Change the command execution time stamp shown in the history command output.
|
||||||
|
HIST_STAMPS="yyyy-mm-dd"
|
||||||
|
|
||||||
|
# Change path to history file.
|
||||||
|
HISTFILE="$ZDOTDIR/.zsh_history"
|
||||||
|
|
||||||
|
# Styles.
|
||||||
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff,underline"
|
||||||
|
|
||||||
|
# Plugins to load.
|
||||||
|
plugins=(git scd zsh-syntax-highlighting zsh-autosuggestions)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# Directory tracking in Emacs vterm.
|
||||||
|
|
||||||
|
function vterm_printf(){
|
||||||
|
if [ -n "$TMUX" ]; then
|
||||||
|
# tell tmux to pass the escape sequences through
|
||||||
|
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
|
||||||
|
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
|
||||||
|
elif [ "${TERM%%-*}" = "screen" ]; then
|
||||||
|
# GNU screen (screen, screen-256color, screen-256color-bce)
|
||||||
|
printf "\eP\e]%s\007\e\\" "$1"
|
||||||
|
else
|
||||||
|
printf "\e]%s\e\\" "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
vterm_prompt_end() {
|
||||||
|
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)";
|
||||||
|
}
|
||||||
|
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
|
Loading…
x
Reference in New Issue
Block a user