Compare commits

...

10 Commits

6 changed files with 70 additions and 8 deletions

View File

@ -1,4 +1,8 @@
---
shell:
program: /bin/zsh
args:
- -l
window:
dynamic_title: true
dimensions:

24
local/bin/caesar Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env python
from __future__ import print_function
import sys
def main(sysargs=sys.argv[:]):
d = {}
for c in (65, 97):
for i in range(26):
d[chr(i+c)] = chr((i+13) % 26 + c)
print(
"".join([
d.get(c, c) for c in " ".join(sysargs[1:])
]),
end=""
)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -3,11 +3,32 @@ set -o errexit
set -o pipefail
main() {
_setup_elan_touchpad
_setup_trackman_marble
local session_id
session_id="$(loginctl --output=json | jq -r '.[]|.session')"
local session_type
session_type="$(
loginctl show-session "${session_id}" -p Type |
awk -F= '{ print $2 }'
)"
"_setup_elan_touchpad_${session_type}"
"_setup_trackman_marble_${session_type}"
}
_setup_elan_touchpad() {
_setup_elan_touchpad_wayland() {
local tp='org.gnome.desktop.peripherals.touchpad'
gsettings set "${tp}" natural-scroll true
gsettings set "${tp}" tap-to-click true
}
_setup_trackman_marble_wayland() {
local tm='org.gnome.desktop.peripherals.trackball'
gsettings set "${tm}" scroll-wheel-emulation-button 8
gsettings set "${tm}" accel-profile default
}
_setup_elan_touchpad_x11() {
local etp='Elan Touchpad'
if ! xinput list-props "${etp}" &>/dev/null; then
@ -17,7 +38,7 @@ _setup_elan_touchpad() {
xinput set-prop "${etp}" 'libinput Natural Scrolling Enabled' 1
}
_setup_trackman_marble() {
_setup_trackman_marble_x11() {
local tmm='Logitech USB Trackball'
if ! xinput list-props "${tmm}" &>/dev/null; then

View File

@ -6,4 +6,7 @@ set-option -g history-limit 100000
set-option -g prefix C-b
set-option -g renumber-windows on
set-option -s escape-time 0
set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set -g status-interval 1
setw -g mode-keys vi

8
vimrc
View File

@ -69,3 +69,11 @@ packadd! dracula
colorscheme dracula
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
nmap <leader>sp :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc

10
zshrc
View File

@ -39,6 +39,7 @@ path=(
$HOME/.phpenv/bin
$HOME/.pyenv/bin
$HOME/.yarn/bin
$HOME/.pulumi/bin
$HOME/perl5/bin
$HOME/Library/Python/3.8/bin
/usr/local/opt/python@3.8/bin
@ -73,11 +74,8 @@ plugins=(
mercurial
nmap
node
#npm
#npx
nvm
pip
#pipenv
postgres
pyenv
python
@ -97,6 +95,10 @@ plugins=(
yarn
)
if [[ -d ~/.oh-my-zsh/plugins/just/ ]]; then
plugins+=just
fi
fpath=(/usr/local/share/zsh/site-functions $fpath)
source $ZSH/oh-my-zsh.sh
@ -149,7 +151,7 @@ if [[ -f ~/.cargo/env ]]; then
fi
if gimme --version &>/dev/null; then
eval "$(gimme '1.15.x')" 2>/dev/null
eval "$(gimme '1.16.x')" 2>/dev/null
export GOPATH="$HOME/go"
fi