Compare commits

...

35 Commits

Author SHA1 Message Date
Christoph J. Scherr f37825c195 kali stuff zsh 2024-09-10 20:38:35 +02:00
Christoph J. Scherr 3ff91c06e4 this is the new kali 2024-09-10 12:48:02 +02:00
Christoph J. Scherr 84a04daf59 symc master 2024-09-10 12:46:45 +02:00
Christoph J. Scherr ba3b2ac1c9 git-verify-commit 2024-09-05 10:50:23 +02:00
Christoph J. Scherr ac2076fc03 zprofile ibus stuff 2024-08-14 10:09:03 +02:00
Christoph J. Scherr a991769cef sync nvim 2024-08-01 17:17:31 +02:00
Christoph J. Scherr 77aa12bf56 zshrc from work 2024-07-26 17:52:01 +02:00
Christoph J. Scherr b737c6a9cb moar zfunc 2024-07-26 17:51:12 +02:00
Christoph J. Scherr 8dd89735ef sync nvim 2024-07-15 11:27:58 +02:00
Christoph J. Scherr 9d19d81a6f zsh-autoquoter 2024-07-15 11:27:41 +02:00
Christoph J. Scherr 34a61fe1f9 fuck nvm 2024-07-05 22:32:13 +02:00
Christoph J. Scherr 7d4e261254 sync nvim 2024-07-04 19:55:36 +02:00
Christoph J. Scherr 2ecd846ad6 nvm shit and home alias 2024-07-04 19:55:33 +02:00
Christoph J. Scherr f695029b5f aliases and EDITOR (once more) 2024-06-25 22:48:48 +02:00
Christoph J. Scherr e12b0f4122 sync nvim 2024-05-30 19:08:19 +02:00
Christoph J. Scherr 68a746d86f too annoyed to describe 2024-05-30 19:08:01 +02:00
Christoph J. Scherr a72e723767 user-dirs 2024-05-24 08:23:29 +02:00
Christoph J. Scherr 96bea3fc03 moar shortcuts 2024-05-21 11:06:36 +02:00
Christoph J. Scherr 6735fe558f add damn shortcuts for kde 2024-05-21 10:43:41 +02:00
Christoph J. Scherr 1a072c98a9 technology hates me 2024-05-20 17:55:03 +02:00
Christoph J. Scherr 6123945230 add stupid kitty fullscreen 2024-05-20 00:39:19 +02:00
Christoph J. Scherr ea70ac6c9a aliases 2024-04-22 17:02:18 +02:00
Christoph J. Scherr 8b83502ad1 bad gitignore, dont let me include my file :( 2024-04-14 17:53:17 +02:00
Christoph J. Scherr e33695df5f update nvim 2024-04-12 11:03:34 +02:00
Christoph J. Scherr 98fd1537b9 ipb 2024-04-12 11:03:22 +02:00
Christoph J. Scherr 04d999f3a6 source zprofile 2024-04-09 23:41:38 +02:00
Christoph J. Scherr bb2ad39fcb remove damn ssh agent 2024-04-06 17:33:20 +02:00
Christoph J. Scherr cfc3b76332 Merge branch 'master' of https://git.cscherr.de/PlexSheep/home 2024-04-06 17:32:27 +02:00
Christoph J. Scherr 67ed9cc3c9
just add terminfo 2024-04-06 17:31:49 +02:00
Christoph J. Scherr 049eb9ee83
pyenv if 2024-04-06 17:20:35 +02:00
Christoph J. Scherr 0ca559ef2d
remove gitconfig from repo 2024-04-06 17:19:22 +02:00
Christoph J. Scherr 2a7b606cc2
pyenv and gitconfig stuff 2024-04-06 17:17:24 +02:00
Christoph J. Scherr 243cc8140f
update nvim 2024-04-06 17:17:11 +02:00
Christoph J. Scherr cbea004fa4
update vimrc 2024-04-06 17:15:06 +02:00
Christoph J. Scherr 41d3750d24 disable default prefix tmux 2024-03-17 09:22:46 -04:00
17 changed files with 2415 additions and 104 deletions

View File

@ -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
@ -178,7 +166,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

View File

@ -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.

View File

@ -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

373
.config/shortkuts.kksrc Normal file
View File

@ -0,0 +1,373 @@
[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+PgDown; Ctrl+]
Activate Previous Tab=Ctrl+PgUp; Ctrl+[
ActualSize=Ctrl+0
AddBookmark=Ctrl+B
Back=Back; Alt+Left
BackwardWord=Ctrl+Left
Begin=Ctrl+Home
BeginningOfLine=Home
Clear=
Close=Ctrl+W; Ctrl+Esc
ConfigureNotifications=
ConfigureToolbars=
Copy=Ctrl+Ins; Ctrl+C
CreateFolder=F10
Cut=Ctrl+X; Shift+Del
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=Refresh; F5
RenameFile=F2
Replace=Ctrl+R
ReportBug=
Revert=
RotateDown=Down
RotateUp=Up
Save=Ctrl+S
SaveAs=Ctrl+Shift+S
SaveOptions=
SelectAll=Ctrl+A
ShowHideHiddenFiles=Alt+.; Ctrl+H
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+-
[discord-screenaudio][Global Shortcuts]
toggleDeafen=
toggleMute=
[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=Screensaver; Meta+L; Ctrl+Alt+L
Log Out=Ctrl+Alt+Del
Log Out Without Confirmation=
Reboot Without Confirmation=
[kwin][Global Shortcuts]
Activate Window Demanding Attention=Ctrl+Alt+A
Decrease Opacity=
Expose=Ctrl+F9
ExposeAll=Launch (C); Ctrl+F10
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=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+Alt+1; Ctrl+F1
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+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
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=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=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=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
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=Ctrl+Alt+Shift+Right
Window to Next Screen=Meta+Shift+Right
Window to Previous Desktop=Ctrl+Alt+Shift+Left
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+-
[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=Search; Alt+Space; Alt+F2
[org.kde.plasma.emojier.desktop][Global Shortcuts]
_launch=Meta+.
[org.kde.spectacle.desktop][Global Shortcuts]
ActiveWindowScreenShot=Meta+Print
CurrentMonitorScreenShot=
FullScreenScreenShot=
OpenWithoutScreenshot=
RectangularRegionScreenShot=Meta+Shift+Print; Print
WindowUnderCursorScreenShot=Meta+Ctrl+Print
_launch=Shift+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 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; Meta+A
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=
[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

15
.config/user-dirs.dirs Normal file
View File

@ -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/"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

8
.gitignore vendored
View File

@ -19,11 +19,17 @@
!.zsh
!.zsh/**
!.tmux.conf
!.gitconfig
!.local/fzf
!.local/fzf/**
!.local/nvim
!.local/nvim/**
!.local/share/nvim
!.local/share/nvim/**
!.terminfo
!.terminfo/**
!.config/shortkuts.kksrc
!.config/user-dirs.dirs
# except except
.config/btop/btop.log
.config/btop/btop.log

3
.gitmodules vendored
View File

@ -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

BIN
.terminfo/78/xterm-kitty Normal file

Binary file not shown.

269
.terminfo/kitty.terminfo Normal file
View File

@ -0,0 +1,269 @@
xterm-kitty|KovIdTTY,
Su,
Tc,
XF,
am,
ccc,
fullkbd,
hs,
km,
mc5i,
mir,
msgr,
npc,
xenl,
colors#256,
cols#80,
it#8,
lines#24,
pairs#32767,
BD=\E[?2004l,
BE=\E[?2004h,
Cr=\E]112\007,
Cs=\E]12;%p1%s\007,
Ms=\E]52;%p1%s;%p2%s\E\\,
PE=\E[201~,
PS=\E[200~,
RV=\E[>c,
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,

BIN
.terminfo/x/xterm-kitty Normal file

Binary file not shown.

2
.vimrc
View File

@ -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

@ -0,0 +1 @@
Subproject commit 9e3b1b216bf7b61a9807a242bae730b5fc232a44

7
.zsh/zfunc/.zfunc/_nala Normal file
View File

@ -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

786
.zsh/zfunc/.zfunc/_rustup Normal file
View File

@ -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 "$@"

692
.zsh/zfunc/_diesel Normal file
View File

@ -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

18
.zshrc
View File

@ -17,18 +17,7 @@ WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
PROMPT_EOL_MARK=""
# configure key keybindings
bindkey -e # emacs key bindings
bindkey ' ' magic-space # do history expansion on space
bindkey '^U' backward-kill-line # ctrl + U
bindkey '^[[3;5~' kill-word # ctrl + Supr
bindkey '^[[3~' delete-char # delete
bindkey '^[[1;5C' forward-word # ctrl + ->
bindkey '^[[1;5D' backward-word # ctrl + <-
bindkey '^[[5~' beginning-of-buffer-or-history # page up
bindkey '^[[6~' end-of-buffer-or-history # page down
bindkey '^[[H' beginning-of-line # home
bindkey '^[[F' end-of-line # end
bindkey '^[[Z' undo # shift + tab undo last action
# is already done in my own stuff
# enable completion features
autoload -Uz compinit
@ -241,11 +230,6 @@ if [ -x /usr/bin/dircolors ]; then
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
# enable auto-suggestions based on the history
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
. /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh

251
.zshrc.custom Normal file
View File

@ -0,0 +1,251 @@
### 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.
# 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.
#
# 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
alias l="lsd -lah --date \"$DATEFMT\""
alias ll="lsd -lh --date \"$DATEFMT\""
alias la="lsd -a --date \"$DATEFMT\""
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"'
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
alias datefmt='date $DATEFMT'
alias gg=lazygit
alias reload="source ~/.zshrc"
alias gls=/bin/ls
alias bat=batcat
alias accon="HOST=$(hostname) conda activate"
alias gotemp="cd $(mktemp -d)"
alias open=xdg-open
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" }
function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" }
function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
function cachekeys () { exec 2>/dev/null;
ssh-agent-start # see ~/.zprofile
ssh-add
}
function newpass() {
LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-40}
}
function condac() {
conda activate $@
export HOST=$(hostname)
}
# calculate on shell with `c 1+1`
function c() { printf "%s\n" "$@" | bc -l; }
# 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}'
}
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
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_IGNORE_ALL_DUPS
setopt appendhistory
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt interactivecomments # allow comments in interactive mode
setopt magicequalsubst # enable filename expansion for arguments of the form anything=expression
setopt nonomatch # hide error message if there is no match for the pattern
setopt notify # report the status of background jobs immediately
setopt numericglobsort # sort filenames numerically when it makes sense
setopt promptsubst # enable command substitution in prompt
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
PROMPT_EOL_MARK=""
# History configurations
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=200000
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
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
### --- Inputs Config ------------------------------------
# vim keys, then override stuff.
bindkey -v
bindkey ' ' magic-space # do history expansion on space
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey -s "^X" 'n^M'
### ---- EXPAND DOTS -------------------------------------
function expand-dots() {
local MATCH
if [[ $LBUFFER =~ '(^| )\.\.\.+' ]]; then
LBUFFER=$LBUFFER:fs%\.\.\.%../..%
fi
}
function expand-dots-then-expand-or-complete() {
zle expand-dots
zle expand-or-complete
}
function expand-dots-then-accept-line() {
zle expand-dots
zle accept-line
}
zle -N expand-dots
zle -N expand-dots-then-expand-or-complete
zle -N expand-dots-then-accept-line
bindkey '^I' expand-dots-then-expand-or-complete
bindkey '^M' expand-dots-then-accept-line
### ---- THEMES -----------------------------------
PS1='%B%F{red}%n@%m%k %B%F{cyan}%(4~|...|)%3~%F{white} %# %b%f%k'
### ---- ZSH MODULES -----------------------------------
fpath+=$ZSH/zfunc
# enable completion features
autoload -Uz compinit
compinit -d ~/.cache/zcompdump
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' rehash true
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
# enable color support
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias diff='diff --color=auto'
alias ip='ip --color=auto'
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
# Take advantage of $LS_COLORS for completion as well
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
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 #')
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
#if [[ "$KITTY_TERM" -eq "TRUE" ]]
#then
# alias ssh="kitty +kitten ssh"
# alias tmux="export KITTY_TERM='TRUE'; tmux"
#fi
alias kssh="kitty +kitten ssh"
alias kimg="kitty +kitten icat"
# kdiff does not work on my system for some reason
#alias kdiff="kitty +kitten diff"
### --- zoxide Config ------------------------------------
if ! command -v zoxide &> /dev/null
then
# zoxide not installed, skipping
# do nothing
else
eval "$(zoxide init zsh)"
fi
### load unversioned zsh code
if [ -f ~/.zsh.local ]; then
source ~/.zsh.local
else
touch ~/.zsh.local
fi