├── .gitignore ├── .vscode ├── custom-vscode-styles.css └── settings.json ├── Brewfile ├── Caskfile ├── LICENSE.md ├── README.md ├── bin ├── GLM.NextGroup.sh ├── GLM.PrevGroup.sh ├── SyncMusic.sh ├── artFileTool ├── batcharge.py ├── cheat_sheet.sh ├── dot ├── e ├── extractFSB5toAT9 ├── flushdns ├── fsbext ├── git-all ├── git-amend ├── git-copy-branch-name ├── git-credit ├── git-delete-local-merged ├── git-nuke ├── git-open ├── git-promote ├── git-rank-contributors ├── git-sub ├── git-track ├── git-undo ├── git-unpushed ├── git-unpushed-stat ├── git-up ├── git-wtf ├── gitio ├── go ├── headers ├── imgur-screenshot ├── managed-prefs ├── matrix.sh ├── movieme ├── numi-cli ├── photorec ├── rmeAdiCurrentVolume ├── rmeAdiMidiControl.sh ├── search ├── splitNSP.py ├── switch-cleanup ├── switch-fluffy ├── switch-smash-atmosphere ├── switch-smash-hekate ├── switch-tinfoil ├── switch-tools ├── switch-usb-loader ├── switch │ ├── .editorconfig │ ├── README.md │ ├── fluffy.pyw │ ├── fusee-launcher.py │ ├── fusee.bin │ ├── hekate.bin │ ├── intermezzo.S │ ├── intermezzo.bin │ ├── intermezzo.lds │ ├── libusbK.py │ ├── modchipd.sh │ ├── ns-usbloader-4.3.jar │ ├── requirements.txt │ └── usb_install_pc.py ├── testdisk ├── todo ├── vid-gif.sh └── volcontrol.sh ├── config.symlink ├── MusicBrainz │ ├── .Picard.ini.synclock │ └── Picard.ini ├── btop │ └── btop.conf ├── fastfetch │ ├── config.jsonc │ ├── profile.jpg │ └── rustmesa_pj.gif ├── fish │ ├── aliases.fish │ ├── completions │ │ ├── fisher.fish │ │ └── tide.fish │ ├── conf.d │ │ ├── _tide_init.fish │ │ ├── abbr_tips.fish │ │ ├── autopair.fish │ │ ├── done.fish │ │ └── sponge.fish │ ├── config.fish │ ├── fish_plugins │ ├── fish_variables │ └── functions │ │ ├── __abbr_tips_bind_newline.fish │ │ ├── __abbr_tips_bind_space.fish │ │ ├── __abbr_tips_clean.fish │ │ ├── __abbr_tips_init.fish │ │ ├── _autopair_backspace.fish │ │ ├── _autopair_insert_left.fish │ │ ├── _autopair_insert_right.fish │ │ ├── _autopair_insert_same.fish │ │ ├── _autopair_tab.fish │ │ ├── _sponge_clear_state.fish │ │ ├── _sponge_on_exit.fish │ │ ├── _sponge_on_postexec.fish │ │ ├── _sponge_on_preexec.fish │ │ ├── _sponge_on_prompt.fish │ │ ├── _sponge_remove_from_history.fish │ │ ├── _tide_1_line_prompt.fish │ │ ├── _tide_2_line_prompt.fish │ │ ├── _tide_cache_variables.fish │ │ ├── _tide_detect_os.fish │ │ ├── _tide_find_and_remove.fish │ │ ├── _tide_fish_colorize.fish │ │ ├── _tide_item_aws.fish │ │ ├── _tide_item_character.fish │ │ ├── _tide_item_cmd_duration.fish │ │ ├── _tide_item_context.fish │ │ ├── _tide_item_crystal.fish │ │ ├── _tide_item_direnv.fish │ │ ├── _tide_item_distrobox.fish │ │ ├── _tide_item_docker.fish │ │ ├── _tide_item_elixir.fish │ │ ├── _tide_item_gcloud.fish │ │ ├── _tide_item_git.fish │ │ ├── _tide_item_go.fish │ │ ├── _tide_item_java.fish │ │ ├── _tide_item_jobs.fish │ │ ├── _tide_item_kubectl.fish │ │ ├── _tide_item_nix_shell.fish │ │ ├── _tide_item_node.fish │ │ ├── _tide_item_os.fish │ │ ├── _tide_item_php.fish │ │ ├── _tide_item_private_mode.fish │ │ ├── _tide_item_pulumi.fish │ │ ├── _tide_item_python.fish │ │ ├── _tide_item_ruby.fish │ │ ├── _tide_item_rustc.fish │ │ ├── _tide_item_shlvl.fish │ │ ├── _tide_item_status.fish │ │ ├── _tide_item_terraform.fish │ │ ├── _tide_item_time.fish │ │ ├── _tide_item_toolbox.fish │ │ ├── _tide_item_vi_mode.fish │ │ ├── _tide_item_zig.fish │ │ ├── _tide_parent_dirs.fish │ │ ├── _tide_print_item.fish │ │ ├── _tide_pwd.fish │ │ ├── _tide_remove_unusable_items.fish │ │ ├── _tide_sub_bug-report.fish │ │ ├── _tide_sub_configure.fish │ │ ├── _tide_sub_reload.fish │ │ ├── fish_mode_prompt.fish │ │ ├── fish_prompt.fish │ │ ├── fisher.fish │ │ ├── sponge_filter_failed.fish │ │ ├── sponge_filter_matched.fish │ │ ├── tide.fish │ │ └── tide │ │ └── configure │ │ ├── choices │ │ ├── all │ │ │ ├── finish.fish │ │ │ ├── icons.fish │ │ │ ├── prompt_colors.fish │ │ │ ├── prompt_connection.fish │ │ │ ├── prompt_connection_andor_frame_color.fish │ │ │ ├── prompt_spacing.fish │ │ │ ├── show_time.fish │ │ │ ├── style.fish │ │ │ └── transient.fish │ │ ├── classic │ │ │ ├── classic_prompt_color.fish │ │ │ └── classic_prompt_separators.fish │ │ ├── lean │ │ │ └── lean_prompt_height.fish │ │ ├── powerline │ │ │ ├── powerline_prompt_heads.fish │ │ │ ├── powerline_prompt_style.fish │ │ │ ├── powerline_prompt_tails.fish │ │ │ └── powerline_right_prompt_frame.fish │ │ └── rainbow │ │ │ └── rainbow_prompt_separators.fish │ │ ├── configs │ │ ├── classic.fish │ │ ├── classic_16color.fish │ │ ├── lean.fish │ │ ├── lean_16color.fish │ │ ├── rainbow.fish │ │ └── rainbow_16color.fish │ │ ├── functions │ │ ├── _fake_tide_cache_variables.fish │ │ ├── _fake_tide_item_character.fish │ │ ├── _fake_tide_item_cmd_duration.fish │ │ ├── _fake_tide_item_git.fish │ │ ├── _fake_tide_item_newline.fish │ │ ├── _fake_tide_item_os.fish │ │ ├── _fake_tide_item_time.fish │ │ ├── _fake_tide_print_item.fish │ │ ├── _fake_tide_prompt.fish │ │ └── _fake_tide_pwd.fish │ │ └── icons.fish ├── github-copilot │ ├── fallbackContextProviderDocumentSymbols │ │ ├── def87251-c0d3-43e6-886d-189d78f608d4.db │ │ ├── def87251-c0d3-43e6-886d-189d78f608d4.db-shm │ │ └── def87251-c0d3-43e6-886d-189d78f608d4.db-wal │ └── symbolDatabaseLookup.json ├── glow │ └── glow.yml ├── iterm2 │ ├── 1.itermcolors │ ├── AppSupport │ ├── Ciapre.itermcolors │ ├── Dracula Refined.itermcolors │ ├── MaterialDarker.itermcolors │ ├── catppuccin-mocha.itermcolors │ ├── palenight.itermcolors │ ├── rose-pine-dawn.itermcolors │ ├── rose-pine-moon.itermcolors │ ├── rose-pine.itermcolors │ └── tokyo-night.itermcolors ├── karabiner │ ├── assets │ │ └── complex_modifications │ │ │ └── 1600179162.json │ ├── automatic_backups │ │ ├── karabiner_20240419.json │ │ ├── karabiner_20241029.json │ │ ├── karabiner_20250301.json │ │ ├── karabiner_20250303.json │ │ └── karabiner_20250316.json │ ├── configstore │ │ ├── google-translate-api.json │ │ ├── nodemon.json │ │ └── update-notifier-npm.json │ └── karabiner.json ├── lla │ ├── config.toml │ └── themes │ │ ├── ayu_dark.toml │ │ ├── ayu_light.toml │ │ ├── ayu_mirage.toml │ │ ├── catppuccin_mocha.toml │ │ ├── circuit_dreams.toml │ │ ├── cosmic_night.toml │ │ ├── dark.toml │ │ ├── deep_sea.toml │ │ ├── default.toml │ │ ├── dracula.toml │ │ ├── forest_depths.toml │ │ ├── gruvbox_dark.toml │ │ ├── light.toml │ │ ├── material_ocean.toml │ │ ├── moonlight.toml │ │ ├── neon_dreams.toml │ │ ├── nord.toml │ │ ├── one_dark.toml │ │ ├── poimandres.toml │ │ ├── synthwave_84.toml │ │ ├── tokyo_night.toml │ │ ├── vesper.toml │ │ └── zen.toml ├── mc │ ├── ini │ ├── mc.ext.ini │ ├── menu │ └── panels.ini ├── raycast │ ├── config.json │ └── scripts │ │ ├── Camelcase.py │ │ ├── Create Symbolic Link.sh │ │ ├── Disk Free.sh │ │ ├── Flush DNS.sh │ │ ├── Open iTerm from Finder.applescript │ │ ├── assets │ │ ├── 1.circle.fill.svg │ │ ├── 2.circle.fill.svg │ │ ├── 3.circle.fill.svg │ │ ├── 4.circle.fill.svg │ │ ├── 5.circle.fill.svg │ │ ├── 6.circle.fill.svg │ │ ├── 7.circle.fill.svg │ │ ├── arrow.clockwise.circle.fill.svg │ │ ├── folder.fill.svg │ │ ├── link.badge.plus.svg │ │ ├── rectangle.bottomhalf.inset.filled.svg │ │ ├── rectangle.center.inset.filled.svg │ │ ├── rectangle.inset.bottomleft.filled.svg │ │ ├── rectangle.inset.bottomright.filled.svg │ │ ├── rectangle.inset.topleft.filled.svg │ │ ├── rectangle.inset.topright.filled.svg │ │ ├── rectangle.lefthalf.inset.filled.svg │ │ ├── rectangle.righthalf.inset.filled.svg │ │ ├── rectangle.tophalf.inset.filled.svg │ │ ├── rectangle.trailinghalf.inset.filled.arrow.trailing.svg │ │ └── yabai.png │ │ ├── yabai-cycle-windows-on-space.sh │ │ ├── yabai-float-window.sh │ │ ├── yabai-focus-space-1.sh │ │ ├── yabai-focus-space-2.sh │ │ ├── yabai-focus-space-3.sh │ │ ├── yabai-focus-space-4.sh │ │ ├── yabai-focus-space-5.sh │ │ ├── yabai-focus-space-6.sh │ │ ├── yabai-focus-space-7.sh │ │ ├── yabai-maximize-window.sh │ │ ├── yabai-mirror-x.sh │ │ ├── yabai-mirror-y.sh │ │ ├── yabai-move-floating-windows-bottomhalf.sh │ │ ├── yabai-move-floating-windows-bottomleft.sh │ │ ├── yabai-move-floating-windows-bottomright.sh │ │ ├── yabai-move-floating-windows-center.sh │ │ ├── yabai-move-floating-windows-lefthalf.sh │ │ ├── yabai-move-floating-windows-righthalf.sh │ │ ├── yabai-move-floating-windows-tophalf.sh │ │ ├── yabai-move-floating-windows-topleft.sh │ │ ├── yabai-move-floating-windows-topright.sh │ │ ├── yabai-move-window.sh │ │ ├── yabai-reload-config.sh │ │ ├── yabai-restart-service.sh │ │ ├── yabai-swap-windows.sh │ │ ├── yabai-toggle-split.sh │ │ ├── yabai-toggle-stack-bsp.sh │ │ ├── yabai-tools.sh │ │ ├── yabai-window-size-decrease.sh │ │ └── yabai-window-size-increase.sh ├── sketchybar │ ├── colors.sh │ ├── globalstyles.sh │ ├── icons.sh │ ├── items │ │ ├── apple.sh │ │ ├── battery.sh │ │ ├── brew.sh │ │ ├── brew_script.sh │ │ ├── control_center.sh │ │ ├── countdown.sh │ │ ├── datetime.sh │ │ ├── diskmonitor.sh │ │ ├── dnd.sh │ │ ├── front_app.sh │ │ ├── mail.sh │ │ ├── messages.sh │ │ ├── music.sh │ │ ├── reminders.sh │ │ ├── spacer.sh │ │ ├── spaces.sh │ │ ├── spaces_simple.sh │ │ ├── stress.sh │ │ ├── things3.sh │ │ ├── transmission.sh │ │ ├── volume.sh │ │ ├── weather.sh │ │ ├── wifi.sh │ │ └── yabai.sh │ ├── plugins │ │ ├── Countdown.sh │ │ ├── app_icon.sh │ │ ├── app_space.sh │ │ ├── app_space_simple.sh │ │ ├── battery.sh │ │ ├── brew.sh │ │ ├── brightness.sh │ │ ├── diskmonitor.sh │ │ ├── dnd.sh │ │ ├── dndindicator.sh │ │ ├── front_app.sh │ │ ├── mail.sh │ │ ├── messages.sh │ │ ├── moode.sh │ │ ├── music.sh │ │ ├── music │ │ │ ├── Cover-Default.png │ │ │ └── Get-Artwork.applescript │ │ ├── nextevent.applescript │ │ ├── nextevent.sh │ │ ├── pia.sh │ │ ├── reminders.sh │ │ ├── stress.py │ │ ├── stress.sh │ │ ├── things3.sh │ │ ├── transmission.sh │ │ ├── volume.sh │ │ ├── volume_click.sh │ │ ├── weather.sh │ │ ├── wifi.sh │ │ └── yabai.sh │ ├── sketchybarrc │ └── window_title.dat ├── ubersicht │ ├── Link.sh │ ├── NextEvent.widget │ │ ├── NextEvent.applescript │ │ └── index.coffee │ ├── Playbox.widget │ │ ├── index.coffee │ │ └── lib │ │ │ ├── default.png │ │ │ ├── getCurrentSong.applescript │ │ │ ├── getCurrentSongMusic.applescript │ │ │ ├── getCurrentSongPlexamp.applescript │ │ │ └── getCurrentSongSpotify.applescript │ ├── Strava.widget │ │ ├── Strava.applescript │ │ └── index.coffee │ └── Strip-Calendar.coffee ├── wtf │ ├── config.yml │ └── log.txt └── yabai │ ├── create_spaces.sh │ ├── cycle_windows.sh │ ├── float_if_one_window.sh │ ├── float_small_windows.sh │ ├── float_window.sh │ ├── move-floating-windows.sh │ ├── reload.sh │ ├── resize_window.sh │ ├── restore_windows.sh │ ├── swap-windows.sh │ ├── update.sh │ ├── yabai-tools.sh │ └── yabairc ├── git ├── aliases.zsh ├── completion.zsh ├── gitconfig.symlink └── gitignore.symlink ├── homebrew └── install.sh ├── macos ├── install.sh ├── set-defaults.sh └── shortcuts.sh ├── nano ├── nano.symlink │ ├── Readme.rst │ ├── apacheconf.nanorc │ ├── asm.nanorc │ ├── c.nanorc │ ├── cmake.nanorc │ ├── conf.nanorc │ ├── css.nanorc │ ├── cython.nanorc │ ├── fish.nanorc │ ├── fortran.nanorc │ ├── gentoo.nanorc │ ├── git.nanorc │ ├── gitcommit.nanorc │ ├── groff.nanorc │ ├── haml.nanorc │ ├── html.nanorc │ ├── java.nanorc │ ├── js.nanorc │ ├── lua.nanorc │ ├── man.nanorc │ ├── markdown.nanorc │ ├── mutt.nanorc │ ├── nanorc.nanorc │ ├── patch.nanorc │ ├── perl.nanorc │ ├── php.nanorc │ ├── pkgbuild.nanorc │ ├── pov.nanorc │ ├── python.nanorc │ ├── reST.nanorc │ ├── ruby.nanorc │ ├── sh.nanorc │ ├── tex.nanorc │ ├── xml.nanorc │ └── zshrc.nanorc └── nanorc.symlink ├── script ├── bootstrap └── install ├── ssh ├── config.symlink └── install.sh ├── system ├── Piotr.crontab ├── Piotr.terminal ├── _path.zsh ├── aliases.zsh ├── env.zsh ├── grc.zsh └── keys.zsh ├── xcode └── aliases.zsh └── zsh ├── aliases.zsh ├── completion.zsh ├── completion.zsh.zwc ├── config.zsh ├── path.zsh ├── themes ├── 1_shell.omp.json ├── agnosterplus.omp.json ├── catppuccin_frappe.omp.json ├── catppuccin_mocha.omp.json ├── catppuccin_mocha.omp.json.bak ├── dracula.omp.json ├── material-palenight.omp.json └── pe8er.omp.json ├── zshrc-backup-pre-oh-my-zsh.symlink ├── zshrc-backup.symlink └── zshrc.symlink /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_STORE 2 | *.swp 3 | *~.nib 4 | songMeta.plist 5 | password.txt 6 | secrets/* 7 | 8 | build/ 9 | 10 | *.mode1v3 11 | *.mode2v3 12 | 13 | xcuserdata 14 | 15 | .xcodeproj/ !*.xcodeproj/project.pbxproj 16 | 17 | # SSH Stuff 18 | id_rsa 19 | id_rsa.pub 20 | known_hosts 21 | git/gitconfig.local.symlink 22 | bin/update 23 | macos/hosts 24 | 25 | ruby/rbenv.zsh 26 | ruby/irbrc.symlink 27 | ruby/gemrc.symlink 28 | ruby/aliases.zsh 29 | 30 | # VS Codium files 31 | extensions 32 | config.symlink/codium-portable-data/user-data/ 33 | !config.symlink/codium-portable-data/user-data/product.json 34 | 35 | config.symlink/raycast/extensions/ 36 | 37 | tmp.jpg 38 | album.txt 39 | Get-Artwork.scpt 40 | secrets.zsh 41 | private.fish -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CodeGPT.apiKey": "OpenAI" 3 | } -------------------------------------------------------------------------------- /Caskfile: -------------------------------------------------------------------------------- 1 | #Apps 2 | cask 'arc' 3 | cask 'audacity' 4 | cask 'cyberduck' 5 | cask 'discord' 6 | cask 'figma' 7 | cask 'handbrake' 8 | cask 'iina' 9 | cask 'imageoptim' 10 | cask 'iterm2' 11 | cask 'jdownloader' 12 | cask 'karabiner-elements' 13 | cask 'menuwhere' 14 | cask 'openmtp' 15 | cask 'plexamp' 16 | cask 'popcorn-time' 17 | cask 'private-internet-access' 18 | cask 'raycast' 19 | cask 'simple-comic' 20 | cask 'syntax-highlight' 21 | cask 'torbrowser' 22 | cask 'vscodium' 23 | cask 'xld' 24 | 25 | # Fonts 26 | brew 'font-fira-code-nerd-font' 27 | brew 'font-hack-nerd-font' 28 | brew 'font-iosevka-term-nerd-font' 29 | brew 'font-jetbrains-mono-nerd-font' 30 | brew 'font-roboto-mono-nerd-font' 31 | cask 'font-caskaydia-cove-nerd-font' 32 | cask 'font-cormorant-garamond' 33 | cask 'font-sf-pro' 34 | cask 'sf-symbols' -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) Zach Holman, http://zachholman.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /bin/GLM.NextGroup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /opt/homebrew/bin/sendmidi dev 'IAC' cc 41 1 -------------------------------------------------------------------------------- /bin/GLM.PrevGroup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | /opt/homebrew/bin/sendmidi dev 'IAC' cc 42 1 -------------------------------------------------------------------------------- /bin/SyncMusic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SOURCE=/Volumes/Extreme\ Pro/Music/ 4 | TARGET=/Volumes/Music/ 5 | LOGFILE=~/Desktop/rsync.txt 6 | 7 | EXCLUDE=( 8 | 'Trey Gunn' 9 | 'Soundtracks' 10 | 'Red Hot Chili Peppers' 11 | 'Puscifer' 12 | 'Klaus Schulze & Lisa Gerrard' 13 | 'Front Line Assembly' 14 | 'Frank Sinatra' 15 | ) 16 | 17 | for i in "${!EXCLUDE[@]}" 18 | do 19 | EXCLUDE[i]="--exclude=${EXCLUDE[i]}" 20 | done 21 | 22 | rsync -avhPzrn --stats --delete "${EXCLUDE[@]}" "${SOURCE}" "${TARGET}" 23 | 24 | printf 'Proceed with sync? (y/n)' 25 | read answer 26 | 27 | if [ "$answer" != "${answer#[Yy]}" ] ;then 28 | touch "${LOGFILE}" 29 | rsync -avhPzr --log-file="${LOGFILE}" --stats --delete "${EXCLUDE[@]}" "${SOURCE}" "${TARGET}" 2> ~/Desktop/rsyncErrors.txt 30 | else 31 | exit 32 | fi 33 | 34 | # a - preserve everything 35 | # v - verbose 36 | # h - human readable 37 | # P - progress/partial 38 | # z - compress on the way 39 | # n - dry run 40 | -------------------------------------------------------------------------------- /bin/artFileTool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/artFileTool -------------------------------------------------------------------------------- /bin/batcharge.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding=UTF-8 3 | 4 | import math, subprocess 5 | 6 | p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) 7 | output = p.communicate()[0] 8 | 9 | o_max = [l for l in output.splitlines() if 'MaxCapacity' in l][0] 10 | o_cur = [l for l in output.splitlines() if 'CurrentCapacity' in l][0] 11 | 12 | b_max = float(o_max.rpartition('=')[-1].strip()) 13 | b_cur = float(o_cur.rpartition('=')[-1].strip()) 14 | 15 | charge = b_cur / b_max 16 | charge_threshold = int(math.ceil(10 * charge)) 17 | 18 | # Output 19 | 20 | total_slots, slots = 10, [] 21 | filled = int(math.ceil(charge_threshold * (total_slots / 10.0))) * u'▸' 22 | empty = (total_slots - len(filled)) * u'▹' 23 | 24 | out = (filled + empty).encode('utf-8') 25 | import sys 26 | 27 | color_green = '%{%}' 28 | color_yellow = '%{%}' 29 | color_red = '%{%}' 30 | color_reset = '%{%}' 31 | color_out = ( 32 | color_green if len(filled) > 6 33 | else color_yellow if len(filled) > 4 34 | else color_red 35 | ) 36 | 37 | out = color_out + out + color_reset 38 | sys.stdout.write(out) 39 | -------------------------------------------------------------------------------- /bin/cheat_sheet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | echo "# Cheat Sheet" 4 | echo "## Apps" 5 | echo "* btop : live system info" 6 | echo "* ctop : (PI) Docker stats" 7 | echo "* fastfetch : system info" 8 | echo "* glow : Markdown viewer" 9 | echo "* mc : Midnight Commander" 10 | echo "* mdcheat : Markdown Cheat Sheet" 11 | echo "* navi : Interactive cheatsheet tool for the command-line" 12 | echo "* tiptop : live system info" 13 | echo "* typioca : Typing speed tester" 14 | echo "---" 15 | echo "## Aliases" 16 | 17 | cat ~/.dotfiles/config.symlink/fish/aliases.fish -------------------------------------------------------------------------------- /bin/dot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # dot 4 | # 5 | # `dot` handles installation, updates, things like that. Run it periodically 6 | # to make sure you're on the latest and greatest. 7 | export ZSH=$HOME/.dotfiles 8 | 9 | # Install homebrew 10 | $ZSH/homebrew/install.sh 2>&1 11 | 12 | # Upgrade homebrew 13 | echo "› brew update" 14 | brew update 15 | 16 | # Install software 17 | echo "› $ZSH/script/install" 18 | $ZSH/script/install 19 | 20 | # Set macOS defaults 21 | $ZSH/macos/set-defaults.sh -------------------------------------------------------------------------------- /bin/e: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Quick shortcut to an editor. 4 | # 5 | # This means that as I travel back and forth between editors, hey, I don't have 6 | # to re-learn any arcane commands. Neat. 7 | # 8 | # USAGE: 9 | # 10 | # $ e 11 | # # => opens the current directory in your editor 12 | # 13 | # $ e . 14 | # $ e /usr/local 15 | # # => opens the specified directory in your editor 16 | 17 | if [ "$1" = "" ] ; then 18 | exec $EDITOR . 19 | else 20 | exec $EDITOR "$1" 21 | fi 22 | -------------------------------------------------------------------------------- /bin/extractFSB5toAT9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/extractFSB5toAT9 -------------------------------------------------------------------------------- /bin/flushdns: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # HT https://support.apple.com/en-us/HT202516 3 | LONGVERSION=$(sw_vers -productVersion) 4 | #Why do people grep | awk ? awk has pattern matching; please stop! 5 | MINOR=$(echo $LONGVERSION | cut -d. -f2) 6 | UPDATE=$(echo $LONGVERSION | cut -d. -f3) 7 | 8 | if (( $MINOR < 7 )) ; then 9 | FLUSH="dscacheutil -flushcache" 10 | elif (( $MINOR < 10 )) ; then 11 | FLUSH="killall -HUP mDNSResponder" 12 | elif (( $MINOR == 10 )) ; then 13 | if (( $UPDATE < 4 )) ; then 14 | FLUSH="discoveryutil mdnsflushcache" 15 | else 16 | FLUSH="killall -HUP mDNSResponder" 17 | fi 18 | else 19 | echo VERSION $LONGVERSION 20 | FLUSH="killall -HUP mDNSResponder" 21 | echo "¯\_(ツ)_/¯" 22 | fi 23 | 24 | echo "Flushing DNS Cache for $LONGVERSION" 25 | echo "$FLUSH #(งツ)ว" 26 | sudo $FLUSH 27 | -------------------------------------------------------------------------------- /bin/fsbext: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/fsbext -------------------------------------------------------------------------------- /bin/git-all: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Stage all unstaged. 4 | 5 | git add -A 6 | -------------------------------------------------------------------------------- /bin/git-amend: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Use the last commit message and amend your stuffs. 4 | 5 | git commit --amend -C HEAD 6 | -------------------------------------------------------------------------------- /bin/git-copy-branch-name: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copy the current branch name to the clipboard. 4 | 5 | branch=$(git rev-parse --abbrev-ref HEAD) 6 | echo $branch 7 | echo $branch | tr -d '\n' | tr -d ' ' | pbcopy 8 | -------------------------------------------------------------------------------- /bin/git-credit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # A very slightly quicker way to credit an author on the latest commit. 4 | # 5 | # $1 - The full name of the author. 6 | # $2 - The email address of the author. 7 | # 8 | # Examples 9 | # 10 | # git credit "Zach Holman" zach@example.com 11 | # 12 | 13 | git commit --amend --author "$1 <$2>" -C HEAD 14 | -------------------------------------------------------------------------------- /bin/git-delete-local-merged: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Delete all local branches that have been merged into HEAD. Stolen from 4 | # our favorite @tekkub: 5 | # 6 | # https://plus.google.com/115587336092124934674/posts/dXsagsvLakJ 7 | 8 | git branch -d `git branch --merged | grep -v '^*' | grep -v 'master' | tr -d '\n'` 9 | -------------------------------------------------------------------------------- /bin/git-nuke: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Nukes a branch locally and on the origin remote. 4 | # 5 | # $1 - Branch name. 6 | # 7 | # Examples 8 | # 9 | # git nuke add-git-nuke 10 | 11 | git branch -D $1 12 | git push origin :$1 13 | -------------------------------------------------------------------------------- /bin/git-promote: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Promotes a local topic branch to a remote tracking branch of the same name, 4 | # by pushing and then setting up the git config 5 | # 6 | # Thanks to ENTP: 7 | # http://hoth.entp.com/2008/11/10/improving-my-git-workflow 8 | 9 | curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||') 10 | 11 | remote_branch=$(git branch -r | grep "origin/${curr_branch}") 12 | [ -z "${remote_branch}" ] && ( git push origin "${curr_branch}" ) 13 | 14 | origin=$(git config --get "branch.${curr_branch}.remote") 15 | [ -z "${origin}" ] && ( git config --add "branch.${curr_branch}.remote" origin ) 16 | 17 | merge=$(git config --get "branch.${curr_branch}.merge") 18 | [ -z "${merge}" ] && ( git config --add "branch.${curr_branch}.merge" "refs/heads/${curr_branch}" ) -------------------------------------------------------------------------------- /bin/git-sub: -------------------------------------------------------------------------------- 1 | git submodule foreach git pull origin master; git commit -am "Updated submodules";git ps 2 | -------------------------------------------------------------------------------- /bin/git-track: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Sets up your branch to track a remote branch. Assumes you mean 4 | # `origin/$branch-name`. 5 | 6 | branch=$(git rev-parse --abbrev-ref HEAD) 7 | git branch $branch --set-upstream-to origin/$branch -------------------------------------------------------------------------------- /bin/git-undo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Undo your last commit, but don't throw away your changes 4 | 5 | git reset --soft HEAD^ 6 | -------------------------------------------------------------------------------- /bin/git-unpushed: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Show the diff of everything you haven't pushed yet. 4 | 5 | branch=$(git rev-parse --abbrev-ref HEAD) 6 | git diff origin/$branch..HEAD 7 | -------------------------------------------------------------------------------- /bin/git-unpushed-stat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Show the diffstat of everything you haven't pushed yet. 4 | 5 | branch=$(git rev-parse --abbrev-ref HEAD) 6 | count=$(git rev-list --count HEAD origin/$branch...HEAD) 7 | 8 | if [ "$count" -eq "1" ] 9 | then 10 | s='' 11 | else 12 | s='s' 13 | fi 14 | 15 | git diff --stat origin/$branch..HEAD 16 | echo " $count commit$s total" 17 | -------------------------------------------------------------------------------- /bin/git-up: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Usage: git-up 4 | # git-reup 5 | # 6 | # Like git-pull but show a short and sexy log of changes 7 | # immediately after merging (git-up) or rebasing (git-reup). 8 | # 9 | # Inspired by Kyle Neath's `git up' alias: 10 | # http://gist.github.com/249223 11 | # 12 | # Stolen from Ryan Tomayko 13 | # http://github.com/rtomayko/dotfiles/blob/rtomayko/bin/git-up 14 | 15 | set -e 16 | 17 | PULL_ARGS="$@" 18 | 19 | # when invoked as git-reup, run as `git pull --rebase' 20 | test "$(basename $0)" = "git-reup" && 21 | PULL_ARGS="--rebase $PULL_ARGS" 22 | 23 | git pull $PULL_ARGS 24 | 25 | # show diffstat of all changes if we're pulling with --rebase. not 26 | # sure why git-pull only does this when merging. 27 | test "$(basename $0)" = "git-reup" && { 28 | echo "Diff:" 29 | git --no-pager diff --color --stat HEAD@{1}.. | 30 | sed 's/^/ /' 31 | } 32 | 33 | # show an abbreviated commit log of stuff that was just merged. 34 | echo "Log:" 35 | git log --color --pretty=oneline --abbrev-commit HEAD@{1}.. | 36 | sed 's/^/ /' 37 | -------------------------------------------------------------------------------- /bin/gitio: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # Usage: gitio URL [CODE] 3 | # 4 | # Turns a github.com URL 5 | # into a git.io URL 6 | # 7 | # Created by @defunkt: 8 | # https://gist.github.com/1209316 9 | # 10 | # Copies the git.io URL to your clipboard. 11 | 12 | url = ARGV[0] 13 | code = ARGV[1] 14 | 15 | if url !~ /^(https?:\/\/)?(gist\.)?github.com/ 16 | abort "* github.com URLs only" 17 | end 18 | 19 | if url !~ /^http/ 20 | url = "https://#{url}" 21 | end 22 | 23 | if code 24 | code = "-F code=#{code}" 25 | end 26 | 27 | output = `curl -i https://git.io -F 'url=#{url}' #{code} 2> /dev/null` 28 | if output =~ /Location: (.+)\n?/ 29 | puts $1 30 | `echo #$1 | pbcopy` 31 | else 32 | puts output 33 | end 34 | -------------------------------------------------------------------------------- /bin/go: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# = 0 ] 4 | then 5 | echo " " 6 | echo "Please provide search string. Usage: $0 [string]" 7 | echo " " 8 | else 9 | F=`echo $@ | sed 's/ /+/g' | sed 's/"/%22/g'` 10 | open "http://google.com/search?q=$F" 11 | fi 12 | -------------------------------------------------------------------------------- /bin/headers: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # https://github.com/rtomayko/dotfiles/blob/rtomayko/bin/headers 4 | 5 | curl -sv "$@" 2>&1 >/dev/null | 6 | grep -v "^\*" | 7 | grep -v "^}" | 8 | cut -c3- -------------------------------------------------------------------------------- /bin/managed-prefs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | sudo rm -f ~/Library/Preferences/com.apple.systempreferences.plist /Library/Managed\ Preferences/piotr_gajos/com.apple.systempreferences.plist /Library/Managed\ Preferences/piotr_gajos/com.apple.icloud.managed.plist 4 | 5 | open /Library/Managed\ Preferences/piotr_gajos/complete.plist -------------------------------------------------------------------------------- /bin/matrix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' -------------------------------------------------------------------------------- /bin/movieme: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # MOVIE ME as in: "MOVIE ME AN ANIMATED GIF FROM THIS MOVIE, DAMMIT" 4 | # 5 | # Creates an animated gif from a movie file. Uploads to CloudApp. You must also 6 | # have `gifme` and `cloudapp` in your $PATH. 7 | # 8 | # $1 - the path to the movie we're converting. 9 | # $2 - the start time of the finished product. 10 | # This can be in seconds, or it also accepts the "hh:mm:ss[.xxx]" format. 11 | # $3 - the duration of the video sequence. 12 | # This can be in seconds, or it also accepts the "hh:mm:ss[.xxx]" format. 13 | # 14 | # Examples: 15 | # 16 | # movieme 17 | # ~/Desktop/dr-strangelove.mp4 23:12 3 18 | # ~/Desktop/holman-backflip-on-fire.mov 3.9 1.75 19 | 20 | # cleanup 21 | rm -rf /tmp/movieme 22 | 23 | # create tmp dir 24 | mkdir -p /tmp/movieme 25 | 26 | # split the movie into constituent frames 27 | ffmpeg -i "$1" -f image2 -vf "scale=iw*sar:ih" -ss $2 -t $3 -r 7 /tmp/movieme/d-%05d.png 28 | 29 | # ANIMATE 30 | gifme /tmp/movieme/* -d 0 31 | -------------------------------------------------------------------------------- /bin/numi-cli: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/numi-cli -------------------------------------------------------------------------------- /bin/photorec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/photorec -------------------------------------------------------------------------------- /bin/rmeAdiCurrentVolume: -------------------------------------------------------------------------------- 1 | 1737028364320,-175,0 2 | -------------------------------------------------------------------------------- /bin/search: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Quick search in a directory for a string ($1). 4 | # 5 | set -e 6 | 7 | # use -iru to search directories ack usually ignores (like .git) 8 | if [ -x /usr/bin/ack-grep ]; then 9 | ack-grep -i $1 10 | else 11 | ack -i $1 12 | fi 13 | -------------------------------------------------------------------------------- /bin/switch-fluffy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$( cd "$( dirname "$0" )" && pwd )" 4 | python3 $DIR/switch/fluffy.pyw 5 | -------------------------------------------------------------------------------- /bin/switch-smash-atmosphere: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$( cd "$( dirname "$0" )" && pwd )" 4 | python3 $DIR/switch/fusee-launcher.py $DIR/switch/fusee.bin 5 | -------------------------------------------------------------------------------- /bin/switch-smash-hekate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$( cd "$( dirname "$0" )" && pwd )" 4 | python3 $DIR/switch/fusee-launcher.py $DIR/switch/hekate.bin -------------------------------------------------------------------------------- /bin/switch-tinfoil: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$( cd "$( dirname "$0" )" && pwd )" 4 | python3 $DIR/switch/usb_install_pc.py ~/Desktop/ -------------------------------------------------------------------------------- /bin/switch-usb-loader: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$( cd "$( dirname "$0" )" && pwd )" 4 | open $DIR/switch/ns-usbloader-4.3.jar 5 | -------------------------------------------------------------------------------- /bin/switch/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 2 9 | trim_trailing_whitespace = true 10 | 11 | [Makefile,*.make] 12 | indent_style = tab 13 | indent_size = 4 14 | 15 | [*.py] 16 | indent_style = space 17 | indent_size = 4 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /bin/switch/fusee.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/switch/fusee.bin -------------------------------------------------------------------------------- /bin/switch/hekate.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/switch/hekate.bin -------------------------------------------------------------------------------- /bin/switch/intermezzo.S: -------------------------------------------------------------------------------- 1 | // 2 | // Payload launcher stub. 3 | // 4 | 5 | .globl _start 6 | 7 | .section ".text" 8 | _start: 9 | 10 | // First, we'll need to move ourselves _out_ of the target area. 11 | // We'll copy down into the IRAM. 12 | ldr r0, =INTERMEZZO_RELOCATED_ADDRESS 13 | ldr r1, =post_relocation 14 | ldr r2, =intermezzo_end 15 | sub r2, r2, r1 16 | bl copy 17 | 18 | // Jump to the start of RAM, which should now contain the post-relocation code. 19 | ldr r0, =INTERMEZZO_RELOCATED_ADDRESS 20 | bx r0 21 | 22 | 23 | .align 4 24 | post_relocation: 25 | 26 | // Next, we'll copy our payload down to the appropriate relocaiton address. 27 | ldr r0, =RELOCATION_TARGET 28 | ldr r1, =PAYLOAD_START_ADDR 29 | ldr r2, =BEFORE_SPRAY_LENGTH 30 | bl copy 31 | 32 | ldr r0, =RELOCATION_TARGET 33 | ldr r1, =BEFORE_SPRAY_LENGTH 34 | add r0, r0, r1 35 | ldr r1, =STACK_SPRAY_END 36 | ldr r2, =AFTER_SPRAY_LENGTH 37 | bl copy 38 | 39 | // Finally, jump into the relocated target. 40 | ldr r0, =ENTRY_POINT_ADDRESS 41 | bx r0 42 | 43 | 44 | // 45 | // Simple block copy. 46 | // r0 = destination address 47 | // r1 = source address 48 | // r2 = length in bytes 49 | // Destroys r0-r3. 50 | // 51 | copy: 52 | 53 | // Copy the word... 54 | ldr r3, [r1], #4 55 | str r3, [r0], #4 56 | 57 | // And continue while we have words left to copy. 58 | subs r2, r2, #4 59 | bne copy 60 | 61 | // Once we're done, return. 62 | bx lr 63 | 64 | -------------------------------------------------------------------------------- /bin/switch/intermezzo.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/switch/intermezzo.bin -------------------------------------------------------------------------------- /bin/switch/intermezzo.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-littlearm") 2 | OUTPUT_ARCH(arm) 3 | ENTRY(_start) 4 | SECTIONS 5 | { 6 | . = LOAD_ADDR; 7 | PROVIDE(intermezzo_start = .); 8 | 9 | .text : { 10 | *(.text) 11 | } 12 | 13 | /* always end on a word boundary for our copy */ 14 | . = ALIGN(4); 15 | PROVIDE(intermezzo_end = .); 16 | 17 | /DISCARD/ : { *(.dynstr*) } 18 | /DISCARD/ : { *(.dynamic*) } 19 | /DISCARD/ : { *(.plt*) } 20 | /DISCARD/ : { *(.interp*) } 21 | /DISCARD/ : { *(.gnu*) } 22 | /DISCARD/ : { *(.data*) } 23 | /DISCARD/ : { *(.rodata*) } 24 | } 25 | -------------------------------------------------------------------------------- /bin/switch/modchipd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | while true; do 4 | ./fusee-launcher.py -w fusee.bin 5 | done 6 | -------------------------------------------------------------------------------- /bin/switch/ns-usbloader-4.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/switch/ns-usbloader-4.3.jar -------------------------------------------------------------------------------- /bin/switch/requirements.txt: -------------------------------------------------------------------------------- 1 | pyusb 2 | -------------------------------------------------------------------------------- /bin/testdisk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/bin/testdisk -------------------------------------------------------------------------------- /bin/todo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Creates something for me to do. 4 | # 5 | # I've used literally every todo list, app, program, script, everything. Even 6 | # the ones you are building and haven't released yet. 7 | # 8 | # I've found that they're all nice in their nice ways, but I still don't use 9 | # them, thus defeating the purpose of a todo list. 10 | # 11 | # All `todo` does is put a file on my Desktop with the filename given. That's 12 | # it. I aggressively prune my desktop of old tasks and keep one or two on there 13 | # at a time. Once I've finished a todo, I just delete the file. That's it. 14 | # 15 | # Millions of dollars later and `touch` wins. 16 | set -e 17 | 18 | # Run our new web 2.0 todo list application and raise millions of VC dollars. 19 | touch ~/Desktop/"$*" 20 | -------------------------------------------------------------------------------- /config.symlink/MusicBrainz/.Picard.ini.synclock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/MusicBrainz/.Picard.ini.synclock -------------------------------------------------------------------------------- /config.symlink/fastfetch/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/fastfetch/profile.jpg -------------------------------------------------------------------------------- /config.symlink/fastfetch/rustmesa_pj.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/fastfetch/rustmesa_pj.gif -------------------------------------------------------------------------------- /config.symlink/fish/completions/fisher.fish: -------------------------------------------------------------------------------- 1 | complete --command fisher --exclusive --long help --description "Print help" 2 | complete --command fisher --exclusive --long version --description "Print version" 3 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" 4 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" 5 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" 6 | complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" 7 | complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" 8 | -------------------------------------------------------------------------------- /config.symlink/fish/completions/tide.fish: -------------------------------------------------------------------------------- 1 | complete tide --no-files 2 | 3 | set -l subcommands bug-report configure reload 4 | 5 | complete tide -x -n __fish_use_subcommand -a bug-report -d "Print info for use in bug reports" 6 | complete tide -x -n __fish_use_subcommand -a configure -d "Run the configuration wizard" 7 | complete tide -x -n __fish_use_subcommand -a reload -d "Reload tide configuration" 8 | 9 | complete tide -x -n "not __fish_seen_subcommand_from $subcommands" -s h -l help -d "Print help message" 10 | complete tide -x -n "not __fish_seen_subcommand_from $subcommands" -s v -l version -d "Print tide version" 11 | 12 | complete tide -x -n '__fish_seen_subcommand_from bug-report' -l clean -d "Run clean Fish instance and install Tide" 13 | complete tide -x -n '__fish_seen_subcommand_from bug-report' -l verbose -d "Print full Tide configuration" 14 | -------------------------------------------------------------------------------- /config.symlink/fish/conf.d/autopair.fish: -------------------------------------------------------------------------------- 1 | status is-interactive || exit 2 | 3 | set --global autopair_left "(" "[" "{" '"' "'" 4 | set --global autopair_right ")" "]" "}" '"' "'" 5 | set --global autopair_pairs "()" "[]" "{}" '""' "''" 6 | 7 | function _autopair_fish_key_bindings --on-variable fish_key_bindings 8 | set --query fish_key_bindings[1] || return 9 | 10 | test $fish_key_bindings = fish_default_key_bindings && 11 | set --local mode default insert || 12 | set --local mode insert default 13 | 14 | bind --mode $mode[-1] --erase \177 \b \t 15 | 16 | bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫ 17 | bind --mode $mode[1] \b _autopair_backspace 18 | bind --mode $mode[1] \t _autopair_tab 19 | 20 | printf "%s\n" $autopair_pairs | while read --local left right --delimiter "" 21 | bind --mode $mode[-1] --erase $left $right 22 | if test $left = $right 23 | bind --mode $mode[1] $left "_autopair_insert_same \\$left" 24 | else 25 | bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right" 26 | bind --mode $mode[1] $right "_autopair_insert_right \\$right" 27 | end 28 | end 29 | end 30 | 31 | _autopair_fish_key_bindings 32 | 33 | function _autopair_uninstall --on-event autopair_uninstall 34 | string collect ( 35 | bind --all | string replace --filter --regex -- "_autopair.*" --erase 36 | set --names | string replace --filter --regex -- "^autopair" "set --erase autopair" 37 | ) | source 38 | functions --erase (functions --all | string match "_autopair_*") 39 | end 40 | -------------------------------------------------------------------------------- /config.symlink/fish/config.fish: -------------------------------------------------------------------------------- 1 | # Source stuff 2 | source ~/.config/fish/aliases.fish 3 | source ~/.config/fish/private.fish 4 | 5 | # Brew 6 | eval "$(/opt/homebrew/bin/brew shellenv)" 7 | 8 | # Chruby 9 | chruby ruby-3.3.5 # Set ruby version. Run `chruby` to see actual version. 10 | 11 | # Greeting 12 | set -g fish_greeting (set_color yellow)$(weather)\n(set_color FF79C6)$(monty_python_quote) 13 | 14 | # Prompt Settings 15 | set -g tide_character_icon → 16 | set -g tide_os_color magenta 17 | set -g fish_color_command yellow 18 | set -g tide_pwd_color_anchors yellow 19 | set -g tide_pwd_color_dirs yellow 20 | set -g tide_pwd_color_truncated_dirs yellow 21 | 22 | # Set Paths 23 | fish_add_path /usr/local/sbin 24 | fish_add_path $HOME/.dotfiles/bin 25 | fish_add_path $HOME/.local/bin 26 | fish_add_path /opt/homebrew/bin 27 | fish_add_path /opt/homebrew/sbin 28 | fish_add_path /opt/homebrew/opt/ruby/bin 29 | fish_add_path $HOME/.dotfiles/config.symlink/yabai/ 30 | set -x BREW_PREFIX (brew --prefix) 31 | fish_add_path $BREW_PREFIX/opt/python@3.11/libexec/bin 32 | 33 | # iTerm2 Integration 34 | test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish 35 | -------------------------------------------------------------------------------- /config.symlink/fish/fish_plugins: -------------------------------------------------------------------------------- 1 | jorgebucaran/fisher 2 | franciscolourenco/done 3 | meaningful-ooo/sponge 4 | jorgebucaran/autopair.fish 5 | gazorby/fish-abbreviation-tips 6 | ilancosman/tide@v6 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/__abbr_tips_bind_newline.fish: -------------------------------------------------------------------------------- 1 | function __abbr_tips_bind_newline 2 | if test $__abbr_tips_used != 1 3 | if abbr -q -- (string trim -- (commandline)) 4 | set -g __abbr_tips_used 1 5 | else 6 | set -g __abbr_tips_used 0 7 | end 8 | end 9 | commandline -f execute 10 | end 11 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/__abbr_tips_bind_space.fish: -------------------------------------------------------------------------------- 1 | function __abbr_tips_bind_space 2 | commandline -i " " 3 | if test $__abbr_tips_used != 1 4 | if abbr -q -- (string trim -- (commandline)) 5 | set -g __abbr_tips_used 1 6 | else 7 | set -g __abbr_tips_used 0 8 | end 9 | end 10 | commandline -f expand-abbr 11 | end 12 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/__abbr_tips_clean.fish: -------------------------------------------------------------------------------- 1 | function __abbr_tips_clean -d "Clean plugin variables and functions" 2 | bind --erase \n 3 | bind --erase \r 4 | bind --erase " " 5 | set --erase __abbr_tips_used 6 | set --erase __abbr_tips_run_once 7 | set --erase __ABBR_TIPS_VALUES 8 | set --erase __ABBR_TIPS_KEYS 9 | set --erase ABBR_TIPS_PROMPT 10 | set --erase ABBR_TIPS_AUTO_UPDATE 11 | set --erase ABBR_TIPS_ALIAS_WHITELIST 12 | set --erase ABBR_TIPS_REGEXES 13 | functions --erase __abbr_tips_bind_newline 14 | functions --erase __abbr_tips_bind_space 15 | functions --erase __abbr_tips 16 | end 17 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/__abbr_tips_init.fish: -------------------------------------------------------------------------------- 1 | function __abbr_tips_init -d "Initialize abbreviations variables for fish-abbr-tips" 2 | set -e __ABBR_TIPS_KEYS 3 | set -e __ABBR_TIPS_VALUES 4 | set -Ux __ABBR_TIPS_KEYS 5 | set -Ux __ABBR_TIPS_VALUES 6 | 7 | set -l i 1 8 | set -l abb (string replace -r '.*-- ' '' -- (abbr -s)) 9 | while test $i -le (count $abb) 10 | set -l current_abb (string split -m1 -- ' ' "$abb[$i]") 11 | set -a __ABBR_TIPS_KEYS "$current_abb[1]" 12 | set -a __ABBR_TIPS_VALUES (string trim -c '\'' -- "$current_abb[2]") 13 | set i (math $i + 1) 14 | end 15 | 16 | set -l i 1 17 | set -l abb (string replace -r '.*-- ' '' -- (alias -s)) 18 | while test $i -le (count $abb) 19 | set -l current_abb (string split -m2 -- ' ' "$abb[$i]") 20 | set -a __ABBR_TIPS_KEYS "a__$current_abb[2]" 21 | set -a __ABBR_TIPS_VALUES (string trim -c '\'' -- "$current_abb[3]") 22 | set i (math $i + 1) 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_autopair_backspace.fish: -------------------------------------------------------------------------------- 1 | function _autopair_backspace 2 | set --local index (commandline --cursor) 3 | set --local buffer (commandline) 4 | 5 | test $index -ge 1 && 6 | contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs && 7 | commandline --function delete-char 8 | commandline --function backward-delete-char 9 | end 10 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_autopair_insert_left.fish: -------------------------------------------------------------------------------- 1 | function _autopair_insert_left --argument-names left right 2 | set --local buffer (commandline) 3 | set --local before (commandline --cut-at-cursor) 4 | 5 | commandline --insert -- $left 6 | 7 | switch "$buffer" 8 | case "$before"{," "\*,$autopair_right\*} 9 | set --local index (commandline --cursor) 10 | commandline --insert -- $right 11 | commandline --cursor $index 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_autopair_insert_right.fish: -------------------------------------------------------------------------------- 1 | function _autopair_insert_right --argument-names key 2 | set --local buffer (commandline) 3 | set --local before (commandline --cut-at-cursor) 4 | 5 | switch "$buffer" 6 | case "$before$key"\* 7 | commandline --cursor (math (commandline --cursor) + 1) 8 | case \* 9 | commandline --insert -- $key 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_autopair_insert_same.fish: -------------------------------------------------------------------------------- 1 | function _autopair_insert_same --argument-names key 2 | set --local buffer (commandline) 3 | set --local index (commandline --cursor) 4 | set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer") 5 | 6 | if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0 7 | test $key = $next && commandline --cursor (math $index + 1) && return 8 | 9 | commandline --insert -- $key 10 | 11 | if test $index -lt 1 || 12 | contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left && 13 | contains -- $next "" " " $autopair_right 14 | commandline --insert -- $key 15 | commandline --cursor (math $index + 1) 16 | end 17 | else 18 | commandline --insert -- $key 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_autopair_tab.fish: -------------------------------------------------------------------------------- 1 | function _autopair_tab 2 | commandline --paging-mode && down-or-search && return 3 | 4 | string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) && 5 | commandline --function end-of-line --function backward-delete-char 6 | commandline --function complete 7 | end 8 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_sponge_clear_state.fish: -------------------------------------------------------------------------------- 1 | function _sponge_clear_state 2 | set --erase --global _sponge_current_command 3 | set --erase --global _sponge_current_command_exit_code 4 | set --erase --global _sponge_current_command_previously_in_history 5 | end 6 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_sponge_on_exit.fish: -------------------------------------------------------------------------------- 1 | function _sponge_on_exit --on-event fish_exit 2 | sponge_delay=0 _sponge_remove_from_history 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_sponge_on_postexec.fish: -------------------------------------------------------------------------------- 1 | function _sponge_on_postexec --on-event fish_postexec 2 | set --global _sponge_current_command_exit_code $status 3 | 4 | # Remove command from the queue if it's been added previously 5 | if set --local index (contains --index -- $_sponge_current_command $_sponge_queue) 6 | set --erase _sponge_queue[$index] 7 | end 8 | 9 | # Ignore empty commands 10 | if test -n $_sponge_current_command 11 | set --local command '' 12 | # Run filters 13 | for filter in $sponge_filters 14 | if $filter \ 15 | $_sponge_current_command \ 16 | $_sponge_current_command_exit_code \ 17 | $_sponge_current_command_previously_in_history 18 | set command $_sponge_current_command 19 | break 20 | end 21 | end 22 | set --prepend --global _sponge_queue $command 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_sponge_on_preexec.fish: -------------------------------------------------------------------------------- 1 | function _sponge_on_preexec --on-event fish_preexec \ 2 | --argument-names command 3 | _sponge_clear_state 4 | 5 | set --global _sponge_current_command $command 6 | 7 | builtin history search --case-sensitive --exact --max=1 --null $command \ 8 | | read --local --null found_entries 9 | 10 | # If a command is in the history and in the queue, ignore it, like if it wasn’t in the history 11 | if test (count $found_entries) -ne 0; and not contains $command $_sponge_queue 12 | set --global _sponge_current_command_previously_in_history true 13 | else 14 | set --global _sponge_current_command_previously_in_history false 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_sponge_on_prompt.fish: -------------------------------------------------------------------------------- 1 | function _sponge_on_prompt --on-event fish_prompt 2 | if test $sponge_purge_only_on_exit = false 3 | _sponge_remove_from_history 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_sponge_remove_from_history.fish: -------------------------------------------------------------------------------- 1 | function _sponge_remove_from_history 2 | 3 | while test (count $_sponge_queue) -gt $sponge_delay 4 | builtin history delete --case-sensitive --exact -- $_sponge_queue[-1] 5 | set --erase _sponge_queue[-1] 6 | end 7 | 8 | builtin history save 9 | end 10 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_1_line_prompt.fish: -------------------------------------------------------------------------------- 1 | function _tide_1_line_prompt 2 | set -g add_prefix 3 | _tide_side=left for item in $_tide_left_items 4 | _tide_item_$item 5 | end 6 | set_color $prev_bg_color -b normal 7 | echo $tide_left_prompt_suffix 8 | 9 | set -g add_prefix 10 | _tide_side=right for item in $_tide_right_items 11 | _tide_item_$item 12 | end 13 | set_color $prev_bg_color -b normal 14 | echo $tide_right_prompt_suffix 15 | end 16 | 17 | function _tide_item_pwd 18 | _tide_print_item pwd @PWD@ 19 | end 20 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_2_line_prompt.fish: -------------------------------------------------------------------------------- 1 | function _tide_2_line_prompt 2 | set -g add_prefix 3 | _tide_side=left for item in $_tide_left_items 4 | _tide_item_$item 5 | end 6 | if not set -e add_prefix 7 | set_color $prev_bg_color -b normal 8 | echo $tide_left_prompt_suffix 9 | end 10 | 11 | echo 12 | 13 | set -g add_prefix 14 | _tide_side=right for item in $_tide_right_items 15 | _tide_item_$item 16 | end 17 | if not set -e add_prefix 18 | set_color $prev_bg_color -b normal 19 | echo $tide_right_prompt_suffix 20 | end 21 | end 22 | 23 | function _tide_item_pwd 24 | _tide_print_item pwd @PWD@ 25 | end 26 | 27 | function _tide_item_newline 28 | set_color $prev_bg_color -b normal 29 | v=tide_"$_tide_side"_prompt_suffix echo $$v 30 | set -g add_prefix 31 | end 32 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_cache_variables.fish: -------------------------------------------------------------------------------- 1 | function _tide_cache_variables 2 | # Same-color-separator color 3 | set_color $tide_prompt_color_separator_same_color | read -gx _tide_color_separator_same_color 4 | 5 | # git 6 | contains git $_tide_left_items $_tide_right_items && set_color $tide_git_color_branch | read -gx _tide_location_color 7 | 8 | # private_mode 9 | if contains private_mode $_tide_left_items $_tide_right_items && test -n "$fish_private_mode" 10 | set -gx _tide_private_mode 11 | else 12 | set -e _tide_private_mode 13 | end 14 | 15 | # item padding 16 | test "$tide_prompt_pad_items" = true && set -gx _tide_pad ' ' || set -e _tide_pad 17 | end 18 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_find_and_remove.fish: -------------------------------------------------------------------------------- 1 | function _tide_find_and_remove -a name list --no-scope-shadowing 2 | contains --index $name $$list | read -l index && set -e "$list"[$index] 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_fish_colorize.fish: -------------------------------------------------------------------------------- 1 | function _tide_fish_colorize 2 | if command -q fish_indent 3 | echo -ns "$argv" | fish_indent --ansi 4 | else 5 | echo -ns "$argv" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_aws.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_aws 2 | # AWS_PROFILE overrides AWS_DEFAULT_PROFILE, AWS_REGION overrides AWS_DEFAULT_REGION 3 | set -q AWS_PROFILE && set -l AWS_DEFAULT_PROFILE $AWS_PROFILE 4 | set -q AWS_REGION && set -l AWS_DEFAULT_REGION $AWS_REGION 5 | 6 | if test -n "$AWS_DEFAULT_PROFILE" && test -n "$AWS_DEFAULT_REGION" 7 | _tide_print_item aws $tide_aws_icon' ' "$AWS_DEFAULT_PROFILE/$AWS_DEFAULT_REGION" 8 | else if test -n "$AWS_DEFAULT_PROFILE$AWS_DEFAULT_REGION" 9 | _tide_print_item aws $tide_aws_icon' ' "$AWS_DEFAULT_PROFILE$AWS_DEFAULT_REGION" 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_character.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_character 2 | test $_tide_status = 0 && set_color $tide_character_color || set_color $tide_character_color_failure 3 | 4 | set -q add_prefix || echo -ns ' ' 5 | 6 | test "$fish_key_bindings" = fish_default_key_bindings && echo -ns $tide_character_icon || 7 | switch $fish_bind_mode 8 | case insert 9 | echo -ns $tide_character_icon 10 | case default 11 | echo -ns $tide_character_vi_icon_default 12 | case replace replace_one 13 | echo -ns $tide_character_vi_icon_replace 14 | case visual 15 | echo -ns $tide_character_vi_icon_visual 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_cmd_duration.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_cmd_duration 2 | test $CMD_DURATION -gt $tide_cmd_duration_threshold && t=( 3 | math -s0 "$CMD_DURATION/3600000" # Hours 4 | math -s0 "$CMD_DURATION/60000"%60 # Minutes 5 | math -s$tide_cmd_duration_decimals "$CMD_DURATION/1000"%60) if test $t[1] != 0 6 | _tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$t[1]h $t[2]m $t[3]s" 7 | else if test $t[2] != 0 8 | _tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$t[2]m $t[3]s" 9 | else 10 | _tide_print_item cmd_duration $tide_cmd_duration_icon' ' "$t[3]s" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_context.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_context 2 | if set -q SSH_TTY 3 | set -fx tide_context_color $tide_context_color_ssh 4 | else if test "$EUID" = 0 5 | set -fx tide_context_color $tide_context_color_root 6 | else if test "$tide_context_always_display" = true 7 | set -fx tide_context_color $tide_context_color_default 8 | else 9 | return 10 | end 11 | 12 | string match -qr "^(?(\.?[^\.]*){0,$tide_context_hostname_parts})" @$hostname 13 | _tide_print_item context $USER$h 14 | end 15 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_crystal.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_crystal 2 | if path is $_tide_parent_dirs/shard.yml 3 | crystal --version | string match -qr "(?[\d.]+)" 4 | _tide_print_item crystal $tide_crystal_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_direnv.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_direnv 2 | set -q DIRENV_DIR || return 3 | direnv status | string match -q 'Found RC allowed false' && 4 | set -lx tide_direnv_color $tide_direnv_color_denied && 5 | set -lx tide_direnv_bg_color $tide_direnv_bg_color_denied 6 | _tide_print_item direnv $tide_direnv_icon 7 | end 8 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_distrobox.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_distrobox 2 | test -e /etc/profile.d/distrobox_profile.sh && test -e /run/.containerenv && 3 | _tide_print_item distrobox $tide_distrobox_icon' ' (string match -rg 'name="(.*)"' .*)' <$CLOUDSDK_CONFIG/configurations/config_$config && 7 | _tide_print_item gcloud $tide_gcloud_icon' ' $project 8 | end 9 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_go.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_go 2 | if path is $_tide_parent_dirs/go.mod 3 | go version | string match -qr "(?[\d.]+)" 4 | _tide_print_item go $tide_go_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_java.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_java 2 | if path is $_tide_parent_dirs/pom.xml 3 | java -version &| string match -qr "(?[\d.]+)" 4 | _tide_print_item java $tide_java_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_jobs.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_jobs 2 | set -q _tide_jobs && if test $_tide_jobs -ge $tide_jobs_number_threshold 3 | _tide_print_item jobs $tide_jobs_icon' ' $_tide_jobs 4 | else 5 | _tide_print_item jobs $tide_jobs_icon 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_kubectl.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_kubectl 2 | kubectl config view --minify --output 'jsonpath={.current-context}/{..namespace}' 2>/dev/null | read -l context && 3 | _tide_print_item kubectl $tide_kubectl_icon' ' (string replace -r '/(|default)$' '' $context) 4 | end 5 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_nix_shell.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_nix_shell 2 | set -q IN_NIX_SHELL && _tide_print_item nix_shell $tide_nix_shell_icon' ' $IN_NIX_SHELL 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_node.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_node 2 | if path is $_tide_parent_dirs/package.json 3 | node --version | string match -qr "v(?.*)" 4 | _tide_print_item node $tide_node_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_os.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_os 2 | _tide_print_item os $tide_os_icon 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_php.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_php 2 | if path is $_tide_parent_dirs/composer.json 3 | php --version | string match -qr "(?[\d.]+)" 4 | _tide_print_item php $tide_php_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_private_mode.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_private_mode 2 | set -q _tide_private_mode && _tide_print_item private_mode $tide_private_mode_icon 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_pulumi.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_pulumi 2 | if path filter $_tide_parent_dirs/Pulumi.yaml | read -l yaml_path 3 | if command -q sha1sum 4 | echo -n "$yaml_path" | sha1sum | string match -qr "(?.{40})" 5 | else if command -q shasum 6 | echo -n "$yaml_path" | shasum | string match -qr "(?.{40})" 7 | else 8 | return 9 | end 10 | 11 | string match -qr 'name: *(?.*)' <$yaml_path 12 | set -l workspace_file "$HOME/.pulumi/workspaces/$project_name-$path_hash-workspace.json" 13 | 14 | if test -e $workspace_file 15 | string match -qr '"stack": *"(?.*)"' <$workspace_file 16 | _tide_print_item pulumi $tide_pulumi_icon' ' $stack 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_python.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_python 2 | if test -n "$VIRTUAL_ENV" 3 | if command -q python3 4 | python3 --version | string match -qr "(?[\d.]+)" 5 | else 6 | python --version | string match -qr "(?[\d.]+)" 7 | end 8 | string match -qr "^.*/(?.*)/(?.*)" $VIRTUAL_ENV 9 | # pipenv $VIRTUAL_ENV looks like /home/ilan/.local/share/virtualenvs/pipenv_project-EwRYuc3l 10 | # Detect whether we are using pipenv by looking for 'virtualenvs'. If so, remove the hash at the end. 11 | if test "$dir" = virtualenvs 12 | string match -qr "(?.*)-.*" $base 13 | _tide_print_item python $tide_python_icon' ' "$v ($base)" 14 | else if contains -- "$base" virtualenv venv .venv env # avoid generic names 15 | _tide_print_item python $tide_python_icon' ' "$v ($dir)" 16 | else 17 | _tide_print_item python $tide_python_icon' ' "$v ($base)" 18 | end 19 | else if path is .python-version Pipfile __init__.py pyproject.toml requirements.txt setup.py 20 | if command -q python3 21 | python3 --version | string match -qr "(?[\d.]+)" 22 | else 23 | python --version | string match -qr "(?[\d.]+)" 24 | end 25 | _tide_print_item python $tide_python_icon' ' $v 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_ruby.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_ruby 2 | if path is $_tide_parent_dirs/{*.gemspec,Gemfile,Rakefile,.ruby-version} 3 | ruby --version | string match -qr "(?[\d.]+)" 4 | _tide_print_item ruby $tide_ruby_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_rustc.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_rustc 2 | if path is $_tide_parent_dirs/Cargo.toml 3 | rustc --version | string match -qr "(?[\d.]+)" 4 | _tide_print_item rustc $tide_rustc_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_shlvl.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_shlvl 2 | # Non-interactive shells do not increment SHLVL, so we don't need to subtract 1 3 | test $SHLVL -gt $tide_shlvl_threshold && _tide_print_item shlvl $tide_shlvl_icon' ' $SHLVL 4 | end 5 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_status.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_status 2 | if string match -qv 0 $_tide_pipestatus # If there is a failure anywhere in the pipestatus 3 | if test "$_tide_pipestatus" = 1 # If simple failure 4 | contains character $_tide_left_items || tide_status_bg_color=$tide_status_bg_color_failure \ 5 | tide_status_color=$tide_status_color_failure _tide_print_item status $tide_status_icon_failure' ' 1 6 | else 7 | fish_status_to_signal $_tide_pipestatus | string replace SIG '' | string join '|' | read -l out 8 | test $_tide_status = 0 && _tide_print_item status $tide_status_icon' ' $out || 9 | tide_status_bg_color=$tide_status_bg_color_failure tide_status_color=$tide_status_color_failure \ 10 | _tide_print_item status $tide_status_icon_failure' ' $out 11 | end 12 | else if not contains character $_tide_left_items 13 | _tide_print_item status $tide_status_icon 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_terraform.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_terraform 2 | path is $_tide_parent_dirs/.terraform && 3 | terraform workspace show | string match -v default | read -l w && 4 | _tide_print_item terraform $tide_terraform_icon' ' $w 5 | end 6 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_time.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_time 2 | _tide_print_item time (date +$tide_time_format) 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_item_toolbox.fish: -------------------------------------------------------------------------------- 1 | function _tide_item_toolbox 2 | test -e /run/.toolboxenv && 3 | _tide_print_item toolbox $tide_toolbox_icon' ' (string match -rg 'name="(.*)"' [\d.]+(-dev)?)" 4 | _tide_print_item zig $tide_zig_icon' ' $v 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_parent_dirs.fish: -------------------------------------------------------------------------------- 1 | function _tide_parent_dirs --on-variable PWD 2 | set -g _tide_parent_dirs (string escape ( 3 | for dir in (string split / -- $PWD) 4 | set -la parts $dir 5 | string join / -- $parts 6 | end)) 7 | end 8 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_print_item.fish: -------------------------------------------------------------------------------- 1 | function _tide_print_item -a item 2 | v=tide_"$item"_bg_color set -f item_bg_color $$v 3 | 4 | if set -e add_prefix 5 | set_color $item_bg_color -b normal 6 | v=tide_"$_tide_side"_prompt_prefix echo -ns $$v 7 | else if test "$item_bg_color" = "$prev_bg_color" 8 | v=tide_"$_tide_side"_prompt_separator_same_color echo -ns $_tide_color_separator_same_color$$v 9 | else if test $_tide_side = left 10 | set_color $prev_bg_color -b $item_bg_color 11 | echo -ns $tide_left_prompt_separator_diff_color 12 | else 13 | set_color $item_bg_color -b $prev_bg_color 14 | echo -ns $tide_right_prompt_separator_diff_color 15 | end 16 | 17 | v=tide_"$item"_color set_color $$v -b $item_bg_color 18 | 19 | echo -ns $_tide_pad $argv[2..] $_tide_pad 20 | 21 | set -g prev_bg_color $item_bg_color 22 | end 23 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_remove_unusable_items.fish: -------------------------------------------------------------------------------- 1 | function _tide_remove_unusable_items 2 | # Remove tool-specific items for tools the machine doesn't have installed 3 | set -l removed_items 4 | for item in aws crystal direnv distrobox docker elixir gcloud git go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox zig 5 | contains $item $tide_left_prompt_items $tide_right_prompt_items || continue 6 | 7 | set -l cli_names $item 8 | switch $item 9 | case distrobox # there is no 'distrobox' command inside the container 10 | set cli_names distrobox-export # 'distrobox-export' and 'distrobox-host-exec' are available 11 | case nix_shell 12 | set cli_names nix nix-shell 13 | case python 14 | set cli_names python python3 15 | end 16 | type --query $cli_names || set -a removed_items $item 17 | end 18 | 19 | set -U _tide_left_items (for item in $tide_left_prompt_items 20 | contains $item $removed_items || echo $item 21 | end) 22 | set -U _tide_right_items (for item in $tide_right_prompt_items 23 | contains $item $removed_items || echo $item 24 | end) 25 | end 26 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/_tide_sub_reload.fish: -------------------------------------------------------------------------------- 1 | function _tide_sub_reload 2 | source (functions --details fish_prompt) 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/fish_mode_prompt.fish: -------------------------------------------------------------------------------- 1 | # Disable default vi prompt 2 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/sponge_filter_failed.fish: -------------------------------------------------------------------------------- 1 | function sponge_filter_failed \ 2 | --argument-names command exit_code previously_in_history 3 | 4 | if test $previously_in_history = true -a $sponge_allow_previously_successful = true 5 | return 1 6 | end 7 | 8 | if contains $exit_code $sponge_successful_exit_codes 9 | return 1 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/sponge_filter_matched.fish: -------------------------------------------------------------------------------- 1 | function sponge_filter_matched \ 2 | --argument-names command 3 | 4 | for pattern in $sponge_regex_patterns 5 | if string match --regex --quiet $pattern -- $command 6 | return 7 | end 8 | end 9 | 10 | return 1 11 | end 12 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide.fish: -------------------------------------------------------------------------------- 1 | function tide --description 'Manage your Tide prompt' 2 | argparse --stop-nonopt v/version h/help -- $argv 3 | 4 | if set -q _flag_version 5 | echo 'tide, version 6.1.1' 6 | else if set -q _flag_help 7 | _tide_help 8 | else if functions --query _tide_sub_$argv[1] 9 | _tide_sub_$argv[1] $argv[2..] 10 | else 11 | _tide_help 12 | return 1 13 | end 14 | end 15 | 16 | function _tide_help 17 | printf %s\n \ 18 | 'Usage: tide [options] subcommand [options]' \ 19 | '' \ 20 | 'Options:' \ 21 | ' -v or --version print tide version number' \ 22 | ' -h or --help print this help message' \ 23 | '' \ 24 | 'Subcommands:' \ 25 | ' configure run interactive configuration wizard' \ 26 | ' reload reload tide configuration' \ 27 | ' bug-report print info for use in bug reports' 28 | end 29 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/finish.fish: -------------------------------------------------------------------------------- 1 | function finish 2 | _tide_title Finish 3 | 4 | echo 5 | set_color red 6 | _tide_option y 'Overwrite your current tide config' 7 | set_color normal 8 | echo 9 | 10 | _tide_option p 'Exit and print the config you just generated' 11 | echo 12 | 13 | _tide_menu (status function) 14 | switch $_tide_selected_option 15 | case 'Overwrite your current tide config' 16 | _tide_finish 17 | command -q clear && clear 18 | set -q _flag_auto || _tide_print_configure_current_options 19 | case 'Exit and print the config you just generated' 20 | _tide_exit_configure 21 | command -q clear && clear 22 | _tide_print_configure_current_options 23 | end 24 | end 25 | 26 | function _tide_finish 27 | _tide_exit_configure 28 | 29 | # Deal with prompt char/vi mode 30 | contains character $fake_tide_left_prompt_items || set -p fake_tide_left_prompt_items vi_mode 31 | 32 | # Set the real variables 33 | for fakeVar in (set --names | string match -r "^fake_tide.*") 34 | set -U (string replace 'fake_' '' $fakeVar) $$fakeVar 35 | end 36 | 37 | # Make sure old prompt won't display 38 | set -e $_tide_prompt_var 2>/dev/null 39 | 40 | # Re-initialize the prompt 41 | tide reload 42 | end 43 | 44 | function _tide_print_configure_current_options 45 | _tide_fish_colorize "tide configure --auto $_tide_configure_current_options" 46 | end 47 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/icons.fish: -------------------------------------------------------------------------------- 1 | function icons 2 | _tide_title Icons 3 | 4 | _tide_option 1 'Few icons' 5 | _tide_display_prompt 6 | 7 | _tide_option 2 'Many icons' 8 | _enable_icons 9 | _tide_display_prompt 10 | 11 | _tide_menu (status function) 12 | switch $_tide_selected_option 13 | case 'Few icons' 14 | _disable_icons 15 | end 16 | _next_choice all/transient 17 | end 18 | 19 | function _enable_icons 20 | set -p fake_tide_left_prompt_items os 21 | set -g fake_tide_pwd_icon  22 | set -g fake_tide_pwd_icon_home  23 | set -g fake_tide_cmd_duration_icon  24 | set -g fake_tide_git_icon  25 | end 26 | 27 | function _disable_icons 28 | _tide_find_and_remove os fake_tide_left_prompt_items 29 | set fake_tide_pwd_icon 30 | set fake_tide_pwd_icon_home 31 | set fake_tide_cmd_duration_icon 32 | set fake_tide_git_icon 33 | end 34 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/prompt_colors.fish: -------------------------------------------------------------------------------- 1 | function prompt_colors 2 | _tide_title 'Prompt Colors' 3 | 4 | _tide_option 1 'True color' 5 | _tide_display_prompt 6 | 7 | _tide_option 2 '16 colors' 8 | _load_config "$_tide_configure_style"_16color 9 | set -g _tide_16color true 10 | _tide_display_prompt 11 | 12 | _tide_menu (status function) 13 | switch $_tide_selected_option 14 | case 'True color' 15 | _load_config "$_tide_configure_style" 16 | set -e _tide_16color 17 | switch $_tide_configure_style 18 | case lean rainbow 19 | _next_choice all/show_time 20 | case classic 21 | _next_choice classic/classic_prompt_color 22 | end 23 | case '16 colors' 24 | _next_choice all/show_time 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/prompt_connection.fish: -------------------------------------------------------------------------------- 1 | function prompt_connection 2 | _tide_title 'Prompt Connection' 3 | 4 | _tide_option 1 Disconnected 5 | set -g fake_tide_prompt_icon_connection ' ' 6 | _tide_display_prompt 7 | 8 | _tide_option 2 Dotted 9 | set -g fake_tide_prompt_icon_connection '·' 10 | _tide_display_prompt 11 | 12 | _tide_option 3 Solid 13 | set -g fake_tide_prompt_icon_connection '─' 14 | _tide_display_prompt 15 | 16 | _tide_menu (status function) 17 | switch $_tide_selected_option 18 | case Disconnected 19 | set -g fake_tide_prompt_icon_connection ' ' 20 | case Dotted 21 | set -g fake_tide_prompt_icon_connection '·' 22 | case Solid 23 | set -g fake_tide_prompt_icon_connection '─' 24 | end 25 | switch $_tide_configure_style 26 | case lean 27 | _next_choice all/prompt_connection_andor_frame_color 28 | case classic rainbow 29 | _next_choice powerline/powerline_right_prompt_frame 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/prompt_connection_andor_frame_color.fish: -------------------------------------------------------------------------------- 1 | function prompt_connection_andor_frame_color 2 | if test "$_tide_16color" = true || 3 | test "$fake_tide_left_prompt_frame_enabled" = false -a \ 4 | "$fake_tide_right_prompt_frame_enabled" = false -a \ 5 | "$fake_tide_prompt_icon_connection" = ' ' 6 | _next_choice all/prompt_spacing 7 | return 0 8 | end 9 | 10 | _tide_title "Connection & Frame Color" 11 | 12 | _tide_option 1 Lightest 13 | set -g fake_tide_prompt_color_frame_and_connection 808080 14 | _tide_display_prompt 15 | 16 | _tide_option 2 Light 17 | set -g fake_tide_prompt_color_frame_and_connection 6C6C6C 18 | _tide_display_prompt 19 | 20 | _tide_option 3 Dark 21 | set -g fake_tide_prompt_color_frame_and_connection 585858 22 | _tide_display_prompt 23 | 24 | _tide_option 4 Darkest 25 | set -g fake_tide_prompt_color_frame_and_connection 444444 26 | _tide_display_prompt 27 | 28 | _tide_menu (status function) 29 | switch $_tide_selected_option 30 | case Lightest 31 | set -g fake_tide_prompt_color_frame_and_connection 808080 32 | case Light 33 | set -g fake_tide_prompt_color_frame_and_connection 6C6C6C 34 | case Dark 35 | set -g fake_tide_prompt_color_frame_and_connection 585858 36 | case Darkest 37 | set -g fake_tide_prompt_color_frame_and_connection 444444 38 | end 39 | _next_choice all/prompt_spacing 40 | end 41 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/prompt_spacing.fish: -------------------------------------------------------------------------------- 1 | function prompt_spacing 2 | _tide_title 'Prompt Spacing' 3 | 4 | _tide_option 1 Compact 5 | set -g fake_tide_prompt_add_newline_before false 6 | _tide_display_prompt 7 | _tide_display_prompt 8 | 9 | _tide_option 2 Sparse 10 | set -g fake_tide_prompt_add_newline_before true 11 | _tide_display_prompt 12 | _tide_display_prompt 13 | 14 | _tide_menu (status function) 15 | switch $_tide_selected_option 16 | case Compact 17 | set -g fake_tide_prompt_add_newline_before false 18 | case Sparse 19 | set -g fake_tide_prompt_add_newline_before true 20 | end 21 | _next_choice all/icons 22 | end 23 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/show_time.fish: -------------------------------------------------------------------------------- 1 | function show_time 2 | _tide_title 'Show current time?' 3 | 4 | _tide_option 1 No 5 | _tide_display_prompt 6 | 7 | set -a fake_tide_right_prompt_items time 8 | 9 | _tide_option 2 '24-hour format' 10 | set -g fake_tide_time_format %T 11 | _tide_display_prompt 12 | 13 | _tide_option 3 '12-hour format' 14 | set -g fake_tide_time_format %r 15 | _tide_display_prompt 16 | 17 | _tide_menu (status function) 18 | switch $_tide_selected_option 19 | case No 20 | set -g fake_tide_time_format '' 21 | set -e fake_tide_right_prompt_items[-1] 22 | case '24-hour format' 23 | set -g fake_tide_time_format %T 24 | case '12-hour format' 25 | set -g fake_tide_time_format %r 26 | end 27 | switch $_tide_configure_style 28 | case lean 29 | _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_height 30 | case classic rainbow 31 | _next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_separators 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/style.fish: -------------------------------------------------------------------------------- 1 | function style 2 | set -g _tide_configure_current_options 3 | 4 | _tide_title 'Prompt Style' 5 | 6 | _tide_option 1 Lean 7 | _load_config lean 8 | _tide_display_prompt 9 | 10 | _tide_option 2 Classic 11 | _load_config classic 12 | _tide_display_prompt 13 | 14 | _tide_option 3 Rainbow 15 | _load_config rainbow 16 | _tide_display_prompt 17 | 18 | _tide_menu (status function) --no-restart 19 | switch $_tide_selected_option 20 | case Lean 21 | _load_config lean 22 | set -g _tide_configure_style lean 23 | case Classic 24 | _load_config classic 25 | set -g _tide_configure_style classic 26 | case Rainbow 27 | _load_config rainbow 28 | set -g _tide_configure_style rainbow 29 | end 30 | _next_choice all/prompt_colors 31 | end 32 | 33 | function _load_config -a name 34 | string replace -r '^' 'set -g fake_' <(status dirname)/../../icons.fish | source 35 | string replace -r '^' 'set -g fake_' <(status dirname)/../../configs/$name.fish | source 36 | end 37 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/all/transient.fish: -------------------------------------------------------------------------------- 1 | function transient 2 | _tide_title 'Enable transient prompt?' 3 | 4 | _tide_option 1 No 5 | _tide_display_prompt 6 | _tide_display_prompt 7 | _tide_display_prompt 8 | 9 | _tide_option 2 Yes 10 | _configure_transient= _tide_display_prompt 11 | _configure_transient= _tide_display_prompt 12 | _tide_display_prompt 13 | 14 | _tide_menu (status function) 15 | switch $_tide_selected_option 16 | case No 17 | set fake_tide_prompt_transient_enabled false 18 | case Yes 19 | set fake_tide_prompt_transient_enabled true 20 | end 21 | _next_choice all/finish 22 | end 23 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/classic/classic_prompt_color.fish: -------------------------------------------------------------------------------- 1 | function classic_prompt_color 2 | _tide_title 'Prompt Color' 3 | 4 | _tide_option 1 Lightest 5 | _set_all_items_bg_color 585858 6 | _tide_display_prompt 7 | 8 | _tide_option 2 Light 9 | _set_all_items_bg_color 444444 10 | _tide_display_prompt 11 | 12 | _tide_option 3 Dark 13 | _set_all_items_bg_color 303030 14 | _tide_display_prompt 15 | 16 | _tide_option 4 Darkest 17 | _set_all_items_bg_color 1C1C1C 18 | _tide_display_prompt 19 | 20 | _tide_menu (status function) 21 | switch $_tide_selected_option 22 | case Lightest 23 | _set_all_items_bg_color 585858 24 | case Light 25 | _set_all_items_bg_color 444444 26 | case Dark 27 | _set_all_items_bg_color 303030 28 | case Darkest 29 | _set_all_items_bg_color 1C1C1C 30 | end 31 | _next_choice all/show_time 32 | end 33 | 34 | function _set_all_items_bg_color -a color 35 | for var in (set --names | string match -r "fake_.*_bg_color.*") 36 | set $var $color 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/lean/lean_prompt_height.fish: -------------------------------------------------------------------------------- 1 | function lean_prompt_height 2 | _tide_title 'Prompt Height' 3 | 4 | _tide_option 1 'One line' 5 | _tide_find_and_remove newline fake_tide_left_prompt_items 6 | set -g fake_tide_left_prompt_suffix '' 7 | _tide_display_prompt 8 | 9 | _tide_option 2 'Two lines' 10 | set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1] 11 | set -g fake_tide_left_prompt_suffix ' ' 12 | _tide_display_prompt 13 | 14 | _tide_menu (status function) 15 | switch $_tide_selected_option 16 | case 'One line' 17 | _tide_find_and_remove newline fake_tide_left_prompt_items 18 | set fake_tide_left_prompt_suffix '' 19 | _next_choice all/prompt_connection_andor_frame_color 20 | case 'Two lines' 21 | _tide_find_and_remove newline fake_tide_left_prompt_items 22 | set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] newline $fake_tide_left_prompt_items[-1] 23 | set -g fake_tide_left_prompt_suffix ' ' 24 | _next_choice all/prompt_connection 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/powerline/powerline_prompt_heads.fish: -------------------------------------------------------------------------------- 1 | function powerline_prompt_heads 2 | _tide_title 'Prompt Heads' 3 | 4 | _tide_option 1 Sharp 5 | set -g fake_tide_left_prompt_suffix  6 | set -g fake_tide_right_prompt_prefix  7 | _tide_display_prompt 8 | 9 | _tide_option 2 Slanted 10 | set -g fake_tide_left_prompt_suffix  11 | set -g fake_tide_right_prompt_prefix  12 | _tide_display_prompt 13 | 14 | _tide_option 3 Round 15 | set -g fake_tide_left_prompt_suffix  16 | set -g fake_tide_right_prompt_prefix  17 | _tide_display_prompt 18 | 19 | _tide_menu (status function) 20 | switch $_tide_selected_option 21 | case Sharp 22 | set -g fake_tide_left_prompt_suffix  23 | set -g fake_tide_right_prompt_prefix  24 | case Slanted 25 | set -g fake_tide_left_prompt_suffix  26 | set -g fake_tide_right_prompt_prefix  27 | case Round 28 | set -g fake_tide_left_prompt_suffix  29 | set -g fake_tide_right_prompt_prefix  30 | end 31 | _next_choice powerline/powerline_prompt_tails 32 | end 33 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish: -------------------------------------------------------------------------------- 1 | function powerline_prompt_tails 2 | _tide_title 'Prompt Tails' 3 | 4 | _tide_option 1 Flat 5 | set -g fake_tide_left_prompt_prefix '' 6 | set -g fake_tide_right_prompt_suffix '' 7 | _tide_display_prompt 8 | 9 | _tide_option 2 Sharp 10 | set -g fake_tide_left_prompt_prefix  11 | set -g fake_tide_right_prompt_suffix  12 | _tide_display_prompt 13 | 14 | _tide_option 3 Slanted 15 | set -g fake_tide_left_prompt_prefix  16 | set -g fake_tide_right_prompt_suffix  17 | _tide_display_prompt 18 | 19 | _tide_option 4 Round 20 | set -g fake_tide_left_prompt_prefix  21 | set -g fake_tide_right_prompt_suffix  22 | _tide_display_prompt 23 | 24 | _tide_menu (status function) 25 | switch $_tide_selected_option 26 | case Flat 27 | set -g fake_tide_left_prompt_prefix '' 28 | set -g fake_tide_right_prompt_suffix '' 29 | case Sharp 30 | set -g fake_tide_left_prompt_prefix  31 | set -g fake_tide_right_prompt_suffix  32 | case Slanted 33 | set -g fake_tide_left_prompt_prefix  34 | set -g fake_tide_right_prompt_suffix  35 | case Round 36 | set -g fake_tide_left_prompt_prefix  37 | set -g fake_tide_right_prompt_suffix  38 | end 39 | _next_choice powerline/powerline_prompt_style 40 | end 41 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/choices/powerline/powerline_right_prompt_frame.fish: -------------------------------------------------------------------------------- 1 | function powerline_right_prompt_frame 2 | _tide_title 'Right Prompt Frame' 3 | 4 | _tide_option 1 No 5 | set fake_tide_right_prompt_frame_enabled false 6 | _tide_display_prompt 7 | 8 | _tide_option 2 Yes 9 | set fake_tide_right_prompt_frame_enabled true 10 | _tide_display_prompt 11 | 12 | _tide_menu (status function) 13 | switch $_tide_selected_option 14 | case No 15 | set fake_tide_right_prompt_frame_enabled false 16 | case Yes 17 | set fake_tide_right_prompt_frame_enabled true 18 | end 19 | _next_choice all/prompt_connection_andor_frame_color 20 | end 21 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_item_character.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_item_character 2 | set_color $fake_tide_character_color 3 | if contains newline $fake_tide_left_prompt_items || set -q _configure_transient 4 | echo -ns $fake_tide_character_icon 5 | else 6 | echo -ns ' '$fake_tide_character_icon 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_item_cmd_duration.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_item_cmd_duration 2 | _fake_tide_print_item cmd_duration $fake_tide_cmd_duration_icon' ' 5s 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_item_git.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_item_git 2 | _fake_tide_print_item git (set_color $fake_tide_git_color_branch) $fake_tide_git_icon' ' main 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_item_newline.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_item_newline 2 | set_color $prev_bg_color -b normal 3 | var=fake_tide_"$_fake_tide_side"_prompt_suffix echo $$var 4 | set -g add_prefix 5 | end 6 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_item_os.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_item_os 2 | _fake_tide_print_item os $fake_tide_os_icon 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_item_time.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_item_time 2 | _fake_tide_print_item time (date +$fake_tide_time_format) 3 | end 4 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_print_item.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_print_item -a item 2 | var=fake_tide_"$item"_bg_color set -f item_bg_color $$var 3 | 4 | if set -e add_prefix 5 | set_color $item_bg_color -b normal 6 | var=fake_tide_"$_fake_tide_side"_prompt_prefix echo -ns $$var 7 | else if test "$item_bg_color" = "$prev_bg_color" 8 | var=fake_tide_"$_fake_tide_side"_prompt_separator_same_color echo -ns $_fake_tide_color_separator_same_color$$var 9 | else if test "$_fake_tide_side" = left 10 | set_color $prev_bg_color -b $item_bg_color 11 | echo -ns $fake_tide_left_prompt_separator_diff_color 12 | else 13 | set_color $item_bg_color -b $prev_bg_color 14 | echo -ns $fake_tide_right_prompt_separator_diff_color 15 | end 16 | 17 | var=fake_tide_"$item"_color set_color $$var -b $item_bg_color 18 | 19 | echo -ns $_fake_tide_pad $argv[2..] $_fake_tide_pad 20 | 21 | set -g prev_bg_color $item_bg_color 22 | end 23 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/functions/_fake_tide_pwd.fish: -------------------------------------------------------------------------------- 1 | function _fake_tide_pwd 2 | set -l out ( 3 | set_color $fake_tide_pwd_color_dirs 4 | echo -ns $fake_tide_pwd_icon' ' '~/' 5 | set_color -o $fake_tide_pwd_color_anchors 6 | echo -ns src 7 | set_color normal -b $fake_tide_pwd_bg_color 8 | ) 9 | set -g _tide_pwd_len (string length --visible $out) 10 | echo -ns $out 11 | end 12 | -------------------------------------------------------------------------------- /config.symlink/fish/functions/tide/configure/icons.fish: -------------------------------------------------------------------------------- 1 | tide_aws_icon  # Actual aws glyph is harder to see 2 | tide_character_icon ❯ 3 | tide_character_vi_icon_default ❮ 4 | tide_character_vi_icon_replace ▶ 5 | tide_character_vi_icon_visual V 6 | tide_cmd_duration_icon 7 | tide_crystal_icon  8 | tide_direnv_icon ▼ 9 | tide_distrobox_icon 󰆧 10 | tide_docker_icon  11 | tide_elixir_icon  12 | tide_gcloud_icon 󰊭 # Actual google cloud glyph is harder to see 13 | tide_git_icon 14 | tide_go_icon  15 | tide_java_icon  16 | tide_jobs_icon  17 | tide_kubectl_icon 󱃾 18 | tide_nix_shell_icon  19 | tide_node_icon  # Actual nodejs glyph is harder to see 20 | tide_os_icon $os_branding_icon 21 | tide_php_icon  22 | tide_private_mode_icon 󰗹 23 | tide_prompt_icon_connection ' ' 24 | tide_pulumi_icon  25 | tide_pwd_icon 26 | tide_pwd_icon_home 27 | tide_pwd_icon_unwritable  28 | tide_python_icon 󰌠 29 | tide_ruby_icon  30 | tide_rustc_icon  31 | tide_shlvl_icon  32 | tide_status_icon ✔ 33 | tide_status_icon_failure ✘ 34 | tide_terraform_icon 󱁢 35 | tide_toolbox_icon  36 | tide_vi_mode_icon_default D 37 | tide_vi_mode_icon_insert I 38 | tide_vi_mode_icon_replace R 39 | tide_vi_mode_icon_visual V 40 | tide_zig_icon  41 | -------------------------------------------------------------------------------- /config.symlink/github-copilot/fallbackContextProviderDocumentSymbols/def87251-c0d3-43e6-886d-189d78f608d4.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/github-copilot/fallbackContextProviderDocumentSymbols/def87251-c0d3-43e6-886d-189d78f608d4.db -------------------------------------------------------------------------------- /config.symlink/github-copilot/fallbackContextProviderDocumentSymbols/def87251-c0d3-43e6-886d-189d78f608d4.db-shm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/github-copilot/fallbackContextProviderDocumentSymbols/def87251-c0d3-43e6-886d-189d78f608d4.db-shm -------------------------------------------------------------------------------- /config.symlink/github-copilot/fallbackContextProviderDocumentSymbols/def87251-c0d3-43e6-886d-189d78f608d4.db-wal: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/github-copilot/fallbackContextProviderDocumentSymbols/def87251-c0d3-43e6-886d-189d78f608d4.db-wal -------------------------------------------------------------------------------- /config.symlink/github-copilot/symbolDatabaseLookup.json: -------------------------------------------------------------------------------- 1 | {"file:///Users/pe8er/.dotfiles/config.symlink":"def87251-c0d3-43e6-886d-189d78f608d4.db"} 2 | -------------------------------------------------------------------------------- /config.symlink/glow/glow.yml: -------------------------------------------------------------------------------- 1 | # style name or JSON path (default "auto") 2 | style: "auto" 3 | # mouse support (TUI-mode only) 4 | mouse: false 5 | # use pager to display markdown 6 | pager: false 7 | # word-wrap at width 8 | width: 80 9 | -------------------------------------------------------------------------------- /config.symlink/iterm2/AppSupport: -------------------------------------------------------------------------------- 1 | /Users/pe8er/Library/Application Support/iTerm2 -------------------------------------------------------------------------------- /config.symlink/karabiner/configstore/google-translate-api.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /config.symlink/karabiner/configstore/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "lastCheck": 1605632695981 3 | } -------------------------------------------------------------------------------- /config.symlink/karabiner/configstore/update-notifier-npm.json: -------------------------------------------------------------------------------- 1 | { 2 | "optOut": false, 3 | "lastUpdateCheck": 1605815849404, 4 | "update": { 5 | "latest": "6.14.8", 6 | "current": "6.14.7", 7 | "type": "patch", 8 | "name": "npm" 9 | } 10 | } -------------------------------------------------------------------------------- /config.symlink/mc/panels.ini: -------------------------------------------------------------------------------- 1 | [New Left Panel] 2 | display=listing 3 | reverse=false 4 | case_sensitive=true 5 | exec_first=false 6 | sort_order=name 7 | list_mode=full 8 | brief_cols=2 9 | user_mini_status=false 10 | filter_flags=7 11 | list_format=full 12 | 13 | [New Right Panel] 14 | display=listing 15 | reverse=false 16 | case_sensitive=true 17 | exec_first=false 18 | sort_order=name 19 | list_mode=full 20 | brief_cols=2 21 | user_mini_status=false 22 | filter_flags=7 23 | list_format=full 24 | 25 | [Dirs] 26 | current_is_left=true 27 | other_dir=/Users/pe8er 28 | -------------------------------------------------------------------------------- /config.symlink/raycast/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "accesstoken" : "BWRV5YhtnWJWKUYpUjiLivuycIqxZMCDGYSa_bmKBVk", 3 | "token" : "BWRV5YhtnWJWKUYpUjiLivuycIqxZMCDGYSa_bmKBVk" 4 | } -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/Create Symbolic Link.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Create Symbolic Link 6 | # @raycast.mode silent 7 | # @raycast.packageName Finder 8 | # 9 | # Optional parameters: 10 | # @raycast.icon assets/link.badge.plus.svg 11 | # 12 | # Documentation: 13 | # @raycast.description Create a symbolic link from selected item(s) in Finder 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | posixPaths=$( 18 | osascript < 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/2.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/3.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/4.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/5.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/6.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/7.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/arrow.clockwise.circle.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/folder.fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.bottomhalf.inset.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.center.inset.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.inset.bottomleft.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.inset.bottomright.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.inset.topleft.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.inset.topright.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.lefthalf.inset.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.righthalf.inset.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/rectangle.tophalf.inset.filled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/assets/yabai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/raycast/scripts/assets/yabai.png -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-cycle-windows-on-space.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Cycle Windows 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Cycles between windows on current space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | ~/.config/yabai/cycle_windows.sh 18 | sketchybar --trigger update_yabai_icon -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-float-window.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Float Window 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Float a window and resize it 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | ~/.dotfiles/config.symlink/yabai/float_window.sh 18 | sketchybar --trigger update_yabai_icon -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 1 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/1.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" 29 | 30 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 2 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/2.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 3 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/3.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-4.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 4 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/4.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 5 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/6.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 6 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/6.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-focus-space-7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Focus Space 7 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/7.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Focus Space 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Remove the extension '.sh' from the filename 21 | filename_no_extension="${filename%.sh}" 22 | 23 | # Get the last character of the filename, which is '1' in this case 24 | spaceNum="${filename_no_extension: -1}" 25 | 26 | yabai -m space --focus $spaceNum 27 | 28 | echo "Welcome to Space $spaceNum!" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-maximize-window.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Set Window Full-screen 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Sets a window full-screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | windowInfo=$(yabai -m query --windows app,has-fullscreen-zoom --window) 18 | 19 | yabai -m window --toggle zoom-fullscreen 20 | sketchybar --trigger update_yabai_icon 21 | 22 | appName=$(echo $windowInfo | jq -r '.app') 23 | 24 | isFullScreen=$(echo $windowInfo | jq -r '."has-fullscreen-zoom"') 25 | 26 | if [[ "$isFullScreen" = "false" ]]; then 27 | echo "Making $appName full screen" 28 | else 29 | echo "Moving $appName back to the grid" 30 | fi -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-mirror-x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Mirror Windows Horizontally 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Mirror windows on current space along the x-axis 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | yabai -m space --mirror x-axis -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-mirror-y.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Mirror Windows Vertically 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Mirror windows on current space along the y-axis 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | yabai -m space --mirror y-axis -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-bottomhalf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Bottom Half 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.bottomhalf.inset.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Bottom Half of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-bottomleft.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Bottom Left 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.inset.bottomleft.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Bottom Left of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-bottomright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Bottom Right 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.inset.bottomright.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Bottom Right of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-center.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Center 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.center.inset.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Center of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-lefthalf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Left Half 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.lefthalf.inset.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Left Half of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-righthalf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Right Half 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.righthalf.inset.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Right Half of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | echo $argument 24 | 25 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-tophalf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Top Half 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.tophalf.inset.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Top Half of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-topleft.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Top Left 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.inset.topleft.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Top Left of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-floating-windows-topright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window -> Top Right 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.inset.topright.filled.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Move Floating Window to Top Right of the Screen 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename 18 | filename=$(basename "$0") 19 | 20 | # Get the last character of the filename, which is '1' in this case 21 | argument=$(echo "${filename%.sh}" | awk -F'-' '{print $NF}') 22 | 23 | $HOME/.dotfiles/config.symlink/yabai/move-floating-windows.sh $argument 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-move-window.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Move Window to Another Space 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/rectangle.trailinghalf.inset.filled.arrow.trailing.svg 10 | # @raycast.argument1 { "type": "text", "placeholder": "Space number (1-7)" } 11 | # @raycast.packageName Yabai 12 | 13 | # Documentation: 14 | # @raycast.description Move focused window to another space 15 | # @raycast.author Pior Gajos 16 | # @raycast.authorURL https://github.com/Pe8er 17 | 18 | yabai -m window --space "$1" --focus 19 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-reload-config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Reload Yabai Config 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/arrow.clockwise.circle.fill.svg 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Reload Yabai Config 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | ~/.config/yabai/reload.sh 18 | 19 | echo "Reloading Yabai config…" 20 | 21 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-restart-service.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Restart Yabai Service 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Restarts Yabai service 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | yabai --restart-service 18 | 19 | echo "Restarting Yabai service…" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-swap-windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Swap Windows 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Swap window positions 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | ~/.config/yabai/swap-windows.sh "prev" 18 | sketchybar --trigger update_yabai_icon 19 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-toggle-split.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Toggle Window Split 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Toggle horizontal / vertical split 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | yabai -m window --toggle split 18 | sketchybar --trigger update_yabai_icon 19 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-toggle-stack-bsp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Toggle Stack / BSP Layout 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Toggle between Stack and BSP layouts 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | sketchybar --trigger alfred_trigger 18 | sleep 0.5 19 | layout=$(yabai -m query --spaces type --space | jq -r .type) 20 | echo "Layout: $layout" 21 | sleep 0.5 22 | sketchybar --trigger update_yabai_icon 23 | 24 | -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Yabai Tools 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.argument1 { "type": "dropdown", "placeholder": "Command", "data": [{ "title": "arrange [lefthalf]", "value": "arrange" }, { "title": "balance", "value": "balance" }, { "title": "cycle", "value": "cycle" }, { "title": "float", "value": "float" }, { "title": "focusSpace [NUM]", "value": "focusSpace" }, { "title": "focusWin [DIR]", "value": "focusWin" }, { "title": "help", "value": "help" }, { "title": "maximize", "value": "maximize" }, { "title": "mirror", "value": "mirror" }, { "title": "move [NUM]", "value": "move" }, { "title": "reloadConfig", "value": "reloadConfig" }, { "title": "resize [+|-]", "value": "resize" }, { "title": "restart", "value": "restart" }, { "title": "start", "value": "start" }, { "title": "status", "value": "status" }, { "title": "stop", "value": "stop" }, { "title": "swap", "value": "swap" }, { "title": "toggleLayout", "value": "toggleLayout" }, { "title": "toggleSplit", "value": "toggleSplit" }, { "title": "updateYabai", "value": "updateYabai" } ] } 11 | # @raycast.argument2 { "type": "text", "placeholder": "Argument", "optional": true } 12 | # @raycast.packageName Yabai 13 | 14 | # Documentation: 15 | # @raycast.description All Yabai scripts in one 16 | # @raycast.author Pior Gajos 17 | # @raycast.authorURL https://github.com/Pe8er 18 | 19 | /Users/pe8er/.dotfiles/config.symlink/yabai/yabai-tools.sh "$1" "$2" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-window-size-decrease.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Decrease Window Size 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Decreases size of focused window 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename without extension 18 | filename=$(basename "$0" .sh) 19 | 20 | # Extract the variable part by splitting the filename 21 | direction=${filename##*-} 22 | 23 | ~/.config/yabai/resize_window.sh "$direction" -------------------------------------------------------------------------------- /config.symlink/raycast/scripts/yabai-window-size-increase.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Required parameters: 4 | # @raycast.schemaVersion 1 5 | # @raycast.title Increase Window Size 6 | # @raycast.mode silent 7 | 8 | # Optional parameters: 9 | # @raycast.icon assets/yabai.png 10 | # @raycast.packageName Yabai 11 | 12 | # Documentation: 13 | # @raycast.description Increases size of focused window 14 | # @raycast.author Pior Gajos 15 | # @raycast.authorURL https://github.com/Pe8er 16 | 17 | # Get the filename without extension 18 | filename=$(basename "$0" .sh) 19 | 20 | # Extract the variable part by splitting the filename 21 | direction=${filename##*-} 22 | 23 | ~/.config/yabai/resize_window.sh "$direction" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/battery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | battery=( 4 | icon.font.size=14 5 | icon.padding_right=0 6 | icon.font.style="Light" 7 | update_freq=60 8 | popup.align=right 9 | script="$PLUGIN_DIR/battery.sh" 10 | updates=when_shown 11 | ) 12 | 13 | sketchybar \ 14 | --add item battery right \ 15 | --set battery "${battery[@]}" \ 16 | --subscribe battery power_source_change \ 17 | mouse.clicked -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/brew.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | brew=( 4 | "${notification_defaults[@]}" 5 | icon=$ICON_PACKAGE 6 | script="$PLUGIN_DIR/brew.sh" 7 | click_script="$PLUGIN_DIR/brew.sh" 8 | --subscribe brew mouse.clicked 9 | ) 10 | 11 | sketchybar --add item brew $1 \ 12 | --set brew "${brew[@]}" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/brew_script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | BREWAPP="$(which brew)" 4 | 5 | $BREWAPP update && $BREWAPP upgrade -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/control_center.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | control_center=( 7 | icon=$ICON_CONTROLCENTER 8 | label.drawing=off 9 | icon.padding_left=$PADDINGS 10 | icon.padding_right=$PADDINGS 11 | icon.y_offset=1.5 12 | click_script="osascript -e 'tell application \"System Events\" to tell process \"Control Center\" to perform action \"AXPress\" of menu bar item 2 of menu bar 1' >/dev/null 2>&1" 13 | ) 14 | 15 | sketchybar --add item control_center right \ 16 | --set control_center "${control_center[@]}" \ 17 | --set control_center "${bracket_defaults[@]}" 18 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/countdown.sh: -------------------------------------------------------------------------------- 1 | sketchybar \ 2 | --add item countdown q \ 3 | --set countdown script="$PLUGIN_DIR/countdown.sh" \ 4 | "${notification_defaults[@]}" \ 5 | background.color=$(getcolor blue) \ 6 | drawing=on \ 7 | update_freq=300 \ 8 | updates=on \ 9 | icon=􀣝 -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/diskmonitor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | diskmonitor=( 4 | icon.font.size=14 5 | icon.padding_right=0 6 | icon.padding_left=$PADDINGS 7 | label.drawing=off 8 | y_offset=1 9 | update_freq=300 10 | updates=when_shown 11 | script="$PLUGIN_DIR/diskmonitor.sh" 12 | ) 13 | 14 | misc=( 15 | icon.drawing=off 16 | width=0 17 | padding_right=4 18 | update_freq=300 19 | updates=when_shown 20 | label.drawing=off 21 | click_script="open -a DaisyDisk.app" 22 | ) 23 | 24 | diskmonitor_label=( 25 | "${misc[@]}" 26 | label.font="$FONT:Semibold:8" 27 | y_offset=5 28 | ) 29 | 30 | diskmonitor_value=( 31 | "${misc[@]}" 32 | label.font="$FONT:Bold:10" 33 | y_offset=-3 34 | ) 35 | 36 | sketchybar \ 37 | --add item diskmonitor.label right \ 38 | --set diskmonitor.label "${diskmonitor_label[@]}" \ 39 | \ 40 | --add item diskmonitor.value right \ 41 | --set diskmonitor.value "${diskmonitor_value[@]}" \ 42 | \ 43 | --add item diskmonitor right \ 44 | --set diskmonitor "${diskmonitor[@]}" \ 45 | --subscribe diskmonitor mouse.clicked -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/dnd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dnd=( 4 | script="$PLUGIN_DIR/dnd.sh" 5 | label.drawing=off 6 | icon=$ICON_DND_ON 7 | --add event focus_on "_NSDoNotDisturbEnabledNotification" 8 | --add event focus_off "_NSDoNotDisturbDisabledNotification" 9 | --subscribe dnd focus_on focus_off mouse.clicked 10 | ) 11 | 12 | sketchybar \ 13 | --add item dnd right \ 14 | --set dnd "${dnd[@]}" 15 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/front_app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | front_app=( 7 | icon.drawing=off 8 | label.padding_right=$PADDINGS 9 | script="$PLUGIN_DIR/front_app.sh" 10 | ) 11 | 12 | sketchybar \ 13 | --add item front_app left \ 14 | --set front_app "${front_app[@]}" \ 15 | --subscribe front_app space_change space_windows_change front_app_switched -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/mail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mail=( 4 | "${notification_defaults[@]}" 5 | icon=$ICON_MAIL 6 | script="$PLUGIN_DIR/mail.sh" 7 | click_script="open -a /System/Applications/Mail.app" 8 | ) 9 | 10 | sketchybar --add item mail $1 \ 11 | --set mail "${mail[@]}" \ 12 | --subscribe mail front_app_switched -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/messages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | messages=( 4 | "${notification_defaults[@]}" 5 | icon=$ICON_CHAT 6 | script="$PLUGIN_DIR/messages.sh" 7 | click_script="open -a /System/Applications/Messages.app" 8 | ) 9 | 10 | sketchybar --add item messages $1 \ 11 | --set messages "${messages[@]}" \ 12 | --subscribe messages front_app_switched -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/music.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | music=( 4 | background.border_color="$(getcolor grey 50)" 5 | background.border_width=1 6 | background.color=$TRANSPARENT 7 | background.image.corner_radius=4 8 | background.image.scale=0.6 9 | icon.padding_right=24 10 | label.max_chars=24 11 | label.padding_right=$PADDINGS 12 | label.scroll_duration=100 13 | padding_right=$PADDINGS 14 | script="$PLUGIN_DIR/music.sh" 15 | click_script="$PLUGIN_DIR/music.sh" 16 | updates=on 17 | --subscribe music media_change mouse.clicked 18 | ) 19 | 20 | sketchybar \ 21 | --add item music right \ 22 | --set music "${music[@]}" 23 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/reminders.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | reminders=( 4 | "${notification_defaults[@]}" 5 | icon=$ICON_TODO 6 | script="$PLUGIN_DIR/reminders.sh" 7 | click_script="open -a /System/Applications/Reminders.app" 8 | ) 9 | 10 | sketchybar --add item reminders $1 \ 11 | --set reminders "${reminders[@]}" \ 12 | --subscribe reminders front_app_switched -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/spacer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | spacer=( 4 | width=4 5 | icon.padding_left=0 6 | icon.padding_right=0 7 | padding_left=0 8 | padding_right=0 9 | ) 10 | 11 | sketchybar \ 12 | --add item spacer.$1 $2 \ 13 | --set spacer.$1 "${spacer[@]}" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/spaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | # Defaults 7 | spaces=( 8 | background.corner_radius=4 9 | ) 10 | 11 | # Get all spaces 12 | SPACES=($(yabai -m query --spaces index | jq -r '.[].index')) 13 | 14 | for SID in "${SPACES[@]}"; do 15 | sketchybar --add space space.$SID left \ 16 | --set space.$SID "${spaces[@]}" \ 17 | script="$PLUGIN_DIR/app_space.sh $SID" \ 18 | associated_space=$SID \ 19 | icon=$SID \ 20 | --subscribe space.$SID mouse.clicked front_app_switched space_change space_windows_change 21 | done -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/stress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | stress=( 4 | "${notification_defaults[@]}" 5 | background.color=$HIGHLIGHT 6 | icon.color=$BAR_COLOR 7 | icon.padding_left=$PADDINGS 8 | icon=$ICON_STRESS 9 | label.color=$BAR_COLOR 10 | label.padding_right=$PADDINGS 11 | label="Loading…" 12 | script="$PLUGIN_DIR/stress.sh" 13 | update_freq=1800 14 | updates=when_shown 15 | ) 16 | 17 | sketchybar --add item stress $1 \ 18 | --set stress "${stress[@]}" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/things3.sh: -------------------------------------------------------------------------------- 1 | # Load global styles, colors and icons 2 | source "$CONFIG_DIR/globalstyles.sh" 3 | 4 | things3=( 5 | "${notification_defaults[@]}" 6 | drawing=on 7 | icon.drawing=off 8 | label.padding_left=8 9 | background.color=$(getcolor cyan) 10 | script="$PLUGIN_DIR/things3.sh" 11 | click_script="open -a /Applications/Things3.app" 12 | ) 13 | 14 | sketchybar --add item things3 right \ 15 | --set things3 "${things3[@]}" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/transmission.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | transmission=( 4 | label.padding_right=4 5 | icon.drawing=off 6 | update_freq=5 7 | script="$PLUGIN_DIR/transmission.sh" 8 | click_script="open -a /Applications/Transmission.app" 9 | ) 10 | 11 | sketchybar --add item transmission right \ 12 | --set transmission "${transmission[@]}" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/volume.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | volume_slider=( 4 | updates=on 5 | icon.drawing=off 6 | label.drawing=off 7 | padding_left=0 8 | padding_right=0 9 | slider.background.color=$(getcolor white 25) 10 | slider.background.corner_radius=12 11 | slider.background.height=8 12 | slider.highlight_color=$HIGHLIGHT 13 | script="$PLUGIN_DIR/volume.sh" 14 | ) 15 | 16 | volume_icon=( 17 | click_script="$PLUGIN_DIR/volume_click.sh" 18 | icon=$ICON_VOLUME_100 19 | label.drawing=off 20 | icon.padding_right=1 21 | popup.align=right 22 | ) 23 | 24 | sketchybar --add slider volume right \ 25 | --set volume "${volume_slider[@]}" \ 26 | --subscribe volume volume_change \ 27 | mouse.clicked \ 28 | mouse.entered \ 29 | mouse.exited \ 30 | mouse.exited.global \ 31 | \ 32 | --add item volume_icon right \ 33 | --set volume_icon "${volume_icon[@]}" 34 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/weather.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | weather=( 4 | "${menu_defaults[@]}" 5 | "${notification_defaults[@]}" 6 | update_freq=1800 7 | drawing=on 8 | popup.align=center 9 | icon.color=$HIGHLIGHT 10 | script="$PLUGIN_DIR/weather.sh" 11 | --subscribe weather wifi_change 12 | mouse.clicked 13 | system_woke 14 | ) 15 | 16 | aqi=( 17 | label.color=$LABEL_COLOR_NEGATIVE 18 | drawing=off 19 | background.height=16 20 | label.padding_left=$PADDINGS 21 | label.padding_right=$PADDINGS 22 | ) 23 | 24 | sketchybar \ 25 | --add item aqi $1 \ 26 | --add item weather $1 \ 27 | --set weather "${weather[@]}" \ 28 | --set aqi "${aqi[@]}" \ 29 | --add item weather.location popup.weather \ 30 | --add item weather.condition popup.weather \ 31 | --add item weather.aqi popup.weather \ 32 | --add item weather.precipitation popup.weather \ 33 | --add item weather.wind popup.weather \ 34 | --add item weather.humidity popup.weather \ 35 | --add item weather.update popup.weather \ 36 | --add item weather.openapp popup.weather \ 37 | --set '/weather\..*/' "${menu_item_defaults[@]}" click_script="sketchybar --set weather popup.drawing=off" -------------------------------------------------------------------------------- /config.symlink/sketchybar/items/yabai.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yabai=( 4 | icon=$ICON_YABAI_GRID 5 | icon.padding_left=$PADDINGS 6 | icon.padding_right=$((PADDINGS + 2)) 7 | label.padding_right=$PADDINGS 8 | script="$PLUGIN_DIR/yabai.sh" 9 | ) 10 | 11 | # Allows my shortcut / workflow in Alfred to trigger things in Sketchybar 12 | sketchybar --add event alfred_trigger 13 | sketchybar --add event update_yabai_icon 14 | 15 | sketchybar --add item yabai left \ 16 | --set yabai "${yabai[@]}" \ 17 | --set yabai "${bracket_defaults[@]}" \ 18 | --subscribe yabai space_change \ 19 | mouse.scrolled.global \ 20 | mouse.clicked \ 21 | front_app_switched \ 22 | space_windows_change \ 23 | alfred_trigger \ 24 | update_yabai_icon -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/Countdown.sh: -------------------------------------------------------------------------------- 1 | end=$(date -j -f "%b %d %Y %H:%M:%S" "Aug 1 2024 23:00:00" +%s) 2 | start=$(date +%s) 3 | 4 | time=$(awk 'BEGIN {p = ('"$start"'-'"$end"')/2628002.88; printf "%.1f\n", p}')"M" 5 | 6 | # countdown=$(printf '%d:%d:%d\n' $(($time/60/60/24%365)) $(($time/3600%24)) $(($time%3600/60))) 7 | 8 | sketchybar --set $NAME label="$time" -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/brew.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | OUTDATED=$(brew outdated) 7 | COUNT=$(echo $OUTDATED | wc -w | tr -d ' ') 8 | 9 | update_label() { 10 | if [ "$(cat /tmp/sketchybar_sender)" == "focus_on" ]; then 11 | DRAWING="off" 12 | else 13 | DRAWING="on" 14 | fi 15 | 16 | case "$COUNT" in 17 | [7-9] | [1-9][0-9]) 18 | COLOR=$(getcolor red) 19 | ;; 20 | [3-6]) 21 | COLOR=$(getcolor orange) 22 | ;; 23 | [1-2]) 24 | COLOR=$(getcolor yellow) 25 | ;; 26 | 0 | "") 27 | COLOR=$LABEL_COLOR 28 | DRAWING="off" 29 | ;; 30 | esac 31 | 32 | sketchybar --animate tanh 20 --set $NAME drawing=$DRAWING label=$COUNT icon.color=$COLOR 33 | } 34 | 35 | mouse_clicked() { 36 | sketchybar --set $NAME icon=$ICON_REFRESH 37 | $(which terminal-notifier) -title "$NAME" -subtitle "$COUNT outdated packages" -message "$(echo -e "$OUTDATED")" 38 | $CONFIG_DIR/items/brew_script.sh & 39 | 40 | # Wait for the brew process to finish 41 | wait $! 42 | echo "Brew update and upgrade are complete." 43 | sleep 3 44 | update_label 45 | sketchybar --set $NAME icon=$ICON_PACKAGE 46 | } 47 | 48 | case "$SENDER" in 49 | "routine" | "forced") 50 | update_label 51 | ;; 52 | "mouse.clicked") 53 | mouse_clicked 54 | ;; 55 | esac 56 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/brightness.sh: -------------------------------------------------------------------------------- 1 | LABEL=$(brightness -l | awk 'NR==2 {printf("%02.0f", $4*100)}')% 2 | 3 | sketchybar --set $NAME label=$LABEL -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/dndindicator.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Thanks to reddit:rudypaul 4 | # BIN_DIR="/usr/bin" 5 | 6 | # PLUTIL="${BIN_DIR}/plutil" 7 | # XPATH="${BIN_DIR}/xpath" 8 | # BASE64="${BIN_DIR}/base64" 9 | 10 | dnd_enabled=$( 11 | defaults read com.apple.controlcenter "NSStatusItem Visible FocusModes" 12 | # dnd_enabled=$( 13 | # "${PLUTIL}" -extract dnd_prefs xml1 -o - ~/Library/Preferences/com.apple.ncprefs.plist | 14 | # "${XPATH}" -q -e 'string(//data)' | 15 | # "${BASE64}" -D | 16 | # "${PLUTIL}" -convert xml1 - -o - | 17 | # "${XPATH}" -q -e 'boolean(//key[text()="userPref"]/following-sibling::dict/key[text()="enabled"])' 18 | ) 19 | 20 | if [ $dnd_enabled -eq 1 ]; then 21 | sketchybar --set $NAME drawing=on icon=􀆺 22 | else 23 | sketchybar --set $NAME drawing=off icon= 24 | fi -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/mail.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | if [ "$(cat /tmp/sketchybar_sender)" == "focus_on" ]; then 7 | DRAWING="off" 8 | else 9 | DRAWING="on" 10 | fi 11 | 12 | COUNT=$(lsappinfo info -only StatusLabel "Mail" | grep -o '"label"="[0-9]*"' | awk -F'"' '{print $4}') 13 | 14 | case "$COUNT" in 15 | [7-9]|[1-9][0-9]) 16 | COLOR=$(getcolor red) 17 | ;; 18 | [3-6]) 19 | COLOR=$(getcolor orange) 20 | ;; 21 | [1-2]) 22 | COLOR=$(getcolor yellow) 23 | ;; 24 | 0|"") 25 | COLOR=$LABEL_COLOR 26 | DRAWING="off" 27 | ;; 28 | esac 29 | 30 | sketchybar --animate tanh 20 --set $NAME drawing=$DRAWING label=$COUNT icon.color=$COLOR -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/messages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | if [ "$(cat /tmp/sketchybar_sender)" == "focus_on" ]; then 7 | DRAWING="off" 8 | else 9 | DRAWING="on" 10 | fi 11 | 12 | # NEWMESSAGES=$(sqlite3 ~/Library/Messages/chat.db "SELECT text FROM message WHERE is_read=0 AND is_from_me=0 AND text!='' AND date_read=0" | wc -l | awk '{$1=$1};1') 13 | COUNT=$(sqlite3 ~/Library/Messages/chat.db "SELECT COUNT(guid) FROM message WHERE NOT(is_read) AND NOT(is_from_me) AND NOT text =''") 14 | 15 | 16 | case "$COUNT" in 17 | [7-9]|[1-9][0-9]) 18 | COLOR=$(getcolor red) 19 | ;; 20 | [3-6]) 21 | COLOR=$(getcolor orange) 22 | ;; 23 | [1-2]) 24 | COLOR=$(getcolor yellow) 25 | ;; 26 | 0|"") 27 | COLOR=$LABEL_COLOR 28 | DRAWING="off" 29 | ;; 30 | esac 31 | 32 | sketchybar --animate tanh 20 --set $NAME drawing=$DRAWING label=$COUNT icon.color=$COLOR -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/music.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PLAYER="$(echo "$INFO" | jq -r '.app')" 4 | PLAYERSTATE="$(echo "$INFO" | jq -r '.state')" 5 | CURRENTARTIST="$(echo "$INFO" | jq -r '.artist')" 6 | CURRENTSONG="$(echo "$INFO" | jq -r '.title')" 7 | 8 | updateWidget() { 9 | if [[ "$PLAYER" = "Music" || "$PLAYER" = "Spotify" || "$PLAYER" = "TIDAL" ]]; then 10 | ARGS=(drawing=on label="$CURRENTARTIST: $CURRENTSONG" background.image=media.artwork) 11 | else 12 | ARGS=(drawing=off) 13 | fi 14 | 15 | sketchybar --set $NAME "${ARGS[@]}" 16 | } 17 | 18 | mouseClicked() { 19 | if [[ "$MODIFIER" == "cmd" ]]; then 20 | open -a "$PLAYER" 21 | elif [[ "$MODIFIER" == "shift" ]]; then 22 | open raycast://extensions/douo/global-media-key/next 23 | elif [[ "$MODIFIER" == "none" ]]; then 24 | open raycast://extensions/douo/global-media-key/play 25 | fi 26 | } 27 | 28 | case "$SENDER" in 29 | "routine" | "forced" | "media_change") 30 | updateWidget 31 | ;; 32 | "mouse.clicked") 33 | mouseClicked 34 | ;; 35 | esac 36 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/music/Cover-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/sketchybar/plugins/music/Cover-Default.png -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/nextevent.applescript: -------------------------------------------------------------------------------- 1 | set input to paragraphs of (do shell script "/opt/homebrew/bin/icalBuddy -ec 'Found in Natural Language,CCSF' -npn -nc -iep 'datetime,title' -po 'datetime,title' -eed -ea -n -li 4 -ps '|: |' -b '' eventsToday") 2 | 3 | set currentTime to date (do shell script "date '+%I:%M %p'") 4 | 5 | set theEvent to "" 6 | 7 | if input is not "" then 8 | repeat with anEvent in input 9 | set text item delimiters to "^" 10 | set eventTime to date (text item 1 of anEvent) 11 | set text item delimiters to "" 12 | if eventTime > currentTime then 13 | set theEvent to anEvent as string 14 | exit repeat 15 | end if 16 | end repeat 17 | end if 18 | 19 | return theEvent -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/pia.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # VPN=$(scutil --nc list | grep Connected | sed -E 's/.*"(.*)".*/\1/') 4 | 5 | VPN_STATUS=$(/usr/local/bin/piactl get connectionstate) 6 | 7 | if [[ "$VPN_STATUS" == "Connected" ]]; then 8 | sketchybar --set $NAME icon=􀎡 drawing=on 9 | else 10 | sketchybar --set $NAME drawing=off 11 | fi -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/reminders.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | if [ "$(cat /tmp/sketchybar_sender)" == "focus_on" ]; then 7 | DRAWING="off" 8 | else 9 | DRAWING="on" 10 | fi 11 | 12 | COUNT=$(( $(reminders show-all --due-date today | grep -E "^[a-zA-Z &]+: \d{1,2}: " | wc -l) + 0 )) 13 | 14 | case "$COUNT" in 15 | [7-9]|[1-9][0-9]) 16 | COLOR=$(getcolor red) 17 | ;; 18 | [3-6]) 19 | COLOR=$(getcolor orange) 20 | ;; 21 | [1-2]) 22 | COLOR=$(getcolor yellow) 23 | ;; 24 | 0|"") 25 | COLOR=$LABEL_COLOR 26 | DRAWING="off" 27 | ;; 28 | esac 29 | 30 | sketchybar --animate tanh 20 --set $NAME drawing=$DRAWING label=$COUNT icon.color=$COLOR -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/stress.py: -------------------------------------------------------------------------------- 1 | # https://github.com/matin/garth 2 | 3 | try: 4 | import garth 5 | except ImportError: 6 | print("garth module is not installed. Please install it using 'pip install garth'.") 7 | exit(1) 8 | from garth.exc import GarthException 9 | from getpass import getpass 10 | 11 | garminCredentials = "/Users/pe8er/.garmin-credentials" 12 | 13 | try: 14 | garth.resume(garminCredentials) 15 | garth.client.username 16 | except (FileNotFoundError, GarthException): 17 | email = input("Email: ") 18 | password = getpass("Password: ") 19 | garth.client.login(email, password) 20 | 21 | garth.save(garminCredentials) 22 | 23 | from datetime import date 24 | dailyStress = garth.DailyStress.list(date.today())[0].overall_stress_level 25 | weeklyStress = garth.WeeklyStress.list(date.today())[0].value 26 | # test = garth.DailySteps.list(period=2) 27 | 28 | # print(dailyStress) 29 | 30 | if dailyStress: 31 | stressData = print(f"{dailyStress}/{weeklyStress}") 32 | else: 33 | stressData = print("N/A") -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/stress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | python=$(which python3.11) 7 | totalStress=$($python $HOME/.config/sketchybar/plugins/stress.py) 8 | currentStress=$(echo $totalStress | cut -d'/' -f1) 9 | 10 | [ "$(cat /tmp/sketchybar_sender)" = "focus_off" ] && DRAWING="on" 11 | 12 | case "$currentStress" in 13 | [0-9] | [1-2][0-9]) 14 | backgroundColor=$(getcolor teal) 15 | ;; 16 | [3-4][0-9]) 17 | backgroundColor=$(getcolor yellow) 18 | ;; 19 | [5-6][0-9]) 20 | backgroundColor=$(getcolor orange) 21 | ;; 22 | [7-9][0-9]) 23 | backgroundColor=$(getcolor red) 24 | ;; 25 | *) 26 | backgroundColor=$LABEL_COLOR 27 | DRAWING="off" 28 | ;; 29 | esac 30 | 31 | sketchybar --animate tanh 20 --set $NAME drawing=$DRAWING label="$totalStress" background.color=$backgroundColor 32 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/things3.sh: -------------------------------------------------------------------------------- 1 | INBOX=$(osascript -e 'tell application "Things3" to return count of to dos of list "Inbox"') 2 | TODAY=$(osascript -e 'tell application "Things3" to return count of to dos of list "Today"') 3 | 4 | args=(label.drawing=on label="$INBOX""|""$TODAY") 5 | 6 | if [[ $INBOX -eq 0 ]] && [[ $TODAY -eq 0 ]]; then args=(drawing=off); fi 7 | 8 | sketchybar --set $NAME "${args[@]}" 9 | 10 | #!/bin/bash 11 | 12 | # Path to the Things 3 database file 13 | DATABASE_PATH="/Users/pe8er/Library/Group Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-94KRO/Things Database.thingsdatabase/main.sqlite" 14 | 15 | QUERY="SELECT COUNT(*) FROM TMTask WHERE trashed = 0 AND start = 0 AND area = (SELECT uuid FROM TMArea WHERE type = 0 AND title = 'Inbox');SELECT COUNT(*) FROM TMTask WHERE trashed = 0 AND start = 0 AND area IN (SELECT uuid FROM TMArea WHERE type = 0 AND title = 'Inbox');" 16 | 17 | 18 | # Execute the query using sqlite3 and print the result 19 | sqlite3 "$DATABASE_PATH" "$QUERY" 20 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/transmission.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | source "$CONFIG_DIR/colors.sh" 4 | 5 | read UP DOWN <<< "$(transmission-remote -l | awk 'NR>1 {up=$4; down=$5} END {print up, down}')" 6 | NUMBERS=($UP $DOWN) 7 | 8 | if [[ $NUMBERS = "" ]]; then 9 | args=(drawing=off) 10 | else 11 | # Number formatting. Thanks, ChatGPT! 12 | for ((i=0; i<${#NUMBERS[@]}; i++)); do 13 | CURRENT_NUMBER=${NUMBERS[i]} 14 | 15 | # Check if the number is greater than 999 16 | if (( $(echo "$CURRENT_NUMBER > 999" | bc -l) )); then 17 | FORMATTED_NUMBER=$(echo "scale=1; $CURRENT_NUMBER / 1000" | bc -l) 18 | SUFFIX="MB" 19 | else 20 | FORMATTED_NUMBER=$(echo "scale=1; $CURRENT_NUMBER" | bc -l) 21 | SUFFIX="KB" 22 | fi 23 | 24 | # Remove the decimal point if it's zero 25 | if [[ $FORMATTED_NUMBER == *".0" ]]; then 26 | FORMATTED_NUMBER=${FORMATTED_NUMBER%".0"} 27 | fi 28 | 29 | # Create a new variable dynamically 30 | NEW_VARIABLE="FORMATTED_NUMBER_$i" 31 | declare "$NEW_VARIABLE=$FORMATTED_NUMBER$SUFFIX" 32 | done 33 | 34 | args+=(drawing=on label="􀄯${FORMATTED_NUMBER_0} 􀄱${FORMATTED_NUMBER_1}") 35 | fi 36 | 37 | 38 | if [[ "$UP" == "0.0" && "$DOWN" == "0.0" ]]; then 39 | args+=(background.color=$(getcolor black 50)) 40 | else 41 | args+=(background.color=$HIGHLIGHT label.color=$LABEL_COLOR_NEGATIVE) 42 | fi 43 | 44 | sketchybar --set $NAME "${args[@]}" -------------------------------------------------------------------------------- /config.symlink/sketchybar/plugins/volume.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Load global styles, colors and icons 4 | source "$CONFIG_DIR/globalstyles.sh" 5 | 6 | WIDTH=100 7 | 8 | volume_change() { 9 | case $INFO in 10 | [7-9][0-9] | 100) 11 | ICON=$ICON_VOLUME_100 12 | ;; 13 | [4-6][0-9]) 14 | ICON=$ICON_VOLUME_66 15 | ;; 16 | [2-3][0-9]) 17 | ICON=$ICON_VOLUME_33 18 | ;; 19 | [0-1][1-9]) 20 | ICON=$ICON_VOLUME_10 21 | ;; 22 | [0-9]) 23 | if [ "$(SwitchAudioSource -t output -c)" == "ADI-2 DAC (56680401)" ]; then 24 | ICON=$ICON_VOLUME_HEADPHONES 25 | else 26 | ICON=$ICON_VOLUME_0 27 | fi 28 | ;; 29 | *) ICON=$ICON_VOLUME_100 ;; 30 | esac 31 | 32 | sketchybar --set volume_icon icon=$ICON 33 | sketchybar --set $NAME slider.percentage=$INFO --animate tanh 30 --set $NAME slider.width=$WIDTH 34 | sleep 2 35 | 36 | # Check whether the volume was changed another time while sleeping 37 | FINAL_PERCENTAGE=$(sketchybar --query $NAME | jq -r ".slider.percentage") 38 | if ((FINAL_PERCENTAGE == INFO)); then 39 | sketchybar --animate tanh 30 --set $NAME slider.width=0 40 | fi 41 | } 42 | 43 | mouse_clicked() { 44 | osascript -e "set volume output volume $PERCENTAGE" 45 | } 46 | 47 | case "$SENDER" in 48 | "volume_change") 49 | volume_change 50 | ;; 51 | "mouse.clicked") 52 | mouse_clicked 53 | ;; 54 | esac 55 | -------------------------------------------------------------------------------- /config.symlink/sketchybar/window_title.dat: -------------------------------------------------------------------------------- 1 | front_app.sh — config.symlink 2 | -------------------------------------------------------------------------------- /config.symlink/ubersicht/Link.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ORIG_PATH='~/Library/Application\ Support/Übersicht/widgets' 4 | 5 | rm -rf $ORIG_PATH 6 | ln -s ~/.dotfiles/ubersicht $ORIG_PATH -------------------------------------------------------------------------------- /config.symlink/ubersicht/NextEvent.widget/NextEvent.applescript: -------------------------------------------------------------------------------- 1 | set input to paragraphs of (do shell script "/opt/homebrew/bin/icalBuddy -ec 'Found in Natural Language,CCSF' -npn -nc -iep 'datetime,title' -po 'datetime,title' -eed -ea -n -li 4 -ps '|: |' -b '' eventsToday") 2 | 3 | set currentTime to date (do shell script "date '+%I:%M %p'") 4 | 5 | set theEvent to "" 6 | 7 | if input is not "" then 8 | repeat with anEvent in input 9 | set text item delimiters to "^" 10 | set eventTime to date (text item 1 of anEvent) 11 | set text item delimiters to "" 12 | if eventTime > currentTime then 13 | set theEvent to anEvent as string 14 | exit repeat 15 | end if 16 | end repeat 17 | end if 18 | 19 | return theEvent -------------------------------------------------------------------------------- /config.symlink/ubersicht/Playbox.widget/lib/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/ubersicht/Playbox.widget/lib/default.png -------------------------------------------------------------------------------- /config.symlink/ubersicht/Playbox.widget/lib/getCurrentSong.applescript: -------------------------------------------------------------------------------- 1 | set TID to AppleScript's text item delimiters 2 | set mypath to POSIX path of (path to me) 3 | set AppleScript's text item delimiters to "/" 4 | set mypath to (mypath's text items 1 thru -2 as string) & "/" 5 | set AppleScript's text item delimiters to TID 6 | 7 | set musicPlayer to isMusicPlaying() 8 | 9 | if musicPlayer is not "NA" then 10 | run script mypath & "getCurrentSong" & musicPlayer & ".applescript" 11 | else 12 | return "NA" 13 | end if 14 | 15 | on isMusicPlaying() 16 | 17 | -- Spotify 18 | tell application "System Events" to if name of processes contains "Spotify" is true then 19 | try 20 | set musicPlayer to do shell script "osascript -e 'tell application \"Spotify\" to if player state is playing then return \"Spotify\"'" 21 | if musicPlayer is not "" then return musicPlayer 22 | on error e 23 | log e 24 | end try 25 | end if 26 | 27 | -- Music 28 | tell application "System Events" to if name of processes contains "Music" is true then 29 | try 30 | set musicPlayer to do shell script "osascript -e 'tell application \"Music\" to if player state is playing then return \"Music\"'" 31 | if musicPlayer is not "" then return musicPlayer 32 | on error e 33 | log e 34 | end try 35 | end if 36 | 37 | -- Plexamp 38 | tell application "System Events" to if (name of processes) contains "Plexamp" is true then return "Plexamp" 39 | 40 | -- If nothing is playing 41 | return "NA" 42 | end isMusicPlaying -------------------------------------------------------------------------------- /config.symlink/ubersicht/Playbox.widget/lib/getCurrentSongMusic.applescript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/ubersicht/Playbox.widget/lib/getCurrentSongMusic.applescript -------------------------------------------------------------------------------- /config.symlink/ubersicht/Playbox.widget/lib/getCurrentSongSpotify.applescript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/ubersicht/Playbox.widget/lib/getCurrentSongSpotify.applescript -------------------------------------------------------------------------------- /config.symlink/ubersicht/Strava.widget/Strava.applescript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/config.symlink/ubersicht/Strava.widget/Strava.applescript -------------------------------------------------------------------------------- /config.symlink/yabai/create_spaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DESIRED_SPACES_PER_DISPLAY=10 4 | CURRENT_SPACES="$(yabai -m query --displays spaces | jq -r '.[].spaces | @sh')" 5 | 6 | DELTA=0 7 | while read -r line 8 | do 9 | LAST_SPACE="$(echo "${line##* }")" 10 | LAST_SPACE=$(($LAST_SPACE+$DELTA)) 11 | EXISTING_SPACE_COUNT="$(echo "$line" | wc -w)" 12 | MISSING_SPACES=$(($DESIRED_SPACES_PER_DISPLAY - $EXISTING_SPACE_COUNT)) 13 | if [ "$MISSING_SPACES" -gt 0 ]; then 14 | for i in $(seq 1 $MISSING_SPACES) 15 | do 16 | yabai -m space --create "$LAST_SPACE" 17 | LAST_SPACE=$(($LAST_SPACE+1)) 18 | done 19 | elif [ "$MISSING_SPACES" -lt 0 ]; then 20 | for i in $(seq 1 $((-$MISSING_SPACES))) 21 | do 22 | yabai -m space --destroy "$LAST_SPACE" 23 | LAST_SPACE=$(($LAST_SPACE-1)) 24 | done 25 | fi 26 | DELTA=$(($DELTA+$MISSING_SPACES)) 27 | done <<< "$CURRENT_SPACES" 28 | 29 | sketchybar --trigger space_change --trigger windows_on_spaces -------------------------------------------------------------------------------- /config.symlink/yabai/cycle_windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yabai -m query --spaces index --space \ 4 | | jq -re ".index" \ 5 | | xargs -I{} yabai -m query --windows --space {} \ 6 | | jq -sre 'add | map(select(."is-minimized"==false)) | sort_by(.display, .frame.y, .frame.x, .id) | . as $array | length as $array_length | index(map(select(."has-focus"==true))) as $has_index | if $has_index > 0 then nth($has_index - 1).id else nth($array_length - 1).id end' \ 7 | | xargs -I{} yabai -m window --focus {} -------------------------------------------------------------------------------- /config.symlink/yabai/float_small_windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | window_id=$YABAI_WINDOW_ID 4 | window_data=$(yabai -m query --windows can-resize,is-floating --window "$window_id") 5 | can_resize=$(echo "$window_data" | jq '.["can-resize"]') 6 | floating=$(echo "$window_data" | jq '.["is-floating"]') 7 | 8 | if [[ "$can_resize" == "false" ]] && [[ "$floating" == "false" ]]; then 9 | yabai -m window "$window_id" --toggle float 10 | osascript -e 'display notification "Float successful"' 11 | exit 0 12 | fi 13 | 14 | display_id=$(echo "$window_data" | jq '.display') 15 | display_area=$(yabai -m query --displays --display "$display_id" | jq '.frame.w * .frame.h') 16 | min_area=$(bc <<< "$display_area * 0.10") 17 | window_area=$(echo "$window_data" | jq '.frame.w * .frame.h') 18 | 19 | if (( $(bc <<< "$window_area < $min_area") == 1 )) && [[ "$floating" == "false" ]]; then 20 | yabai -m window "$window_id" --toggle float 21 | osascript -e 'display notification "Float successful"' 22 | fi -------------------------------------------------------------------------------- /config.symlink/yabai/float_window.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | windowInfo=$(yabai -m query --windows id,frame,app,is-floating --window) 4 | appName=$(echo $windowInfo | jq -r '.app') 5 | isFloating=$(echo $windowInfo | jq -r '."is-floating"') 6 | positionX=$(printf "%.0f" $(echo $windowInfo | jq -r '.frame.x')) 7 | 8 | echo "$windowInfo" | jq -er '"yabai -m window \(.id) --toggle float --resize top_left:\(.frame.w/40):\(.frame.h/40) --resize bottom_right:\(.frame.w/-40):\(.frame.h/-40)"' | 9 | sh - 10 | 11 | if [ "$isFloating" = "true" ] && [ "$positionX" -lt 500 ]; then 12 | yabai -m window --swap prev 13 | fi 14 | 15 | sketchybar --trigger update_yabai_icon 16 | 17 | if [[ "$isFloating" = "false" ]]; then 18 | echo "Floating $appName" 19 | else 20 | echo "Moving $appName back to the grid" 21 | fi 22 | -------------------------------------------------------------------------------- /config.symlink/yabai/move-floating-windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | argument=$1 4 | 5 | case "$argument" in 6 | "center") 7 | destination="5:5:1:1:3:3" 8 | ;; 9 | "lefthalf") 10 | destination="1:2:0:0:1:1" 11 | ;; 12 | "righthalf") 13 | destination="1:2:1:0:1:1" 14 | ;; 15 | "tophalf") 16 | destination="2:1:0:0:1:1" 17 | ;; 18 | "bottomhalf") 19 | destination="2:1:0:1:1:1" 20 | ;; 21 | "topleft") 22 | destination="2:2:0:0:1:1" 23 | ;; 24 | "bottomleft") 25 | destination="2:2:0:1:1:1" 26 | ;; 27 | "topright") 28 | destination="2:2:1:0:1:1" 29 | ;; 30 | "bottomright") 31 | destination="2:2:1:1:1:1" 32 | ;; 33 | esac 34 | 35 | yabai -m window --grid $destination 36 | 37 | echo "Window moved to $argument" 38 | 39 | -------------------------------------------------------------------------------- /config.symlink/yabai/reload.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SID=$(yabai -m query --spaces index --space | jq -r '.index') 4 | source ~/.dotfiles/config.symlink/yabai/yabairc 5 | yabai -m space --focus $SID -------------------------------------------------------------------------------- /config.symlink/yabai/resize_window.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | WINDOW_RESIZE_AMOUNT=100 4 | WINDOW=$(yabai -m query --windows split-type,split-child --window) 5 | SPLIT_TYPE=$(echo $WINDOW | jq -r '."split-type"') 6 | SPLIT_CHILD=$(echo $WINDOW | jq -r '."split-child"') 7 | 8 | resize() { 9 | 10 | if [[ $SPLIT_CHILD == "first_child" ]] && [[ $SPLIT_TYPE == "vertical" ]]; then 11 | DIRECTION="right" 12 | elif [[ $SPLIT_CHILD == "second_child" ]] && [[ $SPLIT_TYPE == "vertical" ]]; then 13 | DIRECTION="left" 14 | elif [[ $SPLIT_CHILD == "first_child" ]] && [[ $SPLIT_TYPE == "horizontal" ]]; then 15 | DIRECTION="bottom" 16 | elif [[ $SPLIT_CHILD == "second_child" ]] && [[ $SPLIT_TYPE == "horizontal" ]]; then 17 | DIRECTION="top" 18 | fi 19 | 20 | if [[ $SPLIT_TYPE == "vertical" ]]; then 21 | echo "$DIRECTION:$1$WINDOW_RESIZE_AMOUNT:0" 22 | else 23 | echo "$DIRECTION:0:$1$WINDOW_RESIZE_AMOUNT" 24 | fi 25 | } 26 | 27 | if [[ $1 = "decrease" ]]; then 28 | SYMBOL="-" 29 | else 30 | SYMBOL= 31 | fi 32 | 33 | yabai -m window --resize $(resize $SYMBOL) -------------------------------------------------------------------------------- /config.symlink/yabai/restore_windows.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env zsh 2 | 3 | function store_window () { 4 | echo LEelel 5 | emulate -L zsh -o err_return -o no_unset -o pipefail 6 | local restore 7 | restore="$(yabai -m query --windows --window "${YABAI_WINDOW_ID}" | 8 | jq -re --arg YABAI_WINDOW_ID "${YABAI_WINDOW_ID}" ' 9 | if .is-floating = "true" then 10 | .frame | "yabai -m window \($YABAI_WINDOW_ID) --move abs:\(.x):\(.y)\n" 11 | + "yabai -m window \($YABAI_WINDOW_ID) --resize abs:\(.w):\(.h)" 12 | else 13 | empty 14 | end')" 15 | if [[ ! -z "${restore}" ]]; then 16 | echo "${restore}" >"/tmp/yabai-restore/${YABAI_WINDOW_ID}.restore" 17 | chmod +x "/tmp/yabai-restore/${YABAI_WINDOW_ID}.restore" 18 | fi 19 | } 20 | 21 | () { 22 | emulate -L zsh -o err_return 23 | rm -rf /tmp/yabai-restore 24 | mkdir /tmp/yabai-restore 25 | # The labels below are generated using `uuidgen` to ensure these signals are 26 | # never running more than once. 27 | yabai -m signal --add label='AA1BE1CD-6665-47B5-B5C4-111FBFFF0E1D' \ 28 | event=window_moved action="${functions[store_window]}" 29 | yabai -m signal --add label='91CC175D-9D33-4D48-9767-0FAF33E63209' \ 30 | event=window_resized action="${functions[store_window]}" 31 | } 32 | 33 | # To restore a window, run this command: 34 | # yabai -m window --toggle float && 35 | # /tmp/yabai-restore/$(yabai -m query --windows --window | jq -re '.id').restore 2>/dev/null || 36 | # true -------------------------------------------------------------------------------- /config.symlink/yabai/swap-windows.sh: -------------------------------------------------------------------------------- 1 | win=$(yabai -m query --windows id --window last | jq '.id') 2 | 3 | while : ; do 4 | yabai -m window $win --swap $1 &> /dev/null 5 | if [[ $? -eq 1 ]]; then 6 | break 7 | fi 8 | done -------------------------------------------------------------------------------- /git/aliases.zsh: -------------------------------------------------------------------------------- 1 | # Use `hub` as our git wrapper: 2 | # http://defunkt.github.com/hub/ 3 | hub_path=$(which hub) 4 | if (( $+commands[hub] )) 5 | then 6 | alias git=$hub_path 7 | fi 8 | 9 | # The rest of my fun git aliases 10 | alias gl='git pull --prune' 11 | alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" 12 | alias gp='git push origin HEAD' 13 | alias gd='git diff' 14 | alias gc='git commit' 15 | alias gca='git commit -a' 16 | alias gco='git checkout' 17 | alias gcb='git copy-branch-name' 18 | alias gb='git branch' 19 | alias gs='git status -sb' # upgrade your git if -sb breaks for you. it's fun. 20 | alias gac='git add -A && git commit -m' 21 | -------------------------------------------------------------------------------- /git/completion.zsh: -------------------------------------------------------------------------------- 1 | # Uses git's autocompletion for inner commands. Assumes an install of git's 2 | # bash `git-completion` script at $completion below (this is where Homebrew 3 | # tosses it, at least). 4 | completion='$(brew --prefix)/share/zsh/site-functions/_git' 5 | 6 | if test -f $completion 7 | then 8 | source $completion 9 | fi 10 | -------------------------------------------------------------------------------- /git/gitignore.symlink: -------------------------------------------------------------------------------- 1 | # Xcode # 2 | ######### 3 | *.xcuserdata 4 | *.xcuserdatad/ 5 | *.xcworkspace 6 | !default.xcworkspace 7 | *.pbxuser 8 | DerivedData 9 | build/ 10 | *.ipa 11 | *.moved-aside 12 | *.mode1v3 13 | *.mode2v3 14 | *.perspectivev3 15 | .plextoken 16 | 17 | # OS generated files # 18 | ###################### 19 | .DS_Store 20 | .DS_Store? 21 | .Spotlight-V100 22 | .Trashes 23 | thumbs.db 24 | Thumbs.db 25 | *~ 26 | *.swp 27 | -------------------------------------------------------------------------------- /homebrew/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Homebrew 4 | # 5 | # This installs some of the common dependencies needed (or at least desired) 6 | # using Homebrew. 7 | 8 | # Install the correct homebrew for each OS type 9 | if test "$(uname)" = "Darwin" 10 | then 11 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 12 | elif test "$(expr substr $(uname -s) 1 5)" = "Linux" 13 | then 14 | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)" 15 | fi 16 | 17 | exit 0 -------------------------------------------------------------------------------- /macos/install.sh: -------------------------------------------------------------------------------- 1 | # The Brewfile handles Homebrew-based app and library installs, but there may 2 | # still be updates and installables in the Mac App Store. There's a nifty 3 | # command line interface to it that we can use to just install everything, so 4 | # yeah, let's do that. 5 | 6 | echo "› sudo softwareupdate -i -a" 7 | sudo softwareupdate -i -a 8 | -------------------------------------------------------------------------------- /nano/nano.symlink/Readme.rst: -------------------------------------------------------------------------------- 1 | *************************************** 2 | Improved Nano Syntax Highlighting Files 3 | *************************************** 4 | 5 | This repository holds {lang}.nanorc files that have imporved 6 | definitions of syntax highlighting for various languages. 7 | These should be placed inside of the ``~/.nano/`` directory. 8 | 9 | Once there you should add the languages you want to your 10 | nano configuration file ``~/.nanorc``. For example, 11 | my config file includes:: 12 | 13 | ## C/C++ 14 | include "~/.nano/c.nanorc" 15 | 16 | ## Fortran 17 | include "~/.nano/fortran.nanorc" 18 | 19 | ## HTML 20 | include "~/.nano/html.nanorc" 21 | 22 | ## Patch files 23 | include "~/.nano/patch.nanorc" 24 | 25 | ## Manpages 26 | include "~/.nano/man.nanorc" 27 | 28 | ## Perl 29 | include "~/.nano/perl.nanorc" 30 | 31 | ## Python 32 | include "~/.nano/python.nanorc" 33 | 34 | ## reST 35 | include "~/.nano/reST.nanorc" 36 | 37 | ## Ruby 38 | include "~/.nano/ruby.nanorc" 39 | 40 | ## Bourne shell scripts 41 | include "~/.nano/sh.nanorc" 42 | 43 | ## makefile .am 44 | include "~/.nano/gentoo.nanorc" 45 | 46 | ## TeX 47 | include "~/.nano/tex.nanorc" 48 | 49 | ## CSS 50 | include "~/.nano/css.nanorc" 51 | 52 | ## php 53 | include "~/.nano/php.nanorc" 54 | 55 | ## XML 56 | include "~/.nano/xml.nanorc" 57 | 58 | ## Lua 59 | include "~/.nano/lua.nanorc" 60 | 61 | -------------------------------------------------------------------------------- /nano/nano.symlink/asm.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for assembler. 2 | ## 3 | syntax "asm" "\.(S|s|asm)$" 4 | color red "\<[A-Z_]{2,}\>" 5 | color brightgreen "\.(data|subsection|text)" 6 | color green "\.(align|file|globl|global|hidden|section|size|type|weak)" 7 | color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)" 8 | icolor brightred "^[[:space:]]*[.0-9A-Z_]*:" 9 | color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)" 10 | ## Highlight strings (note: VERY resource intensive) 11 | color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" 12 | color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" 13 | ## Highlight comments 14 | color brightblue "//.*" 15 | color brightblue start="/\*" end="\*/" 16 | ## Highlight trailing whitespace 17 | color ,green "[[:space:]]+$" 18 | -------------------------------------------------------------------------------- /nano/nano.symlink/cmake.nanorc: -------------------------------------------------------------------------------- 1 | ## CMake syntax highlighter for GNU Nano 2 | ## 3 | syntax "cmake" "(CMakeLists\.txt|\.cmake)$" 4 | 5 | icolor green "^[[:space:]]*[A-Z0-9_]+" 6 | icolor brightyellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>" 7 | 8 | icolor brightgreen "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>" 9 | color brightgreen "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]" 10 | color brightgreen "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]" 11 | 12 | icolor brightred "^[[:space:]]*\<((end)?(function|macro)|return)" 13 | 14 | #String Color 15 | color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" 16 | color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" 17 | 18 | icolor brightred start="\$(\{|ENV\{)" end="\}" 19 | color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>" 20 | 21 | icolor brightblue "^([[:space:]]*)?#.*" 22 | icolor brightblue "[[:space:]]#.*" 23 | -------------------------------------------------------------------------------- /nano/nano.symlink/conf.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for nanorc files. 2 | ## 3 | syntax "conf" "\.c[o]?nf$" 4 | ## Possible errors and parameters 5 | ## Strings 6 | icolor white ""(\\.|[^"])*"" 7 | ## Comments 8 | icolor brightblue "^[[:space:]]*#.*$" 9 | icolor cyan "^[[:space:]]*##.*$" 10 | 11 | -------------------------------------------------------------------------------- /nano/nano.symlink/css.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for css files. 2 | ## 3 | 4 | syntax "css" "\.css$" 5 | color brightred "." 6 | color brightyellow start="\{" end="\}" 7 | color brightwhite start=":" end="[;^\{]" 8 | color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" 9 | color brightblue start="\/\*" end="\\*/" 10 | color green ";|:|\{|\}" 11 | -------------------------------------------------------------------------------- /nano/nano.symlink/cython.nanorc: -------------------------------------------------------------------------------- 1 | ## Cython nanorc, based off of Python nanorc. 2 | ## 3 | syntax "cython" "\.pyx$" "\.pxd$" "\.pyi$" 4 | icolor brightred "def [ 0-9A-Z_]+" 5 | icolor brightred "cpdef [ 0-9A-Z_]+\(.*?\):" 6 | icolor brightred "cdef cppclass [ 0-9A-Z_]+\(.*?\):" 7 | 8 | 9 | 10 | # Python Keyword Color 11 | color green "\<(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" 12 | color brightmagenta "\<(continue|break|return)\>" 13 | 14 | # Cython Keyword Color 15 | color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>" 16 | color red "\<(bint|char|double|int|public|void|unsigned)\>" 17 | 18 | #Operator Color 19 | color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" 20 | 21 | #Parenthetical Color 22 | color magenta "[(){}]" "\[" "\]" 23 | 24 | #String Color 25 | color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" 26 | color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" 27 | color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" 28 | 29 | # Comment Color 30 | color brightblue "#.*$" 31 | -------------------------------------------------------------------------------- /nano/nano.symlink/fish.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for Fish shell scripts. 2 | ## 3 | syntax "fish" "\.fish$" 4 | magic "(Fish.*) shell script text" 5 | icolor brightgreen "^[0-9A-Z_]+\(\)" 6 | color green "\<(alias|begin|break|case|continue|contains|else|end|for|function|if|math|return|set|switch|test|while)\>" 7 | color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" 8 | color green "\<(and|isatty|not|or|in)\>" 9 | color yellow "--[a-z-]+" 10 | color brightmagenta "\ -[a-z]+" 11 | color brightblue "\<(bg|bind|block|breakpoint|builtin|cd|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set_color|status|trap|type|ulimit|umask|vared)\>" 12 | icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" 13 | color cyan "(^|[[:space:]])#.*$" 14 | color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" 15 | color ,green "[[:space:]]+$" 16 | -------------------------------------------------------------------------------- /nano/nano.symlink/gitcommit.nanorc: -------------------------------------------------------------------------------- 1 | git.nanorc -------------------------------------------------------------------------------- /nano/nano.symlink/groff.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for groff. 2 | ## 3 | syntax "groff" "\.m[ems]$" "\.rof" "\.tmac$" "^tmac." 4 | ## The argument of .ds or .nr 5 | color cyan "^\.(ds|nr) [^[[:space:]]]*" 6 | ## Single character escapes 7 | color brightmagenta "\\." 8 | ## Highlight the argument of \f or \s in the same color 9 | color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]" 10 | ## Newlines 11 | color cyan "(\\|\\\\)n(.|\(..)" 12 | color cyan start="(\\|\\\\)n\[" end="]" 13 | ## Requests 14 | color brightgreen "^\.[[:space:]]*[^[[:space:]]]*" 15 | ## Comments 16 | color yellow "^\.\\".*$" 17 | ## Strings 18 | color green "(\\|\\\\)\*(.|\(..)" 19 | color green start="(\\|\\\\)\*\[" end="]" 20 | ## Characters 21 | color brightred "\\\(.." 22 | color brightred start="\\\[" end="]" 23 | ## Macro arguments 24 | color brightcyan "\\\\\$[1-9]" 25 | -------------------------------------------------------------------------------- /nano/nano.symlink/haml.nanorc: -------------------------------------------------------------------------------- 1 | syntax "haml" "\.haml$" 2 | 3 | color cyan "-|=" 4 | color white "->|=>" 5 | icolor cyan "([ ]|^)%[0-9A-Z_]+\>" 6 | icolor magenta ":[0-9A-Z_]+\>" 7 | icolor yellow "\.[A-Z_]+\>" 8 | ## Double quote & single quote 9 | color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" 10 | color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" 11 | ## Vars 12 | color brightgreen "#\{[^}]*\}" 13 | color brightblue "(@|@@)[0-9A-Z_a-z]+" 14 | ## Comments 15 | color brightcyan "#[^{].*$" "#$" 16 | 17 | -------------------------------------------------------------------------------- /nano/nano.symlink/html.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is a short improved example for HTML. 2 | ## 3 | syntax "html" "\.htm[l]?$" 4 | color brightblue start="<" end=">" 5 | color red "&[^;[[:space:]]]*;" 6 | color yellow "".*"|qq\|.*\|" 7 | color red "(alt|bgcolor|height|href|label|longdesc|name|onclick|onfocus|onload|onmouseover|size|span|src|style|target|type|value|width)=" -------------------------------------------------------------------------------- /nano/nano.symlink/java.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for Java. 2 | ## 3 | syntax "java" "\.java$" 4 | color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>" 5 | color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>" 6 | color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>" 7 | color red ""[^"]*"" 8 | color yellow "\<(true|false|null)\>" 9 | color blue "//.*" 10 | color blue start="/\*" end="\*/" 11 | color brightblue start="/\*\*" end="\*/" 12 | color ,green "[[:space:]]+$" 13 | -------------------------------------------------------------------------------- /nano/nano.symlink/man.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for manpages. 2 | ## 3 | syntax "man" "\.[1-9]x?$" 4 | color green "\.(S|T)H.*$" 5 | color brightgreen "\.(S|T)H" "\.TP" 6 | color brightred "\.(BR?|I[PR]?).*$" 7 | color brightblue "\.(BR?|I[PR]?|PP)" 8 | color brightwhite "\\f[BIPR]" 9 | color yellow "\.(br|DS|RS|RE|PD)" 10 | -------------------------------------------------------------------------------- /nano/nano.symlink/markdown.nanorc: -------------------------------------------------------------------------------- 1 | ## found: 2 | ## http://lists.gnu.org/archive/html/help-nano/2006-08/msg00000.html 3 | ## edited by serialhex 4 | ## http://daringfireball.net/projects/markdown/syntax 5 | 6 | syntax "markdown" "\.txt$" "\.text$" "\.md$" "\.markdown$" 7 | # Quotations 8 | color cyan "^>.*" 9 | # Emphasis 10 | color green "_[^_]*_" 11 | color green "\*[^\*]*\*" 12 | # Strong emphasis 13 | color brightgreen "\*\*[^\*]*\*\*" 14 | color brightgreen "__[\_]*__" 15 | # Underline headers 16 | color brightblue "^====(=*)" 17 | color brightblue "^----(-*)" 18 | # Hash headers 19 | color brightblue "^#.*" 20 | # Linkified URLs (and inline html tags) 21 | color brightmagenta start="<" end=">" 22 | # Links 23 | color brightmagenta "\[.*\](\([^\)]*\))?" 24 | # Link id's: 25 | color brightmagenta "^\[.*\]:( )+.*" 26 | # Code spans 27 | color brightyellow "`[^`]*`" 28 | # Code blocks 29 | # disabled, because indented lines aren't always code blocks 30 | # color brightyellow "^( ).*" 31 | # Links and inline images 32 | color brightmagenta start="!\[" end="\]" 33 | color brightmagenta start="\[" end="\]" 34 | # Lists 35 | color yellow "^( )*(\*|\+|\-|[0-9]+\.) " 36 | -------------------------------------------------------------------------------- /nano/nano.symlink/mutt.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for quoted emails (under e.g. mutt). 2 | ## 3 | syntax "mutt" 4 | color green "^>.*" 5 | -------------------------------------------------------------------------------- /nano/nano.symlink/nanorc.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for nanorc files. 2 | ## 3 | syntax "nanorc" "\.?nanorc$" 4 | ## Possible errors and parameters 5 | icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$" 6 | ## Keywords 7 | icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace|wordbounds)\>" 8 | icolor green "^[[:space:]]*(set|unset|include|syntax)\>" 9 | ## Colors 10 | icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>" 11 | icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)=" 12 | ## Strings 13 | icolor white ""(\\.|[^"])*"" 14 | ## Comments 15 | icolor brightblue "^[[:space:]]*#.*$" 16 | icolor cyan "^[[:space:]]*##.*$" 17 | -------------------------------------------------------------------------------- /nano/nano.symlink/patch.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for patch files. 2 | ## 3 | syntax "patch" "\.(patch|diff)$" 4 | color brightgreen "^\+.*" 5 | color green "^\+\+\+.*" 6 | color brightblue "^ .*" 7 | color brightred "^-.*" 8 | color red "^---.*" 9 | color brightyellow "^@@.*" 10 | color magenta "^diff.*" 11 | -------------------------------------------------------------------------------- /nano/nano.symlink/perl.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for Perl. 2 | ## 3 | syntax "perl" "\.p[lm]$" 4 | color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>" 5 | color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>" 6 | icolor cyan start="[$@%]" end="( |[^0-9A-Z_]|-)" 7 | color yellow "".*"|qq\|.*\|" 8 | color white "[sm]/.*/" 9 | color white start="(^use| = new)" end=";" 10 | color green "#.*" 11 | color yellow start="<< 'STOP'" end="STOP" 12 | -------------------------------------------------------------------------------- /nano/nano.symlink/php.nanorc: -------------------------------------------------------------------------------- 1 | ## PHP syntax highlighting 2 | ## 3 | syntax "php" "\.php$" "\.php[2345s]$" "\.phtml$" 4 | #functions 5 | color brightmagenta "([A-Za-z0-9])" 6 | #numbers 7 | color brightblue "[0-9]" 8 | #special 9 | color brightwhite "(^|[^A-Za-z0-9])(<\?php|\?>|var|and|or|default|class|extends|true|false|global|function|new|switch|case|break|next|prev|elseif|if|else|foreach|for|as|do|while|exit|die|declare|require_once|require|include_once|include|return|echo|static|array|isset)([^A-Za-z0-9])" 10 | #types 11 | color brightred "([^A-Za-z0-9])|[^A-Za-z](null|int|string|float|bool|object|resource)[^A-Za-z0-9_]+[^A-Za-z]" 12 | #strings 13 | color brightyellow ""(\\.|[^\"])*"" 14 | color brightyellow "'(\\.|[^\'])*'" 15 | #Variables 16 | color brightcyan "\$[]\[A-Za-z0-9_'\"]*" 17 | #comments 18 | color green "//.*" 19 | color green "#.*" 20 | color green start="/\*" end="\*/" 21 | -------------------------------------------------------------------------------- /nano/nano.symlink/pkgbuild.nanorc: -------------------------------------------------------------------------------- 1 | ## Arch PKGBUILD files 2 | ## 3 | syntax "pkgbuild" "^.*PKGBUILD$" 4 | color green start="^." end="$" 5 | color cyan "^.*(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license).*=.*$" 6 | color brightcyan "\<(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)\>" 7 | color brightcyan "(\$|\$\{|\$\()(pkgbase|pkgname|pkgver|pkgrel|pkgdesc|arch|url|license)(|\}|\))" 8 | color cyan "^.*(depends|makedepends|optdepends|conflicts|provides|replaces).*=.*$" 9 | color brightcyan "\<(depends|makedepends|optdepends|conflicts|provides|replaces)\>" 10 | color brightcyan "(\$|\$\{|\$\()(depends|makedepends|optdepends|conflicts|provides|replaces)(|\}|\))" 11 | color cyan "^.*(groups|backup|noextract|options).*=.*$" 12 | color brightcyan "\<(groups|backup|noextract|options)\>" 13 | color brightcyan "(\$|\$\{|\$\()(groups|backup|noextract|options)(|\}|\))" 14 | color cyan "^.*(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums).*=.*$" 15 | color brightcyan "\<(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)\>" 16 | color brightcyan "(\$|\$\{|\$\()(install|source|md5sums|sha1sums|sha256sums|sha384sums|sha512sums)(|\}|\))" 17 | color brightcyan "\<(startdir|srcdir|pkgdir)\>" 18 | color cyan "\.install" 19 | color brightwhite "=" "'" "\(" "\)" "\"" "#.*$" "\," "\{" "\}" 20 | color brightred "build\(\)" 21 | color brightred "package_.*.*$" 22 | color brightred "\<(configure|make|cmake|scons)\>" 23 | color red "\<(DESTDIR|PREFIX|prefix|sysconfdir|datadir|libdir|includedir|mandir|infodir)\>" 24 | -------------------------------------------------------------------------------- /nano/nano.symlink/pov.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for POV-Ray. 2 | ## 3 | syntax "pov" "\.(pov|POV|povray|POVRAY)$" 4 | color brightcyan "^[[:space:]]*#[[:space:]]*(declare)" 5 | color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>" 6 | color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>" 7 | color brightyellow "\<(fog_type|fog_offset|fog_alt|rgb|distance|transform)\>" 8 | color brightred "^\<(texture)\>" 9 | color brightred "\<(light_source|background)\>" 10 | color brightred "\<(fog|object|camera)\>" 11 | color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" 12 | color brightmagenta "\<(union|group|subgroup)\>" 13 | ## Comment highlighting 14 | color brightblue "//.*" 15 | color brightblue start="/\*" end="\*/" 16 | -------------------------------------------------------------------------------- /nano/nano.symlink/python.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for Python. 2 | ## 3 | syntax "python" "\.py$" 4 | icolor brightred "def [0-9A-Z_]+" 5 | 6 | 7 | 8 | #Keyword Color 9 | color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>" 10 | color brightmagenta "\<(continue|break|return)\>" 11 | 12 | # decorator color 13 | color brightgreen "@.*[(]" 14 | 15 | #Operator Color 16 | color yellow "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&" 17 | 18 | #Parenthetical Color 19 | color magenta "[(){}]" "\[" "\]" 20 | 21 | #String Color 22 | color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" 23 | color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" 24 | 25 | color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" 26 | #color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" 27 | #color cyan start="([[:space:]]"""|^""")" end=""""" start="'''[^']" end="'''" 28 | #color cyan start=""""" end=""""" start="'''" end="'''" 29 | #color cyan start="("""[^"]|[^"]""")" end="("""[^"]|[^"]""")" start="'''[^']" end="'''" 30 | #color cyan start="\"\"\"" end="\"\"\"" 31 | 32 | 33 | #Comment Color 34 | color brightblue "#.*$" 35 | 36 | -------------------------------------------------------------------------------- /nano/nano.symlink/reST.nanorc: -------------------------------------------------------------------------------- 1 | ## For reST 2 | syntax "rest" "\.rest$" "\.rst$" 3 | # italics 4 | #color magenta "\*[^*]\*" 5 | # bold 6 | color red "\*\*[^*]+\*\*" 7 | # code block 8 | color brightred "::" 9 | # link reference 10 | color blue "`[^`]+`_{1,2}" 11 | # code 12 | color yellow "``[^`]+``" 13 | # directives or comments 14 | color cyan "^\.\. .*$" 15 | # anon link targets 16 | color cyan "^__ .*$" 17 | # h1 18 | color yellow "^###+$" 19 | color yellow "^\*\*\*+$" 20 | # h2 21 | color magenta "^===+$" 22 | # h3 23 | color red "^---+$" 24 | # h4 25 | color green "^\^\^\^+$" 26 | # h5 27 | color blue "^"""+$" 28 | -------------------------------------------------------------------------------- /nano/nano.symlink/sh.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for Bourne shell scripts. 2 | ## 3 | syntax "zsh" "sh" "\.sh$" "Makefile" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_profile" "bash_profile" 4 | icolor brightgreen "^[0-9A-Z_]+\(\)" 5 | color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" 6 | color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" 7 | color green "-[Ldefgruwx]\>" 8 | color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" 9 | color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>" 10 | icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" 11 | color cyan "(^|[[:space:]])#.*$" 12 | color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" 13 | #color ,green "[[:space:]]+$" 14 | -------------------------------------------------------------------------------- /nano/nano.symlink/tex.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is a short example for TeX files. 2 | ## 3 | syntax "tex" "\.tex$" "bib" "\.bib$" "cls" "\.cls$" 4 | color yellow "\$[^$]*\$" 5 | icolor green "\\.|\\[A-Z]*" 6 | color magenta "[{}]" 7 | color blue "%.*" 8 | color blue start="\\begin\{comment\}" end="\\end\{comment\}" 9 | -------------------------------------------------------------------------------- /nano/nano.symlink/xml.nanorc: -------------------------------------------------------------------------------- 1 | ## Here is an example for xml files. 2 | ## 3 | 4 | syntax "ml" ".*\.([jrs]?html?|xml|sgml?|rng)$" 5 | color white "^.+$" 6 | color green start="<" end=">" 7 | color cyan "<[^> ]+" 8 | color cyan ">" 9 | color yellow start="" 10 | color yellow start="" 11 | color red "&[^;]*;" 12 | -------------------------------------------------------------------------------- /nano/nano.symlink/zshrc.nanorc: -------------------------------------------------------------------------------- 1 | ## Hightlightings for zsh configuration files (most used keywords) 2 | syntax "zshrc" "\.?zshrc$" 3 | 4 | ## Keywords 5 | color red "\<(autoload|prompt(init)?|zstyle|zmodload|compinit|setopt|export|source)\>" 6 | color magenta "\<(alias|bindkey|function)\>" 7 | 8 | ## Strings 9 | icolor white ""(\\.|[^"])*"" 10 | icolor white "'(\\.|[^'])*'" 11 | 12 | ## Comments 13 | icolor brightblue "^[[:space:]]*#.*$" 14 | icolor cyan "^[[:space:]]*##.*$" 15 | -------------------------------------------------------------------------------- /nano/nanorc.symlink: -------------------------------------------------------------------------------- 1 | ## Settings 2 | 3 | set backup 4 | set backupdir /tmp 5 | set mouse 6 | set tabsize 4 # Insert 4 spaces per tab 7 | set multibuffer # Allow opening multiple files (Alt+< and Alt+> to switch) 8 | # set undo # Enable undo/redo features 9 | set smooth # Scroll one line at a time 10 | set const # Show cursor position at the bottom of the screen 11 | set nowrap 12 | 13 | ## Shortcuts 14 | 15 | # bind ^Z undo main 16 | bind ^Y redo main 17 | bind ^S mark main 18 | 19 | ## HTML 20 | include "~/.nano/html.nanorc" 21 | 22 | ## Patch files 23 | include "~/.nano/patch.nanorc" 24 | 25 | ## Manpages 26 | include "~/.nano/man.nanorc" 27 | 28 | ## Perl 29 | include "~/.nano/perl.nanorc" 30 | 31 | ## Python 32 | include "~/.nano/python.nanorc" 33 | 34 | ## reST 35 | include "~/.nano/reST.nanorc" 36 | 37 | ## Ruby 38 | include "~/.nano/ruby.nanorc" 39 | 40 | ## Bourne shell scripts 41 | include "~/.nano/sh.nanorc" 42 | 43 | ## makefile .am 44 | include "~/.nano/gentoo.nanorc" 45 | 46 | ## CSS 47 | include "~/.nano/css.nanorc" 48 | 49 | ## php 50 | include "~/.nano/php.nanorc" 51 | 52 | ## XML 53 | include "~/.nano/xml.nanorc" 54 | 55 | ## Markdown 56 | include "~/.nano/markdown.nanorc" 57 | -------------------------------------------------------------------------------- /script/install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run all dotfiles installers. 4 | 5 | set -e 6 | 7 | cd "$(dirname $0)"/.. 8 | 9 | # Run Homebrew through the Brewfile 10 | echo "› brew bundle" 11 | brew bundle 12 | 13 | # find the installers and run them iteratively 14 | find . -name install.sh | while read installer ; do sh -c "${installer}" ; done 15 | -------------------------------------------------------------------------------- /ssh/config.symlink: -------------------------------------------------------------------------------- 1 | Host * 2 | AddKeysToAgent yes 3 | UseKeychain yes 4 | IdentityFile ~/.ssh/id_rsa 5 | 6 | Host pi 7 | User pe8er 8 | Hostname pi.local 9 | 10 | Host ark 11 | User ark 12 | Hostname 192.168.1.194 13 | 14 | Host spizarnia 15 | User piotr 16 | Hostname spizarnia.local 17 | Port 666 18 | -------------------------------------------------------------------------------- /ssh/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Generating local keys…" 4 | ssh-keygen -t rsa -b 2048 5 | 6 | echo "Putting SSH config file where it should be…" 7 | ln -s -f ~/.dotfiles/ssh/config.symlink ~/.ssh/config 8 | rm -r ~/.config 9 | 10 | echo "Setting up access without password…" 11 | cat ~/.ssh/id_rsa.pub | ssh pi "cat >> ~/.ssh/authorized_keys" 12 | cat ~/.ssh/id_rsa.pub | ssh spizarnia "cat >> ~/.ssh/authorized_keys" 13 | -------------------------------------------------------------------------------- /system/Piotr.crontab: -------------------------------------------------------------------------------- 1 | # * * * * * command to be executed 2 | # - - - - - 3 | # | | | | | 4 | # | | | | +----- day of week (0 - 6) (Sunday=0) 5 | # | | | +------- month (1 - 12) 6 | # | | +--------- day of month (1 - 31) 7 | # | +----------- hour (0 - 23) 8 | # +------------- min (0 - 59) 9 | 10 | # @reboot Run once, at startup. 11 | # @yearly Run once a year, "0 0 1 1 *". 12 | # @annually (same as @yearly) 13 | # @monthly Run once a month, "0 0 1 * *". 14 | # @weekly Run once a week, "0 0 * * 0". 15 | # @daily Run once a day, "0 0 * * *". 16 | # @midnight (same as @daily) 17 | # @hourly Run once an hour, "0 * * * *". 18 | 19 | # Setup 20 | # crontab ~/.dotfiles/system/Piotr.crontab 21 | # crontab -l 22 | 23 | @monthly ~/.dotfiles/bin/dot -------------------------------------------------------------------------------- /system/_path.zsh: -------------------------------------------------------------------------------- 1 | export PATH="./bin:/usr/local/bin:/usr/local/sbin:$ZSH/bin:$PATH" 2 | export MANPATH="/usr/local/man:/usr/local/mysql/man:/usr/local/git/man:$MANPATH" 3 | -------------------------------------------------------------------------------- /system/aliases.zsh: -------------------------------------------------------------------------------- 1 | # grc overides for ls 2 | # Made possible through contributions from generous benefactors like 3 | # `brew install coreutils` 4 | if $(gls &>/dev/null) 5 | then 6 | alias ls="gls -F --color" 7 | alias l="gls -lAh --color" 8 | alias ll="gls -l --color" 9 | alias la='gls -A --color' 10 | fi -------------------------------------------------------------------------------- /system/env.zsh: -------------------------------------------------------------------------------- 1 | export EDITOR='nano' -------------------------------------------------------------------------------- /system/grc.zsh: -------------------------------------------------------------------------------- 1 | # GRC colorizes nifty unix tools all over the place 2 | if (( $+commands[grc] )) && (( $+commands[brew] )) 3 | then 4 | source `brew --prefix`/etc/grc.bashrc 5 | fi 6 | -------------------------------------------------------------------------------- /system/keys.zsh: -------------------------------------------------------------------------------- 1 | # Pipe my public key to my clipboard. 2 | alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to pasteboard.'" -------------------------------------------------------------------------------- /xcode/aliases.zsh: -------------------------------------------------------------------------------- 1 | alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" 2 | -------------------------------------------------------------------------------- /zsh/aliases.zsh: -------------------------------------------------------------------------------- 1 | alias c="codium" 2 | alias cl="clear" 3 | alias cls="clear" 4 | alias dirsizes="du -skh *(/)" 5 | alias dotpull="cd ~/.dotfiles ; git pl" 6 | alias e="nano" 7 | alias ls="lla" 8 | alias markdownhelp="open http://j.mp/144z4kR" 9 | alias notify="terminal-notifier -message" 10 | alias reload_zsh="exec zsh" 11 | alias update_brew="brew update && brew upgrade" 12 | alias update_hosts="curl https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts > ~/.dotfiles/macos/hosts; sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder" 13 | alias update_yabai="~/.config/yabai/update.sh" 14 | alias update_znap="znap pull" 15 | alias \?="~/.dotfiles/bin/cheat_sheet.sh | glow" 16 | alias bundle="bundle exec jekyll serve --livereload" 17 | wtf='wtfutil' 18 | -------------------------------------------------------------------------------- /zsh/completion.zsh.zwc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Pe8er/dotfiles/274a4b779646514da0fe33a91c57c3413a9d6684/zsh/completion.zsh.zwc -------------------------------------------------------------------------------- /zsh/config.zsh: -------------------------------------------------------------------------------- 1 | # if [[ -n $SSH_CONNECTION ]]; then 2 | # export PS1='%m:%3~$(git_info_for_prompt)%# ' 3 | # else 4 | # export PS1='%3~$(git_info_for_prompt)%# ' 5 | # fi 6 | 7 | # export LSCOLORS="exfxcxdxbxegedabagacad" 8 | export LSCOLORS=ExFxBxDxCxegedabagacad 9 | export CLICOLOR=true 10 | 11 | # fpath=($ZSH/functions $fpath) 12 | 13 | setopt autocd # Change directories by typing the directory path without using the cd command 14 | setopt NO_BG_NICE # don't nice background tasks 15 | setopt NO_LIST_BEEP 16 | setopt LOCAL_OPTIONS # allow functions to have local options 17 | setopt LOCAL_TRAPS # allow functions to have local traps 18 | setopt PROMPT_SUBST # Enables parameter and command substitution 19 | setopt CORRECT # Enables spelling correction in commands 20 | setopt COMPLETE_IN_WORD # Allows completion to be done within a word 21 | setopt IGNORE_EOF # prevents the shell from exiting when an EOF character (usually Ctrl+D) is entered at the beginning of a line 22 | setopt complete_aliases # allows the shell to expand aliases as part of the completion process. -------------------------------------------------------------------------------- /zsh/path.zsh: -------------------------------------------------------------------------------- 1 | export PATH="/usr/local/sbin:$PATH" 2 | export PATH="$HOME/.dotfiles/bin:$PATH" 3 | export PATH="$HOME/.local/bin:$PATH" 4 | export PATH="/opt/homebrew/opt/ruby/bin:$PATH" 5 | export PATH="$HOME/.dotfiles/config.symlink/yabai/:$PATH" 6 | export PATH="$(brew --prefix)/opt/python@3.11/libexec/bin:$PATH" -------------------------------------------------------------------------------- /zsh/zshrc-backup.symlink: -------------------------------------------------------------------------------- 1 | if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then 2 | eval "$(oh-my-posh init zsh --strict --config $HOME/.dotfiles/zsh/themes/catppuccin_mocha.omp.json)" 3 | fi 4 | 5 | source $HOME/.dotfiles/zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh 6 | source $HOME/.dotfiles/zsh/aliases.zsh 7 | source $HOME/.dotfiles/zsh/completion.zsh 8 | source $HOME/.dotfiles/zsh/config.zsh 9 | source $HOME/.dotfiles/zsh/path.zsh 10 | source /Users/Shared/rlm/rlmenvset.sh 11 | # eval "$(pyenv init -)" # Slows down iTerm2, may break Python 12 | 13 | # zsh-autocomplete settings 14 | # bindkey -M menuselect '\r' .accept-line 15 | 16 | # Autocompletion 17 | zstyle -e ':autocomplete:list-choices:*' list-lines 'reply=( $(( LINES / 20 )) )' 18 | 19 | # Override history search. 20 | zstyle ':autocomplete:history-incremental-search-backward:*' list-lines 20 21 | 22 | # History menu. 23 | zstyle ':autocomplete:history-search-backward:*' list-lines 20 24 | 25 | # Suggestion colors 26 | zstyle ':completion:*:descriptions' format '%F{yellow}%d%f' 27 | 28 | # Automatically show subfolders in current folder 29 | # zstyle ':autocomplete:*' min-input 0 30 | 31 | # Chruby 32 | # source /opt/homebrew/opt/chruby/share/chruby/chruby.sh 33 | # source /opt/homebrew/opt/chruby/share/chruby/auto.sh 34 | # chruby ruby-3.1.3 # run chruby to see actual version 35 | 36 | # Change directories by typing the directory path without using the cd command 37 | setopt autocd --------------------------------------------------------------------------------