This commit is contained in:
ayham 2022-06-01 06:24:34 +03:00
parent 653ea4c025
commit ea969e01b8
Signed by: ayham
GPG Key ID: EAB7F5A9DF503678
5 changed files with 63 additions and 2 deletions

View File

@ -62,6 +62,7 @@ export XMONAD_CACHE_HOME="$XDG_CACHE_HOME"/xmonad
export ZDOTDIR="$XDG_CONFIG_HOME"/zsh
export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"
export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
export VSCODE_PORTABLE="$XDG_DATA_HOME"/vscode
# ~/ alias clean-ups
alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""

View File

@ -5,7 +5,7 @@ include "/home/ayham/.gtkrc-2.0.mine"
gtk-theme-name="oomox-xresources-reverse"
gtk-icon-theme-name="mate"
gtk-font-name="Sans 10"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-name="WhiteSur-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_TEXT
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR

View File

@ -13,4 +13,4 @@ gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-name=WhiteSur-cursors

View File

@ -87,6 +87,8 @@ set wildchar=<TAB>
set nosmd
set hidden
set nomodeline
setlocal spell spelllang=en_us
" vimtex
let g:vimtex_view_method="zathura"

58
.local/bin/tmuxify Executable file
View File

@ -0,0 +1,58 @@
#! /bin/bash
for file in {$PWD,$HOME}/.tmuxify.layout; do
test -f $file && layout=$file && break
done
if [[ ! -f $layout ]]; then
echo "Aborting. No $PWD/.tmuxify.layout nor $HOME/.tmuxify.layout found."
exit 1
fi
session=${1:-$(basename $PWD | tr . -)}
if [[ -z $(tmux ls -F "#{session_name}" 2>/dev/null | grep "^$session$") ]]; then
tmux $TMUX_OPTS new-session -s $session -d
else
tmux $TMUX_OPTS attach -t $session
exit 0
fi
while read window pane command; do
[ -z "$window" -o -z "$pane" -o -z "$command" ] && continue
pane_number=${pane//[^0-9]*}
active=${pane//[^*]}
if [[ -n $active ]]; then
active_window=$window
active_pane=$pane_number
fi
if [[ -z $(tmux list-windows -t $session -F "#{window_name}" | grep "^${window}$") ]]; then
tmux new-window -a -t $session -n $window -c $PWD
fi
if [[ -z $(tmux list-panes -t $session:$window -F "#{pane_index}" | grep "^${pane_number}$") ]]; then
tmux split-window -t $session:$window
fi
tmux select-layout -t $session:$window tiled > /dev/null
tmux send-keys -t $session:$window.$pane_number "$command" C-m
done < $layout
# The first window is never used. The specified window names in the layout create new windows.
# Closing the first window will not renumber the existing ones. To fix that, add the following option in ~/.tmux.conf
#
# set-option -g renumber-windows on
#
tmux kill-window -t $session:$( tmux list-windows -t $session -F "#{window_index}" | head -n 1 )
tmux select-window -t $session:$active_window
tmux select-pane -t $session:$active_window.$active_pane
tmux $TMUX_OPTS attach-session -t $session