Compare commits
10 Commits
91d23490df
...
4ba0b9eb49
Author | SHA1 | Date | |
---|---|---|---|
4ba0b9eb49 | |||
5a0beeba4c | |||
043ba733af | |||
3418aa4e0f | |||
9f383fa7da | |||
51fc885e84 | |||
527cdfa217 | |||
c7780308ec | |||
3299670cf1 | |||
159b0ae613 |
@ -1,4 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
shell:
|
||||||
|
program: /bin/zsh
|
||||||
|
args:
|
||||||
|
- -l
|
||||||
window:
|
window:
|
||||||
dynamic_title: true
|
dynamic_title: true
|
||||||
dimensions:
|
dimensions:
|
||||||
|
24
local/bin/caesar
Executable file
24
local/bin/caesar
Executable 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())
|
@ -3,11 +3,32 @@ set -o errexit
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
_setup_elan_touchpad
|
local session_id
|
||||||
_setup_trackman_marble
|
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'
|
local etp='Elan Touchpad'
|
||||||
|
|
||||||
if ! xinput list-props "${etp}" &>/dev/null; then
|
if ! xinput list-props "${etp}" &>/dev/null; then
|
||||||
@ -17,7 +38,7 @@ _setup_elan_touchpad() {
|
|||||||
xinput set-prop "${etp}" 'libinput Natural Scrolling Enabled' 1
|
xinput set-prop "${etp}" 'libinput Natural Scrolling Enabled' 1
|
||||||
}
|
}
|
||||||
|
|
||||||
_setup_trackman_marble() {
|
_setup_trackman_marble_x11() {
|
||||||
local tmm='Logitech USB Trackball'
|
local tmm='Logitech USB Trackball'
|
||||||
|
|
||||||
if ! xinput list-props "${tmm}" &>/dev/null; then
|
if ! xinput list-props "${tmm}" &>/dev/null; then
|
||||||
|
@ -6,4 +6,7 @@ set-option -g history-limit 100000
|
|||||||
set-option -g prefix C-b
|
set-option -g prefix C-b
|
||||||
set-option -g renumber-windows on
|
set-option -g renumber-windows on
|
||||||
set-option -s escape-time 0
|
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
|
setw -g mode-keys vi
|
||||||
|
8
vimrc
8
vimrc
@ -69,3 +69,11 @@ packadd! dracula
|
|||||||
colorscheme dracula
|
colorscheme dracula
|
||||||
|
|
||||||
hi Comment cterm=NONE ctermfg=DarkRed gui=NONE guifg=red2
|
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
10
zshrc
@ -39,6 +39,7 @@ path=(
|
|||||||
$HOME/.phpenv/bin
|
$HOME/.phpenv/bin
|
||||||
$HOME/.pyenv/bin
|
$HOME/.pyenv/bin
|
||||||
$HOME/.yarn/bin
|
$HOME/.yarn/bin
|
||||||
|
$HOME/.pulumi/bin
|
||||||
$HOME/perl5/bin
|
$HOME/perl5/bin
|
||||||
$HOME/Library/Python/3.8/bin
|
$HOME/Library/Python/3.8/bin
|
||||||
/usr/local/opt/python@3.8/bin
|
/usr/local/opt/python@3.8/bin
|
||||||
@ -73,11 +74,8 @@ plugins=(
|
|||||||
mercurial
|
mercurial
|
||||||
nmap
|
nmap
|
||||||
node
|
node
|
||||||
#npm
|
|
||||||
#npx
|
|
||||||
nvm
|
nvm
|
||||||
pip
|
pip
|
||||||
#pipenv
|
|
||||||
postgres
|
postgres
|
||||||
pyenv
|
pyenv
|
||||||
python
|
python
|
||||||
@ -97,6 +95,10 @@ plugins=(
|
|||||||
yarn
|
yarn
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ -d ~/.oh-my-zsh/plugins/just/ ]]; then
|
||||||
|
plugins+=just
|
||||||
|
fi
|
||||||
|
|
||||||
fpath=(/usr/local/share/zsh/site-functions $fpath)
|
fpath=(/usr/local/share/zsh/site-functions $fpath)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
@ -149,7 +151,7 @@ if [[ -f ~/.cargo/env ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if gimme --version &>/dev/null; then
|
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"
|
export GOPATH="$HOME/go"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user