added mod+shift+enter to open terminal with alternate color theme
This commit is contained in:
parent
2b799e06ef
commit
81ee2bcca4
14
bin/desktop/kitty/alternate-terminal.sh
Executable file
14
bin/desktop/kitty/alternate-terminal.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
CONFIG_DIR="$HOME/.wryn/config/kitty"
|
||||
|
||||
[ -f "$CONFIG_DIR/temp.conf" ] && return 1 # race condition lock
|
||||
|
||||
mv "$CONFIG_DIR/theme.conf" "$CONFIG_DIR/temp.conf"
|
||||
mv "$CONFIG_DIR/alternate.conf" "$CONFIG_DIR/theme.conf"
|
||||
|
||||
i3-sensible-terminal &
|
||||
sleep 0.1
|
||||
|
||||
mv "$CONFIG_DIR/theme.conf" "$CONFIG_DIR/alternate.conf"
|
||||
mv "$CONFIG_DIR/temp.conf" "$CONFIG_DIR/theme.conf"
|
@ -211,6 +211,7 @@ client.placeholder $PLACEHOLDER_BORDER $PLACEHOLDER_BACKGROUND $PLACEHOLDER_TEXT
|
||||
|
||||
# Terminal / Application Launcher
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
bindsym $mod+shift+Return exec --no-startup-id $UTILS alternateterm
|
||||
bindsym $mod+space exec --no-startup-id dmenu_run -fn 'DejaVu Sans Mono-25'
|
||||
|
||||
|
||||
|
@ -19,6 +19,8 @@ LOG_OUT="$UTIL_BIN/i3/logout.sh";
|
||||
|
||||
BG_RANDOMIZE="$UTIL_BIN/feh/randomize-background.sh"
|
||||
|
||||
ALTERNATE_TERMINAL="$UTIL_BIN/kitty/alternate-terminal.sh"
|
||||
|
||||
|
||||
case $1 in
|
||||
next ) "$MEDIA__NEXT" ;;
|
||||
@ -37,4 +39,6 @@ case $1 in
|
||||
logout ) "$LOG_OUT" ;;
|
||||
|
||||
bgrandomize ) "$BG_RANDOMIZE" ;;
|
||||
|
||||
alternateterm ) "$ALTERNATE_TERMINAL" ;;
|
||||
esac
|
||||
|
1
config/kitty/alternate.conf
Symbolic link
1
config/kitty/alternate.conf
Symbolic link
@ -0,0 +1 @@
|
||||
/home/w0ryn/.wryn/config/colorschemes/kitty/WrynValentines.conf
|
13
zsh/colors
13
zsh/colors
@ -30,13 +30,18 @@ PS1="$PREVIOUS_COMMAND_CONDITION $USER $SEPARATOR $DIRECTORY $GIT_BRANCH $PROMPT
|
||||
|
||||
######################################################################################
|
||||
|
||||
alias change_kitty_theme='KITTY_CHANGE_THEME default'
|
||||
alias change_alternate_kitty_theme='KITTY_CHANGE_THEME alternate'
|
||||
function KITTY_CHANGE_THEME () {
|
||||
[ ! $1 ] && echo no filename given :c && return 1;
|
||||
[ ! -f "$DOTWRYN/config/colorschemes/kitty/$1" ] \
|
||||
[ ! $2 ] && echo no filename given :c && return 1;
|
||||
[ ! -f "$DOTWRYN/config/colorschemes/kitty/$2" ] \
|
||||
&& echo colorscheme not supported && return 2;
|
||||
|
||||
rm $DOTWRYN/config/kitty/theme.conf
|
||||
ln -s "$DOTWRYN/config/colorschemes/kitty/$1" "$DOTWRYN/config/kitty/theme.conf"\
|
||||
local THEME_DIR="$DOTWRYN/config/kitty";
|
||||
local THEME;
|
||||
[ $1 = 'default' ] && THEME="$THEME_DIR/theme.conf" || THEME="$THEME_DIR/alternate.conf"
|
||||
rm "$THEME"
|
||||
ln -s "$DOTWRYN/config/colorschemes/kitty/$2" "$THEME"\
|
||||
&& echo 'theme changed successfully! (effective on new terminal session)'
|
||||
}
|
||||
_KITTY_CHANGE_THEME () {
|
||||
|
Loading…
Reference in New Issue
Block a user