zsh: Add .bin to path if it exists
This commit is contained in:
parent
08f46228de
commit
354fccbde2
2 changed files with 52 additions and 12 deletions
43
.bin/alchanger
Executable file
43
.bin/alchanger
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
## slightly modified version of https://github.com/mtwb47/scripts/blob/master/alchanger.sh
|
||||
|
||||
config="$HOME/.config/alacritty/colors.yml"
|
||||
|
||||
declare -a options=(
|
||||
"doom-one"
|
||||
"dracula"
|
||||
"gruvbox-dark"
|
||||
"monokai-pro"
|
||||
"nord"
|
||||
"oceanic-next"
|
||||
"solarized-light"
|
||||
"solarized-dark"
|
||||
"tomorrow-night"
|
||||
"quit"
|
||||
)
|
||||
|
||||
choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -i -l 20 -p 'Themes')
|
||||
|
||||
if [[ "$choice" == quit ]]; then
|
||||
echo "No Theme Chosen" && exit 1
|
||||
elif [[ "$choice" == 'doom-one' ]]; then
|
||||
sed -i '/^colors:/c\colors: *doom-one' $config
|
||||
elif [[ "$choice" == 'dracula' ]]; then
|
||||
sed -i '/^colors:/c\colors: *dracula' $config
|
||||
elif [[ "$choice" == 'gruvbox-dark' ]]; then
|
||||
sed -i '/^colors:/c\colors: *gruvbox-dark' $config
|
||||
elif [[ "$choice" == 'monokai-pro' ]]; then
|
||||
sed -i '/^colors:/c\colors: *monokai-pro' $config
|
||||
elif [[ "$choice" == 'nord' ]]; then
|
||||
sed -i '/^colors:/c\colors: *nord' $config
|
||||
elif [[ "$choice" == 'oceanic-next' ]]; then
|
||||
sed -i '/^colors:/c\colors: *oceanic-next' $config
|
||||
elif [[ "$choice" == 'solarized-light' ]]; then
|
||||
sed -i '/^colors:/c\colors: *solarized-light' $config
|
||||
elif [[ "$choice" == 'solarized-dark' ]]; then
|
||||
sed -i '/^colors:/c\colors: *solarized-dark' $config
|
||||
elif [[ "$choice" == 'tomorrow-night' ]]; then
|
||||
sed -i '/^colors:/c\colors: *tomorrow-night' $config
|
||||
fi
|
||||
|
21
.zshrc
21
.zshrc
|
@ -20,13 +20,9 @@ POWERLEVEL9K_CONFIG_FILE="$HOME/.config/p10k/config.zsh"
|
|||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS=true
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
HIST_STAMPS="dd.mm.yyyy"
|
||||
|
||||
|
@ -46,27 +42,28 @@ plugins=(
|
|||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
### User configuration
|
||||
|
||||
### PATH
|
||||
if [ -d "$HOME/.bin" ] ;
|
||||
then PATH="$HOME/.bin:$PATH"
|
||||
fi
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
export EDITOR=/usr/bin/nvim
|
||||
export VISUAL=/usr/bin/nvim
|
||||
export HISTORY_IGNORE="(ls|cd|pwd|exit|history|cd -|cd ..)"
|
||||
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
setopt completealiases
|
||||
|
||||
### Start Wayland specific stuff
|
||||
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
##! Use the following launch options for Steam Games which crash with this.
|
||||
##> 'SDL_VIDEODRIVER=x11 %command%'
|
||||
export SDL_VIDEODRIVER='wayland'
|
||||
|
||||
### End Wayland specific stuff
|
||||
|
||||
setopt completealiases
|
||||
|
||||
prompt_context(){}
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
|
|
Loading…
Add table
Reference in a new issue