From f4da6725670eb4fdbcce3309e9103dd5a45558bc Mon Sep 17 00:00:00 2001 From: Bryan Date: Sun, 24 Aug 2025 03:04:13 -0600 Subject: [PATCH] lnk: added 6 files --- .lnk | 6 + .zsh_history | 473 +++++++++++++++++++++++++++++++++++++++ .zsh_plugins.txt | 21 ++ .zsh_plugins.zsh | 22 ++ .zshenv | 98 ++++++++ .zshrc | 69 ++++++ .zshrc.d/aliases.zsh | 32 +++ .zshrc.d/colors.zsh | 18 ++ .zshrc.d/environment.zsh | 41 ++++ .zshrc.d/functions.zsh | 90 ++++++++ .zshrc.d/options.zsh | 19 ++ 11 files changed, 889 insertions(+) create mode 100644 .lnk create mode 100644 .zsh_history create mode 100644 .zsh_plugins.txt create mode 100644 .zsh_plugins.zsh create mode 100644 .zshenv create mode 100644 .zshrc create mode 100644 .zshrc.d/aliases.zsh create mode 100644 .zshrc.d/colors.zsh create mode 100644 .zshrc.d/environment.zsh create mode 100644 .zshrc.d/functions.zsh create mode 100644 .zshrc.d/options.zsh diff --git a/.lnk b/.lnk new file mode 100644 index 0000000..de86198 --- /dev/null +++ b/.lnk @@ -0,0 +1,6 @@ +.zsh_history +.zsh_plugins.txt +.zsh_plugins.zsh +.zshenv +.zshrc +.zshrc.d diff --git a/.zsh_history b/.zsh_history new file mode 100644 index 0000000..69b29a7 --- /dev/null +++ b/.zsh_history @@ -0,0 +1,473 @@ +: 1749751923:0;cp Recursive.zip ~/.local/share/fonts/Recursive +: 1755559858:0;tput blink +: 1755559867:0;tput init +: 1755559871:0;tput clear +: 1755559872:0;tput +: 1755560010:0;tput setaf 3 +: 1755560017:0;tput setaf 3; echo "hello" +: 1755560024:0;tput setaf 4; echo "hello" +: 1755560028:0;tput setaf 5; echo "hello" +: 1755560047:0;man tput +: 1755560240:0;tput home +: 1755560637:0;echo "\0338" +: 1755560659:0;echo "\033 7" +: 1755560662:0;echo "\033 8" +: 1755560665:0;fsdfssdf +: 1755566167:0;source functions.zsh +: 1755566230:0;man hash +: 1755566258:0;man bash +: 1755566504:0;docker compose up +: 1755566551:0;sudo docker compose up -d +: 1755567429:0;z .zshrc.d +: 1755567498:0;z /home/bryan/.librewolf/dm1fo3zh.default +: 1755567514:0;mcd chrome +: 1755567523:0;nvim userChrome.css +: 1755569638:0;z +: 1755569644:0;readlink +: 1755569647:0;readlink --help +: 1755569667:0;readlink -f Templates +: 1755570822:0;z setUI +: 1755570836:0;cat setUI.boot.js +: 1755570959:0;z banglejs-multi-timer +: 1755571051:0;cat tsconfig.json +: 1755571061:0;bat tsconfig.json +: 1755571135:0;cat package.json +: 1755571149:0;builtin cat package.json +: 1755571160:0;which cat +: 1755571164:0;whence cat +: 1755571177:0;hash cat +: 1755571203:0;man j +: 1755571206:0;man jq +: 1755571318:0;jq tsconfig.json +: 1755571330:0;cat tsconfig.json | jq +: 1755571346:0;apropos json +: 1755571419:0;cat nvim-genghis.json +: 1755571436:0;rip nvim-genghis.json +: 1755571441:0;cat cmdstopback.nvim.json +: 1755571447:0;rip cmdstopback.nvim.json +: 1755571451:0;cat copy-books +: 1755571483:0;mv copy-books ~/scripts +: 1755571505:0;ll +: 1755571538:0;z tt_2ch_media +: 1755571586:0;z hodd +: 1755571632:0;z get-fingerprint +: 1755571636:0;cat get-fingerprint.py +: 1755571672:0;z twilio +: 1755571677:0;cat requirements.txt +: 1755571685:0;z mgphoto +: 1755571722:0;z readme_files +: 1755571734:0;cat readme.md +: 1755571784:0;z ares +: 1755571875:0;z tmp +: 1755571878:0;rip tmp +: 1755571885:0;z apropos-sublime +: 1755571914:0;apropos xq +: 1755571929:0;cat apropos.sublime-syntax +: 1755571989:0;z caddy +: 1755571992:0;cat Caddyfile +: 1755572028:0;z mgmt +: 1755572043:0;z scrcpy +: 1755572084:0;z NebulaApp +: 1755572106:0;z play +: 1755572115:0;z lua_build +: 1755572126:0;cat package-lock.json +: 1755572194:0;z guesslang +: 1755572228:0;;s +: 1755572242:0;rip package-lock.json +: 1755572638:0;nvim notes.md +: 1755572833:0;git clone https://github.com/espruino/BangleApps.git +: 1755572920:0;z core +: 1755572956:0;git submodule update --init +: 1755573261:0;nvim README.md +: 1755573831:0;git remote add clone https://git.tnet.space/bryan/BangleApps.git +: 1755573863:0;git push -u clone main +: 1755573875:0;git push -u clone master +: 1755573963:0;git remote get-url +: 1755573966:0;git remote get-url --all +: 1755573979:0;git remote get-url --all origin +: 1755574013:0;git remote update +: 1755574020:0;man git remote +: 1755574692:0;bin/sanitycheck.js +: 1755574868:0;z tools +: 1755574917:0;cat _config.yml +: 1755574922:0;z examples +: 1755574925:0;cat uart.html +: 1755574933:0;bat uart.html +: 1755574951:0;open uart.html +: 1755575135:0;cat uart.js +: 1755609456:0;cat .gitmodules +: 1755609759:0;man git +: 1755609945:0;man git config +: 1755610094:0;git lsfiles +: 1755610104:0;git ls-files +: 1755610225:0;man git pull +: 1755610627:0;tldr git fetch +: 1755610683:0;man git fetch +: 1755611028:0;man git clone +: 1755611267:0;cat description +: 1755611292:0;z modules +: 1755611397:0;z . +: 1755611413:0;z bangle-dev/BangleApps +: 1755611418:0;z .git +: 1755611425:0;cat config +: 1755611447:0;cat index +: 1755611459:0;z hooks +: 1755611466:0;cat commit-msg.sample +: 1755611510:0;cat pre-commit.sample +: 1755611530:0;cat pre-rebase.sample +: 1755611568:0;cat pre-push.sample +: 1755611680:0;z branches +: 1755611682:0;la +: 1755611716:0;z info +: 1755611719:0;cat exclude +: 1755611736:0;z logs +: 1755611743:0;cat HEAD +: 1755611757:0;z regs +: 1755611760:0;z refs +: 1755611767:0;z heads +: 1755611769:0;cat master +: 1755611776:0;z .... +: 1755611785:0;z ../../../.. +: 1755668208:0;man git submodules +: 1755668232:0;man git submo +: 1755668875:0;z - +: 1755669844:0;z bangle-dev +: 1755669877:0;hash +: 1755669883:0;hashcat +: 1755669891:0;md5sum +: 1755669984:0;man md5sum +: 1755669993:0;man cksum +: 1755670041:0;cksum +: 1755670053:0;echo hello | cksum - +: 1755670062:0;echo hello | cksum +: 1755670090:0;echo 'hello' | cksum +: 1755670329:0;fd message +: 1755670348:0;man fdfind +: 1755670378:0;man -d0 message +: 1755670396:0;fd -d0 message +: 1755670401:0;fd -d1 message +: 1755692462:0;z ../.. +: 1755692539:0;mv bangle-dev bangle +: 1755692580:0;cat apps.txt +: 1755692589:0;mv apps.txt ../ +: 1755692596:0;cat notes.txt +: 1755692658:0;git remote add origin git@git.tnet.space:bryan/Bangle_MessageCenter.git +: 1755692667:0;man git push +: 1755692753:0;which explain +: 1755692763:0;explain git push -u +: 1755692787:0;explain 'git push -u' +: 1755692816:0;git push -u origin main +: 1755692824:0;git push -u origin master +: 1755692875:0;man gitsubmodules +: 1755692923:0;git submodule add git@git.tnet.space:bryan/Bangle_MessageCenter.git messagecenter +: 1755692999:0;git commit -m "Add messagecenter app as submodule" +: 1755693250:0;git remote +: 1755693255:0;git fetch origin +: 1755693267:0;git status origin +: 1755693301:0;git remote update origin +: 1755693313:0;git reflog +: 1755693541:0;gitui +: 1755695625:0;tar -xzf delta-0.18.2-x86_64-unknown-linux-gnu.tar.gz +: 1755695628:0;z delta-0.18.2-x86_64-unknown-linux-gnu +: 1755695633:0;./delta +: 1755695646:0;cat README.md +: 1755695714:0;dpkg -i git-delta_0.18.2_amd64.deb +: 1755695728:0;plz +: 1755695737:0;which delta +: 1755695740:0;man delta +: 1755696045:0;rg --json -C 2 bangle | delta +: 1755696081:0;rg bangle | delta +: 1755696092:0;rg bangle +: 1755696640:0;./create_apps_json.sh +: 1755696678:0;cat pre-publish.sh +: 1755696685:0;sudo apt install nodejs +: 1755696809:0;z proj +: 1755696811:0;z bangle +: 1755697376:0;z down +: 1755697390:0;mv icons8-chat-room-48.png ~/projects/bangle/messagecenter +: 1755697914:0;git commit -m "Add README and app icon." +: 1755697920:0;git push clone +: 1755697994:0;git submodule status +: 1755698101:0;z ../../ +: 1755698289:0;git commit -m "Update messagecenter.info to include app icon." +: 1755698395:0;cat messagecenter.info +: 1755698420:0;git submodule +: 1755698477:0;git submodule update messagecenter +: 1755698488:0;git submodule update +: 1755698494:0;z apps +: 1755698627:0;git submodule update --rebase +: 1755698631:0;git log +: 1755698658:0;man git submodule +: 1755698868:0;z apps/messagecenter/ +: 1755699626:0;z ../../.. +: 1755699837:0;git commit -m "Update info file" +: 1755699853:0;z BangleApps +: 1755699858:0;git submodule update --rebase --remote +: 1755699888:0;git commit -m "Update messagecenter" +: 1755699929:0;git stauts +: 1755780761:0;z messagecenter +: 1755781574:0;git rm icons8-chat-room-48.png +: 1755781655:0;git commit -m "Rename some things, fix metatadata.json?" +: 1755781681:0;git pull +: 1755781691:0;git submodule update --remote +: 1755781718:0;git commit -am "Update apps/messagecenter" +: 1755782100:0;z .bin +: 1755782231:0;cat .gitignore +: 1755782452:0;nvim +: 1755782478:0;git add . +: 1755782539:0;git commit -m "Remove appdates.csv from .gitignore, add appdates.csv to tracked files" +: 1755782613:0;z bin +: 1755782680:0;./pre-publish.sh +: 1755782815:0;z .. +: 1755782819:0;bin/pre-publish.sh +: 1755783742:0;cat appdates.csv +: 1755783754:0;git status +: 1755783765:0;git commit -am "Update appdates.csv" +: 1755783767:0;git push +: 1755784025:0;nvim +: 1755824396:0;sudo apt update +: 1755824537:0;sudo apt upgrade -y +: 1755825354:0;ssh tnet.space +: 1755825370:0;z projects +: 1755825374:0;z bangle +: 1755825389:0;z BangleApps +: 1755825394:0;git remote +: 1755825401:0;git fetch origin +: 1755825406:0;git status +: 1755825439:0;git status origin +: 1755825459:0;git pull origin +: 1755825469:0;git fetch origin master +: 1755825473:0;git status +: 1755825485:0;git branch +: 1755825501:0;git pull origin master +: 1755825538:0;git pull origin master --rebase +: 1755825551:0;git status +: 1755825587:0;git pull clone/master +: 1755825593:0;git pull +: 1755825600:0;git pull --rebase +: 1755825607:0;git status +: 1755825651:0;git push +: 1755825756:0;git remote set-branches +: 1755825786:0;git remote show clone +: 1755825803:0;git remote show origin +: 1755825878:0;git remote update +: 1755825945:0;git branch +: 1755862175:0;man git remote +: 1755862422:0;git ls-remote +: 1755862544:0;man git switch +: 1755862783:0;git ls-remote +: 1755862787:0;man git remote +: 1755862843:0;man git branch +: 1755862870:0;git branch -r +: 1755863052:0;man git branch +: 1755863066:0;git branch -r +: 1755863097:0;man git remote +: 1755863135:0;git branch -r +: 1755863183:0;git branch -r | \ +bat +: 1755863209:0;git branch -r | \ +bat --color-always +: 1755863216:0;git branch -r | \ +bat --color always +: 1755863234:0;git branch -r +: 1755863295:0;man git branch +: 1755863303:0;man git remote +: 1755863368:0;git remote set-head clone -a +: 1755863372:0;git remote +: 1755863378:0;git branch -r +: 1755863446:0;git fetch origin +: 1755863449:0;git status +: 1755863484:0;man git fetch +: 1755863680:0;git log +: 1755863748:0;git fetch origin +: 1755863756:0;man git fetch +: 1755863854:0;z .git +: 1755863858:0;z remotes +: 1755863881:0;z branches +: 1755863884:0;la +: 1755863885:0;z .. +: 1755863900:0;cat config +: 1755864038:0;z .. +: 1755864044:0;git fetch origin/master +: 1755864053:0;git fetch origin master +: 1755864058:0;git status +: 1755864137:0;git fetch origin master --refetch +: 1755864184:0;git status +: 1755865697:0;z ebooks +: 1755865724:0;open 'sketcher - Unknown.pdf' +: 1755866353:0;git branch +: 1755866356:0;git branch -r +: 1755866378:0;git checkout origin +: 1755866383:0;git status +: 1755866392:0;git checkout master +: 1755866456:0;git branch --all +: 1755866598:0;git branch --all | cat +: 1755866610:0;git merge origin/master +: 1755866702:0;git status +: 1755866716:0;git rebase +: 1755866755:0;git diff +: 1755866802:0;git status +: 1755866846:0;z apps/imc +: 1755866856:0;z .. +: 1755866859:0;git status +: 1755866867:0;z .. +: 1755866871:0;git add imc/app.js +: 1755866890:0;z apps +: 1755866892:0;git status +: 1755866896:0;git add imc/app.js +: 1755866899:0;git status +: 1755866921:0;git rebase --continue +: 1755866989:0;git status +: 1755866994:0;git add . +: 1755867006:0;git rebase --continue +: 1755867026:0;git status +: 1755867032:0;git add imc/app-icon.js +: 1755867036:0;git rebase --continue +: 1755867049:0;git status +: 1755867068:0;git rebase --abort +: 1755867070:0;git status +: 1755867082:0;git log +: 1755867093:0;z messagecenter +: 1755867096:0;z .. +: 1755868552:0;git status +: 1755868559:0;git log +: 1755868831:0;git status +: 1755868841:0;git reflog +: 1755868942:0;git push +: 1755868956:0;git log +: 1755869480:0;z .. +: 1755869484:0;z bin +: 1755869486:0;nvim +: 1755869717:0;z .. +: 1755869752:0;bin/create_apps_json.sh apps.json +: 1755869758:0;git status +: 1755869767:0;cat apps.json +: 1755869774:0;git log +: 1755869778:0;git status +: 1755869804:0;bin/create_apps_json.sh apps2.json +: 1755869807:0;git status +: 1755869814:0;diff apps.json apps2.json +: 1755869821:0;rm apps2.json +: 1755869823:0;git status +: 1755869844:0;bin/pre-publish.sh +: 1755872114:0;git status +: 1755872124:0;git commit -am "Update appdates.csv" +: 1755872127:0;git push +: 1755872566:0;z .. +: 1755872571:0;z books-synced +: 1755872576:0;la +: 1755872577:0;z .. +: 1755872587:0;rip books-synced +: 1755872611:0;z library +: 1755872616:0;z .. +: 1755872624:0;z ebooks +: 1755872817:0;z down +: 1755872866:0;z +: 1755872879:0;fd 'The Room' +: 1755872890:0;z down +: 1755872897:0;fd 'The Room' +: 1755872908:0;fd -e epub +: 1755872943:0;fd room +: 1755872948:0;z .. +: 1755872949:0;fd room +: 1755873051:0;apropos webdav +: 1755873056:0;z ebooks +: 1755873059:0;cadaver +: 1755873086:0;cadaver dav.tnet.space +: 1755873098:0;cadaver dav.tnet.space/ebooks +: 1755873120:0;cadaver https://dav.tnet.space +: 1755873292:0;rip '*' +: 1755958982:0;z down +: 1755959045:0;z doc +: 1755959047:0;z +: 1755959052:0;z Documents +: 1755959078:0;z down +: 1755959251:0;open https://crater.tnet.space/invoices/pdf/ODR8nvGjg8L2bLqp4m26 +: 1755959703:0;fd 044 +: 1755959751:0;z /tmp +: 1755959758:0;z mozilla_bryan0 +: 1755959769:0;cp INV-0044.pdf ~/Downloads +: 1755959771:0;z down +: 1755959787:0;pdf2jpg INV-0044.pdf +: 1755960016:0;sftp 172.16.1.64:2121 +: 1755960026:0;sftp 172.16.1.64 -p 2121 +: 1755960049:0;sftp -P 2121 172.16.1.64 +: 1755960069:0;ftp -P 2121 172.16.1.64 +: 1755960075:0;sftp -P 2121 172.16.1.64 +: 1755960173:0;sftp -P 2121 bryan@172.16.1.64 +: 1755960192:0;sftp -P 2121 admin@172.16.1.64 +: 1755960199:0;sftp -P 2121 admin@172.16.1.64/ +: 1755960203:0;sftp -P 2121 admin@172.16.1.64 +: 1755970687:0;unzip gitu-v0.34.0-x86_64-unknown-linux-gnu.zip +: 1755970691:0;z gitu-v0.34.0-x86_64-unknown-linux-gnu +: 1755970695:0;cat README.md +: 1755970705:0;ll +: 1755970711:0;chmod 755 gitu +: 1755970721:0;cp gitu ~/.local/bin +: 1755970723:0;gitu +: 1755970727:0;z +: 1755970729:0;z projects +: 1755970732:0;z bangle +: 1755970739:0;z BangleApps +: 1755970740:0;gitu +: 1756005099:0;z notes +: 1756005101:0;nvim +: 1756005126:0;nvim +: 1756005584:0;git remote +: 1756005593:0;git fetch origin master +: 1756005600:0;git log +: 1756005614:0;git diff +: 1756005632:0;git branch --all +: 1756013643:0;git reflog +: 1756013663:0;git rebase +: 1756013676:0;git rebase origin master +: 1756013704:0;git rebase --abort +: 1756013708:0;git log +: 1756013712:0;git remote +: 1756013716:0;git status +: 1756014226:0;\ +\ +curl -o install_vet.sh https://getvet.sh/install.sh\ +\ + +: 1756014237:0;mv install_vet.sh stage/ +: 1756014240:0;z stage +: 1756014245:0;cat install_vet.sh +: 1756014325:0;sh install_vet.sh +: 1756014330:0;plz +: 1756014387:0;vet \ +curl -sSL https://raw.githubusercontent.com/yarlson/lnk/main/install.sh +: 1756014443:0;cat install_vet.sh +: 1756014520:0;sh install_vet.sh --help +: 1756014527:0;vet --help +: 1756014738:0;command +: 1756014742:0;command --help +: 1756014746:0;command -v +: 1756014749:0;command -v bat +: 1756014767:0;man bash +: 1756014826:0;vet \ +curl -sSL https://raw.githubusercontent.com/yarlson/lnk/main/install.sh +: 1756014866:0;vet https://raw.githubusercontent.com/yarlson/lnk/main/install.sh +: 1756014955:0;which lnk +: 1756014957:0;z +: 1756025639:0;go install github.com/marwanhawari/stew@latest +: 1756025747:0;stew install junegunn/fzf +: 1756025779:0;which fzf +: 1756025787:0;sk +: 1756025799:0;stew search skim +: 1756025820:0;which skim +: 1756025824:0;which sk +: 1756025836:0;whence sk +: 1756025843:0;whence -p sk +: 1756025859:0;skim uninstall fzf +: 1756025882:0;stew uninstall fzf +: 1756025886:0;stew ls +: 1756025901:0;stew list +: 1756025962:0;stew install stew +: 1756025969:0;stew search stew +: 1756026063:0;which vet +: 1756026083:0;stew install vet-run/vet +: 1756026110:0;stew ls +: 1756026120:0;stew uninstall install.sh +: 1756026190:0;lnk init +: 1756026253:0;lnk add .zsh* diff --git a/.zsh_plugins.txt b/.zsh_plugins.txt new file mode 100644 index 0000000..2a096c0 --- /dev/null +++ b/.zsh_plugins.txt @@ -0,0 +1,21 @@ +# vim: set filetype=sh nospell : + +mattmc3/zephyr path:plugins/color +mattmc3/zephyr path:plugins/completion +mattmc3/zephyr path:plugins/editor +mattmc3/zephyr path:plugins/zfunctions + +zsh-users/zsh-autosuggestions + +zsh-users/zsh-history-substring-search + +3v1n0/zsh-bash-completions-fallback + +Sam-programs/zsh-calc + +MichaelAquilina/zsh-you-should-use + +mattmc3/zman + +# NOTE: syntax highlighting needs to be last +zdharma-continuum/fast-syntax-highlighting diff --git a/.zsh_plugins.zsh b/.zsh_plugins.zsh new file mode 100644 index 0000000..a4eef5d --- /dev/null +++ b/.zsh_plugins.zsh @@ -0,0 +1,22 @@ +fpath+=( $HOME/.cache/antidote/mattmc3/zephyr/plugins/color ) +source $HOME/.cache/antidote/mattmc3/zephyr/plugins/color/color.plugin.zsh +fpath+=( $HOME/.cache/antidote/mattmc3/zephyr/plugins/completion ) +source $HOME/.cache/antidote/mattmc3/zephyr/plugins/completion/completion.plugin.zsh +fpath+=( $HOME/.cache/antidote/mattmc3/zephyr/plugins/editor ) +source $HOME/.cache/antidote/mattmc3/zephyr/plugins/editor/editor.plugin.zsh +fpath+=( $HOME/.cache/antidote/mattmc3/zephyr/plugins/zfunctions ) +source $HOME/.cache/antidote/mattmc3/zephyr/plugins/zfunctions/zfunctions.plugin.zsh +fpath+=( $HOME/.cache/antidote/zsh-users/zsh-autosuggestions ) +source $HOME/.cache/antidote/zsh-users/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh +fpath+=( $HOME/.cache/antidote/zsh-users/zsh-history-substring-search ) +source $HOME/.cache/antidote/zsh-users/zsh-history-substring-search/zsh-history-substring-search.plugin.zsh +fpath+=( $HOME/.cache/antidote/3v1n0/zsh-bash-completions-fallback ) +source $HOME/.cache/antidote/3v1n0/zsh-bash-completions-fallback/zsh-bash-completions-fallback.plugin.zsh +fpath+=( $HOME/.cache/antidote/Sam-programs/zsh-calc ) +source $HOME/.cache/antidote/Sam-programs/zsh-calc/zsh-calc.zsh +fpath+=( $HOME/.cache/antidote/MichaelAquilina/zsh-you-should-use ) +source $HOME/.cache/antidote/MichaelAquilina/zsh-you-should-use/zsh-you-should-use.plugin.zsh +fpath+=( $HOME/.cache/antidote/mattmc3/zman ) +source $HOME/.cache/antidote/mattmc3/zman/zman.plugin.zsh +fpath+=( $HOME/.cache/antidote/zdharma-continuum/fast-syntax-highlighting ) +source $HOME/.cache/antidote/zdharma-continuum/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh diff --git a/.zshenv b/.zshenv new file mode 100644 index 0000000..12042cd --- /dev/null +++ b/.zshenv @@ -0,0 +1,98 @@ +# vim: set filetype=sh nospell: + +export STOW_DIR="$HOME/.local/stow" +# export SKIM_DEFAULT_OPTIONS='--bind="ctrl-k:up" --bind="ctrl-j:down"' + +## Set XDG directories +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_STATE_HOME="$HOME/.local/state" +export XDG_CACHE_HOME="$HOME/.cache" + +export XDG_DATA_DIRS="/usr/local/share:/usr/share" +export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share/applications" + +# Desktop files (used by desktop environments within both X11 and Wayland) are +# # looked for in XDG_DATA_DIRS; make sure it includes the relevant directory for +# # snappy applications' desktop files. +snap_xdg_path="/var/lib/snapd/desktop" +if [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}}" ] && [ -n "${XDG_DATA_DIRS##*${snap_xdg_path}:*}" ]; then + export XDG_DATA_DIRS="${XDG_DATA_DIRS}:${snap_xdg_path}" +fi + +# set XDG_DATA_DIRS to include Flatpak installations +if command -v flatpak >/dev/null; then + + new_dirs=$( + ( + unset G_MESSAGES_DEBUG + echo "${XDG_DATA_HOME:-"$HOME/.local/share"}/flatpak" + GIO_USE_VFS=local flatpak --installations + ) | ( + new_dirs= + while read -r install_path; do + share_path=$install_path/exports/share + case ":$XDG_DATA_DIRS:" in + *":$share_path:"*) : ;; + *":$share_path/:"*) : ;; + *) new_dirs=${new_dirs:+${new_dirs}:}$share_path ;; + esac + done + echo "$new_dirs" + ) + ) + + export XDG_DATA_DIRS + XDG_DATA_DIRS="${new_dirs:+${new_dirs}:}${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +fi + +# lua library paths +# eval "$(luarocks-5.4 path --bin)" + +## Path for go(lang) +# Go compiler: +path+="/usr/local/go/bin" +# Local go programs +export GOPATH="$HOME/go" +path+=$GOPATH/bin + +## Personal scripts +path+="$HOME/scripts" + +if [ -d "$HOME/bin" ]; then + path+=$HOME/bin +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ]; then + path+=$HOME/.local/bin +fi + +# git-fuzzy path +path+=$HOME/scripts/git-fuzzy/bin + +# set PATH so it includes cargo if it exists +if [ -d "$HOME/.cargo/bin" ]; then + path+=/home/bryan/.cargo/bin +fi + +. "$HOME/.cargo/env" + +## lua +## luaenv +# see: https://github.com/cehoffman/luaenv +# +# Install luaenv: +# git clone https://github.com/cehoffman/luaenv.git ~/.luaenv +# +# Install lua-build plugin: +# git clone https://github.com/cehoffman/lua-build.git ~/.luaenv/plugins/lua-build +# +# Install luaenv-luarocks: +# git clone https://github.com/xpol/luaenv-luarocks.git ~/.luaenv/plugins/luaenv-luarocks +# +path+="$HOME/.luaenv/bin" +eval "$(luaenv init -)" + +# Add all directories under ~/lua to path +path+=$(ls -Dd $HOME/lua/*) diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..fdc1536 --- /dev/null +++ b/.zshrc @@ -0,0 +1,69 @@ +# vim: set filetype=sh nospell : +# + +# Clone antidote ( https://antidote.sh ) +[[ -d ${ZDOTDIR:-~}/.antidote ]] || + git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote +# source antidote +source ${ZDOTDIR:-~}/.antidote/antidote.zsh +zstyle ':antidote:bundle' use-friendly-names 'yes' +antidote load + +plugins+=(fzf) + +export PAGER='ov' +export VISUAL='nvim' +export EDITOR='nvim' + +export MANPAGER="sh -c 'col -bx | bat -l man -p'" +export MANROFFOPT="-c" + +export BAT_PAGER="ov -FX" + +## zoxide stuff - zoxide is a better cd utility +eval "$(zoxide init zsh)" + +## starship +eval "$(starship init zsh)" + +## FZF extras +[[ -e "$HOME/.fzf-extras/fzf-extras.sh" ]] && + source "$HOME/.fzf-extras/fzf-extras.sh" + +# set vi mode +bindkey -v +# set ctrl-p and ctrl-n for vi insert mode +bindkey -v '^P' history-substring-search-up #up-history +bindkey -v '^N' history-substring-search-down #down-history + +# mattmc3/zephyr path:plugins/editor +bindkey '^Z' symmetric-ctrl-z +bindkey '^S' prepend-sudo + +# Alt+Enter +# To make shift+enter work in zsh we map Shift+Enter to Alt+Enter in kitty. +# There are autocommands in Neovim that set a user variable in kitty when we are in Neovim and unsets it when we exit. +# This allows us to unmap Shift+Enter in kitty when inside Neovim. +# By doing this we can use Shift+Enter for `forward-word`, which is autosuggest partial accept +# in the autosuggest plugin in zsh, without interfering with the mapping in nvim. +bindkey '^[^M' forward-word +# bindkey '^R' fzf-history-widget + +# Source anything in .zshrc.d. +for _rc in ${ZDOTDIR:-$HOME}/.zshrc.d/*.zsh; do + # Ignore tilde files. + if [[ $_rc:t != '~'* ]]; then + source "$_rc" + fi +done +unset _rc + +# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh +# Source skim keybindings. Skim repo is cloned into stow directory +# so we can use stow to install the man page. The stow binary still has +# to be installed seperately. +source "$STOW_DIR/skim/shell/key-bindings.zsh" + +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 diff --git a/.zshrc.d/aliases.zsh b/.zshrc.d/aliases.zsh new file mode 100644 index 0000000..0d0df00 --- /dev/null +++ b/.zshrc.d/aliases.zsh @@ -0,0 +1,32 @@ +# vim: set filetype=sh nospell: + +## Use the kitty ssh kitten so that terminfo will be copied over to the remote +## otherwise the remote doesn't recognize kitty terminal +alias ssh="kitten ssh" +alias mosh='mosh --ssh="kitten ssh"' + +# Show process names by default with pgrep +alias pgrep='pgrep -l' + +# Use ov as less +alias less=ov + +alias fd=fdfind + +# Use eza as ls +alias la="eza -a --sort time" +alias ls="eza --sort time" +alias ll="eza -l --sort time" +alias lsd="eza -D" +alias lsf="eza -f" + +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +## Use main clipbard by default with xclip +alias xclip="xclip -selection clipboard" diff --git a/.zshrc.d/colors.zsh b/.zshrc.d/colors.zsh new file mode 100644 index 0000000..388e08f --- /dev/null +++ b/.zshrc.d/colors.zsh @@ -0,0 +1,18 @@ +COLOR_1='\033[1;34m' # Primary color +COLOR_2='\033[0;96m' # Secondary color +COLOR_LIGHT='\033[2m' + +COLOR_ERROR='\033[1;31m' +COLOR_WARN='\033[0;33m' +COLOR_SUCCESS='\033[0;32m' + +TEXT_RESET='\033[0m' +TEXT_ITAL='\e[3m' +TEXT_ULINE='\e[4m' + +CYAN_B='\033[1;96m' +YELLOW='\033[0;93m' +RED_B='\033[1;31m' +GREEN='\033[0;32m' +PURPLE='\033[0;35m' + diff --git a/.zshrc.d/environment.zsh b/.zshrc.d/environment.zsh new file mode 100644 index 0000000..153941f --- /dev/null +++ b/.zshrc.d/environment.zsh @@ -0,0 +1,41 @@ +# vim: set filetype=sh nospell: + +# Set language. +export LANG=${LANG:-en_US.UTF-8} + +# Reduce key delay +export KEYTIMEOUT=${KEYTIMEOUT:-1} + +# Ensure path arrays do not contain duplicates. +typeset -gU cdpath fpath mailpath path + +### History settings ### +setopt BANG_HIST # Treat the '!' character specially during expansion. +setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format. +setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history. +setopt HIST_FIND_NO_DUPS # Do not display a previously found event. +setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate. +setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again. +setopt HIST_IGNORE_SPACE # Do not record an event starting with a space. +setopt HIST_REDUCE_BLANKS # Remove extra blanks from commands added to the history list. +setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file. +setopt HIST_VERIFY # Do not execute immediately upon history expansion. +setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. +setopt NO_HIST_BEEP # Don't beep when accessing non-existent history. +setopt NO_SHARE_HISTORY # Don't share history between all sessions. +setopt HIST_REDUCE_BLANKS # Remove superfluous blanks from each command line being added to the history. + +export HIST_STAMPS="yyyy-mm-dd" +export HISTFILE=~/.zsh_history +export HISTORY_IGNORE="(ls|cd|pwd|exit|fg|hstr)*" +export SAVEHIST=1000 # increase history file size (default is 500) +export HISTSIZE=1000 # increase history size (default is 500) + +export HSTR_CONFIG=prompt-bottom,hicolor,raw-history-view +export HSTR_PROMPT=">" + +# for `zsh-users/zsh-history-substring-search` plugin +HISTORY_SUBSTRING_SEARCH_PREFIXED=1 # Match against the start of each history entry. + +# for `Sam-programs/zsh-calc` plugin +CALC_CMD="qalc -t -c -f <(echo \$BUFFER)" diff --git a/.zshrc.d/functions.zsh b/.zshrc.d/functions.zsh new file mode 100644 index 0000000..b638399 --- /dev/null +++ b/.zshrc.d/functions.zsh @@ -0,0 +1,90 @@ +# vim: set filetype=sh nospell: + +source ~/.zshrc.d/colors.zsh + +## Use bat as cat, except use glow for Markdown files +function cat() { + if [[ $# -eq 1 ]]; then + extension=$([[ "$1" = *.* ]] && echo ".${1##*.}" || echo '') + if [[ "$extension" == ".md" ]]; then + glow --pager -w0 $1 + elif [[ "$extension" == ".html" ]]; then + reader $1 | ov + elif [[ "$extension" == ".json" ]]; then + bat $1 | jq --color-output | bat + else + bat $1 + fi + else + bat $@ + fi +} + +## Use bat to colorize help text +## alias bathelp='bat --plain --language=help' +function help() { + "$@" --help 2>&1 | bat --plain --language=help +} + +## If there is no man page for given command then use help +function man() { + $(whence -p man) $@ + [[ $? -ne 0 ]] && help $1 || true +} + +## Syntax highlighting for apropos +function apropos() { + $(whence -p apropos) "$@" | bat +} + +## Make directory and cd into it +function mcd() { + mkdir $@ + cd $_ +} + +## List dot files +function lsdot() { + eza -d $@ .??* 2>/dev/null +} + +## Wrapper for yazi to provide ability to change current working directory when exiting yazi +function y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + builtin cd -- "$cwd" + fi + rm -f -- "$tmp" +} + +function hstr() { + local cmd_file="$(mktemp -t "hist-cmd.XXXXXX")" + 1>&2 2>"$cmd_file" /usr/bin/hstr + + local cmd="$(cat $cmd_file)" + echo "$cmd" >>"$HISTFILE" + echo "$cmd" + eval "$cmd" + rm "$cmd_file" +} + +# set kitty user var `in_editor` when inside sk (skim fuzzy finder) +# need to use whence to find path of executible, functions can be recursive +# so if we don't do this it will just keep calling the sk() function +function sk() { + kitten @ set-user-var in_editor=1 + $(whence -p sk) "$@" + kitten @ set-user-var in_editor +} + +function fzf() { + echo "fzf not installed, using sk (skim)" + sk +} + +function plz() { + last_command=$(fc -l -n -1) + echo "${COLOR_1}Okay, ${COLOR_SUCCESS}${TEXT_ITAL}sudo${TEXT_RESET} ${COLOR_SUCCESS}${last_command}. ${COLOR_1}You're welcome.${TEXT_RESET}" + echo "$last_command" | xargs sudo +} diff --git a/.zshrc.d/options.zsh b/.zshrc.d/options.zsh new file mode 100644 index 0000000..6bf237b --- /dev/null +++ b/.zshrc.d/options.zsh @@ -0,0 +1,19 @@ +# vim: set filetype=sh nospell: + +setopt extended_glob # Use extended globbing syntax (#,~,^). +setopt glob_dots # Don't hide dotfiles from glob patterns. +setopt NO_rm_star_silent # Ask for confirmation for `rm *' or `rm path/*' + +setopt combining_chars # Combine 0-len chars with the base character (eg: accents). +setopt interactive_comments # Enable comments in interactive shell. +setopt rc_quotes # Allow 'Hitchhikers''s Guide' instead of 'Hitchhikers'\''s Guide'. +setopt NO_mail_warning # Don't print a warning message if a mail file has been accessed. +setopt NO_beep # Don't beep on error in line editor. + +# Set Zsh options related to job control. +setopt auto_resume # Attempt to resume existing job before creating a new process. +setopt long_list_jobs # List jobs in the long format by default. +setopt notify # Report status of background jobs immediately. +setopt NO_bg_nice # Don't run all background jobs at a lower priority. +setopt NO_check_jobs # Don't report on jobs when shell exit. +setopt NO_hup # Don't kill jobs on shell exit.