aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bspwm/sxhkdrc19
-rwxr-xr-xbspwm/terminal.sh9
-rwxr-xr-xpython/install.sh48
3 files changed, 35 insertions, 41 deletions
diff --git a/bspwm/sxhkdrc b/bspwm/sxhkdrc
index 5eb5df0..664aaef 100644
--- a/bspwm/sxhkdrc
+++ b/bspwm/sxhkdrc
@@ -9,16 +9,6 @@ mod4 + Return
alacritty
mod4 + space
rofi -show drun
-#mod4 + backslash
-# i3-msg "split h"
-#mod4 + minus
-# i3-msg "split v"
-#mod4 + Tab
-# i3-msg "layout toggle split"
-#mod4 + p
-# i3-msg "focus parent"
-#mod4 + r
-# i3-msg "mode resize"
mod4 + {1, 2, 3, 4, a, s, d, f}
@@ -51,8 +41,11 @@ mod4 + {l, Right}
mod4 + shift + {h, Left}
bspc node -s west
mod4 + shift + {j, Down}
- bspc node -s west
+ bspc node -s south
mod4 + shift + {k, Up}
- bspc node -s west
+ bspc node -s north
mod4 + shift + {l, Right}
- bspc node -s west
+ bspc node -s east
+
+mod4 + slash
+ bspc node @parent -R 90
diff --git a/bspwm/terminal.sh b/bspwm/terminal.sh
index 6dcce6e..f89375c 100755
--- a/bspwm/terminal.sh
+++ b/bspwm/terminal.sh
@@ -3,13 +3,14 @@
DESKTOP=term
INSTANCE=tmux_term
-(xdo id -n $INSTANCE > /dev/null) || \
- alacritty --class $INSTANCE -e \
- tmux new-session -A -s default
-
if [ $(bspc query -D --names -d focused) = $DESKTOP ]; then
bspc desktop -f last.local
else
bspc desktop $DESKTOP -m focused
bspc desktop -f $DESKTOP
+
+ if ! (xdo id -n $INSTANCE > /dev/null); then
+ exec alacritty --class $INSTANCE -e \
+ tmux new-session -A -s default
+ fi
fi
diff --git a/python/install.sh b/python/install.sh
index fe083b8..1d7fa82 100755
--- a/python/install.sh
+++ b/python/install.sh
@@ -6,34 +6,34 @@ symlink () {
ln -sfT "$@"
}
-PYTHON38=$(which python3.8)
-PYTHON39=$(which python3.9)
+install_python() {
+ LONG=$1
+ SHORT=${LONG//\./}
-PYTHON38_DIR=~/python38
-PYTHON39_DIR=~/python39
+ PYTHON_BIN=$(command -v "python$LONG")
+ if [ ! -z $PYTHON_BIN ]; then
-PIP38=$PYTHON38_DIR/bin/pip3.8
-PIP39=$PYTHON39_DIR/bin/pip3.9
+ PYTHON_DIR=~/python$SHORT
+ PIP_BIN=$PYTHON_DIR/bin/pip$LONG
+ REQUIREMENTS=~/.dotfiles/python/requirements.pip$SHORT.txt
+ LOCAL_PYTHON_BIN=~/bin/python$LONG
+ LOCAL_PIP_BIN=~/bin/pip$LONG
+ LOCAL_DOIT_BIN=~/bin/doit$LONG
-[ ! -d $PYTHON38_DIR ] && $PYTHON38 -m venv --system-site-packages $PYTHON38_DIR
-[ ! -d $PYTHON39_DIR ] && $PYTHON39 -m venv --system-site-packages $PYTHON39_DIR
+ [ ! -d $PYTHON_DIR ] && \
+ $PYTHON_BIN -m venv --system-site-packages $PYTHON_DIR
-$PIP38 -q install -U -r ~/.dotfiles/python/requirements.pip38.txt
-$PIP39 -q install -U -r ~/.dotfiles/python/requirements.pip39.txt
+ $PIP_BIN -q install -U -r $REQUIREMENTS
-cat > ~/bin/python3.8 << EOF
-#!/bin/sh
-exec $(cd $PYTHON38_DIR; pwd)/bin/python3.8 "\$@"
-EOF
-cat > ~/bin/python3.9 << EOF
-#!/bin/sh
-exec $(cd $PYTHON39_DIR; pwd)/bin/python3.9 "\$@"
-EOF
-chmod +x ~/bin/python3.8
-chmod +x ~/bin/python3.9
+ echo "#!/bin/sh" > $LOCAL_PYTHON_BIN
+ echo "exec $(cd $PYTHON_DIR; pwd)/bin/python$LONG \"\$@\"" >> $LOCAL_PYTHON_BIN
+ chmod +x $LOCAL_PYTHON_BIN
-symlink $PIP38 ~/bin/pip3.8
-symlink $PIP39 ~/bin/pip3.9
+ symlink $PIP_BIN $LOCAL_PIP_BIN
+ symlink $PYTHON_DIR/bin/doit $LOCAL_DOIT_BIN
+
+ fi
+}
-symlink $PYTHON38_DIR/bin/doit ~/bin/doit3.8
-symlink $PYTHON39_DIR/bin/doit ~/bin/doit3.9
+install_python 3.8
+install_python 3.9