summaryrefslogtreecommitdiff
path: root/.config/zsh
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh')
-rw-r--r--.config/zsh/.zshrc9
-rw-r--r--.config/zsh/zprofile2
2 files changed, 10 insertions, 1 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index b6c435e..6c3b004 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -286,6 +286,7 @@ alias sv='sudo sv'
alias mmv='noglob zmv -W'
alias s='sudo '
alias fh='fzf --tac < "$OPEN_HISTFILE"'
+alias ide='nvim -u "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/dev.vim"'
alias mirror='sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist-arch'
alias mirrord='sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist-arch'
alias cleanup='sudo pacman -Rns $(pacman -Qtdq)'
@@ -294,6 +295,14 @@ alias gtypist="gtypist $GTYPIST_OPTS"
alias typ='launch-gtypist -l "$(sed "/^gtypist lesson - \(.*\)$/!d; s//\1/" ~/Documents/Notes/QuickNote.md)"'
alias typa='launch-gtypist -e 3 -l "$(sed "/^gtypist lesson - \(.*\)$/!d; s//\1/" ~/Documents/Notes/ak47.txt)"'
+# Launch new (W)indow in background
+W() {
+ windowid="$(xdotool getactivewindow)"
+ setsid -f $TERMINAL >/dev/null 2>&1
+ while [ "$(xdotool getactivewindow)" = "$windowid" ]; do sleep 0.1; done
+ xdotool windowfocus "$windowid"
+}
+
# Find command package
F() {
ret=$?
diff --git a/.config/zsh/zprofile b/.config/zsh/zprofile
index 46c5217..f41c6a2 100644
--- a/.config/zsh/zprofile
+++ b/.config/zsh/zprofile
@@ -9,7 +9,7 @@ on_ac_power="$(cat /sys/class/power_supply/ACAD/online)"
case "$TTY" in
/dev/tty1)
- [ "$on_ac_power" = 1 ] && {
+ command -V optimus-manager >/dev/null && [ "$on_ac_power" = 1 ] {
echo "Waiting for nvidia card to load up..."
until [ -e /dev/dri/card0 ]; do; sleep 0.1; done
}