From 41d3750d24fa28fd9863c00fee5f81c94b1bf1c9 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 17 Mar 2024 09:22:11 -0400 Subject: [PATCH 01/31] disable default prefix tmux --- .tmux.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 3a66fe5..ba52819 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,8 +1,12 @@ # thanks to this awesome guide: https://thevaluable.dev/tmux-config-mouseless/ (visited 2023-02-04 -# make ctrl-space the prefix. Keep ctrl-b as an alternative. -#unbind C-b -set -g prefix2 C-Space +# make ctrl-space the prefix. Unbind default ctrl-b +set -g prefix C-Space +set -g prefix C-Space +unbind -T prefix C-b +unbind -n C-b +unbind C-b +bind-key -n C-b send-keys C-b # enable using the mouse set -g mouse on From cbea004fa4f884be9c2fdab85239ba1c7939ce2e Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:15:06 +0200 Subject: [PATCH 02/31] update vimrc --- .vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vimrc b/.vimrc index 107e589..ec3aed4 100644 --- a/.vimrc +++ b/.vimrc @@ -1,4 +1,5 @@ " GENERAL CONFIGS ---------------------------------------------------------------------------------- +colorscheme slate " use a less ugly colorscheme syntax on " syntax highlighting set nocompatible " disable compatibility to old-time vi set number @@ -23,6 +24,7 @@ set numberwidth=4 " How much space the line numbers should take set signcolumn=yes " Show extra icons in the line numbers (like git marks, errors) set timeout timeoutlen=400 " How long to wait for non prefix free hotkey melodies set ttimeoutlen=0 +set nowrap " Avoid showing message extra message when using completion set shortmess+=c From 243cc8140f47ae329a9357809a8fdedfe1128cc3 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:17:11 +0200 Subject: [PATCH 03/31] update nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index cd91bf7..971a5c2 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit cd91bf774d4c964953160cf04c7e6b3bbd820baf +Subproject commit 971a5c234977ef504e5c0ca7282d3336fb8680b0 From 2a7b606cc2cbba26e0f5c8ee18a35ed5fe66ae6c Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:17:24 +0200 Subject: [PATCH 04/31] pyenv and gitconfig stuff --- .gitconfig | 1 + .zshrc | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitconfig b/.gitconfig index eccff3f..4c7bf02 100644 --- a/.gitconfig +++ b/.gitconfig @@ -16,3 +16,4 @@ repo = /home/plex/Documents/code/rs/pt repo = /home/plex/Documents/code/rs/rs-base repo = /home/plex/Documents/code/rs/rs-basic + repo = /home/plex/Documents/code/rs/wordle-analyzer diff --git a/.zshrc b/.zshrc index d7394bf..7ceeb01 100644 --- a/.zshrc +++ b/.zshrc @@ -210,3 +210,4 @@ export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init - zsh)" +pyenv activate std 2> /dev/null > /dev/null From 0ca559ef2ddbd2ee36537f5bd40c1e0ec2a3c536 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:19:22 +0200 Subject: [PATCH 05/31] remove gitconfig from repo --- .gitconfig | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig deleted file mode 100644 index 4c7bf02..0000000 --- a/.gitconfig +++ /dev/null @@ -1,19 +0,0 @@ -[user] - email = software@cscherr.de - name = PlexSheep - signingkey = software@cscherr.de -[credential] - helper = store --file ~/.git-credentials -[commit] - gpgsign = true -[pull] - rebase = false -[maintenance] - repo = /home/plex/Documents/code/rs/autocrate - repo = /home/plex/Documents/code/rs/ganar - repo = /home/plex/Documents/code/rs/hedu - repo = /home/plex/Documents/code/rs/netpong - repo = /home/plex/Documents/code/rs/pt - repo = /home/plex/Documents/code/rs/rs-base - repo = /home/plex/Documents/code/rs/rs-basic - repo = /home/plex/Documents/code/rs/wordle-analyzer From 049eb9ee839c53823c5dca40aaef6280dbee4735 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:20:35 +0200 Subject: [PATCH 06/31] pyenv if --- .zshrc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.zshrc b/.zshrc index 7ceeb01..060de86 100644 --- a/.zshrc +++ b/.zshrc @@ -206,8 +206,10 @@ else fi ### --- pyenv Config ------------------------------------- -export PYENV_ROOT="$HOME/.pyenv" -[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init - zsh)" -pyenv activate std 2> /dev/null > /dev/null +if [ -d $HOME/.pyenv ]; then + export PYENV_ROOT="$HOME/.pyenv" + [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" + eval "$(pyenv virtualenv-init - zsh)" + pyenv activate std 2> /dev/null > /dev/null +fi From 67ed9cc3c9c29d2d07bb9ec3070551d1a3e3a207 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:31:49 +0200 Subject: [PATCH 07/31] just add terminfo --- .gitignore | 2 + .terminfo/78/xterm-kitty | Bin 0 -> 3711 bytes .terminfo/kitty.terminfo | 269 +++++++++++++++++++++++++++++++++++++++ .terminfo/x/xterm-kitty | Bin 0 -> 3711 bytes 4 files changed, 271 insertions(+) create mode 100644 .terminfo/78/xterm-kitty create mode 100644 .terminfo/kitty.terminfo create mode 100644 .terminfo/x/xterm-kitty diff --git a/.gitignore b/.gitignore index 6bc29ba..4c725dc 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,6 @@ !.local/nvim/** !.local/share/nvim !.local/share/nvim/** +!.terminfo +!.terminfo/** .config/btop/btop.log diff --git a/.terminfo/78/xterm-kitty b/.terminfo/78/xterm-kitty new file mode 100644 index 0000000000000000000000000000000000000000..d8eaab6e96e9c3460b98635928bd2dedb62cdb00 GIT binary patch literal 3711 zcmaJ@YiwLc6+Y+QYmyd~Hi#-|w{0qwYtbaO?|XN9(`;j}9d8qRw|*o}Hm0ew>)7!l zj(45dwVeP_RYX8kYJcMS&tM-q8IJ2&%*k_)$~`WZYlF4XYPMRf z(7M~|w0f*TYuKt98l_UuJ>*>15bBbeRP{?tKAWu%y1-wLJD zvQ|B0=j@rRUB}ehRm`Iur^=4_BD)^Db}Xg`Gtj1M&-nHd@@bt9V20XE!_3$*mZ6)j zQ7bAJDsA4pWlKv-YpdfNIPky&qoaoojg5_uA3i)WF*!LkH9dXg$jr>qqqDQMTD?9u zckI~li6CKs8qAIloZRCj4o%d+ZJ zYol}Fs#7M4Y;0XEl3H!lXu5?t*=c$45dn~pVS63%KyaOFpE&3?jx zW;gbAa6bvIrVQRBxXz|y&6$L=nh{*jFv=&>qB%&)#eohUB*FDc$Ss3?ic6@1Q&^6s z0Xe%IJFe#kVU*5fhq0T>lKgBOWU=LjT_?bi9u8u4AmZ6WBX_AY;DzC`y$NT*ahzql z&GuTop*GpXi&s#B%PVp_m3_HmJca7S;%vC~VrJRiYS(?$uw7LyH&VXrijHGwSADFj z?w&d&WjR`_)q~4acb%02s($dk`gns773mwa(_;JxXYS*8k=T@>9Cgu7x{tn0Ptr5= zJe|WErT=NUfEC-@=$ zB0tJc^4Iw}yb8|oi~KUb!msh`e4gLn3;YiMk4@uRW1X?V*l08xEk1h?K0)j0X1bMbr#tX=x|6n$Pg&YZ+bK^w@P;bUZrV>HG)7Z2 zOULnk`Yb&}U%*%%BY8VLL*G;*`Z2wPG5topn*M@O{hcn*+Zb1an)su57p>=8F|s?k zjYGVOw(|~*tsn29`?<;!e1z+G@tojO{CWNoM))|N!3eR-JjYR=4rSoR8FpPy_Lb|Y zm8*#zCN?~tT~iywbL6{$Z-RUj%G+dTdbb}1hMBuOY(y+`6ox)_MVnpGc`sBsy$zc$ zd9huQ(>o+kMJuxF)b@~&rMs1>+ui0!BROnt-D@%Ap2T^Rd(n*pO`)bpQ(DN^N6?Se znMH83p9nAB28&czP@<_O`)bpQ(BWRw=%kM~QTlNJoiult@Pjb&*gP33ZWB7YSDzk}m`r(iCcn zG^I7kmmNiXO@XFRQ=};^R6r^sd2&^igOxoYI{~jOpl_>1_OGa*V*eZs9HgNx8l9V* zoEWK4d!E`msbiKpYSdGsQYV%Asc$#+SMjgUO&+BFskzB{>aS7%!ZfP((P)K6t2EKx zxx-f&C=3-w3ez-^?|_)^fR^uol<$C&?+~F^l8C(`_KMgmVlTwb-aHf_Bp@^(L?G1e zVh>axR3KC!R3OxXv{;Z93({giS}aJ5ySfIT03iXP0U-jR_6~^(gbIWTgbIXO>e~$! z2o(qw2o(smuOM}SP=Qc^P=QbfOOjAvumpXu1bMIob+80+zJPg{FAfgS?9}``)v9%T MZAKCvrJ6YZ4c, + Se=\E[2\sq, + Setulc=\E[58:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m, + Smulx=\E[4:%p1%dm, + Ss=\E[%p1%d\sq, + Sync=\EP=%p1%ds\E\\, + XR=\E[>0q, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + bel=^G, + bold=\E[1m, + cbt=\E[Z, + civis=\E[?25l, + clear=\E[H\E[2J, + cnorm=\E[?12h\E[?25h, + cr=^M, + csr=\E[%i%p1%d;%p2%dr, + cub=\E[%p1%dD, + cub1=^H, + cud=\E[%p1%dB, + cud1=^J, + cuf=\E[%p1%dC, + cuf1=\E[C, + cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, + cuu1=\E[A, + cvvis=\E[?12;25h, + dch=\E[%p1%dP, + dch1=\E[P, + dim=\E[2m, + dl=\E[%p1%dM, + dl1=\E[M, + dsl=\E]2;\E\\, + ech=\E[%p1%dX, + ed=\E[J, + el=\E[K, + el1=\E[1K, + fd=\E[?1004l, + fe=\E[?1004h, + flash=\E[?5h$<100/>\E[?5l, + fsl=^G, + home=\E[H, + hpa=\E[%i%p1%dG, + ht=^I, + hts=\EH, + ich=\E[%p1%d@, + il=\E[%p1%dL, + il1=\E[L, + ind=^J, + indn=\E[%p1%dS, + initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, + kBEG=\E[1;2E, + kBEG3=\E[1;3E, + kBEG4=\E[1;4E, + kBEG5=\E[1;5E, + kBEG6=\E[1;6E, + kBEG7=\E[1;7E, + kDC=\E[3;2~, + kDC3=\E[3;3~, + kDC4=\E[3;4~, + kDC5=\E[3;5~, + kDC6=\E[3;6~, + kDC7=\E[3;7~, + kDN=\E[1;2B, + kDN3=\E[1;3B, + kDN4=\E[1;4B, + kDN5=\E[1;5B, + kDN6=\E[1;6B, + kDN7=\E[1;7B, + kEND=\E[1;2F, + kEND3=\E[1;3F, + kEND4=\E[1;4F, + kEND5=\E[1;5F, + kEND6=\E[1;6F, + kEND7=\E[1;7F, + kHOM=\E[1;2H, + kHOM3=\E[1;3H, + kHOM4=\E[1;4H, + kHOM5=\E[1;5H, + kHOM6=\E[1;6H, + kHOM7=\E[1;7H, + kIC=\E[2;2~, + kIC3=\E[2;3~, + kIC4=\E[2;4~, + kIC5=\E[2;5~, + kIC6=\E[2;6~, + kIC7=\E[2;7~, + kLFT=\E[1;2D, + kLFT3=\E[1;3D, + kLFT4=\E[1;4D, + kLFT5=\E[1;5D, + kLFT6=\E[1;6D, + kLFT7=\E[1;7D, + kNXT=\E[6;2~, + kNXT3=\E[6;3~, + kNXT4=\E[6;4~, + kNXT5=\E[6;5~, + kNXT6=\E[6;6~, + kNXT7=\E[6;7~, + kPRV=\E[5;2~, + kPRV3=\E[5;3~, + kPRV4=\E[5;4~, + kPRV5=\E[5;5~, + kPRV6=\E[5;6~, + kPRV7=\E[5;7~, + kRIT=\E[1;2C, + kRIT3=\E[1;3C, + kRIT4=\E[1;4C, + kRIT5=\E[1;5C, + kRIT6=\E[1;6C, + kRIT7=\E[1;7C, + kUP=\E[1;2A, + kUP3=\E[1;3A, + kUP4=\E[1;4A, + kUP5=\E[1;5A, + kUP6=\E[1;6A, + kUP7=\E[1;7A, + ka1=, + ka3=, + kbeg=\EOE, + kbs=\177, + kc1=, + kc3=, + kcbt=\E[Z, + kcub1=\EOD, + kcud1=\EOB, + kcuf1=\EOC, + kcuu1=\EOA, + kdch1=\E[3~, + kend=\EOF, + kf1=\EOP, + kf10=\E[21~, + kf11=\E[23~, + kf12=\E[24~, + kf13=\E[1;2P, + kf14=\E[1;2Q, + kf15=\E[13;2~, + kf16=\E[1;2S, + kf17=\E[15;2~, + kf18=\E[17;2~, + kf19=\E[18;2~, + kf2=\EOQ, + kf20=\E[19;2~, + kf21=\E[20;2~, + kf22=\E[21;2~, + kf23=\E[23;2~, + kf24=\E[24;2~, + kf25=\E[1;5P, + kf26=\E[1;5Q, + kf27=\E[13;5~, + kf28=\E[1;5S, + kf29=\E[15;5~, + kf3=\EOR, + kf30=\E[17;5~, + kf31=\E[18;5~, + kf32=\E[19;5~, + kf33=\E[20;5~, + kf34=\E[21;5~, + kf35=\E[23;5~, + kf36=\E[24;5~, + kf37=\E[1;6P, + kf38=\E[1;6Q, + kf39=\E[13;6~, + kf4=\EOS, + kf40=\E[1;6S, + kf41=\E[15;6~, + kf42=\E[17;6~, + kf43=\E[18;6~, + kf44=\E[19;6~, + kf45=\E[20;6~, + kf46=\E[21;6~, + kf47=\E[23;6~, + kf48=\E[24;6~, + kf49=\E[1;3P, + kf5=\E[15~, + kf50=\E[1;3Q, + kf51=\E[13;3~, + kf52=\E[1;3S, + kf53=\E[15;3~, + kf54=\E[17;3~, + kf55=\E[18;3~, + kf56=\E[19;3~, + kf57=\E[20;3~, + kf58=\E[21;3~, + kf59=\E[23;3~, + kf6=\E[17~, + kf60=\E[24;3~, + kf61=\E[1;4P, + kf62=\E[1;4Q, + kf63=\E[13;4~, + kf7=\E[18~, + kf8=\E[19~, + kf9=\E[20~, + khlp=, + khome=\EOH, + kich1=\E[2~, + kind=\E[1;2B, + kmous=\E[M, + knp=\E[6~, + kpp=\E[5~, + kri=\E[1;2A, + kund=, + kxIN=\E[I, + kxOUT=\E[O, + oc=\E]104\007, + op=\E[39;49m, + rc=\E8, + rep=%p1%c\E[%p2%{1}%-%db, + rev=\E[7m, + ri=\EM, + rin=\E[%p1%dT, + ritm=\E[23m, + rmacs=\E(B, + rmam=\E[?7l, + rmcup=\E[?1049l, + rmir=\E[4l, + rmkx=\E[?1l, + rmso=\E[27m, + rmul=\E[24m, + rmxx=\E[29m, + rs1=\E]\E\\\Ec, + sc=\E7, + setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, + setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, + setrgbb=\E[48:2:%p1%d:%p2%d:%p3%dm, + setrgbf=\E[38:2:%p1%d:%p2%d:%p3%dm, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sgr0=\E(B\E[m, + sitm=\E[3m, + smacs=\E(0, + smam=\E[?7h, + smcup=\E[?1049h, + smir=\E[4h, + smkx=\E[?1h, + smso=\E[7m, + smul=\E[4m, + smxx=\E[9m, + tbc=\E[3g, + tsl=\E]2;, + u6=\E[%i%d;%dR, + u7=\E[6n, + u8=\E[?%[;0123456789]c, + u9=\E[c, + vpa=\E[%i%p1%dd, diff --git a/.terminfo/x/xterm-kitty b/.terminfo/x/xterm-kitty new file mode 100644 index 0000000000000000000000000000000000000000..d8eaab6e96e9c3460b98635928bd2dedb62cdb00 GIT binary patch literal 3711 zcmaJ@YiwLc6+Y+QYmyd~Hi#-|w{0qwYtbaO?|XN9(`;j}9d8qRw|*o}Hm0ew>)7!l zj(45dwVeP_RYX8kYJcMS&tM-q8IJ2&%*k_)$~`WZYlF4XYPMRf z(7M~|w0f*TYuKt98l_UuJ>*>15bBbeRP{?tKAWu%y1-wLJD zvQ|B0=j@rRUB}ehRm`Iur^=4_BD)^Db}Xg`Gtj1M&-nHd@@bt9V20XE!_3$*mZ6)j zQ7bAJDsA4pWlKv-YpdfNIPky&qoaoojg5_uA3i)WF*!LkH9dXg$jr>qqqDQMTD?9u zckI~li6CKs8qAIloZRCj4o%d+ZJ zYol}Fs#7M4Y;0XEl3H!lXu5?t*=c$45dn~pVS63%KyaOFpE&3?jx zW;gbAa6bvIrVQRBxXz|y&6$L=nh{*jFv=&>qB%&)#eohUB*FDc$Ss3?ic6@1Q&^6s z0Xe%IJFe#kVU*5fhq0T>lKgBOWU=LjT_?bi9u8u4AmZ6WBX_AY;DzC`y$NT*ahzql z&GuTop*GpXi&s#B%PVp_m3_HmJca7S;%vC~VrJRiYS(?$uw7LyH&VXrijHGwSADFj z?w&d&WjR`_)q~4acb%02s($dk`gns773mwa(_;JxXYS*8k=T@>9Cgu7x{tn0Ptr5= zJe|WErT=NUfEC-@=$ zB0tJc^4Iw}yb8|oi~KUb!msh`e4gLn3;YiMk4@uRW1X?V*l08xEk1h?K0)j0X1bMbr#tX=x|6n$Pg&YZ+bK^w@P;bUZrV>HG)7Z2 zOULnk`Yb&}U%*%%BY8VLL*G;*`Z2wPG5topn*M@O{hcn*+Zb1an)su57p>=8F|s?k zjYGVOw(|~*tsn29`?<;!e1z+G@tojO{CWNoM))|N!3eR-JjYR=4rSoR8FpPy_Lb|Y zm8*#zCN?~tT~iywbL6{$Z-RUj%G+dTdbb}1hMBuOY(y+`6ox)_MVnpGc`sBsy$zc$ zd9huQ(>o+kMJuxF)b@~&rMs1>+ui0!BROnt-D@%Ap2T^Rd(n*pO`)bpQ(DN^N6?Se znMH83p9nAB28&czP@<_O`)bpQ(BWRw=%kM~QTlNJoiult@Pjb&*gP33ZWB7YSDzk}m`r(iCcn zG^I7kmmNiXO@XFRQ=};^R6r^sd2&^igOxoYI{~jOpl_>1_OGa*V*eZs9HgNx8l9V* zoEWK4d!E`msbiKpYSdGsQYV%Asc$#+SMjgUO&+BFskzB{>aS7%!ZfP((P)K6t2EKx zxx-f&C=3-w3ez-^?|_)^fR^uol<$C&?+~F^l8C(`_KMgmVlTwb-aHf_Bp@^(L?G1e zVh>axR3KC!R3OxXv{;Z93({giS}aJ5ySfIT03iXP0U-jR_6~^(gbIWTgbIXO>e~$! z2o(qw2o(smuOM}SP=Qc^P=QbfOOjAvumpXu1bMIob+80+zJPg{FAfgS?9}``)v9%T MZAKCvrJ6YZ4 Date: Sat, 6 Apr 2024 17:33:20 +0200 Subject: [PATCH 08/31] remove damn ssh agent --- .zprofile | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.zprofile b/.zprofile index 58036e9..e69de29 100644 --- a/.zprofile +++ b/.zprofile @@ -1,14 +0,0 @@ -export SSH_AUTH_SOCK=~/.ssh/ssh-agent.$USER.sock -function ssh-agent-start () -{ - # if that socket does not exist, start the ssh-agent on it - if [[ -z $SSH_AGENT_PID ]] - then - rm $SSH_AUTH_SOCK - eval $(ssh-agent -a "$SSH_AUTH_SOCK") > /dev/null - # using ssh-add might ask for a password, we don't want that here. - # If only using ssh keys without passphrases, you can do this here - # ssh-add - fi -} -ssh-agent-start From 04d999f3a6681a5fc37824dd6006645d6f84d8d5 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 9 Apr 2024 23:36:16 +0200 Subject: [PATCH 09/31] source zprofile --- .zprofile | 5 +++++ .zshrc | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.zprofile b/.zprofile index e69de29..3ced297 100644 --- a/.zprofile +++ b/.zprofile @@ -0,0 +1,5 @@ +export GEM_HOME="$HOME/.local/share/gems" +export PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.deno/bin:/usr/games/:$GEM_HOME/bin" +export EDITOR=nvim +export editor=nvim +export XDG_CONFIG_HOME=~/.config diff --git a/.zshrc b/.zshrc index 060de86..0c52f95 100644 --- a/.zshrc +++ b/.zshrc @@ -1,9 +1,5 @@ ### ENVVARS -PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.deno/bin:/usr/games/" -export PATH -export EDITOR=nvim -export editor=nvim -export XDG_CONFIG_HOME=~/.config +source "$HOME/.zprofile" export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' export ZSH=$HOME/.zsh export CLIPBOARD_NOGUI=1 # wayland only allows GUI apps to use the clipboard. From 98fd1537b96482d1fcc028a2425a896880a19ef6 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 12 Apr 2024 11:03:22 +0200 Subject: [PATCH 10/31] ipb --- .config/btop/btop.conf | 2 +- .zshrc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf index 401d9a4..9df9c8b 100644 --- a/.config/btop/btop.conf +++ b/.config/btop/btop.conf @@ -178,7 +178,7 @@ disk_free_priv = False show_io_stat = True #* Toggles io mode for disks, showing big graphs for disk read/write speeds. -io_mode = False +io_mode = True #* Set to True to show combined read/write io graphs in io mode. io_graph_combined = False diff --git a/.zshrc b/.zshrc index 0c52f95..f9fcb30 100644 --- a/.zshrc +++ b/.zshrc @@ -33,6 +33,7 @@ alias bat=batcat alias accon="HOST=$(hostname) conda activate" alias gotemp="cd $(mktemp -d)" alias open=xdg-open +alias ipb="ip -brief" ### Functions function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } From e33695df5f6c89027f2785b809585350e1bd3904 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 12 Apr 2024 11:03:34 +0200 Subject: [PATCH 11/31] update nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index 971a5c2..0c5be13 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 971a5c234977ef504e5c0ca7282d3336fb8680b0 +Subproject commit 0c5be1344f597fb495a42bfbefc1105643171d69 From 8b83502ad1aba4260991edf4c22b41a55ebe60d2 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 14 Apr 2024 17:45:37 +0200 Subject: [PATCH 12/31] bad gitignore, dont let me include my file :( --- .gitignore | 4 ++-- .zshrc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0a31345..f0c88bc 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ !.zsh !.zsh/** !.tmux.conf -!.gitconfig !.local/fzf !.local/fzf/** !.local/nvim @@ -28,5 +27,6 @@ !.local/share/nvim/** !.terminfo !.terminfo/** + +# except except .config/btop/btop.log -.gitconfig diff --git a/.zshrc b/.zshrc index f9fcb30..ab12d5b 100644 --- a/.zshrc +++ b/.zshrc @@ -2,7 +2,7 @@ source "$HOME/.zprofile" export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' export ZSH=$HOME/.zsh -export CLIPBOARD_NOGUI=1 # wayland only allows GUI apps to use the clipboard. +export CLIPBOARD_NOGUI=0 # wayland only allows GUI apps to use the clipboard. # cb would have to open every 2 seconds and steal # focus. This sucks, so I will have to disable GUI # integration (yes that means ctrl+v) for now. From ea70ac6c9a253bbb488b1b4f049c31eccd8b4467 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 22 Apr 2024 17:02:18 +0200 Subject: [PATCH 13/31] aliases --- .config/nvim | 2 +- .zprofile | 5 +++++ .zshrc | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index 0c5be13..e102335 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 0c5be1344f597fb495a42bfbefc1105643171d69 +Subproject commit e102335f6e1f006d9cb7a6eb8d3bf27452d57174 diff --git a/.zprofile b/.zprofile index 3ced297..cad08d2 100644 --- a/.zprofile +++ b/.zprofile @@ -3,3 +3,8 @@ export PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin export EDITOR=nvim export editor=nvim export XDG_CONFIG_HOME=~/.config +export GTK_IM_MODULE=fcitx +export QT_IM_MODULE=fcitx +export SDL_IM_MODULE=fcitx +export GLFW_IM_MODULE=ibus + diff --git a/.zshrc b/.zshrc index ab12d5b..c5c7112 100644 --- a/.zshrc +++ b/.zshrc @@ -20,6 +20,8 @@ alias ls="lsd --date \"$DATEFMT\"" alias grep="grep --color" alias egrep="grep -E" alias lgrep="find | grep" +alias lagrep="find -exec realpath {} \; | grep" +alias llgrep="find -type d -exec lsd -lah {} \;| grep" alias psgrep="ps axu | grep" alias plasmarestart="killall plasmashell; kstart5 plasmashell" alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"' @@ -34,6 +36,7 @@ alias accon="HOST=$(hostname) conda activate" alias gotemp="cd $(mktemp -d)" alias open=xdg-open alias ipb="ip -brief" +alias ps all="ps -eadf" ### Functions function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } From 61239452301ad0db8664f29def44a69f394e4a08 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 20 May 2024 00:39:19 +0200 Subject: [PATCH 14/31] add stupid kitty fullscreen --- .config/kitty/kitty.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 4130eaa..2f337a3 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -36,3 +36,5 @@ map alt+e next_tab map alt+q previous_tab # i want that for neovim map ctrl+shift+s no_op + +map shift+alt+f11 toggle_fullscreen From 1a072c98a97c1626ed4b99c86c6fc184f61b7f72 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 20 May 2024 17:55:03 +0200 Subject: [PATCH 15/31] technology hates me --- .config/btop/btop.conf | 22 +++++----------------- .config/nvim | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf index 9df9c8b..6b68e1a 100644 --- a/.config/btop/btop.conf +++ b/.config/btop/btop.conf @@ -1,4 +1,4 @@ -#? Config file for btop v. 1.2.13 +#? Config file for btop v. 1.2.3 #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" @@ -16,11 +16,11 @@ force_tty = False #* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. #* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. -#* Use whitespace " " as separator between different presets. +#* Use withespace " " as separator between different presets. #* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" -#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Set to True to enable "h,j,k,l" keys for directional control in lists. #* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. vim_keys = True @@ -52,8 +52,8 @@ shown_boxes = "cpu mem net proc" #* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. update_ms = 1000 -#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", -#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu responsive" updates top process directly. proc_sorting = "cpu direct" #* Reverse sorting order, True or False. @@ -74,18 +74,12 @@ proc_per_core = False #* Show process memory as bytes instead of percent. proc_mem_bytes = True -#* Show cpu graph for each process. -proc_cpu_graphs = True - #* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) proc_info_smaps = False #* Show proc box on left side of screen instead of right. proc_left = False -#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). -proc_filter_kernel = True - #* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. #* Select from a list of detected attributes from the options menu. cpu_graph_upper = "total" @@ -150,9 +144,6 @@ mem_graphs = True #* Show mem box below net box instead of above. mem_below_net = False -#* Count ZFS ARC in cached and available memory. -zfs_arc_cached = True - #* If swap memory should be shown in memory box. show_swap = True @@ -168,9 +159,6 @@ only_physical = True #* Read disks list from /etc/fstab. This also disables only_physical. use_fstab = True -#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) -zfs_hide_datasets = False - #* Set to true to show available disk space for privileged users. disk_free_priv = False diff --git a/.config/nvim b/.config/nvim index e102335..6b75d25 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit e102335f6e1f006d9cb7a6eb8d3bf27452d57174 +Subproject commit 6b75d25bf04a8f03c54aaec380779006c2ebf355 From 6735fe558f6fc56ecac5fbf228799170b992b2b2 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 21 May 2024 10:43:41 +0200 Subject: [PATCH 16/31] add damn shortcuts for kde --- .config/shortkuts.kksrc | 148 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 149 insertions(+) create mode 100644 .config/shortkuts.kksrc diff --git a/.config/shortkuts.kksrc b/.config/shortkuts.kksrc new file mode 100644 index 0000000..bea726e --- /dev/null +++ b/.config/shortkuts.kksrc @@ -0,0 +1,148 @@ +[kitty.desktop][Global Shortcuts] +_launch=Ctrl+Alt+T + +[kwin][Global Shortcuts] +Activate Window Demanding Attention=Ctrl+Alt+A +Decrease Opacity= +Expose=Ctrl+F9 +ExposeAll=Ctrl+F10; Launch (C) +ExposeClass=Ctrl+F7 +Increase Opacity= +Invert Screen Colors= +Kill Window=Ctrl+Alt+Esc +MoveMouseToCenter=Meta+F6 +MoveMouseToFocus=Meta+F5 +MoveZoomDown= +MoveZoomLeft= +MoveZoomRight= +MoveZoomUp= +Setup Window Shortcut= +Show Desktop=Meta+D +ShowDesktopGrid=Ctrl+F8 +Suspend Compositing=Alt+Shift+F12 +Switch One Desktop Down= +Switch One Desktop Up= +Switch One Desktop to the Left= +Switch One Desktop to the Right= +Switch Window Down=Meta+Alt+Down +Switch Window Left=Meta+Alt+Left +Switch Window Right=Meta+Alt+Right +Switch Window Up=Meta+Alt+Up +Switch to Desktop 1=Ctrl+F1; Ctrl+Alt+1 +Switch to Desktop 10=Ctrl+Alt+0 +Switch to Desktop 11= +Switch to Desktop 12= +Switch to Desktop 13= +Switch to Desktop 14= +Switch to Desktop 15= +Switch to Desktop 16= +Switch to Desktop 17= +Switch to Desktop 18= +Switch to Desktop 19= +Switch to Desktop 2=Ctrl+Alt+2; Ctrl+F2 +Switch to Desktop 20= +Switch to Desktop 3=Ctrl+F3; Ctrl+Alt+3 +Switch to Desktop 4=Ctrl+F4; Ctrl+Alt+4 +Switch to Desktop 5=Ctrl+Alt+5 +Switch to Desktop 6=Ctrl+Alt+6 +Switch to Desktop 7=Ctrl+Alt+7 +Switch to Desktop 8=Ctrl+Alt+8 +Switch to Desktop 9=Ctrl+Alt+9 +Switch to Next Desktop= +Switch to Next Screen= +Switch to Previous Desktop= +Switch to Previous Screen= +Switch to Screen 0= +Switch to Screen 1= +Switch to Screen 2= +Switch to Screen 3= +Switch to Screen 4= +Switch to Screen 5= +Switch to Screen 6= +Switch to Screen 7= +Toggle Night Color= +Toggle Window Raise/Lower= +Walk Through Desktop List= +Walk Through Desktop List (Reverse)= +Walk Through Desktops= +Walk Through Desktops (Reverse)= +Walk Through Windows=Alt+Tab +Walk Through Windows (Reverse)=Alt+Shift+Backtab +Walk Through Windows Alternative= +Walk Through Windows Alternative (Reverse)= +Walk Through Windows of Current Application=Alt+` +Walk Through Windows of Current Application (Reverse)=Alt+~ +Walk Through Windows of Current Application Alternative= +Walk Through Windows of Current Application Alternative (Reverse)= +Window Above Other Windows= +Window Below Other Windows= +Window Close=Alt+F4 +Window Fullscreen=Alt+F11 +Window Grow Horizontal= +Window Grow Vertical= +Window Lower= +Window Maximize=Alt+F10; Meta+PgUp +Window Maximize Horizontal= +Window Maximize Vertical= +Window Minimize=Meta+PgDown +Window Move= +Window Move Center= +Window No Border= +Window On All Desktops= +Window One Desktop Down=Meta+Ctrl+Shift+Down +Window One Desktop Up=Meta+Ctrl+Shift+Up +Window One Desktop to the Left=Meta+Ctrl+Shift+Left +Window One Desktop to the Right=Meta+Ctrl+Shift+Right +Window Operations Menu=Alt+F3 +Window Pack Down= +Window Pack Left= +Window Pack Right= +Window Pack Up= +Window Quick Tile Bottom=Meta+Down +Window Quick Tile Bottom Left= +Window Quick Tile Bottom Right= +Window Quick Tile Left=Meta+Left +Window Quick Tile Right=Meta+Right +Window Quick Tile Top=Meta+Up +Window Quick Tile Top Left= +Window Quick Tile Top Right= +Window Raise= +Window Resize= +Window Shade= +Window Shrink Horizontal= +Window Shrink Vertical= +Window to Desktop 1=Ctrl+Alt+! +Window to Desktop 10=Ctrl+Alt+= +Window to Desktop 11= +Window to Desktop 12= +Window to Desktop 13= +Window to Desktop 14= +Window to Desktop 15= +Window to Desktop 16= +Window to Desktop 17= +Window to Desktop 18= +Window to Desktop 19= +Window to Desktop 2=Ctrl+Alt+" +Window to Desktop 20= +Window to Desktop 3=Ctrl+Alt+ยง +Window to Desktop 4=Ctrl+Alt+$ +Window to Desktop 5=Ctrl+Alt+% +Window to Desktop 6=Ctrl+Alt+& +Window to Desktop 7=Ctrl+Alt+/ +Window to Desktop 8=Ctrl+Alt+( +Window to Desktop 9=Ctrl+Alt+) +Window to Next Desktop= +Window to Next Screen=Meta+Shift+Right +Window to Previous Desktop= +Window to Previous Screen=Meta+Shift+Left +Window to Screen 0= +Window to Screen 1= +Window to Screen 2= +Window to Screen 3= +Window to Screen 4= +Window to Screen 5= +Window to Screen 6= +Window to Screen 7= +view_actual_size=Meta+0 +view_zoom_in=Meta+= +view_zoom_out=Meta+- diff --git a/.gitignore b/.gitignore index f0c88bc..a4c004f 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ !.local/share/nvim/** !.terminfo !.terminfo/** +!.config/shortkuts.kksrc # except except .config/btop/btop.log From 96bea3fc03e23ca4bc9470ac0aea09310ddb164d Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 21 May 2024 11:06:36 +0200 Subject: [PATCH 17/31] moar shortcuts --- .config/shortkuts.kksrc | 213 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 202 insertions(+), 11 deletions(-) diff --git a/.config/shortkuts.kksrc b/.config/shortkuts.kksrc index bea726e..abfadb4 100644 --- a/.config/shortkuts.kksrc +++ b/.config/shortkuts.kksrc @@ -1,6 +1,129 @@ +[ActivityManager][Global Shortcuts] +switch-to-activity-b81d941f-2f97-41a3-ad5f-a685736616e0= + +[KDE Keyboard Layout Switcher][Global Shortcuts] +Switch to Next Keyboard Layout=Ctrl+Alt+K + +[StandardShortcuts] +AboutApp= +AboutKDE= +Activate Next Tab=Ctrl+]; Ctrl+PgDown +Activate Previous Tab=Ctrl+[; Ctrl+PgUp +ActualSize=Ctrl+0 +AddBookmark=Ctrl+B +Back=Alt+Left; Back +BackwardWord=Ctrl+Left +Begin=Ctrl+Home +BeginningOfLine=Home +Clear= +Close=Ctrl+W; Ctrl+Esc +ConfigureNotifications= +ConfigureToolbars= +Copy=Ctrl+Ins; Ctrl+C +CreateFolder=F10 +Cut=Shift+Del; Ctrl+X +DeleteFile=Shift+Del +DeleteWordBack=Ctrl+Backspace +DeleteWordForward=Ctrl+Del +Deselect=Ctrl+Shift+A +DocumentBack=Alt+Shift+Left +DocumentForward=Alt+Shift+Right +Donate= +EditBookmarks= +End=Ctrl+End +EndOfLine=End +Find=Ctrl+F +FindNext=F3 +FindPrev=Shift+F3 +FitToHeight= +FitToPage= +FitToWidth= +Forward=Alt+Right; Forward +ForwardWord=Ctrl+Right +FullScreen=Ctrl+Shift+F +Goto= +GotoLine=Ctrl+G +GotoPage= +Help=F1 +Home=Alt+Home; Home Page +KeyBindings=Ctrl+Alt+, +Mail= +MoveToTrash=Del +New=Ctrl+N +Next=PgDown +NextCompletion=Ctrl+Down +Open=Ctrl+O +OpenRecent= +Paste=Ctrl+V; Shift+Ins +Paste Selection=Ctrl+Shift+Ins +Preferences=Ctrl+Shift+, +PrevCompletion=Ctrl+Up +Print=Ctrl+P +PrintPreview= +Prior=PgUp +Quit=Ctrl+Q +Redo=Ctrl+Shift+Z +Reload=F5; Refresh +RenameFile=F2 +Replace=Ctrl+R +ReportBug= +Revert= +RotateDown=Down +RotateUp=Up +Save=Ctrl+S +SaveAs=Ctrl+Shift+S +SaveOptions= +SelectAll=Ctrl+A +ShowHideHiddenFiles=Ctrl+H; Alt+. +ShowMenubar=Ctrl+M +ShowStatusbar= +ShowToolbar= +Spelling= +SubstringCompletion=Ctrl+T +SwitchApplicationLanguage= +TextCompletion=Ctrl+E +TipofDay= +Undo=Ctrl+Z +Up=Alt+Up +WhatsThis=Shift+F1 +Zoom= +ZoomIn=Ctrl++; Ctrl+= +ZoomOut=Ctrl+- + +[kaccess][Global Shortcuts] +Toggle Screen Reader On and Off=Meta+Alt+S + +[kcm_touchpad][Global Shortcuts] +Disable Touchpad=Touchpad Off +Enable Touchpad=Touchpad On +Toggle Touchpad=Touchpad Toggle + +[kded5][Global Shortcuts] +Show System Activity=Ctrl+Esc +display=Meta+P; Display + +[khotkeys][Global Shortcuts] +{90040de6-4095-4f8e-b05b-8c65f08be0c0}= +{d03619b6-9b3c-48cc-9d9c-a2aadb485550}= + [kitty.desktop][Global Shortcuts] _launch=Ctrl+Alt+T +[kmix][Global Shortcuts] +decrease_microphone_volume=Microphone Volume Down +decrease_volume=Volume Down +increase_microphone_volume=Microphone Volume Up +increase_volume=Volume Up +mic_mute=Microphone Mute; Meta+Volume Mute +mute=Volume Mute + +[ksmserver][Global Shortcuts] +Halt Without Confirmation= +Lock Session=Meta+L; Ctrl+Alt+L; Screensaver +Log Out=Ctrl+Alt+Del +Log Out Without Confirmation= +Reboot Without Confirmation= + [kwin][Global Shortcuts] Activate Window Demanding Attention=Ctrl+Alt+A Decrease Opacity= @@ -20,15 +143,15 @@ Setup Window Shortcut= Show Desktop=Meta+D ShowDesktopGrid=Ctrl+F8 Suspend Compositing=Alt+Shift+F12 -Switch One Desktop Down= -Switch One Desktop Up= -Switch One Desktop to the Left= -Switch One Desktop to the Right= +Switch One Desktop Down=Ctrl+Alt+Down +Switch One Desktop Up=Ctrl+Alt+Up +Switch One Desktop to the Left=Ctrl+Alt+Left +Switch One Desktop to the Right=Ctrl+Alt+Right Switch Window Down=Meta+Alt+Down Switch Window Left=Meta+Alt+Left Switch Window Right=Meta+Alt+Right Switch Window Up=Meta+Alt+Up -Switch to Desktop 1=Ctrl+F1; Ctrl+Alt+1 +Switch to Desktop 1=Ctrl+Alt+1; Ctrl+F1 Switch to Desktop 10=Ctrl+Alt+0 Switch to Desktop 11= Switch to Desktop 12= @@ -74,21 +197,21 @@ Walk Through Windows of Current Application=Alt+` Walk Through Windows of Current Application (Reverse)=Alt+~ Walk Through Windows of Current Application Alternative= Walk Through Windows of Current Application Alternative (Reverse)= -Window Above Other Windows= -Window Below Other Windows= +Window Above Other Windows=Alt+F8 +Window Below Other Windows=Alt+F7 Window Close=Alt+F4 Window Fullscreen=Alt+F11 Window Grow Horizontal= Window Grow Vertical= Window Lower= -Window Maximize=Alt+F10; Meta+PgUp +Window Maximize=Meta+PgUp; Alt+F10 Window Maximize Horizontal= Window Maximize Vertical= Window Minimize=Meta+PgDown Window Move= Window Move Center= Window No Border= -Window On All Desktops= +Window On All Desktops=Alt+F9 Window One Desktop Down=Meta+Ctrl+Shift+Down Window One Desktop Up=Meta+Ctrl+Shift+Up Window One Desktop to the Left=Meta+Ctrl+Shift+Left @@ -131,9 +254,9 @@ Window to Desktop 6=Ctrl+Alt+& Window to Desktop 7=Ctrl+Alt+/ Window to Desktop 8=Ctrl+Alt+( Window to Desktop 9=Ctrl+Alt+) -Window to Next Desktop= +Window to Next Desktop=Ctrl+Alt+Shift+Right Window to Next Screen=Meta+Shift+Right -Window to Previous Desktop= +Window to Previous Desktop=Ctrl+Alt+Shift+Left Window to Previous Screen=Meta+Shift+Left Window to Screen 0= Window to Screen 1= @@ -146,3 +269,71 @@ Window to Screen 7= view_actual_size=Meta+0 view_zoom_in=Meta+= view_zoom_out=Meta+- + +[org.kde.dolphin.desktop][Global Shortcuts] +_launch=Meta+E + +[org.kde.krunner.desktop][Global Shortcuts] +RunClipboard=Alt+Shift+F2 +_launch=Alt+Space; Alt+F2; Search + +[org.kde.plasma.emojier.desktop][Global Shortcuts] +_launch=Meta+. + +[org.kde.spectacle.desktop][Global Shortcuts] +ActiveWindowScreenShot=Meta+Print +CurrentMonitorScreenShot= +FullScreenScreenShot=Shift+Print +OpenWithoutScreenshot= +RectangularRegionScreenShot=Meta+Shift+Print +WindowUnderCursorScreenShot=Meta+Ctrl+Print +_launch=Print + +[org_kde_powerdevil][Global Shortcuts] +Decrease Keyboard Brightness=Keyboard Brightness Down +Decrease Screen Brightness=Monitor Brightness Down +Hibernate=Hibernate +Increase Keyboard Brightness=Keyboard Brightness Up +Increase Screen Brightness=Monitor Brightness Up +PowerDown=Power Down +PowerOff=Power Off +Sleep=Sleep +Toggle Keyboard Backlight=Keyboard Light On/Off +Turn Off Screen= + +[plasmashell][Global Shortcuts] +activate task manager entry 1=Meta+1 +activate task manager entry 10= +activate task manager entry 2=Meta+2 +activate task manager entry 3=Meta+3 +activate task manager entry 4=Meta+4 +activate task manager entry 5=Meta+5 +activate task manager entry 6=Meta+6 +activate task manager entry 7=Meta+7 +activate task manager entry 8=Meta+8 +activate task manager entry 9=Meta+9 +activate widget 3=Alt+F1 +clear-history= +clipboard_action=Ctrl+Alt+X +cycleNextAction= +cyclePrevAction= +edit_clipboard= +manage activities=Meta+Q +next activity=Meta+Tab +previous activity=Meta+Shift+Tab +repeat_action=Ctrl+Alt+R +show dashboard=Ctrl+F12 +show-barcode= +show-on-mouse-pos=Meta+V +stop current activity=Meta+S +switch to next activity= +switch to previous activity= +toggle do not disturb= + +[systemsettings.desktop][Global Shortcuts] +_launch=Tools +kcm-kscreen= +kcm-lookandfeel= +kcm-users= +powerdevilprofilesconfig= +screenlocker= From a72e72376707b8b6b936b14333d5dae63249195f Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 24 May 2024 08:22:45 +0200 Subject: [PATCH 18/31] user-dirs --- .config/user-dirs.dirs | 15 +++++++++++++++ .gitignore | 1 + .zshrc | 1 + 3 files changed, 17 insertions(+) create mode 100644 .config/user-dirs.dirs diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 0000000..745dc04 --- /dev/null +++ b/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Desktop/" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Templates" +XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_DOCUMENTS_DIR="$HOME/Documents" +XDG_MUSIC_DIR="$HOME/Music" +XDG_PICTURES_DIR="$HOME/Pictures" +XDG_VIDEOS_DIR="$HOME/Videos" diff --git a/.gitignore b/.gitignore index a4c004f..2ff0e3c 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ !.terminfo !.terminfo/** !.config/shortkuts.kksrc +!.config/user-dirs.dirs # except except .config/btop/btop.log diff --git a/.zshrc b/.zshrc index c5c7112..08cad67 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,6 @@ ### ENVVARS source "$HOME/.zprofile" +source "$HOME/.config/user-dirs.dirs" export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P' export ZSH=$HOME/.zsh export CLIPBOARD_NOGUI=0 # wayland only allows GUI apps to use the clipboard. From 68a746d86f6793bef52e1ef31817fa7c1235bca3 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 30 May 2024 19:08:01 +0200 Subject: [PATCH 19/31] too annoyed to describe --- .config/btop/btop.log | 68 ----------------------------------------- .config/shortkuts.kksrc | 64 +++++++++++++++++++++++++++++--------- .config/user-dirs.dirs | 6 ++-- .gitignore | 1 + .zshrc | 3 +- 5 files changed, 55 insertions(+), 87 deletions(-) delete mode 100644 .config/btop/btop.log diff --git a/.config/btop/btop.log b/.config/btop/btop.log deleted file mode 100644 index 8395023..0000000 --- a/.config/btop/btop.log +++ /dev/null @@ -1,68 +0,0 @@ - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:07) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:07) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:10) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:10) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:10) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:10) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:10) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:10) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:10) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:10) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:10) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:10) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:10) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:10) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:11) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:11) | ERROR: No tty detected! -btop++ needs an interactive shell to run. - -2023/11/28 (21:11:11) | ===> btop++ v.1.2.13 -2023/11/28 (21:11:11) | ERROR: No tty detected! -btop++ needs an interactive shell to run. diff --git a/.config/shortkuts.kksrc b/.config/shortkuts.kksrc index abfadb4..a82f60e 100644 --- a/.config/shortkuts.kksrc +++ b/.config/shortkuts.kksrc @@ -1,17 +1,20 @@ [ActivityManager][Global Shortcuts] +switch-to-activity-= +switch-to-activity-9497743c-b928-4711-9a15-88ae73a36745= switch-to-activity-b81d941f-2f97-41a3-ad5f-a685736616e0= [KDE Keyboard Layout Switcher][Global Shortcuts] +Switch keyboard layout to German= Switch to Next Keyboard Layout=Ctrl+Alt+K [StandardShortcuts] AboutApp= AboutKDE= -Activate Next Tab=Ctrl+]; Ctrl+PgDown -Activate Previous Tab=Ctrl+[; Ctrl+PgUp +Activate Next Tab=Ctrl+PgDown; Ctrl+] +Activate Previous Tab=Ctrl+PgUp; Ctrl+[ ActualSize=Ctrl+0 AddBookmark=Ctrl+B -Back=Alt+Left; Back +Back=Back; Alt+Left BackwardWord=Ctrl+Left Begin=Ctrl+Home BeginningOfLine=Home @@ -21,7 +24,7 @@ ConfigureNotifications= ConfigureToolbars= Copy=Ctrl+Ins; Ctrl+C CreateFolder=F10 -Cut=Shift+Del; Ctrl+X +Cut=Ctrl+X; Shift+Del DeleteFile=Shift+Del DeleteWordBack=Ctrl+Backspace DeleteWordForward=Ctrl+Del @@ -63,7 +66,7 @@ PrintPreview= Prior=PgUp Quit=Ctrl+Q Redo=Ctrl+Shift+Z -Reload=F5; Refresh +Reload=Refresh; F5 RenameFile=F2 Replace=Ctrl+R ReportBug= @@ -74,7 +77,7 @@ Save=Ctrl+S SaveAs=Ctrl+Shift+S SaveOptions= SelectAll=Ctrl+A -ShowHideHiddenFiles=Ctrl+H; Alt+. +ShowHideHiddenFiles=Alt+.; Ctrl+H ShowMenubar=Ctrl+M ShowStatusbar= ShowToolbar= @@ -87,9 +90,13 @@ Undo=Ctrl+Z Up=Alt+Up WhatsThis=Shift+F1 Zoom= -ZoomIn=Ctrl++; Ctrl+= +ZoomIn=Ctrl+=; Ctrl++ ZoomOut=Ctrl+- +[discord-screenaudio][Global Shortcuts] +toggleDeafen= +toggleMute= + [kaccess][Global Shortcuts] Toggle Screen Reader On and Off=Meta+Alt+S @@ -119,7 +126,7 @@ mute=Volume Mute [ksmserver][Global Shortcuts] Halt Without Confirmation= -Lock Session=Meta+L; Ctrl+Alt+L; Screensaver +Lock Session=Screensaver; Meta+L; Ctrl+Alt+L Log Out=Ctrl+Alt+Del Log Out Without Confirmation= Reboot Without Confirmation= @@ -128,7 +135,7 @@ Reboot Without Confirmation= Activate Window Demanding Attention=Ctrl+Alt+A Decrease Opacity= Expose=Ctrl+F9 -ExposeAll=Ctrl+F10; Launch (C) +ExposeAll=Launch (C); Ctrl+F10 ExposeClass=Ctrl+F7 Increase Opacity= Invert Screen Colors= @@ -162,7 +169,7 @@ Switch to Desktop 16= Switch to Desktop 17= Switch to Desktop 18= Switch to Desktop 19= -Switch to Desktop 2=Ctrl+Alt+2; Ctrl+F2 +Switch to Desktop 2=Ctrl+F2; Ctrl+Alt+2 Switch to Desktop 20= Switch to Desktop 3=Ctrl+F3; Ctrl+Alt+3 Switch to Desktop 4=Ctrl+F4; Ctrl+Alt+4 @@ -270,12 +277,22 @@ view_actual_size=Meta+0 view_zoom_in=Meta+= view_zoom_out=Meta+- +[mediacontrol][Global Shortcuts] +mediavolumedown= +mediavolumeup= +nextmedia=Media Next +pausemedia=Media Pause +playmedia= +playpausemedia=Media Play +previousmedia=Media Previous +stopmedia=Media Stop + [org.kde.dolphin.desktop][Global Shortcuts] _launch=Meta+E [org.kde.krunner.desktop][Global Shortcuts] RunClipboard=Alt+Shift+F2 -_launch=Alt+Space; Alt+F2; Search +_launch=Search; Alt+Space; Alt+F2 [org.kde.plasma.emojier.desktop][Global Shortcuts] _launch=Meta+. @@ -283,11 +300,11 @@ _launch=Meta+. [org.kde.spectacle.desktop][Global Shortcuts] ActiveWindowScreenShot=Meta+Print CurrentMonitorScreenShot= -FullScreenScreenShot=Shift+Print +FullScreenScreenShot= OpenWithoutScreenshot= -RectangularRegionScreenShot=Meta+Shift+Print +RectangularRegionScreenShot=Meta+Shift+Print; Print WindowUnderCursorScreenShot=Meta+Ctrl+Print -_launch=Print +_launch=Shift+Print [org_kde_powerdevil][Global Shortcuts] Decrease Keyboard Brightness=Keyboard Brightness Down @@ -312,14 +329,18 @@ activate task manager entry 6=Meta+6 activate task manager entry 7=Meta+7 activate task manager entry 8=Meta+8 activate task manager entry 9=Meta+9 +activate widget 18=Meta+C +activate widget 26= activate widget 3=Alt+F1 +activate widget 47= +activate widget 75= clear-history= clipboard_action=Ctrl+Alt+X cycleNextAction= cyclePrevAction= edit_clipboard= manage activities=Meta+Q -next activity=Meta+Tab +next activity=Meta+Tab; Meta+A previous activity=Meta+Shift+Tab repeat_action=Ctrl+Alt+R show dashboard=Ctrl+F12 @@ -337,3 +358,16 @@ kcm-lookandfeel= kcm-users= powerdevilprofilesconfig= screenlocker= + +[wacomtablet][Global Shortcuts] +Map to fullscreen=Meta+Ctrl+F +Map to screen 1=Meta+Ctrl+1 +Map to screen 2=Meta+Ctrl+2 +Next Profile=Meta+Ctrl+N +Previous Profile=Meta+Ctrl+P +Toggle screen map selection=Meta+Ctrl+M +Toggle stylus mode=Meta+Ctrl+S +Toggle touch tool=Meta+Ctrl+T + +[yakuake][Global Shortcuts] +toggle-window-state=Shift+F12 diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs index 745dc04..7c11592 100644 --- a/.config/user-dirs.dirs +++ b/.config/user-dirs.dirs @@ -4,12 +4,12 @@ # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an # absolute path. No other format is supported. -# +# XDG_DESKTOP_DIR="$HOME/Desktop/" XDG_DOWNLOAD_DIR="$HOME/Downloads" XDG_TEMPLATES_DIR="$HOME/Templates" -XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_PUBLICSHARE_DIR="$HOME/" XDG_DOCUMENTS_DIR="$HOME/Documents" -XDG_MUSIC_DIR="$HOME/Music" +XDG_MUSIC_DIR="$HOME/" XDG_PICTURES_DIR="$HOME/Pictures" XDG_VIDEOS_DIR="$HOME/Videos" diff --git a/.gitignore b/.gitignore index 2ff0e3c..bb5f814 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ # except except .config/btop/btop.log +.config/btop/btop.log diff --git a/.zshrc b/.zshrc index 08cad67..ecdcaa6 100644 --- a/.zshrc +++ b/.zshrc @@ -37,7 +37,8 @@ alias accon="HOST=$(hostname) conda activate" alias gotemp="cd $(mktemp -d)" alias open=xdg-open alias ipb="ip -brief" -alias ps all="ps -eadf" +alias psa="ps -eadf" +alias fsize="stat --printf='%s'" ### Functions function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } From e12b0f4122c40a7b3f4d29b97b56a23f1fd0d61e Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 30 May 2024 19:08:19 +0200 Subject: [PATCH 20/31] sync nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index 6b75d25..10f2d2c 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 6b75d25bf04a8f03c54aaec380779006c2ebf355 +Subproject commit 10f2d2c76eae57ba6d6f805d9c6a0a1f1c9eed4f From f695029b5f7faad2de19b55fa69e7a526ee4ad5a Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 25 Jun 2024 22:48:48 +0200 Subject: [PATCH 21/31] aliases and EDITOR (once more) --- .zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zshrc b/.zshrc index ecdcaa6..2fa6692 100644 --- a/.zshrc +++ b/.zshrc @@ -11,6 +11,8 @@ export CLIPBOARD_NOGUI=0 # wayland only allows GUI apps to use the clipboard. # For wayland, set this to `1` # see https://github.com/Slackadays/Clipboard/issues/171 export DATEFMT='+%a %Y-%m-%d %X' +export EDITOR=nvim +export VISUAL=nvim ### Aliases @@ -39,6 +41,7 @@ alias open=xdg-open alias ipb="ip -brief" alias psa="ps -eadf" alias fsize="stat --printf='%s'" +alias rg="rg --no-ignore" ### Functions function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } From 2ecd846ad62c86a9496022168d3f43177c711d0f Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 4 Jul 2024 19:55:33 +0200 Subject: [PATCH 22/31] nvm shit and home alias --- .zshrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.zshrc b/.zshrc index 2fa6692..32d155b 100644 --- a/.zshrc +++ b/.zshrc @@ -42,6 +42,7 @@ alias ipb="ip -brief" alias psa="ps -eadf" alias fsize="stat --printf='%s'" alias rg="rg --no-ignore" +alias home="cd $HOME" ### Functions function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } @@ -218,3 +219,7 @@ if [ -d $HOME/.pyenv ]; then eval "$(pyenv virtualenv-init - zsh)" pyenv activate std 2> /dev/null > /dev/null fi + +export NVM_DIR="$HOME/.config/nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion From 7d4e26125444f62bffec7aa90acadb2de05618ba Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 4 Jul 2024 19:55:36 +0200 Subject: [PATCH 23/31] sync nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index 10f2d2c..ac2ac08 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 10f2d2c76eae57ba6d6f805d9c6a0a1f1c9eed4f +Subproject commit ac2ac080c9c4ab7e4c1f75268f603b8455679bb2 From 34a61fe1f9463496c7d79ca54a78107803da41a1 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 5 Jul 2024 22:32:13 +0200 Subject: [PATCH 24/31] fuck nvm --- .zshrc | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.zshrc b/.zshrc index 32d155b..94cb140 100644 --- a/.zshrc +++ b/.zshrc @@ -33,7 +33,6 @@ alias datefmt='date $DATEFMT' alias gg=lazygit alias reload="source ~/.zshrc" alias gls=/bin/ls -alias neorg='nvim -c "Neorg workspace $1"' alias bat=batcat alias accon="HOST=$(hostname) conda activate" alias gotemp="cd $(mktemp -d)" @@ -87,6 +86,14 @@ setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it +### load unversioned zsh code +if [ -f ~/.zsh.local ]; then + source ~/.zsh.local +else + touch ~/.zsh.local +fi + + ### --- Inputs Config ------------------------------------ # vim keys, then override stuff. bindkey -v @@ -178,10 +185,6 @@ fpath=($ZSH/plugins/zsh-completions/src $fpath) export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" export FZF_CTRL_R_OPTS='--no-sort --exact' -### --- nnn Config ------------------------------------ -source ~/.local/share/nnn/quitcd/quitcd.bash_zsh -export NNN_PLUG='j:jump;z:autojump;' - ### --- kitty Config ------------------------------------ # $KITTY_TERM is a custom envar I set in the kitty conf # this stuff does not work nicely with tmux, just make them regular aliases. Shows an error if you use them in another terminal @@ -204,13 +207,6 @@ else eval "$(zoxide init zsh)" fi -### load unversioned zsh code -if [ -f ~/.zsh.local ]; then - source ~/.zsh.local -else - touch ~/.zsh.local -fi - ### --- pyenv Config ------------------------------------- if [ -d $HOME/.pyenv ]; then export PYENV_ROOT="$HOME/.pyenv" @@ -219,7 +215,3 @@ if [ -d $HOME/.pyenv ]; then eval "$(pyenv virtualenv-init - zsh)" pyenv activate std 2> /dev/null > /dev/null fi - -export NVM_DIR="$HOME/.config/nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion From 9d19d81a6fb10dacf15172d32c61d1f480ea760e Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 15 Jul 2024 11:26:00 +0200 Subject: [PATCH 25/31] zsh-autoquoter --- .gitmodules | 3 +++ .zsh/plugins/zsh-autoquoter | 1 + .zshrc | 10 +++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 160000 .zsh/plugins/zsh-autoquoter diff --git a/.gitmodules b/.gitmodules index 2865e56..a7568cf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "nvchad-custom"] path = .custon/nvim/lua/custom url = https://git.cscherr.de/PlexSheep/nvchad-custom +[submodule ".zsh/plugins/zsh-autoquoter"] + path = .zsh/plugins/zsh-autoquoter + url = https://github.com/ianthehenry/zsh-autoquoter diff --git a/.zsh/plugins/zsh-autoquoter b/.zsh/plugins/zsh-autoquoter new file mode 160000 index 0000000..9e3b1b2 --- /dev/null +++ b/.zsh/plugins/zsh-autoquoter @@ -0,0 +1 @@ +Subproject commit 9e3b1b216bf7b61a9807a242bae730b5fc232a44 diff --git a/.zshrc b/.zshrc index 94cb140..a91551b 100644 --- a/.zshrc +++ b/.zshrc @@ -58,7 +58,10 @@ function condac() { conda activate $@ export HOST=$(hostname) } -# TODO: make neorg a function, take a workspace as arg +# calculate on shell with `c 1+1` +function c() { printf "%s\n" "$@" | bc -l; } +# call python in a print from args +function py() { python -c "from math import *; print($*)" } ### ---- zsh options ------------------------------------- setopt autocd @@ -177,10 +180,15 @@ fi ### ---- PLUGINS ----------------------------------- source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +source $ZSH/plugins/zsh-autoquoter/zsh-autoquoter.zsh +ZSH_HIGHLIGHT_HIGHLIGHTERS+=(zaq) source ~/.local/share/fzf/key-bindings.zsh source ~/.local/share/fzf/completion.zsh fpath=($ZSH/plugins/zsh-completions/src $fpath) +ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m') +ZAQ_PREFIXES_GREEDY+=('py #') + ### --- fzf Config ------------------------------------ export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" export FZF_CTRL_R_OPTS='--no-sort --exact' From 8dd89735efc439a31b917b562b15a7bd07469733 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 15 Jul 2024 11:27:58 +0200 Subject: [PATCH 26/31] sync nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index ac2ac08..2a6fb44 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit ac2ac080c9c4ab7e4c1f75268f603b8455679bb2 +Subproject commit 2a6fb440abc22a21d20fb3e4166f414ec43f495a From b737c6a9cb1dcfb062e4eb6d07f3371d477a4efd Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 26 Jul 2024 17:51:12 +0200 Subject: [PATCH 27/31] moar zfunc --- .zsh/zfunc/.zfunc/_nala | 7 + .zsh/zfunc/.zfunc/_rustup | 786 ++++++++++++++++++++++++++++++++++++++ .zsh/zfunc/_diesel | 692 +++++++++++++++++++++++++++++++++ 3 files changed, 1485 insertions(+) create mode 100644 .zsh/zfunc/.zfunc/_nala create mode 100644 .zsh/zfunc/.zfunc/_rustup create mode 100644 .zsh/zfunc/_diesel diff --git a/.zsh/zfunc/.zfunc/_nala b/.zsh/zfunc/.zfunc/_nala new file mode 100644 index 0000000..4aef6db --- /dev/null +++ b/.zsh/zfunc/.zfunc/_nala @@ -0,0 +1,7 @@ +#compdef nala + +_nala_completion() { + eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _NALA_COMPLETE=complete_zsh nala) +} + +compdef _nala_completion nala \ No newline at end of file diff --git a/.zsh/zfunc/.zfunc/_rustup b/.zsh/zfunc/.zfunc/_rustup new file mode 100644 index 0000000..6c91ed2 --- /dev/null +++ b/.zsh/zfunc/.zfunc/_rustup @@ -0,0 +1,786 @@ +#compdef rustup + +autoload -U is-at-least + +_rustup() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'-V[Print version information]' \ +'--version[Print version information]' \ +'*-v[Enable verbose output]' \ +'*--verbose[Enable verbose output]' \ +'(-v --verbose)*-q[Disable progress output]' \ +'(-v --verbose)*--quiet[Disable progress output]' \ +'::+toolchain -- release channel (e.g. +stable) or custom toolchain to set override:' \ +":: :_rustup_commands" \ +"*::: :->rustup" \ +&& ret=0 + case $state in + (rustup) + words=($line[2] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-command-$line[2]:" + case $line[2] in + (dump-testament) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(show) +_arguments "${_arguments_options[@]}" \ +'*-v[Enable verbose output with rustc information for all installed toolchains]' \ +'*--verbose[Enable verbose output with rustc information for all installed toolchains]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__show_commands" \ +"*::: :->show" \ +&& ret=0 + + case $state in + (show) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-show-command-$line[1]:" + case $line[1] in + (active-toolchain) +_arguments "${_arguments_options[@]}" \ +'*-v[Enable verbose output with rustc information]' \ +'*--verbose[Enable verbose output with rustc information]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(home) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(profile) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(install) +_arguments "${_arguments_options[@]}" \ +'--profile=[]: :(minimal default complete)' \ +'*--no-self-update[Don'\''t perform self-update when running the `rustup install` command]' \ +'*--force[Force an update, even if some components are missing]' \ +'*--force-non-host[Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(uninstall) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(update) +_arguments "${_arguments_options[@]}" \ +'*--no-self-update[Don'\''t perform self update when running the `rustup update` command]' \ +'*--force[Force an update, even if some components are missing]' \ +'*--force-non-host[Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(check) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(default) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(toolchain) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__toolchain_commands" \ +"*::: :->toolchain" \ +&& ret=0 + + case $state in + (toolchain) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-toolchain-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +'*-v[Enable verbose output with toolchain information]' \ +'*--verbose[Enable verbose output with toolchain information]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(install) +_arguments "${_arguments_options[@]}" \ +'--profile=[]: :(minimal default complete)' \ +'*-c+[Add specific components on installation]: : ' \ +'*--component=[Add specific components on installation]: : ' \ +'*-t+[Add specific targets on installation]: : ' \ +'*--target=[Add specific targets on installation]: : ' \ +'*--no-self-update[Don'\''t perform self update when running the`rustup toolchain install` command]' \ +'*--force[Force an update, even if some components are missing]' \ +'*--allow-downgrade[Allow rustup to downgrade the toolchain to satisfy your component choice]' \ +'*--force-non-host[Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(uninstall) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(link) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':toolchain -- Custom toolchain name:' \ +':path -- Path to the directory:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(target) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__target_commands" \ +"*::: :->target" \ +&& ret=0 + + case $state in + (target) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-target-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'*--installed[List only installed targets]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(add) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::target -- List of targets to install; "all" installs all available targets:' \ +&& ret=0 +;; +(remove) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::target -- List of targets to uninstall:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(component) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__component_commands" \ +"*::: :->component" \ +&& ret=0 + + case $state in + (component) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-component-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'*--installed[List only installed components]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(add) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'--target=[]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::component:' \ +&& ret=0 +;; +(remove) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'--target=[]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'*::component:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(override) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__override_commands" \ +"*::: :->override" \ +&& ret=0 + + case $state in + (override) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-override-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(set) +_arguments "${_arguments_options[@]}" \ +'--path=[Path to the directory]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +&& ret=0 +;; +(unset) +_arguments "${_arguments_options[@]}" \ +'--path=[Path to the directory]: : ' \ +'*--nonexistent[Remove override toolchain for all nonexistent directories]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(run) +_arguments "${_arguments_options[@]}" \ +'*--install[Install the requested toolchain if needed]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \ +'*::command:' \ +&& ret=0 +;; +(which) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':command:' \ +&& ret=0 +;; +(doc) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'*--path[Only print the path to the documentation]' \ +'*--alloc[The Rust core allocation and collections library]' \ +'*--book[The Rust Programming Language book]' \ +'*--cargo[The Cargo Book]' \ +'*--core[The Rust Core Library]' \ +'*--edition-guide[The Rust Edition Guide]' \ +'*--nomicon[The Dark Arts of Advanced and Unsafe Rust Programming]' \ +'*--proc_macro[A support library for macro authors when defining new macros]' \ +'*--reference[The Rust Reference]' \ +'*--rust-by-example[A collection of runnable examples that illustrate various Rust concepts and standard libraries]' \ +'*--rustc[The compiler for the Rust programming language]' \ +'*--rustdoc[Documentation generator for Rust projects]' \ +'*--std[Standard library API documentation]' \ +'*--test[Support code for rustc'\''s built in unit-test and micro-benchmarking framework]' \ +'*--unstable-book[The Unstable Book]' \ +'*--embedded-book[The Embedded Rust Book]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'::topic -- Topic such as '\''core'\'', '\''fn'\'', '\''usize'\'', '\''eprintln!'\'', '\''core\:\:arch'\'', '\''alloc\:\:format!'\'', '\''std\:\:fs'\'', '\''std\:\:fs\:\:read_dir'\'', '\''std\:\:io\:\:Bytes'\'', '\''std\:\:iter\:\:Sum'\'', '\''std\:\:io\:\:error\:\:Result'\'' etc...:' \ +&& ret=0 +;; +(man) +_arguments "${_arguments_options[@]}" \ +'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':command:' \ +&& ret=0 +;; +(self) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__self_commands" \ +"*::: :->self" \ +&& ret=0 + + case $state in + (self) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-self-command-$line[1]:" + case $line[1] in + (update) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(uninstall) +_arguments "${_arguments_options[@]}" \ +'*-y[]' \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(upgrade-data) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(set) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +":: :_rustup__set_commands" \ +"*::: :->set" \ +&& ret=0 + + case $state in + (set) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:rustup-set-command-$line[1]:" + case $line[1] in + (default-host) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':host_triple:' \ +&& ret=0 +;; +(profile) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':profile-name:(minimal default complete)' \ +&& ret=0 +;; +(auto-self-update) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +':auto-self-update-mode:(enable disable check-only)' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +;; +(completions) +_arguments "${_arguments_options[@]}" \ +'-h[Print help information]' \ +'--help[Print help information]' \ +'::shell:(bash elvish fish powershell zsh)' \ +'::command:(rustup cargo)' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +'*::subcommand -- The subcommand whose help message to display:' \ +&& ret=0 +;; + esac + ;; +esac +} + +(( $+functions[_rustup_commands] )) || +_rustup_commands() { + local commands; commands=( +'dump-testament:Dump information about the build' \ +'show:Show the active and installed toolchains or profiles' \ +'install:Update Rust toolchains' \ +'uninstall:Uninstall Rust toolchains' \ +'update:Update Rust toolchains and rustup' \ +'check:Check for updates to Rust toolchains and rustup' \ +'default:Set the default toolchain' \ +'toolchain:Modify or query the installed toolchains' \ +'target:Modify a toolchain'\''s supported targets' \ +'component:Modify a toolchain'\''s installed components' \ +'override:Modify directory toolchain overrides' \ +'run:Run a command with an environment configured for a given toolchain' \ +'which:Display which binary will be run for a given command' \ +'doc:Open the documentation for the current toolchain' \ +'man:View the man page for a given command' \ +'self:Modify the rustup installation' \ +'set:Alter rustup settings' \ +'completions:Generate tab-completion scripts for your shell' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup commands' commands "$@" +} +(( $+functions[_rustup__show__active-toolchain_commands] )) || +_rustup__show__active-toolchain_commands() { + local commands; commands=() + _describe -t commands 'rustup show active-toolchain commands' commands "$@" +} +(( $+functions[_rustup__component__add_commands] )) || +_rustup__component__add_commands() { + local commands; commands=() + _describe -t commands 'rustup component add commands' commands "$@" +} +(( $+functions[_rustup__target__add_commands] )) || +_rustup__target__add_commands() { + local commands; commands=() + _describe -t commands 'rustup target add commands' commands "$@" +} +(( $+functions[_rustup__set__auto-self-update_commands] )) || +_rustup__set__auto-self-update_commands() { + local commands; commands=() + _describe -t commands 'rustup set auto-self-update commands' commands "$@" +} +(( $+functions[_rustup__check_commands] )) || +_rustup__check_commands() { + local commands; commands=() + _describe -t commands 'rustup check commands' commands "$@" +} +(( $+functions[_rustup__completions_commands] )) || +_rustup__completions_commands() { + local commands; commands=() + _describe -t commands 'rustup completions commands' commands "$@" +} +(( $+functions[_rustup__component_commands] )) || +_rustup__component_commands() { + local commands; commands=( +'list:List installed and available components' \ +'add:Add a component to a Rust toolchain' \ +'remove:Remove a component from a Rust toolchain' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup component commands' commands "$@" +} +(( $+functions[_rustup__default_commands] )) || +_rustup__default_commands() { + local commands; commands=() + _describe -t commands 'rustup default commands' commands "$@" +} +(( $+functions[_rustup__set__default-host_commands] )) || +_rustup__set__default-host_commands() { + local commands; commands=() + _describe -t commands 'rustup set default-host commands' commands "$@" +} +(( $+functions[_rustup__doc_commands] )) || +_rustup__doc_commands() { + local commands; commands=() + _describe -t commands 'rustup doc commands' commands "$@" +} +(( $+functions[_rustup__dump-testament_commands] )) || +_rustup__dump-testament_commands() { + local commands; commands=() + _describe -t commands 'rustup dump-testament commands' commands "$@" +} +(( $+functions[_rustup__component__help_commands] )) || +_rustup__component__help_commands() { + local commands; commands=() + _describe -t commands 'rustup component help commands' commands "$@" +} +(( $+functions[_rustup__help_commands] )) || +_rustup__help_commands() { + local commands; commands=() + _describe -t commands 'rustup help commands' commands "$@" +} +(( $+functions[_rustup__override__help_commands] )) || +_rustup__override__help_commands() { + local commands; commands=() + _describe -t commands 'rustup override help commands' commands "$@" +} +(( $+functions[_rustup__self__help_commands] )) || +_rustup__self__help_commands() { + local commands; commands=() + _describe -t commands 'rustup self help commands' commands "$@" +} +(( $+functions[_rustup__set__help_commands] )) || +_rustup__set__help_commands() { + local commands; commands=() + _describe -t commands 'rustup set help commands' commands "$@" +} +(( $+functions[_rustup__show__help_commands] )) || +_rustup__show__help_commands() { + local commands; commands=() + _describe -t commands 'rustup show help commands' commands "$@" +} +(( $+functions[_rustup__target__help_commands] )) || +_rustup__target__help_commands() { + local commands; commands=() + _describe -t commands 'rustup target help commands' commands "$@" +} +(( $+functions[_rustup__toolchain__help_commands] )) || +_rustup__toolchain__help_commands() { + local commands; commands=() + _describe -t commands 'rustup toolchain help commands' commands "$@" +} +(( $+functions[_rustup__show__home_commands] )) || +_rustup__show__home_commands() { + local commands; commands=() + _describe -t commands 'rustup show home commands' commands "$@" +} +(( $+functions[_rustup__install_commands] )) || +_rustup__install_commands() { + local commands; commands=() + _describe -t commands 'rustup install commands' commands "$@" +} +(( $+functions[_rustup__toolchain__install_commands] )) || +_rustup__toolchain__install_commands() { + local commands; commands=() + _describe -t commands 'rustup toolchain install commands' commands "$@" +} +(( $+functions[_rustup__toolchain__link_commands] )) || +_rustup__toolchain__link_commands() { + local commands; commands=() + _describe -t commands 'rustup toolchain link commands' commands "$@" +} +(( $+functions[_rustup__component__list_commands] )) || +_rustup__component__list_commands() { + local commands; commands=() + _describe -t commands 'rustup component list commands' commands "$@" +} +(( $+functions[_rustup__override__list_commands] )) || +_rustup__override__list_commands() { + local commands; commands=() + _describe -t commands 'rustup override list commands' commands "$@" +} +(( $+functions[_rustup__target__list_commands] )) || +_rustup__target__list_commands() { + local commands; commands=() + _describe -t commands 'rustup target list commands' commands "$@" +} +(( $+functions[_rustup__toolchain__list_commands] )) || +_rustup__toolchain__list_commands() { + local commands; commands=() + _describe -t commands 'rustup toolchain list commands' commands "$@" +} +(( $+functions[_rustup__man_commands] )) || +_rustup__man_commands() { + local commands; commands=() + _describe -t commands 'rustup man commands' commands "$@" +} +(( $+functions[_rustup__override_commands] )) || +_rustup__override_commands() { + local commands; commands=( +'list:List directory toolchain overrides' \ +'set:Set the override toolchain for a directory' \ +'unset:Remove the override toolchain for a directory' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup override commands' commands "$@" +} +(( $+functions[_rustup__set__profile_commands] )) || +_rustup__set__profile_commands() { + local commands; commands=() + _describe -t commands 'rustup set profile commands' commands "$@" +} +(( $+functions[_rustup__show__profile_commands] )) || +_rustup__show__profile_commands() { + local commands; commands=() + _describe -t commands 'rustup show profile commands' commands "$@" +} +(( $+functions[_rustup__component__remove_commands] )) || +_rustup__component__remove_commands() { + local commands; commands=() + _describe -t commands 'rustup component remove commands' commands "$@" +} +(( $+functions[_rustup__target__remove_commands] )) || +_rustup__target__remove_commands() { + local commands; commands=() + _describe -t commands 'rustup target remove commands' commands "$@" +} +(( $+functions[_rustup__run_commands] )) || +_rustup__run_commands() { + local commands; commands=() + _describe -t commands 'rustup run commands' commands "$@" +} +(( $+functions[_rustup__self_commands] )) || +_rustup__self_commands() { + local commands; commands=( +'update:Download and install updates to rustup' \ +'uninstall:Uninstall rustup.' \ +'upgrade-data:Upgrade the internal data format.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup self commands' commands "$@" +} +(( $+functions[_rustup__override__set_commands] )) || +_rustup__override__set_commands() { + local commands; commands=() + _describe -t commands 'rustup override set commands' commands "$@" +} +(( $+functions[_rustup__set_commands] )) || +_rustup__set_commands() { + local commands; commands=( +'default-host:The triple used to identify toolchains when not specified' \ +'profile:The default components installed' \ +'auto-self-update:The rustup auto self update mode' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup set commands' commands "$@" +} +(( $+functions[_rustup__show_commands] )) || +_rustup__show_commands() { + local commands; commands=( +'active-toolchain:Show the active toolchain' \ +'home:Display the computed value of RUSTUP_HOME' \ +'profile:Show the current profile' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup show commands' commands "$@" +} +(( $+functions[_rustup__target_commands] )) || +_rustup__target_commands() { + local commands; commands=( +'list:List installed and available targets' \ +'add:Add a target to a Rust toolchain' \ +'remove:Remove a target from a Rust toolchain' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup target commands' commands "$@" +} +(( $+functions[_rustup__toolchain_commands] )) || +_rustup__toolchain_commands() { + local commands; commands=( +'list:List installed toolchains' \ +'install:Install or update a given toolchain' \ +'uninstall:Uninstall a toolchain' \ +'link:Create a custom toolchain by symlinking to a directory' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'rustup toolchain commands' commands "$@" +} +(( $+functions[_rustup__self__uninstall_commands] )) || +_rustup__self__uninstall_commands() { + local commands; commands=() + _describe -t commands 'rustup self uninstall commands' commands "$@" +} +(( $+functions[_rustup__toolchain__uninstall_commands] )) || +_rustup__toolchain__uninstall_commands() { + local commands; commands=() + _describe -t commands 'rustup toolchain uninstall commands' commands "$@" +} +(( $+functions[_rustup__uninstall_commands] )) || +_rustup__uninstall_commands() { + local commands; commands=() + _describe -t commands 'rustup uninstall commands' commands "$@" +} +(( $+functions[_rustup__override__unset_commands] )) || +_rustup__override__unset_commands() { + local commands; commands=() + _describe -t commands 'rustup override unset commands' commands "$@" +} +(( $+functions[_rustup__self__update_commands] )) || +_rustup__self__update_commands() { + local commands; commands=() + _describe -t commands 'rustup self update commands' commands "$@" +} +(( $+functions[_rustup__update_commands] )) || +_rustup__update_commands() { + local commands; commands=() + _describe -t commands 'rustup update commands' commands "$@" +} +(( $+functions[_rustup__self__upgrade-data_commands] )) || +_rustup__self__upgrade-data_commands() { + local commands; commands=() + _describe -t commands 'rustup self upgrade-data commands' commands "$@" +} +(( $+functions[_rustup__which_commands] )) || +_rustup__which_commands() { + local commands; commands=() + _describe -t commands 'rustup which commands' commands "$@" +} + +_rustup "$@" diff --git a/.zsh/zfunc/_diesel b/.zsh/zfunc/_diesel new file mode 100644 index 0000000..3dbe838 --- /dev/null +++ b/.zsh/zfunc/_diesel @@ -0,0 +1,692 @@ +#compdef diesel + +autoload -U is-at-least + +_diesel() { + typeset -A opt_args + typeset -a _arguments_options + local ret=1 + + if is-at-least 5.2; then + _arguments_options=(-s -S -C) + else + _arguments_options=(-s -C) + fi + + local context curcontext="$curcontext" state line + _arguments "${_arguments_options[@]}" : \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_diesel_commands" \ +"*::: :->diesel" \ +&& ret=0 + case $state in + (diesel) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-command-$line[1]:" + case $line[1] in + (migration) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +":: :_diesel__migration_commands" \ +"*::: :->migration" \ +&& ret=0 + + case $state in + (migration) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-migration-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +'(-a --all)-n+[Reverts the last \`n\` migration files.]: : ' \ +'(-a --all)--number=[Reverts the last \`n\` migration files.]: : ' \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'(-n --number)-a[Reverts previously run migration files.]' \ +'(-n --number)--all[Reverts previously run migration files.]' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(redo) +_arguments "${_arguments_options[@]}" : \ +'(-a --all)-n+[Redo the last \`n\` migration files.]: : ' \ +'(-a --all)--number=[Redo the last \`n\` migration files.]: : ' \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'(-n --number)-a[Reverts and re-runs all migrations.]' \ +'(-n --number)--all[Reverts and re-runs all migrations.]' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(pending) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(generate) +_arguments "${_arguments_options[@]}" : \ +'--version=[The version number to use when generating the migration. Defaults to the current timestamp, which should suffice for most use cases.]: : ' \ +'--format=[The format of the migration to be generated.]: :(sql)' \ +'--diff-schema=[Populate the generated migrations based on the current difference between your \`schema.rs\` file and the specified database. The generated migrations are not expected to be perfect. Be sure to check whether they meet your expectations. Adjust the generated output if that'\''s not the case.]' \ +'*--schema-key=[select schema key from diesel.toml, use '\''default'\'' for print_schema without key.]: : ' \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'-u[Don'\''t generate a down.sql file. You won'\''t be able to run migration \`revert\` or \`redo\`.]' \ +'--no-down[Don'\''t generate a down.sql file. You won'\''t be able to run migration \`revert\` or \`redo\`.]' \ +'--sqlite-integer-primary-key-is-bigint[For SQLite 3.37 and above, detect \`INTEGER PRIMARY KEY\` columns as \`BigInt\`, when the table isn'\''t declared with \`WITHOUT ROWID\`. See https\://www.sqlite.org/lang_createtable.html#rowid for more information. Only used with the \`--diff-schema\` argument.]' \ +'*-o[Only include tables from table-name that matches regexp.]' \ +'*--only-tables[Only include tables from table-name that matches regexp.]' \ +'*-e[Exclude tables from table-name that matches regex.]' \ +'*--except-tables[Exclude tables from table-name that matches regex.]' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +':MIGRATION_NAME -- The name of the migration to create.:' \ +'*::table-name -- Table names to filter.:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_diesel__migration__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-migration-help-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(redo) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(pending) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(generate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(database) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +":: :_diesel__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-database-command-$line[1]:" + case $line[1] in + (setup) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_diesel__database__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-database-help-command-$line[1]:" + case $line[1] in + (setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(completions) +_arguments "${_arguments_options[@]}" : \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +':SHELL:(bash elvish fish powershell zsh)' \ +&& ret=0 +;; +(print-schema) +_arguments "${_arguments_options[@]}" : \ +'-s+[The name of the schema.]: : ' \ +'--schema=[The name of the schema.]: : ' \ +'*--with-docs-config=[Render documentation comments for tables and columns.]: :(database-comments-fallback-to-auto-generated-doc-comment only-database-comments no-doc-comments)' \ +'*--column-sorting=[Sort order for table columns.]: :(ordinal_position name)' \ +'*--patch-file=[A unified diff file to be applied to the final schema.]: :_files' \ +'*--import-types=[A list of types to import for every table, separated by commas.]: : ' \ +'*--except-custom-type-definitions=[A list of regexes to filter the custom types definitions generated]: : ' \ +'*--custom-type-derives=[A list of derives to implement for every automatically generated SqlType in the schema, separated by commas.]: : ' \ +'*--schema-key=[select schema key from diesel.toml, use '\''default'\'' for print_schema without key.]: : ' \ +'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \ +'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \ +'*-o[Only include tables from table-name that matches regexp.]' \ +'*--only-tables[Only include tables from table-name that matches regexp.]' \ +'*-e[Exclude tables from table-name that matches regex.]' \ +'*--except-tables[Exclude tables from table-name that matches regex.]' \ +'*--with-docs[Render documentation comments for tables and columns.]' \ +'*--no-generate-missing-sql-type-definitions[Generate SQL type definitions for types not provided by diesel]' \ +'*--sqlite-integer-primary-key-is-bigint[For SQLite 3.37 and above, detect \`INTEGER PRIMARY KEY\` columns as \`BigInt\`, when the table isn'\''t declared with \`WITHOUT ROWID\`. See https\://www.sqlite.org/lang_createtable.html#rowid for more information.]' \ +'--locked-schema[Require that the schema file is up to date.]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'*::table-name -- Table names to filter.:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +":: :_diesel__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-help-command-$line[1]:" + case $line[1] in + (migration) +_arguments "${_arguments_options[@]}" : \ +":: :_diesel__help__migration_commands" \ +"*::: :->migration" \ +&& ret=0 + + case $state in + (migration) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-help-migration-command-$line[1]:" + case $line[1] in + (run) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(revert) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(redo) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(pending) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(generate) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(database) +_arguments "${_arguments_options[@]}" : \ +":: :_diesel__help__database_commands" \ +"*::: :->database" \ +&& ret=0 + + case $state in + (database) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:diesel-help-database-command-$line[1]:" + case $line[1] in + (setup) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(reset) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(drop) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; +(completions) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(print-schema) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" : \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_diesel_commands] )) || +_diesel_commands() { + local commands; commands=( +'migration:A group of commands for generating, running, and reverting migrations.' \ +'setup:Creates the migrations directory, creates the database specified in your DATABASE_URL, and runs existing migrations.' \ +'database:A group of commands for setting up and resetting your database.' \ +'completions:Generate shell completion scripts for the diesel command.' \ +'print-schema:Print table definitions for database schema.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'diesel commands' commands "$@" +} +(( $+functions[_diesel__completions_commands] )) || +_diesel__completions_commands() { + local commands; commands=() + _describe -t commands 'diesel completions commands' commands "$@" +} +(( $+functions[_diesel__database_commands] )) || +_diesel__database_commands() { + local commands; commands=( +'setup:Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' \ +'reset:Resets your database by dropping the database specified in your DATABASE_URL and then running \`diesel database setup\`.' \ +'drop:Drops the database specified in your DATABASE_URL.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'diesel database commands' commands "$@" +} +(( $+functions[_diesel__database__drop_commands] )) || +_diesel__database__drop_commands() { + local commands; commands=() + _describe -t commands 'diesel database drop commands' commands "$@" +} +(( $+functions[_diesel__database__help_commands] )) || +_diesel__database__help_commands() { + local commands; commands=( +'setup:Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' \ +'reset:Resets your database by dropping the database specified in your DATABASE_URL and then running \`diesel database setup\`.' \ +'drop:Drops the database specified in your DATABASE_URL.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'diesel database help commands' commands "$@" +} +(( $+functions[_diesel__database__help__drop_commands] )) || +_diesel__database__help__drop_commands() { + local commands; commands=() + _describe -t commands 'diesel database help drop commands' commands "$@" +} +(( $+functions[_diesel__database__help__help_commands] )) || +_diesel__database__help__help_commands() { + local commands; commands=() + _describe -t commands 'diesel database help help commands' commands "$@" +} +(( $+functions[_diesel__database__help__reset_commands] )) || +_diesel__database__help__reset_commands() { + local commands; commands=() + _describe -t commands 'diesel database help reset commands' commands "$@" +} +(( $+functions[_diesel__database__help__setup_commands] )) || +_diesel__database__help__setup_commands() { + local commands; commands=() + _describe -t commands 'diesel database help setup commands' commands "$@" +} +(( $+functions[_diesel__database__reset_commands] )) || +_diesel__database__reset_commands() { + local commands; commands=() + _describe -t commands 'diesel database reset commands' commands "$@" +} +(( $+functions[_diesel__database__setup_commands] )) || +_diesel__database__setup_commands() { + local commands; commands=() + _describe -t commands 'diesel database setup commands' commands "$@" +} +(( $+functions[_diesel__help_commands] )) || +_diesel__help_commands() { + local commands; commands=( +'migration:A group of commands for generating, running, and reverting migrations.' \ +'setup:Creates the migrations directory, creates the database specified in your DATABASE_URL, and runs existing migrations.' \ +'database:A group of commands for setting up and resetting your database.' \ +'completions:Generate shell completion scripts for the diesel command.' \ +'print-schema:Print table definitions for database schema.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'diesel help commands' commands "$@" +} +(( $+functions[_diesel__help__completions_commands] )) || +_diesel__help__completions_commands() { + local commands; commands=() + _describe -t commands 'diesel help completions commands' commands "$@" +} +(( $+functions[_diesel__help__database_commands] )) || +_diesel__help__database_commands() { + local commands; commands=( +'setup:Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' \ +'reset:Resets your database by dropping the database specified in your DATABASE_URL and then running \`diesel database setup\`.' \ +'drop:Drops the database specified in your DATABASE_URL.' \ + ) + _describe -t commands 'diesel help database commands' commands "$@" +} +(( $+functions[_diesel__help__database__drop_commands] )) || +_diesel__help__database__drop_commands() { + local commands; commands=() + _describe -t commands 'diesel help database drop commands' commands "$@" +} +(( $+functions[_diesel__help__database__reset_commands] )) || +_diesel__help__database__reset_commands() { + local commands; commands=() + _describe -t commands 'diesel help database reset commands' commands "$@" +} +(( $+functions[_diesel__help__database__setup_commands] )) || +_diesel__help__database__setup_commands() { + local commands; commands=() + _describe -t commands 'diesel help database setup commands' commands "$@" +} +(( $+functions[_diesel__help__help_commands] )) || +_diesel__help__help_commands() { + local commands; commands=() + _describe -t commands 'diesel help help commands' commands "$@" +} +(( $+functions[_diesel__help__migration_commands] )) || +_diesel__help__migration_commands() { + local commands; commands=( +'run:Runs all pending migrations.' \ +'revert:Reverts the specified migrations.' \ +'redo:Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' \ +'list:Lists all available migrations, marking those that have been applied.' \ +'pending:Returns true if there are any pending migrations.' \ +'generate:Generate a new migration with the given name, and the current timestamp as the version.' \ + ) + _describe -t commands 'diesel help migration commands' commands "$@" +} +(( $+functions[_diesel__help__migration__generate_commands] )) || +_diesel__help__migration__generate_commands() { + local commands; commands=() + _describe -t commands 'diesel help migration generate commands' commands "$@" +} +(( $+functions[_diesel__help__migration__list_commands] )) || +_diesel__help__migration__list_commands() { + local commands; commands=() + _describe -t commands 'diesel help migration list commands' commands "$@" +} +(( $+functions[_diesel__help__migration__pending_commands] )) || +_diesel__help__migration__pending_commands() { + local commands; commands=() + _describe -t commands 'diesel help migration pending commands' commands "$@" +} +(( $+functions[_diesel__help__migration__redo_commands] )) || +_diesel__help__migration__redo_commands() { + local commands; commands=() + _describe -t commands 'diesel help migration redo commands' commands "$@" +} +(( $+functions[_diesel__help__migration__revert_commands] )) || +_diesel__help__migration__revert_commands() { + local commands; commands=() + _describe -t commands 'diesel help migration revert commands' commands "$@" +} +(( $+functions[_diesel__help__migration__run_commands] )) || +_diesel__help__migration__run_commands() { + local commands; commands=() + _describe -t commands 'diesel help migration run commands' commands "$@" +} +(( $+functions[_diesel__help__print-schema_commands] )) || +_diesel__help__print-schema_commands() { + local commands; commands=() + _describe -t commands 'diesel help print-schema commands' commands "$@" +} +(( $+functions[_diesel__help__setup_commands] )) || +_diesel__help__setup_commands() { + local commands; commands=() + _describe -t commands 'diesel help setup commands' commands "$@" +} +(( $+functions[_diesel__migration_commands] )) || +_diesel__migration_commands() { + local commands; commands=( +'run:Runs all pending migrations.' \ +'revert:Reverts the specified migrations.' \ +'redo:Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' \ +'list:Lists all available migrations, marking those that have been applied.' \ +'pending:Returns true if there are any pending migrations.' \ +'generate:Generate a new migration with the given name, and the current timestamp as the version.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'diesel migration commands' commands "$@" +} +(( $+functions[_diesel__migration__generate_commands] )) || +_diesel__migration__generate_commands() { + local commands; commands=() + _describe -t commands 'diesel migration generate commands' commands "$@" +} +(( $+functions[_diesel__migration__help_commands] )) || +_diesel__migration__help_commands() { + local commands; commands=( +'run:Runs all pending migrations.' \ +'revert:Reverts the specified migrations.' \ +'redo:Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' \ +'list:Lists all available migrations, marking those that have been applied.' \ +'pending:Returns true if there are any pending migrations.' \ +'generate:Generate a new migration with the given name, and the current timestamp as the version.' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'diesel migration help commands' commands "$@" +} +(( $+functions[_diesel__migration__help__generate_commands] )) || +_diesel__migration__help__generate_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help generate commands' commands "$@" +} +(( $+functions[_diesel__migration__help__help_commands] )) || +_diesel__migration__help__help_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help help commands' commands "$@" +} +(( $+functions[_diesel__migration__help__list_commands] )) || +_diesel__migration__help__list_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help list commands' commands "$@" +} +(( $+functions[_diesel__migration__help__pending_commands] )) || +_diesel__migration__help__pending_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help pending commands' commands "$@" +} +(( $+functions[_diesel__migration__help__redo_commands] )) || +_diesel__migration__help__redo_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help redo commands' commands "$@" +} +(( $+functions[_diesel__migration__help__revert_commands] )) || +_diesel__migration__help__revert_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help revert commands' commands "$@" +} +(( $+functions[_diesel__migration__help__run_commands] )) || +_diesel__migration__help__run_commands() { + local commands; commands=() + _describe -t commands 'diesel migration help run commands' commands "$@" +} +(( $+functions[_diesel__migration__list_commands] )) || +_diesel__migration__list_commands() { + local commands; commands=() + _describe -t commands 'diesel migration list commands' commands "$@" +} +(( $+functions[_diesel__migration__pending_commands] )) || +_diesel__migration__pending_commands() { + local commands; commands=() + _describe -t commands 'diesel migration pending commands' commands "$@" +} +(( $+functions[_diesel__migration__redo_commands] )) || +_diesel__migration__redo_commands() { + local commands; commands=() + _describe -t commands 'diesel migration redo commands' commands "$@" +} +(( $+functions[_diesel__migration__revert_commands] )) || +_diesel__migration__revert_commands() { + local commands; commands=() + _describe -t commands 'diesel migration revert commands' commands "$@" +} +(( $+functions[_diesel__migration__run_commands] )) || +_diesel__migration__run_commands() { + local commands; commands=() + _describe -t commands 'diesel migration run commands' commands "$@" +} +(( $+functions[_diesel__print-schema_commands] )) || +_diesel__print-schema_commands() { + local commands; commands=() + _describe -t commands 'diesel print-schema commands' commands "$@" +} +(( $+functions[_diesel__setup_commands] )) || +_diesel__setup_commands() { + local commands; commands=() + _describe -t commands 'diesel setup commands' commands "$@" +} + +if [ "$funcstack[1]" = "_diesel" ]; then + _diesel "$@" +else + compdef _diesel diesel +fi From 77aa12bf56b5794c47c76d8fb8e040d8c43f07ad Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 26 Jul 2024 17:52:01 +0200 Subject: [PATCH 28/31] zshrc from work --- .zshrc | 60 +++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/.zshrc b/.zshrc index a91551b..9c1b09e 100644 --- a/.zshrc +++ b/.zshrc @@ -60,8 +60,28 @@ function condac() { } # calculate on shell with `c 1+1` function c() { printf "%s\n" "$@" | bc -l; } -# call python in a print from args -function py() { python -c "from math import *; print($*)" } +# Call Python and execute multiple statements from args +function py() { + python <<< " +from math import * + +def evaluate_and_print(code): + for expr in code.split(';'): + expr = expr.strip() + if '=' in expr: + exec(expr) + else: + result = eval(expr) + print(f\"{expr} => {result}\") + +if __name__ == \"__main__\": + expr = '$*' + evaluate_and_print(expr) +" +} +function countlines() { + find . -type f -name "$1" -exec wc -l {} \; | awk '{print $0} {total += $1} END {print "Total lines:", total}' +} ### ---- zsh options ------------------------------------- setopt autocd @@ -89,14 +109,6 @@ setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it -### load unversioned zsh code -if [ -f ~/.zsh.local ]; then - source ~/.zsh.local -else - touch ~/.zsh.local -fi - - ### --- Inputs Config ------------------------------------ # vim keys, then override stuff. bindkey -v @@ -188,11 +200,16 @@ fpath=($ZSH/plugins/zsh-completions/src $fpath) ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m') ZAQ_PREFIXES_GREEDY+=('py #') +ZAQ_PREFIXES_GREEDY+=('countlines #') ### --- fzf Config ------------------------------------ export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" export FZF_CTRL_R_OPTS='--no-sort --exact' +### --- nnn Config ------------------------------------ +source ~/.local/share/nnn/quitcd/quitcd.bash_zsh +export NNN_PLUG='j:jump;z:autojump;' + ### --- kitty Config ------------------------------------ # $KITTY_TERM is a custom envar I set in the kitty conf # this stuff does not work nicely with tmux, just make them regular aliases. Shows an error if you use them in another terminal @@ -215,11 +232,20 @@ else eval "$(zoxide init zsh)" fi -### --- pyenv Config ------------------------------------- -if [ -d $HOME/.pyenv ]; then - export PYENV_ROOT="$HOME/.pyenv" - [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" - eval "$(pyenv init -)" - eval "$(pyenv virtualenv-init - zsh)" - pyenv activate std 2> /dev/null > /dev/null +### load unversioned zsh code +if [ -f ~/.zsh.local ]; then + source ~/.zsh.local +else + touch ~/.zsh.local fi + +### --- pyenv Config ------------------------------------- +export PYENV_ROOT="$HOME/.pyenv" +[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init - zsh)" + +. "$HOME/.cargo/env" + +zstyle ':completion:*' menu select +fpath+=~/.zfunc From a991769cef7e282541665dd17a1441ca37485129 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 1 Aug 2024 17:17:31 +0200 Subject: [PATCH 29/31] sync nvim --- .config/nvim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim b/.config/nvim index 2a6fb44..38fb445 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 2a6fb440abc22a21d20fb3e4166f414ec43f495a +Subproject commit 38fb445fb1631b73ad3a12ee01b30d74464fb0f0 From ac2076fc03b8b6f269b7c271c6df1b8e61a2ab60 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 14 Aug 2024 10:09:03 +0200 Subject: [PATCH 30/31] zprofile ibus stuff --- .config/nvim | 2 +- .zprofile | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.config/nvim b/.config/nvim index 38fb445..9fed026 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 38fb445fb1631b73ad3a12ee01b30d74464fb0f0 +Subproject commit 9fed026ab76016f71df5dac7db9686c364b07c21 diff --git a/.zprofile b/.zprofile index cad08d2..195dbf0 100644 --- a/.zprofile +++ b/.zprofile @@ -3,8 +3,9 @@ export PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin export EDITOR=nvim export editor=nvim export XDG_CONFIG_HOME=~/.config -export GTK_IM_MODULE=fcitx -export QT_IM_MODULE=fcitx -export SDL_IM_MODULE=fcitx -export GLFW_IM_MODULE=ibus +export GTK_IM_MODULE=ibus +export QT_IM_MODULE=ibus +export SDL_IM_MODULE=ibus +export GLFW_IM_MODULE=ibus +export XMODIFIERS=@im=ibus From ba3b2ac1c9830f5b311cd5c2096f91de74e4859b Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 5 Sep 2024 10:50:10 +0200 Subject: [PATCH 31/31] git-verify-commit --- .zshrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.zshrc b/.zshrc index 9c1b09e..847a9e7 100644 --- a/.zshrc +++ b/.zshrc @@ -82,6 +82,16 @@ if __name__ == \"__main__\": function countlines() { find . -type f -name "$1" -exec wc -l {} \; | awk '{print $0} {total += $1} END {print "Total lines:", total}' } +function git-verify-commit () { +git verify-commit $1 +ret=$? +if [ $ret -ne 0 ]; then + echo "Commit is not signed." +else + echo "OK" +fi +return $ret +} ### ---- zsh options ------------------------------------- setopt autocd