diff options
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -13,8 +13,15 @@ export d="/mnt/D" function swap() { mv "$1" "$1._tmp" && mv "$2" "$1" && mv "$1._tmp" "$2"; } -function kboff() { xinput float 22; } -function kbon() { xinput reattach 22 3; } +function kboff() { xinput float `xinput \ + | grep "AT Translated" \ + | sed -r 's/.+id=([0-9]+).+/\1/'`; } +function kbon() { xinput reattach `xinput \ + | grep "AT Translated" \ + | sed -r 's/.+id=([0-9]+).+/\1/'` \ + `xinput \ + | grep "Virtual core keyboard" \ + | sed -r 's/.+id=([0-9]+).+/\1/'` ; } # dotfiles alias config='/usr/bin/git --git-dir=$HOME/.cfg --work-tree=$HOME' @@ -23,3 +30,4 @@ GHC_PACKAGE_PATH="/usr/lib/ghc-9.0.2/package.conf.d" # Created by `pipx` on 2023-08-09 18:40:17 export PATH="$PATH:/home/main/.local/bin" export VISUAL=vim + |