Update 748 files

- /.local/assets/Betelgeuse.macOS.terminal
- /.local/bin/bwc
- /.local/bin/fonttest
- /.local/bin/install-dotfiles
- /.local/bin/install-gnome-extensions
- /.local/bin/install-program
- /.local/bin/install-terminal-theme
- /.local/bin/ksetwallpaper
- /.local/bin/load-secrets
- /.local/bin/logg
- /.local/bin/open
- /.local/bin/provision
- /.local/bin/ramqube
- /.local/bin/run
- /.local/bin/slack
- /.local/bin/squash-symlink
- /.local/delta/themes.gitconfig
- /.local/konsole/Default.profile
- /.local/scripts/motd.bash
- /.local/scripts/p10k.zsh
- /.local/theme/Betelgeuse.macOS.terminal
- /.local/theme/background.jpg
- /.local/vagrant.d/.gitkeep
- /.local/share/bash-completion/completions/deno.bash
- /.local/share/bash-completion/completions/direnv.bash
- /.local/share/bash-completion/completions/fig.bash
- /.local/share/bash-completion/completions/fzf-key-bindings.bash
- /.local/share/bash-completion/completions/fzf.bash
- /.local/share/bash-completion/completions/gcloud.bash
- /.local/share/bash-completion/completions/gh.bash
- /.local/share/bash-completion/completions/googler.bash
- /.local/share/bash-completion/completions/gradle.bash
- /.local/share/bash-completion/completions/helm.bash
- /.local/share/bash-completion/completions/hyperfine.bash
- /.local/share/bash-completion/completions/kubectl.bash
- /.local/share/bash-completion/completions/mcfly.bash
- /.local/share/bash-completion/completions/nb.bash
- /.local/share/bash-completion/completions/nnn.bash
- /.local/share/bash-completion/completions/poetry.bash
- /.local/share/bash-completion/completions/volta.bash
- /.local/share/bash-completion/completions/wp.bash
- /.local/share/bash-completion/completions/zoxide.bash
- /.local/share/bash-completion/generate.sh
- /.local/share/fonts/FontAwesome.ttf
- /.local/share/fonts/Hack Bold Italic Nerd Font Complete Mono Windows Compatible.ttf
- /.local/share/fonts/Hack Bold Italic Nerd Font Complete Mono.ttf
- /.local/share/fonts/Hack Bold Italic Nerd Font Complete Windows Compatible.ttf
- /.local/share/fonts/Hack Bold Italic Nerd Font Complete.ttf
- /.local/share/fonts/Hack Bold Nerd Font Complete Mono Windows Compatible.ttf
- /.local/share/fonts/Hack Bold Nerd Font Complete Mono.ttf
- /.local/share/fonts/Hack Bold Nerd Font Complete Windows Compatible.ttf
- /.local/share/fonts/Hack Bold Nerd Font Complete.ttf
- /.local/share/fonts/Hack Italic Nerd Font Complete Mono Windows Compatible.ttf
- /.local/share/fonts/Hack Italic Nerd Font Complete Mono.ttf
- /.local/share/fonts/Hack Italic Nerd Font Complete Windows Compatible.ttf
- /.local/share/fonts/Hack Italic Nerd Font Complete.ttf
- /.local/share/fonts/Hack Regular Nerd Font Complete Mono Windows Compatible.ttf
- /.local/share/fonts/Hack Regular Nerd Font Complete Mono.ttf
- /.local/share/fonts/Hack Regular Nerd Font Complete Windows Compatible.ttf
- /.local/share/fonts/Hack Regular Nerd Font Complete.ttf
- /.local/share/fonts/Montserrat-Black.ttf
- /.local/share/fonts/Montserrat-BlackItalic.ttf
- /.local/share/fonts/Montserrat-Bold.ttf
- /.local/share/fonts/Montserrat-BoldItalic.ttf
- /.local/share/fonts/Montserrat-ExtraBold.ttf
- /.local/share/fonts/Montserrat-ExtraBoldItalic.ttf
- /.local/share/fonts/Montserrat-ExtraLight.ttf
- /.local/share/fonts/Montserrat-ExtraLightItalic.ttf
- /.local/share/fonts/Montserrat-Italic.ttf
- /.local/share/fonts/Montserrat-Light.ttf
- /.local/share/fonts/Montserrat-LightItalic.ttf
- /.local/share/fonts/Montserrat-Medium.ttf
- /.local/share/fonts/Montserrat-MediumItalic.ttf
- /.local/share/fonts/Montserrat-Regular.ttf
- /.local/share/fonts/Montserrat-SemiBold.ttf
- /.local/share/fonts/Montserrat-SemiBoldItalic.ttf
- /.local/share/fonts/Montserrat-Thin.ttf
- /.local/share/fonts/Montserrat-ThinItalic.ttf
- /.local/share/fonts/Weather-Icons.ttf
- /.local/share/fonts/ZillaSlab-Bold.ttf
- /.local/share/fonts/ZillaSlab-BoldItalic.ttf
- /.local/share/fonts/ZillaSlab-Italic.ttf
- /.local/share/fonts/ZillaSlab-Light.ttf
- /.local/share/fonts/ZillaSlab-LightItalic.ttf
- /.local/share/fonts/ZillaSlab-Medium.ttf
- /.local/share/fonts/ZillaSlab-MediumItalic.ttf
- /.local/share/fonts/ZillaSlab-Regular.ttf
- /.local/share/fonts/ZillaSlab-SemiBold.ttf
- /.local/share/fonts/ZillaSlab-SemiBoldItalic.ttf
- /.local/share/git-core/templates/hooks/post-commit
- /.local/share/kactivitymanagerd/resources/database
- /.local/share/kactivitymanagerd/resources/database-shm
- /.local/share/kactivitymanagerd/resources/database-wal
- /.gnupg/public/apt.hashicorp.sig
- /.gnupg/public/linux.wazuh.sig
- /.gnupg/public/qubes.uman.sig
- /.gnupg/public/unman.sig
- /.gnupg/public/wazuh.sig
- /.config/Kvantum/kvantum.config
- /.config/age/expect
- /.config/age/run_once_before_decrypt-private-key.sh.tmpl
- /.config/alacritty/alacritty.yml
- /.config/asdf/asdfrc
- /.config/asdf/default-cargo-pkgs
- /.config/asdf/default-golang-pkgs
- /.config/asdf/default-npm-packages
- /.config/asdf/default-python-pkgs
- /.config/asdf/default-ruby-pkgs
- /.config/bashtop/bashtop.cfg
- /.config/bat/config
- /.config/brew/whalebrew
- /.config/crontab/config
- /.config/direnv/direnv.toml
- /.config/fd/ignore
- /.config/firejail/bitwarden.local
- /.config/firejail/chromium.local
- /.config/firejail/code.local
- /.config/firejail/gcloud.local
- /.config/firejail/google-chrome-stable.local
- /.config/firejail/slack.local
- /.config/firejail/thunderbird.local
- /.config/fontconfig/fonts.conf
- /.config/ghorg/conf.yaml
- /.config/git/attributes
- /.config/git/commit-template
- /.config/git/ignore
- /.config/gtk-2.0/gtkrc
- /.config/gtk-3.0/settings.ini
- /.config/himalaya/config.toml
- /.config/k9s/plugin.yml
- /.config/kitty/Betelgeuse-dark.conf
- /.config/kitty/Betelgeuse-light.conf
- /.config/kitty/kitty.conf
- /.config/ngrok/ngrok.yml
- /.config/npm/npmrc.tmpl.TODO
- /.config/oh-my-posh/Betelgeuse-minimal.omp.json
- /.config/oh-my-posh/Betelgeuse.omp.json
- /.config/pgcli/config
- /.config/plasma/plasmoids.yml
- /.config/powershell/takuya.omp.json
- /.config/powershell/user_profile.ps1
- /.config/rclone/merge_rclone.conf
- /.config/readline/inputrc
- /.config/ripgrep/config
- /.config/shell/.private
- /.config/shell/functions
- /.config/shell/motd
- /.config/shell/profile
- /.config/slack-term/config
- /.config/tabby/config.yaml
- /.config/terminator/config
- /.config/wget/wgetrc
- /.config/xsettingsd/xsettingsd.conf
- /.config/youtube-dl/config
- /.config/xfce4/terminal/terminalrc
- /.config/misc/.warp/themes/betelgeuse_dark.yaml
- /.config/misc/.warp/themes/betelgeuse_light.yaml
- /.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
- /.config/misc/.tmux.themer
- /.config/Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json
- /.config/Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json
- /.config/Code/User/extensions/theme-betelgeuse-vscode/README.md
- /.config/Code/User/extensions/theme-betelgeuse-vscode/icon.svg
- /.config/Code/User/extensions/theme-betelgeuse-vscode/package.json
- /.config/Code/User/extensions.json
- /.config/Code/User/keybindings.json
- /.config/Code/User/settings.json
- /.config/batrc
- /.config/chromium-flags.conf
- /.config/dircolors
- /.config/gtkrc
- /.config/kactivitymanagerdrc
- /.config/kcminputrc
- /.config/kdeglobals
- /.config/konsolerc
- /.config/ksplashrc
- /.config/ktimezonedrc
- /.config/kwinrc
- /.config/mimeapps.list
- /.config/plasma-localerc
- /.config/plasmarc
- /.config/ripgreprc
- /.config/wgetrc
- /.config/whalebrew
- /.vim/colors/betelgeuse.vim
- /.vim/autoload/lightline/colorscheme/Betelgeuse.vim
- /.vim/autoload/plug.vim
- /.vim/vimrc
- /.vscode/extensions.json
- /.vscode/settings.json
- /AppData/Local/clink/oh-my-posh.lua
- /Library/Preferences/com.apple.Terminal.plist
- /Library/VirtualBox/VirtualBox.xml
- /Library/Application Support/tabby/plugins/package-lock.json
- /Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Dark.dvtcolortheme
- /Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Light.dvtcolortheme
- /.local/share/chezmoi/docs/CHEZMOI-INTRO.md
- /.local/share/chezmoi/home/.chezmoi.yaml.tmpl
- /.local/share/chezmoi/home/.chezmoidata.yaml
- /.local/share/chezmoi/home/.chezmoiexternal.toml
- /.local/share/chezmoi/home/.chezmoiignore
- /.local/share/chezmoi/home/.chezmoiremove
- /.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_5-install-homebrew.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_8-install-zx.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_before_9-ensure-node-version.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-macos.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_20-ensure-zsh-macos.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_set-wallpaper.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_before_20-ensure-user-group.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/debian/run_onchange_before_10-install-debian-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/freebsd/run_onchange_before_11-install-freebsd-packages.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/linux/run_onchange_before_10-system-tweaks.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/linux/run_onchange_before_configure-swap.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/opensuse/run_onchange_before_11-install-opensuse-software.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_after_11-set-wallpaper.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_11-update-timezone.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_12-update-dom0.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_13-install-official-templates.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_14-ensure-minimal-vms-passwordless.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_15-install-unofficial-templates.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_16-update-template-vms.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_17-install-mirage-firewall.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_18-configure-sys-usb.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/qubes/run_onchange_before_19-setup-sys-gui.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_once_before_1-decrypt-age-key.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_11-symlink-ansible-roles.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_14_install-aqua-packages.sh.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_50-crontab.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_59-connect-tailscale.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-zsh-plugins.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/windows/run_onchange_after_14-cleanup-windows
- /.local/share/chezmoi/home/.chezmoiscripts/windows/run_onchange_before_10-install-windows-dependencies.tmpl
- /.local/share/chezmoi/home/.chezmoiscripts/windows/run_onchange_before_11-install-windows-packages.tmpl
- /.local/share/chezmoi/home/.chezmoitemplates/darwin/Brewfile
- /.local/share/chezmoi/home/.chezmoitemplates/universal/essential-packages
- /.local/share/chezmoi/home/.chezmoitemplates/universal/logg
- /.local/share/chezmoi/home/.chezmoitemplates/universal/logg-compat
- /.local/share/chezmoi/home/.chezmoitemplates/universal/profile
- /.local/share/chezmoi/home/AppData/Local/clink/oh-my-posh.lua
- /.local/share/chezmoi/home/AppData/Roaming/Google Assistant/symlink_config.json.tmpl
- /.local/share/chezmoi/home/Library/Application Support/tabby/plugins/package-lock.json
- /.local/share/chezmoi/home/Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Dark.dvtcolortheme
- /.local/share/chezmoi/home/Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Light.dvtcolortheme
- /.local/share/chezmoi/home/Library/Fonts/run_onchange_after_add-fonts.tmpl
- /.local/share/chezmoi/home/Library/Preferences/com.apple.Terminal.plist
- /.local/share/chezmoi/home/Library/Preferences/com.googlecode.iterm2.plist
- /.local/share/chezmoi/home/Library/VirtualBox/VirtualBox.xml.tmpl
- /.local/share/chezmoi/home/dot_VirtualBox/VirtualBox.xml.tmpl
- /.local/share/chezmoi/home/dot_Xresources
- /.local/share/chezmoi/home/dot_bashrc
- /.local/share/chezmoi/home/dot_cache/readonly_rclone/remove_dot_gitkeep
- /.local/share/chezmoi/home/dot_cache/zsh/remove_dot_gitkeep
- /.local/share/chezmoi/home/dot_editorconfig
- /.local/share/chezmoi/home/dot_gnupg/public/apt.hashicorp.sig
- /.local/share/chezmoi/home/dot_gnupg/public/linux.wazuh.sig
- /.local/share/chezmoi/home/dot_gnupg/public/qubes.uman.sig
- /.local/share/chezmoi/home/dot_local/Taskfile-local.yml
- /.local/share/chezmoi/home/dot_local/assets/Betelgeuse.macOS.terminal
- /.local/share/chezmoi/home/dot_local/bin/executable_gist
- /.local/share/chezmoi/home/dot_local/bin/executable_install-gnome-extensions
- /.local/share/chezmoi/home/dot_local/bin/executable_install-program
- /.local/share/chezmoi/home/dot_local/bin/executable_install-terminal-theme.tmpl
- /.local/share/chezmoi/home/dot_local/bin/executable_kde-wallpaper
- /.local/share/chezmoi/home/dot_local/bin/executable_logg
- /.local/share/chezmoi/home/dot_local/bin/executable_open
- /.local/share/chezmoi/home/dot_local/bin/executable_provision.tmpl
- /.local/share/chezmoi/home/dot_local/bin/executable_ramqube
- /.local/share/chezmoi/home/dot_local/bin/executable_squash-symlink
- /.local/share/chezmoi/home/dot_local/bin/executable_task
- /.local/share/chezmoi/home/dot_local/bin/executable_tinypng.tmpl
- /.local/share/chezmoi/home/dot_local/bin/firejail/executable_slack
- /.local/share/chezmoi/home/dot_local/bin/run_onchange_ensure-executable.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_bat.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_bombshell-client.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_fd.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_install-software.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_qrun.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_qscp
- /.local/share/chezmoi/home/dot_local/bin/symlink_qssh.tmpl
- /.local/share/chezmoi/home/dot_local/bin/symlink_readlink.tmpl
- /.local/share/chezmoi/home/dot_local/konsole/Default.profile
- /.local/share/chezmoi/home/dot_local/log/remove_dot_gitkeep
- /.local/share/chezmoi/home/dot_local/scripts/docker-functions.bash
- /.local/share/chezmoi/home/dot_local/scripts/motd.bash
- /.local/share/chezmoi/home/dot_local/scripts/p10k.zsh
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_README.md.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_Vagrantfile.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_ansible.cfg.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_docs.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_environments.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_main.yml.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_playbooks.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/symlink_requirements.yml.tmpl
- /.local/share/chezmoi/home/dot_local/share/ansible/tasks/symlink_qubes.tmpl
- /.local/share/chezmoi/home/dot_local/share/fonts/FontAwesome.ttf
- /.local/share/chezmoi/home/dot_local/share/fonts/Weather-Icons.ttf
- /.local/share/chezmoi/home/dot_local/share/git-core/templates/hooks/post-commit
- /.local/share/chezmoi/home/dot_local/state/bash/remove_dot_gitkeep
- /.local/share/chezmoi/home/dot_local/state/zsh/remove_dot_gitkeep
- /.local/share/chezmoi/home/dot_ssh/authorized_keys.github.tmpl
- /.local/share/chezmoi/home/dot_ssh/private_config.tmpl
- /.local/share/chezmoi/home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl
- /.local/share/chezmoi/home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl
- /.local/share/chezmoi/home/dot_ssh/symlink_authorized_keys.tmpl
- /.local/share/chezmoi/home/dot_tool-versions.tmpl
- /.local/share/chezmoi/home/dot_vim/autoload/lightline/colorscheme/Betelgeuse.vim
- /.local/share/chezmoi/home/dot_vim/colors/Betelgeuse.vim
- /.local/share/chezmoi/home/dot_zshrc
- /.local/share/chezmoi/home/key.txt.age
- /.local/share/chezmoi/home/private_dot_config/Google Assistant/client-secret.json
- /.local/share/chezmoi/home/private_dot_config/Google Assistant/config.json.tmpl
- /.local/share/chezmoi/home/private_dot_config/Kvantum/kvantum.config
- /.local/share/chezmoi/home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl
- /.local/share/chezmoi/home/private_dot_config/alacritty/alacritty.yml
- /.local/share/chezmoi/home/private_dot_config/asdf/asdfrc.tmpl
- /.local/share/chezmoi/home/private_dot_config/asdf/default-cargo-pkgs
- /.local/share/chezmoi/home/private_dot_config/asdf/default-golang-pkgs
- /.local/share/chezmoi/home/private_dot_config/asdf/default-npm-packages
- /.local/share/chezmoi/home/private_dot_config/asdf/default-python-pkgs
- /.local/share/chezmoi/home/private_dot_config/asdf/default-ruby-pkgs
- /.local/share/chezmoi/home/private_dot_config/bashtop/bashtop.cfg
- /.local/share/chezmoi/home/private_dot_config/bat/config
- /.local/share/chezmoi/home/private_dot_config/brew/Brewfile.tmpl
- /.local/share/chezmoi/home/private_dot_config/brew/whalebrew
- /.local/share/chezmoi/home/private_dot_config/chromium-flags.conf
- /.local/share/chezmoi/home/private_dot_config/crontab/config
- /.local/share/chezmoi/home/private_dot_config/direnv/direnv.toml
- /.local/share/chezmoi/home/private_dot_config/fd/ignore
- /.local/share/chezmoi/home/private_dot_config/firejail/bitwarden.local
- /.local/share/chezmoi/home/private_dot_config/firejail/chromium.local
- /.local/share/chezmoi/home/private_dot_config/firejail/code.local
- /.local/share/chezmoi/home/private_dot_config/firejail/gcloud.local
- /.local/share/chezmoi/home/private_dot_config/firejail/google-chrome-stable.local
- /.local/share/chezmoi/home/private_dot_config/firejail/slack.local
- /.local/share/chezmoi/home/private_dot_config/firejail/thunderbird.local
- /.local/share/chezmoi/home/private_dot_config/fontconfig/fonts.conf
- /.local/share/chezmoi/home/private_dot_config/ghorg/conf.yaml.tmpl
- /.local/share/chezmoi/home/private_dot_config/git/attributes
- /.local/share/chezmoi/home/private_dot_config/git/commit-template
- /.local/share/chezmoi/home/private_dot_config/git/config.tmpl
- /.local/share/chezmoi/home/private_dot_config/git/ignore
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_commit-msg
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_post-checkout
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_post-commit
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_post-merge
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_post-rewrite
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_pre-commit
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_pre-push
- /.local/share/chezmoi/home/private_dot_config/git/template/symlink_prepare-commit-msg
- /.local/share/chezmoi/home/private_dot_config/gtk-1.0/.gitkeep
- /.local/share/chezmoi/home/private_dot_config/gtk-2.0/gtkrc
- /.local/share/chezmoi/home/private_dot_config/gtk-3.0/settings.ini
- /.local/share/chezmoi/home/private_dot_config/gtkrc
- /.local/share/chezmoi/home/private_dot_config/heroku/deploy.yml.tmpl
- /.local/share/chezmoi/home/private_dot_config/himalaya/config.toml
- /.local/share/chezmoi/home/private_dot_config/k9s/plugin.yml
- /.local/share/chezmoi/home/private_dot_config/kcminputrc
- /.local/share/chezmoi/home/private_dot_config/kdeglobals
- /.local/share/chezmoi/home/private_dot_config/kitty/Betelgeuse-dark.conf
- /.local/share/chezmoi/home/private_dot_config/kitty/Betelgeuse-light.conf
- /.local/share/chezmoi/home/private_dot_config/kitty/kitty.conf
- /.local/share/chezmoi/home/private_dot_config/konsolerc
- /.local/share/chezmoi/home/private_dot_config/ksplashrc
- /.local/share/chezmoi/home/private_dot_config/ktimezonedrc
- /.local/share/chezmoi/home/private_dot_config/kwinrc
- /.local/share/chezmoi/home/private_dot_config/libvirt/libvirtd.conf
- /.local/share/chezmoi/home/private_dot_config/mimeapps.list
- /.local/share/chezmoi/home/private_dot_config/ngrok/ngrok.yml.tmpl
- /.local/share/chezmoi/home/private_dot_config/npm/npmrc.tmpl.TODO
- /.local/share/chezmoi/home/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json
- /.local/share/chezmoi/home/private_dot_config/oh-my-posh/Betelgeuse.omp.json
- /.local/share/chezmoi/home/private_dot_config/pg/.gitkeep
- /.local/share/chezmoi/home/private_dot_config/pgcli/config
- /.local/share/chezmoi/home/private_dot_config/plasma-localerc
- /.local/share/chezmoi/home/private_dot_config/plasma/plasmoids.yml
- /.local/share/chezmoi/home/private_dot_config/plasmarc
- /.local/share/chezmoi/home/private_dot_config/powershell/profile.ps1
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions.json
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/keybindings.json
- /.local/share/chezmoi/home/private_dot_config/private_Code/User/settings.json
- /.local/share/chezmoi/home/private_dot_config/putty/.gitkeep
- /.local/share/chezmoi/home/private_dot_config/rclone/merge_rclone.conf
- /.local/share/chezmoi/home/private_dot_config/readline/inputrc
- /.local/share/chezmoi/home/private_dot_config/ripgrep/config
- /.local/share/chezmoi/home/private_dot_config/rofi/config.rasi.tmpl
- /.local/share/chezmoi/home/private_dot_config/shell/aliases.sh.tmpl
- /.local/share/chezmoi/home/private_dot_config/shell/exports.sh.tmpl
- /.local/share/chezmoi/home/private_dot_config/shell/functions.sh
- /.local/share/chezmoi/home/private_dot_config/shell/motd.sh
- /.local/share/chezmoi/home/private_dot_config/shell/private_private.sh
- /.local/share/chezmoi/home/private_dot_config/shell/profile.sh
- /.local/share/chezmoi/home/private_dot_config/slack-term/config.tmpl
- /.local/share/chezmoi/home/private_dot_config/tabby/config.yaml.tmpl
- /.local/share/chezmoi/home/private_dot_config/terminator/config
- /.local/share/chezmoi/home/private_dot_config/tmux/remove_dot_gitkeep
- /.local/share/chezmoi/home/private_dot_config/vim/vimrc
- /.local/share/chezmoi/home/private_dot_config/wget/wgetrc
- /.local/share/chezmoi/home/private_dot_config/xfce4/terminal/terminalrc
- /.local/share/chezmoi/home/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
- /.local/share/chezmoi/home/private_dot_config/xsettingsd/xsettingsd.conf
- /.local/share/chezmoi/home/private_dot_config/youtube-dl/config
- /.local/share/chezmoi/home/private_dot_config/zap/v2/config.ini
- /.local/share/chezmoi/system/.chezmoidata.yaml
- /.local/share/chezmoi/system/.chezmoiexternal.toml
- /.local/share/chezmoi/system/.chezmoiignore
- /.local/share/chezmoi/system/Applications/Firefox.app/Contents/Resources/distribution/policies.json
- /.local/share/chezmoi/system/boot/efi/EFI/qubes/modify_grubenv
- /.local/share/chezmoi/system/etc/cockpit/machines.d/TODO.cockpit-machine.json.tmpl
- /.local/share/chezmoi/system/etc/cups/cupsd.conf
- /.local/share/chezmoi/system/etc/cups/modify_cupsd.conf
- /.local/share/chezmoi/system/etc/default/modify_grub
- /.local/share/chezmoi/system/etc/fonts/local.conf
- /.local/share/chezmoi/system/etc/grub.d/31-hold-shift
- /.local/share/chezmoi/system/etc/keybase/config.json
- /.local/share/chezmoi/system/etc/modify_environment
- /.local/share/chezmoi/system/etc/opt/chrome/policies/managed/policies.json
- /.local/share/chezmoi/system/etc/qubes/repo-templates/qubes-templates.repo
- /.local/share/chezmoi/system/etc/rcloneignore
- /.local/share/chezmoi/system/etc/sanoid/sanoid.conf.TODO
- /.local/share/chezmoi/system/etc/sddm.conf
- /.local/share/chezmoi/system/etc/systemd/system/r2-docker.service
- /.local/share/chezmoi/system/etc/systemd/system/r2-{{ .user.username }}.service.tmpl
- /.local/share/chezmoi/system/etc/timeshift/timeshift.json
- /.local/share/chezmoi/system/etc/yum.repos.d/qubes-dom0.repo
- /.local/share/chezmoi/system/mnt/private_r2-docker/remove_dot_gitkeep
- /.local/share/chezmoi/system/usr/lib/firefox-esr/distribution/policies.json
- /.local/share/chezmoi/system/usr/lib/firefox/distribution/policies.json
- /.local/share/chezmoi/system/usr/local/bin/executable_rclone-mount
- /.local/share/chezmoi/system/usr/local/bin/executable_squash-symlink
- /.local/share/chezmoi/system/usr/local/share/run_onchange_after_setup-share-folder
- /.local/share/chezmoi/system/usr/share/run_onchange_after_setup-share-folder
- /.local/share/chezmoi/system/var/cache/rclone/remove_dot_gitkeep
- /.local/share/chezmoi/system/var/log/user/run_onchange_after-symlink-user-logs
- /.local/share/chezmoi/.chezmoiignore
- /.local/share/chezmoi/.chezmoiroot
- /.local/share/chezmoi/software.yml
- /.local/Taskfile-local.yml
- /.local/aliases
- /.local/antigen.zsh
- /.local/dockerfunc.sh
- /.local/functions
- /.local/motd.sh
- /.bashrc
- /.tool-versions
- /.Xresources
- /.zshrc
- /TODO.md
- /sync.sh
- /docs/TODO.md
- /docs/partials/guide.md
- /docs/partials/CHEZMOI-INTRO.md
- /home/.chezmoiscripts/linux/run_onchange_before_configure-swap
- /home/.chezmoiscripts/linux/run_onchange_before_10-system-tweaks
- /home/.chezmoiscripts/qubes/run_onchange_before_19-setup-sys-gui
- /home/.chezmoiscripts/qubes/run_onchange_after_11-set-wallpaper.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_12-update-dom0.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_13-install-official-templates.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_11-update-timezone.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_14-ensure-minimal-vms-passwordless.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_15-install-unofficial-templates.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_16-update-template-vms.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_17-install-mirage-firewall.tmpl
- /home/.chezmoiscripts/qubes/run_onchange_before_18-configure-sys-usb.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_8-install-zx.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_9-ensure-node-version.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_5-install-homebrew.tmpl
- /home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-dependencies.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl
- /home/.chezmoiscripts/darwin/run_onchange_after_10_configure-macos.tmpl
- /home/.chezmoiscripts/darwin/run_onchange_before_20-ensure-user-group.tmpl
- /home/.chezmoiscripts/darwin/run_onchange_after_set-wallpaper.tmpl
- /home/.chezmoiscripts/darwin/run_onchange_after_20-ensure-zsh-macos.tmpl
- /home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-dependencies.tmpl
- /home/.chezmoiscripts/debian/run_onchange_before_10-install-debian-dependencies.tmpl
- /home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl
- /home/.chezmoiscripts/freebsd/run_onchange_before_11-install-freebsd-packages.tmpl
- /home/.chezmoiscripts/opensuse/run_onchange_before_11-install-opensuse-software.tmpl
- /home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_59-connect-tailscale.tmpl
- /home/.chezmoiscripts/universal/run_once_before_1-decrypt-age-key.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_50-crontab.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_11-symlink-ansible-roles.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_14_install-aqua-packages.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-zsh-plugins.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.tmpl
- /home/.chezmoiscripts/windows/run_onchange_before_11-install-windows-packages.tmpl
- /home/.chezmoiscripts/windows/run_onchange_after_14-cleanup-windows
- /home/.chezmoiscripts/windows/run_onchange_before_10-install-windows-dependencies.tmpl
- /home/.chezmoidata.yaml
- /home/.chezmoiexternal.toml
- /home/.chezmoiignore
- /home/.chezmoiremove
- /home/.chezmoitemplates/darwin/Brewfile
- /home/.chezmoitemplates/universal/logg-compat
- /home/.chezmoitemplates/universal/profile
- /home/.chezmoitemplates/universal/logg
- /home/.chezmoitemplates/universal/essential-packages
- /home/AppData/Local/clink/oh-my-posh.lua
- /home/AppData/Roaming/Google Assistant/symlink_config.json.tmpl
- /home/Library/Application Support/tabby/plugins/package-lock.json
- /home/Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Light.dvtcolortheme
- /home/Library/Developer/Xcode/UserData/FontAndColorThemes/Betelgeuse Dark.dvtcolortheme
- /home/Library/Fonts/run_onchange_after_add-fonts.tmpl
- /home/Library/Preferences/com.apple.Terminal.plist
- /home/Library/Preferences/com.googlecode.iterm2.plist
- /home/Library/VirtualBox/VirtualBox.xml.tmpl
- /home/dot_VirtualBox/VirtualBox.xml.tmpl
- /home/dot_cache/readonly_rclone/remove_dot_gitkeep
- /home/dot_cache/zsh/remove_dot_gitkeep
- /home/dot_gnupg/public/apt.hashicorp.sig
- /home/dot_gnupg/public/qubes.uman.sig
- /home/dot_gnupg/public/linux.wazuh.sig
- /home/dot_local/assets/Betelgeuse.macOS.terminal
- /home/dot_local/bin/executable_install-program
- /home/dot_local/bin/firejail/executable_slack
- /home/dot_local/bin/executable_ramqube
- /home/dot_local/bin/executable_squash-symlink
- /home/dot_local/bin/symlink_bombshell-client.tmpl
- /home/dot_local/bin/symlink_fd.tmpl
- /home/dot_local/bin/symlink_qssh.tmpl
- /home/dot_local/bin/executable_kde-wallpaper
- /home/dot_local/bin/symlink_bat.tmpl
- /home/dot_local/bin/executable_tinypng.tmpl
- /home/dot_local/bin/executable_task
- /home/dot_local/bin/executable_install-terminal-theme.tmpl
- /home/dot_local/bin/symlink_qscp
- /home/dot_local/bin/symlink_readlink.tmpl
- /home/dot_local/bin/executable_logg
- /home/dot_local/bin/executable_install-gnome-extensions
- /home/dot_local/bin/executable_gist
- /home/dot_local/bin/symlink_qrun.tmpl
- /home/dot_local/bin/symlink_install-software.tmpl
- /home/dot_local/bin/executable_open
- /home/dot_local/bin/run_onchange_ensure-executable.tmpl
- /home/dot_local/bin/executable_provision.tmpl
- /home/dot_local/konsole/Default.profile
- /home/dot_local/log/remove_dot_gitkeep
- /home/dot_local/scripts/docker-functions.bash
- /home/dot_local/scripts/motd.bash
- /home/dot_local/scripts/p10k.zsh
- /home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl
- /home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl
- /home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl
- /home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl
- /home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl
- /home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl
- /home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl
- /home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl
- /home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl
- /home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl
- /home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl
- /home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl
- /home/dot_local/share/ansible/tasks/symlink_qubes.tmpl
- /home/dot_local/share/ansible/symlink_docs.tmpl
- /home/dot_local/share/ansible/symlink_main.yml.tmpl
- /home/dot_local/share/ansible/symlink_playbooks.tmpl
- /home/dot_local/share/ansible/symlink_README.md.tmpl
- /home/dot_local/share/ansible/symlink_requirements.yml.tmpl
- /home/dot_local/share/ansible/symlink_environments.tmpl
- /home/dot_local/share/ansible/symlink_Vagrantfile.tmpl
- /home/dot_local/share/ansible/symlink_ansible.cfg.tmpl
- /home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl
- /home/dot_local/share/fonts/Weather-Icons.ttf
- /home/dot_local/share/fonts/FontAwesome.ttf
- /home/dot_local/share/git-core/templates/hooks/post-commit
- /home/dot_local/state/bash/remove_dot_gitkeep
- /home/dot_local/state/zsh/remove_dot_gitkeep
- /home/dot_local/Taskfile-local.yml
- /home/dot_ssh/symlink_authorized_keys.tmpl
- /home/dot_ssh/authorized_keys.github.tmpl
- /home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl
- /home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl
- /home/dot_ssh/private_config.tmpl
- /home/dot_vim/autoload/lightline/colorscheme/Betelgeuse.vim
- /home/dot_vim/colors/Betelgeuse.vim
- /home/private_dot_config/Google Assistant/client-secret.json
- /home/private_dot_config/Google Assistant/config.json.tmpl
- /home/private_dot_config/Kvantum/kvantum.config
- /home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl
- /home/private_dot_config/alacritty/alacritty.yml
- /home/private_dot_config/asdf/default-ruby-pkgs
- /home/private_dot_config/asdf/asdfrc.tmpl
- /home/private_dot_config/asdf/default-golang-pkgs
- /home/private_dot_config/asdf/default-cargo-pkgs
- /home/private_dot_config/asdf/default-python-pkgs
- /home/private_dot_config/asdf/default-npm-packages
- /home/private_dot_config/bashtop/bashtop.cfg
- /home/private_dot_config/bat/config
- /home/private_dot_config/brew/whalebrew
- /home/private_dot_config/brew/Brewfile.tmpl
- /home/private_dot_config/crontab/config
- /home/private_dot_config/direnv/direnv.toml
- /home/private_dot_config/fd/ignore
- /home/private_dot_config/firejail/google-chrome-stable.local
- /home/private_dot_config/firejail/bitwarden.local
- /home/private_dot_config/firejail/thunderbird.local
- /home/private_dot_config/firejail/slack.local
- /home/private_dot_config/firejail/code.local
- /home/private_dot_config/firejail/gcloud.local
- /home/private_dot_config/firejail/chromium.local
- /home/private_dot_config/fontconfig/fonts.conf
- /home/private_dot_config/ghorg/conf.yaml.tmpl
- /home/private_dot_config/git/template/symlink_post-checkout
- /home/private_dot_config/git/template/symlink_post-rewrite
- /home/private_dot_config/git/template/symlink_prepare-commit-msg
- /home/private_dot_config/git/template/symlink_pre-push
- /home/private_dot_config/git/template/symlink_post-commit
- /home/private_dot_config/git/template/symlink_commit-msg
- /home/private_dot_config/git/template/symlink_pre-commit
- /home/private_dot_config/git/template/symlink_post-merge
- /home/private_dot_config/git/attributes
- /home/private_dot_config/git/ignore
- /home/private_dot_config/git/config.tmpl
- /home/private_dot_config/git/commit-template
- /home/private_dot_config/gtk-1.0/.gitkeep
- /home/private_dot_config/gtk-2.0/gtkrc
- /home/private_dot_config/gtk-3.0/settings.ini
- /home/private_dot_config/heroku/deploy.yml.tmpl
- /home/private_dot_config/himalaya/config.toml
- /home/private_dot_config/k9s/plugin.yml
- /home/private_dot_config/kitty/Betelgeuse-light.conf
- /home/private_dot_config/kitty/Betelgeuse-dark.conf
- /home/private_dot_config/kitty/kitty.conf
- /home/private_dot_config/libvirt/libvirtd.conf
- /home/private_dot_config/ngrok/ngrok.yml.tmpl
- /home/private_dot_config/npm/npmrc.tmpl.TODO
- /home/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json
- /home/private_dot_config/oh-my-posh/Betelgeuse.omp.json
- /home/private_dot_config/pg/.gitkeep
- /home/private_dot_config/pgcli/config
- /home/private_dot_config/plasma/plasmoids.yml
- /home/private_dot_config/powershell/profile.ps1
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-light-color-theme.json
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/themes/themer-dark-color-theme.json
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/README.md
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/package.json
- /home/private_dot_config/private_Code/User/extensions/theme-betelgeuse-vscode/icon.svg
- /home/private_dot_config/private_Code/User/settings.json
- /home/private_dot_config/private_Code/User/keybindings.json
- /home/private_dot_config/private_Code/User/extensions.json
- /home/private_dot_config/putty/.gitkeep
- /home/private_dot_config/rclone/merge_rclone.conf
- /home/private_dot_config/readline/inputrc
- /home/private_dot_config/ripgrep/config
- /home/private_dot_config/rofi/config.rasi.tmpl
- /home/private_dot_config/shell/exports.sh.tmpl
- /home/private_dot_config/shell/profile.sh
- /home/private_dot_config/shell/functions.sh
- /home/private_dot_config/shell/aliases.sh.tmpl
- /home/private_dot_config/shell/private_private.sh
- /home/private_dot_config/shell/motd.sh
- /home/private_dot_config/slack-term/config.tmpl
- /home/private_dot_config/tabby/config.yaml.tmpl
- /home/private_dot_config/terminator/config
- /home/private_dot_config/tmux/remove_dot_gitkeep
- /home/private_dot_config/vim/vimrc
- /home/private_dot_config/wget/wgetrc
- /home/private_dot_config/xfce4/terminal/terminalrc
- /home/private_dot_config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
- /home/private_dot_config/xsettingsd/xsettingsd.conf
- /home/private_dot_config/youtube-dl/config
- /home/private_dot_config/zap/v2/config.ini
- /home/private_dot_config/kcminputrc
- /home/private_dot_config/kwinrc
- /home/private_dot_config/gtkrc
- /home/private_dot_config/mimeapps.list
- /home/private_dot_config/ksplashrc
- /home/private_dot_config/ktimezonedrc
- /home/private_dot_config/plasma-localerc
- /home/private_dot_config/plasmarc
- /home/private_dot_config/chromium-flags.conf
- /home/private_dot_config/konsolerc
- /home/private_dot_config/kdeglobals
- /home/dot_editorconfig
- /home/key.txt.age
- /home/dot_tool-versions.tmpl
- /home/dot_Xresources
- /home/dot_zshrc
- /home/.chezmoi.yaml.tmpl
- /home/dot_bashrc
- /system/Applications/Firefox.app/Contents/Resources/distribution/policies.json
- /system/boot/efi/EFI/qubes/modify_grubenv
- /system/etc/cockpit/machines.d/TODO.cockpit-machine.json.tmpl
- /system/etc/cups/cupsd.conf
- /system/etc/cups/modify_cupsd.conf
- /system/etc/default/modify_grub
- /system/etc/fonts/local.conf
- /system/etc/grub.d/31-hold-shift
- /system/etc/keybase/config.json
- /system/etc/opt/chrome/policies/managed/policies.json
- /system/etc/qubes/repo-templates/qubes-templates.repo
- /system/etc/sanoid/sanoid.conf.TODO
- /system/etc/systemd/system/r2-docker.service
- /system/etc/systemd/system/r2-{{ .user.username }}.service.tmpl
- /system/etc/timeshift/timeshift.json
- /system/etc/yum.repos.d/qubes-dom0.repo
- /system/etc/modify_environment
- /system/etc/rcloneignore
- /system/etc/sddm.conf
- /system/mnt/private_r2-docker/remove_dot_gitkeep
- /system/usr/lib/firefox-esr/distribution/policies.json
- /system/usr/lib/firefox/distribution/policies.json
- /system/usr/local/bin/executable_rclone-mount
- /system/usr/local/bin/executable_squash-symlink
- /system/usr/local/share/run_onchange_after_setup-share-folder
- /system/usr/share/run_onchange_after_setup-share-folder
- /system/var/cache/rclone/remove_dot_gitkeep
- /system/var/log/user/run_onchange_after-symlink-user-logs
- /system/.chezmoidata.yaml
- /system/.chezmoiexternal.toml
- /system/.chezmoiignore
- /.chezmoiignore
- /.chezmoiroot
- /software.yml
- /README.md
- /local/sync.sh
This commit is contained in:
Brian Zalewski 2022-12-24 19:40:44 +00:00
parent 533c70bc60
commit 9a0f472ea5
479 changed files with 27 additions and 34570 deletions

View file

@ -1,38 +0,0 @@
! general
*background: rgb:16/19/25
*foreground: rgb:aa/ae/b8
! blacks
*color0: rgb:47/4b/56
*color8: rgb:60/64/6f
! reds
*color1: rgb:ed/25/4e
*color9: rgb:e5/45/68
! greens
*color2: rgb:71/f7/9f
*color10: rgb:81/ed/a9
! yellows
*color3: rgb:f9/dc/5c
*color11: rgb:ee/d8/73
! blues
*color4: rgb:7c/b7/ff
*color12: rgb:8a/ba/f6
! magentas
*color5: rgb:c7/4d/89
*color13: rgb:c6/65/97
! cyans
*color6: rgb:0/c1/e4
*color14: rgb:27/c2/e0
! whites
*color7: rgb:aa/ae/b8
*color15: rgb:c3/c7/d1
xterm*faceName: Hack Nerd Font

96
.bashrc
View file

@ -1,96 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC1090,SC1091
# Prefer US English
export LANG="en_US"
# Detect support for advanced terminal features
if [ "$0" = 'bash' ] || [ "$0" = '/bin/bash' ]; then
export BASH_SUPPORT=true
fi
### Fig / LC_ALL
if [ "$BASH_SUPPORT" = 'true' ]; then
if [[ "$(hostname)" != *'-minimal' ]]; then
export LC_ALL="en_US.UTF-8"
fi
if [ -f "$HOME/.fig/shell/bashrc.pre.bash" ]; then
. "$HOME/.fig/shell/bashrc.pre.bash"
fi
fi
### Import Common Settings
if [ -f "$HOME/.config/shell/profile" ]; then
. "$HOME/.config/shell/profile"
fi
### Settings
if command -v shopt > /dev/null; then
shopt -s globstar
shopt -s histappend
shopt -s checkwinsize
fi
### History
export HISTFILE="$XDG_STATE_HOME/bash/history"
### /etc/bashrc
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Prompt (on bash only)
if [ "$BASH_SUPPORT" = 'true' ]; then
if [[ "$(hostname)" != *'-minimal' ]]; then
### Styled Terminal
if command -v oh-my-posh > /dev/null; then
# Oh My Posh (See: https://ohmyposh.dev/)
eval "$(oh-my-posh init bash --config "$XDG_CONFIG_HOME/oh-my-posh/Betelgeuse.omp.json")"
else
# Basic styled terminal
case "$TERM" in
xterm* | rxvt* | Eterm | aterm | kterm | gnome* | alacritty)
PS1="\n \[\033[0;34m\]╭─\[\033[0;31m\]\[\033[0;37m\]\[\033[41m\] $OS_ICON \u \[\033[0m\]\[\033[0;31m\]\[\033[44m\]\[\033[0;34m\]\[\033[44m\]\[\033[0;30m\]\[\033[44m\] \w \[\033[0m\]\[\033[0;34m\] \n \[\033[0;34m\]╰ \[\033[1;36m\]\$ \[\033[0m\]"
;;
esac
fi
else
# Minimal session
if command -v oh-my-posh > /dev/null; then
eval "$(oh-my-posh init bash --config "$XDG_CONFIG_HOME/oh-my-posh/Betelgeuse-minimal.omp.json")"
fi
fi
fi
### Bash Initialization Hooks
if [ "$BASH_SUPPORT" = 'true' ]; then
### Bash Completion
if [ -f "/usr/local/etc/profile.d/bash_completion.sh" ]; then
. "/usr/local/etc/profile.d/bash_completion.sh"
fi
### direnv
if command -v direnv > /dev/null; then
eval "$(direnv hook bash)"
fi
### Java (asdf)
if [ -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ]; then
. "$ASDF_DATA_DIR/plugins/java/set-java-home.bash"
fi
### zoxide
if command -v zoxide > /dev/null; then
eval "$(zoxide init --cmd cd bash)"
fi
### Fig
if [ -f "$HOME/.fig/shell/bashrc.post.bash" ]; then
. "$HOME/.fig/shell/bashrc.post.bash"
fi
### Vault
if command -v vault > /dev/null; then
complete -C vault vault
fi
fi

View file

@ -1 +1 @@
.local/share/chezmoi/home
home

View file

@ -1,11 +0,0 @@
#!/usr/bin/expect
# TODO: https://github.com/hyperupcall/dots/tree/8e62ad19f4fa870bd70b1816d383bc32e9b6d149/dotmgr
# https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/#how-do-i-configure-chezmoi-to-encrypt-files-but-only-request-a-passphrase-the-first-time-chezmoi-init-is-run
# Figure out way of not writing AGE_PASSPHRASE to disk - keep in mem
spawn ./test.bash
expect "Enter passphrase*"
send -- "{{ .Env.AGE_PASSPHRASE }}\r"
expect "Confirm passphrase*"
send -- "{{ .Env.AGE_PASSPHRASE }}\r"
expect eof

View file

@ -1,13 +0,0 @@
#!/bin/sh
if [ ! -f "$HOME/.config/age/headless.txt" ]; then
logg 'Generating age public key under `~/.config/age/key.txt`'
age-keygen > "$HOME/.config/age/headless.txt"
fi
if [ -f "{{ .chezmoi.sourceDir }}/key.txt.age" ]; then
# TODO
logg 'Decrypting age key'
age --decrypt --output "$HOME/.config/age/key.txt" "{{ .chezmoi.sourceDir }}/key.txt.age"
chmod 600 "$HOME/.config/age/key.txt"
fi

View file

@ -1,8 +0,0 @@
# See the docs for explanations: https://asdf-vm.com/manage/configuration.html
legacy_version_file = no
use_release_candidates = no
always_keep_download = no
plugin_repository_last_check_duration = 60
disable_plugin_short_name_repository = no
java_macos_integration_enable = yes

View file

@ -1 +0,0 @@

View file

@ -1,8 +0,0 @@
github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest
github.com/ramya-rao-a/go-outline@latest
github.com/cweill/gotests/...@latest
github.com/fatih/gomodifytags@latest
github.com/josharian/impl@latest
github.com/go-delve/delve/cmd/dlv@latest
golang.org/x/tools/gopls@latest
honnef.co/go/tools/cmd/staticcheck@latest

View file

@ -1 +0,0 @@

View file

@ -1 +0,0 @@
pytest

View file

@ -1 +0,0 @@
bundler

View file

@ -1,11 +0,0 @@
# Set the theme to "TwoDark"
--theme="TwoDark"
# Show line numbers, Git modifications and file header (but no grid)
--style="numbers,changes,header"
# Use italic text on the terminal (not supported on all terminals)
--italic-text=always
# Use C++ syntax for Arduino .ino files
--map-syntax "*.ino:C++"

View file

@ -1,849 +0,0 @@
# LS_COLORS
# Maintainers: Magnus Woldrich <m@japh.se>,
# Ryan Delaney <ryan.patrick.delaney@protonmail.com>
# URL: https://github.com/trapd00r/LS_COLORS
#
# This is a collection of extension:color mappings, suitable to use as your
# LS_COLORS environment variable. Most of them use the extended color map,
# described in the ECMA-48 document; in other words, you'll need a terminal
# with capabilities of displaying 256 colors.
#
# As of this writing, over 500 different filetypes/extensions are supported.
# That's indeed a lot of extensions, but there's a lot more! Therefore I need
# your help.
#
# Fork this project on github, add the extensions you are missing, and send me
# a pull request.
#
# For files that usually end up next to each other, like html, css and js,
# try to pick colors that fit nicely together. Filetypes with multiple
# possible extensions, like htm and html, should have the same color.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the Perl Artistic License for more details.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the Perl Artistic License as published by the Perl Foundation,
# either version 1.0 of the License, or (at your option) any later version.
#
# You should have received a copy of the Perl Artistic License along
# with this program. If not, see <http://www.perlfoundation.org/artistic_license_1_0>.
# core {{{1
BLK 38;5;68
CAPABILITY 38;5;17
CHR 38;5;113;1
DIR 38;5;30
DOOR 38;5;127
EXEC 38;5;208;1
FIFO 38;5;126
FILE 0
LINK target
MULTIHARDLINK 38;5;222;1
# "NORMAL don't reset the bold attribute -
# https://github.com/trapd00r/LS_COLORS/issues/11
#NORMAL 38;5;254
NORMAL 0
ORPHAN 48;5;196;38;5;232;1
OTHER_WRITABLE 38;5;220;1
SETGID 48;5;3;38;5;0
SETUID 38;5;220;1;3;100;1
SOCK 38;5;197
STICKY 38;5;86;48;5;234
STICKY_OTHER_WRITABLE 48;5;235;38;5;139;3
*LS_COLORS 48;5;89;38;5;197;1;3;4;7 # :-)
# }}}
# documents {{{1
*README 38;5;220;1
*README.rst 38;5;220;1
*README.md 38;5;220;1
*LICENSE 38;5;220;1
*COPYING 38;5;220;1
*INSTALL 38;5;220;1
*COPYRIGHT 38;5;220;1
*AUTHORS 38;5;220;1
*HISTORY 38;5;220;1
*CONTRIBUTORS 38;5;220;1
*PATENTS 38;5;220;1
*VERSION 38;5;220;1
*NOTICE 38;5;220;1
*CHANGES 38;5;220;1
.log 38;5;190
# plain-text {{{2
.txt 38;5;253
# markup {{{2
.etx 38;5;184
.info 38;5;184
.markdown 38;5;184
.md 38;5;184
.mkd 38;5;184
.nfo 38;5;184
.pod 38;5;184
.rst 38;5;184
.tex 38;5;184
.textile 38;5;184
# key-value, non-relational data {{{2
.bib 38;5;178
.json 38;5;178
.jsonl 38;5;178
.jsonnet 38;5;178
.libsonnet 38;5;142
.ndjson 38;5;178
.msg 38;5;178
.pgn 38;5;178
.rss 38;5;178
.xml 38;5;178
.fxml 38;5;178
.toml 38;5;178
.yaml 38;5;178
.yml 38;5;178
.RData 38;5;178
.rdata 38;5;178
.xsd 38;5;178
.dtd 38;5;178
.sgml 38;5;178
.rng 38;5;178
.rnc 38;5;178
# }}}
# binary {{{2
.cbr 38;5;141
.cbz 38;5;141
.chm 38;5;141
.djvu 38;5;141
.pdf 38;5;141
.PDF 38;5;141
.mobi 38;5;141
.epub 38;5;141
# words {{{3
.docm 38;5;111;4
.doc 38;5;111
.docx 38;5;111
.odb 38;5;111
.odt 38;5;111
.rtf 38;5;111
# presentation {{{3
.odp 38;5;166
.pps 38;5;166
.ppt 38;5;166
.pptx 38;5;166
# Powerpoint show
.ppts 38;5;166
# Powerpoint with enabled macros
.pptxm 38;5;166;4
# Powerpoint show with enabled macros
.pptsm 38;5;166;4
# spreadsheet {{{3
.csv 38;5;78
.tsv 38;5;78
# Open document spreadsheet
.ods 38;5;112
.xla 38;5;76
# Excel spreadsheet
.xls 38;5;112
.xlsx 38;5;112
# Excel spreadsheet with macros
.xlsxm 38;5;112;4
# Excel module
.xltm 38;5;73;4
.xltx 38;5;73
# macOS office suite {{{3
.pages 38;5;111
.numbers 38;5;112
.key 38;5;166
# }}}
# }}}
# configs {{{2
*config 1
*cfg 1
*conf 1
*rc 1
*authorized_keys 1
*known_hosts 1
.ini 1
.plist 1
# vim
.viminfo 1
# cisco VPN client configuration
.pcf 1
# adobe photoshop proof settings file
.psf 1
# Sublime Text config
.hidden-color-scheme 1
.hidden-tmTheme 1
.last-run 1
.merged-ca-bundle 1
.sublime-build 1
.sublime-commands 1
.sublime-keymap 1
.sublime-settings 1
.sublime-snippet 1
.sublime-project 1
.sublime-workspace 1
.tmTheme 1
.user-ca-bundle 1
# eclipse
.epf 1
# }}}
# }}}
# code {{{1
# version control {{{2
.git 38;5;197
.gitignore 38;5;240
.gitattributes 38;5;240
.gitmodules 38;5;240
# shell {{{2
.awk 38;5;172
.bash 38;5;172
.bat 38;5;172
.BAT 38;5;172
.sed 38;5;172
.sh 38;5;172
.zsh 38;5;172
.vim 38;5;172
.kak 38;5;172
# interpreted {{{2
.ahk 38;5;41
# python
.py 38;5;41
.ipynb 38;5;41
# ruby
.rb 38;5;41
.gemspec 38;5;41
# perl
.pl 38;5;208
.PL 38;5;160
.t 38;5;114
# sql
.msql 38;5;222
.mysql 38;5;222
.pgsql 38;5;222
.sql 38;5;222
# Tool Command Language
.tcl 38;5;64;1
# R language
.r 38;5;49
.R 38;5;49
# GrADS script
.gs 38;5;81
# Clojure
.clj 38;5;41
.cljs 38;5;41
.cljc 38;5;41
# Clojure gorilla REPL worksheet
.cljw 38;5;41
# Scala
.scala 38;5;41
# Dart
.dart 38;5;51
# compiled {{{2
#
# assembly language
.asm 38;5;81
# LISP
.cl 38;5;81
.lisp 38;5;81
.rkt 38;5;81
# lua
.lua 38;5;81
# Moonscript
.moon 38;5;81
# C
.c 38;5;81
.C 38;5;81
.h 38;5;110
.H 38;5;110
.tcc 38;5;110
# C++
.c++ 38;5;81
.h++ 38;5;110
.hpp 38;5;110
.hxx 38;5;110
.ii 38;5;110
# method file for Objective C
.M 38;5;110
.m 38;5;110
# Csharp
.cc 38;5;81
.cs 38;5;81
.cp 38;5;81
.cpp 38;5;81
.cxx 38;5;81
# Crystal
.cr 38;5;81
# Google golang
.go 38;5;81
# fortran
.f 38;5;81
.F 38;5;81
.for 38;5;81
.ftn 38;5;81
.f90 38;5;81
.F90 38;5;81
.f95 38;5;81
.F95 38;5;81
.f03 38;5;81
.F03 38;5;81
.f08 38;5;81
.F08 38;5;81
# Nim
.nim 38;5;81
.nimble 38;5;81
# pascal
.s 38;5;110
.S 38;5;110
# Rust
.rs 38;5;81
# AppleScript
.scpt 38;5;219
# Swift
.swift 38;5;219
# ?
.sx 38;5;81
# Vala
.vala 38;5;81
.vapi 38;5;81
# interface file in GHC - https://github.com/trapd00r/LS_COLORS/pull/9
.hi 38;5;110
# haskell
.hs 38;5;81
.lhs 38;5;81
# agda
.agda 38;5;81
.lagda 38;5;81
.lagda.tex 38;5;81
.lagda.rst 38;5;81
.lagda.md 38;5;81
.agdai 38;5;110
# Zig
.zig 38;5;81
# V
.v 38;5;81
# binaries {{{2
# compiled apps for interpreted languages
.pyc 38;5;240
# }}}
# orchestration {{{2
.tf 38;5;168
.tfstate 38;5;168
.tfvars 38;5;168
# orchestration 2}}}
# html {{{2
.css 38;5;125;1
.less 38;5;125;1
.sass 38;5;125;1
.scss 38;5;125;1
.htm 38;5;125;1
.html 38;5;125;1
.jhtm 38;5;125;1
.mht 38;5;125;1
.eml 38;5;125;1
.mustache 38;5;125;1
# }}}
# java {{{2
.coffee 38;5;074;1
.java 38;5;074;1
.js 38;5;074;1
.mjs 38;5;074;1
.jsm 38;5;074;1
.jsp 38;5;074;1
# }}}
# php {{{2
.php 38;5;81
# CakePHP view scripts and helpers
.ctp 38;5;81
# Twig template engine
.twig 38;5;81
# }}}
# vb/a {{{2
.vb 38;5;81
.vba 38;5;81
.vbs 38;5;81
# 2}}}
# Build stuff {{{2
*Dockerfile 38;5;155
.dockerignore 38;5;240
*Makefile 38;5;155
*MANIFEST 38;5;243
*pm_to_blib 38;5;240
# Functional Configuration
.nix 38;5;155
.dhall 38;5;178
# ruby rake
.rake 38;5;155
# automake
.am 38;5;242
.in 38;5;242
.hin 38;5;242
.scan 38;5;242
.m4 38;5;242
.old 38;5;242
.out 38;5;242
.SKIP 38;5;244
# }}}
# patch files {{{2
.diff 48;5;197;38;5;232
.patch 48;5;197;38;5;232;1
#}}}
# graphics {{{1
.bmp 38;5;97
.dicom 38;5;97
.tiff 38;5;97
.tif 38;5;97
.TIFF 38;5;97
.cdr 38;5;97
.flif 38;5;97
.gif 38;5;97
.icns 38;5;97
.ico 38;5;97
.jpeg 38;5;97
.JPG 38;5;97
.jpg 38;5;97
.nth 38;5;97
.png 38;5;97
.psd 38;5;97
.pxd 38;5;97
.pxm 38;5;97
.xpm 38;5;97
.webp 38;5;97
# }}}
# vector {{{1
.ai 38;5;99
.eps 38;5;99
.epsf 38;5;99
.drw 38;5;99
.ps 38;5;99
.svg 38;5;99
# }}}
# video {{{1
.avi 38;5;114
.divx 38;5;114
.IFO 38;5;114
.m2v 38;5;114
.m4v 38;5;114
.mkv 38;5;114
.MOV 38;5;114
.mov 38;5;114
.mp4 38;5;114
.mpeg 38;5;114
.mpg 38;5;114
.ogm 38;5;114
.rmvb 38;5;114
.sample 38;5;114
.wmv 38;5;114
# mobile/streaming {{{2
.3g2 38;5;115
.3gp 38;5;115
.gp3 38;5;115
.webm 38;5;115
.gp4 38;5;115
.asf 38;5;115
.flv 38;5;115
.ts 38;5;115
.ogv 38;5;115
.f4v 38;5;115
# }}}
# lossless {{{2
.VOB 38;5;115;1
.vob 38;5;115;1
# }}}
# subtitles {{{1
.ass 38;5;117
.srt 38;5;117
.ssa 38;5;117
.sub 38;5;117
.sup 38;5;117 # bitmap image track
.vtt 38;5;117
#}}}
# audio {{{1
.3ga 38;5;137;1
.S3M 38;5;137;1
.aac 38;5;137;1
.amr 38;5;137;1
.au 38;5;137;1
.caf 38;5;137;1
.dat 38;5;137;1
.dts 38;5;137;1
.fcm 38;5;137;1
.m4a 38;5;137;1
.mod 38;5;137;1
.mp3 38;5;137;1
.mp4a 38;5;137;1
.oga 38;5;137;1
.ogg 38;5;137;1
.opus 38;5;137;1
.s3m 38;5;137;1
.sid 38;5;137;1
.wma 38;5;137;1
# lossless
.ape 38;5;136;1
.aiff 38;5;136;1
.cda 38;5;136;1
.flac 38;5;136;1
.alac 38;5;136;1
.mid 38;5;136;1
.midi 38;5;136;1
.pcm 38;5;136;1
.wav 38;5;136;1
.wv 38;5;136;1
.wvc 38;5;136;1
# }}}
# fonts {{{1
.afm 38;5;66
.fon 38;5;66
.fnt 38;5;66
.pfb 38;5;66
.pfm 38;5;66
.ttf 38;5;66
.otf 38;5;66
# Web Open Font Format
.woff 38;5;66
.woff2 38;5;66
# postscript fonts
.PFA 38;5;66
.pfa 38;5;66
# }}}
# archives {{{1
.7z 38;5;40
.a 38;5;40
.arj 38;5;40
.bz2 38;5;40
.cpio 38;5;40
.gz 38;5;40
.lrz 38;5;40
.lz 38;5;40
.lzma 38;5;40
.lzo 38;5;40
.rar 38;5;40
.s7z 38;5;40
.sz 38;5;40
.tar 38;5;40
.tgz 38;5;40
.warc 38;5;40
.WARC 38;5;40
.xz 38;5;40
.z 38;5;40
.zip 38;5;40
.zipx 38;5;40
.zoo 38;5;40
.zpaq 38;5;40
.zst 38;5;40
.zstd 38;5;40
.zz 38;5;40
# packaged apps {{{2
.apk 38;5;215
.ipa 38;5;215
.deb 38;5;215
.rpm 38;5;215
.jad 38;5;215
.jar 38;5;215
.cab 38;5;215
.pak 38;5;215
.pk3 38;5;215
.vdf 38;5;215
.vpk 38;5;215
.bsp 38;5;215
.dmg 38;5;215
# }}}
# segments from 0 to three digits after first extension letter {{{2
.r[0-9]{0,2} 38;5;239
.zx[0-9]{0,2} 38;5;239
.z[0-9]{0,2} 38;5;239
# partial files
.part 38;5;239
# }}}
# partition images {{{2
.iso 38;5;124
.bin 38;5;124
.nrg 38;5;124
.qcow 38;5;124
.sparseimage 38;5;124
.toast 38;5;124
.vcd 38;5;124
.vmdk 38;5;124
# }}}
# databases {{{2
.accdb 38;5;60
.accde 38;5;60
.accdr 38;5;60
.accdt 38;5;60
.db 38;5;60
.fmp12 38;5;60
.fp7 38;5;60
.localstorage 38;5;60
.mdb 38;5;60
.mde 38;5;60
.sqlite 38;5;60
.typelib 38;5;60
# NetCDF database
.nc 38;5;60
# }}}
# tempfiles {{{1
# undo files
.pacnew 38;5;33
.un~ 38;5;241
.orig 38;5;241
# backups
.BUP 38;5;241
.bak 38;5;241
.o 38;5;241 # *nix Object file (shared libraries, core dumps etc)
*core 38;5;241 # Linux user core dump file (from /proc/sys/kernel/core_pattern)
.mdump 38;5;241 # Mini DuMP crash report
.rlib 38;5;241 # Static rust library
.dll 38;5;241 # dynamic linked library
# temporary files
.swp 38;5;244
.swo 38;5;244
.tmp 38;5;244
.sassc 38;5;244
# state files
.pid 38;5;248
.state 38;5;248
*lockfile 38;5;248
*lock 38;5;248
# error logs
.err 38;5;160;1
.error 38;5;160;1
.stderr 38;5;160;1
# state dumps
.aria2 38;5;241
.dump 38;5;241
.stackdump 38;5;241
.zcompdump 38;5;241
.zwc 38;5;241
# tcpdump, network traffic capture
.pcap 38;5;29
.cap 38;5;29
.dmp 38;5;29
# macOS
.DS_Store 38;5;239
.localized 38;5;239
.CFUserTextEncoding 38;5;239
# }}}
# hosts {{{1
# /etc/hosts.{deny,allow}
.allow 38;5;112
.deny 38;5;196
# }}}
# systemd {{{1
# http://www.freedesktop.org/software/systemd/man/systemd.unit.html
.service 38;5;45
*@.service 38;5;45
.socket 38;5;45
.swap 38;5;45
.device 38;5;45
.mount 38;5;45
.automount 38;5;45
.target 38;5;45
.path 38;5;45
.timer 38;5;45
.snapshot 38;5;45
# }}}
# metadata {{{1
.application 38;5;116
.cue 38;5;116
.description 38;5;116
.directory 38;5;116
.m3u 38;5;116
.m3u8 38;5;116
.md5 38;5;116
.properties 38;5;116
.sfv 38;5;116
.theme 38;5;116
.torrent 38;5;116
.urlview 38;5;116
.webloc 38;5;116
.lnk 38;5;39
# }}}
# macOS files {{{1
*CodeResources 38;5;239 # code signing apps
*PkgInfo 38;5;239 # app bundle id
.nib 38;5;57 # UI
.car 38;5;57 # asset catalog
.dylib 38;5;241 # shared lib
# Xcode files {{{2
.entitlements 1
.pbxproj 1
.strings 1
.storyboard 38;5;196
.xcconfig 1
.xcsettings 1
.xcuserstate 1
.xcworkspacedata 1
.xib 38;5;208
# }}}
# }}}
# encrypted data {{{1
.asc 38;5;192;3
.bfe 38;5;192;3
.enc 38;5;192;3
.gpg 38;5;192;3
.signature 38;5;192;3
.sig 38;5;192;3
.p12 38;5;192;3
.pem 38;5;192;3
.pgp 38;5;192;3
.p7s 38;5;192;3
*id_dsa 38;5;192;3
*id_rsa 38;5;192;3
*id_ecdsa 38;5;192;3
*id_ed25519 38;5;192;3
# 1}}}
# emulators {{{1
.32x 38;5;213
.cdi 38;5;213
.fm2 38;5;213
.rom 38;5;213
.sav 38;5;213
.st 38;5;213
# atari
.a00 38;5;213
.a52 38;5;213
.A64 38;5;213
.a64 38;5;213
.a78 38;5;213
.adf 38;5;213
.atr 38;5;213
# nintendo
.gb 38;5;213
.gba 38;5;213
.gbc 38;5;213
.gel 38;5;213
.gg 38;5;213
.ggl 38;5;213
.ipk 38;5;213 # Nintendo (DS Packed Images)
.j64 38;5;213
.nds 38;5;213
.nes 38;5;213
# Sega
.sms 38;5;213
# }}}
# Texas Instruments Calculator files {{{1
# for more see http://tibasicdev.wikidot.com/file-extensions
.8xp 38;5;121
.8eu 38;5;121
.82p 38;5;121
.83p 38;5;121
.8xe 38;5;121
# }}}
# 3D printing {{{1
.stl 38;5;216
.dwg 38;5;216
.ply 38;5;216
.wrl 38;5;216
# }}}
# unsorted {{{1
#
# Portable Object Translation for GNU Gettext
.pot 38;5;7
# CAD files for printed circuit boards
.pcb 38;5;7
# groff (rendering app for texinfo)
.mm 38;5;7
# GIMP files
.gbr 38;5;7
.scm 38;5;7
.xcf 38;5;7
# printer spool file
.spl 38;5;7
# RStudio project file
.Rproj 38;5;11
# Nokia Symbian OS files
.sis 38;5;7
.1p 38;5;7
.3p 38;5;7
.cnc 38;5;7
.def 38;5;7
.ex 38;5;7
.example 38;5;7
.feature 38;5;7
.ger 38;5;7
.ics 38;5;7 # calendar information
.map 38;5;7
.mf 38;5;7
.mfasl 38;5;7
.mi 38;5;7
.mtx 38;5;7
.pc 38;5;7
.pi 38;5;7
.plt 38;5;7
.pm 38;5;7
.rdf 38;5;7
.ru 38;5;7
.sch 38;5;7
.sty 38;5;7
.sug 38;5;7
.tdy 38;5;7
.tfm 38;5;7
.tfnt 38;5;7
.tg 38;5;7
.vcard 38;5;7
.vcf 38;5;7 #contact information
.xln 38;5;7
# AppCode files
.iml 38;5;166
# }}}
# termcap {{{1
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM Eterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM rxvt-unicode256
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.linux
TERM screen.rxvt
TERM terminator
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
TERM xterm-kitty
# }}}
# vim: ft=dircolors:fdm=marker:et:sw=2:

View file

@ -1,219 +0,0 @@
---
# +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
# |G|E|N|E|R|A|L| |C|O|N|F|I|G|U|R|A|T|I|O|N|
# +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+
# Which provider to clone from (github, gitlab, gitea or bitbucket)
# default: github
# flag (--scm, -s) eg: --scm=gitlab
GHORG_SCM_TYPE: github
# How you'd like to clone the repos (https or ssh)
# default: https
# flag (--protocol) eg: --protocol=https
GHORG_CLONE_PROTOCOL: https
# This is where your ghorg directory will be created, use absolute pathing, shell expansions will not work.
# The ghorg directory is the home for all ghorg clones
# See https://github.com/gabrie30/ghorg#changing-clone-directories for example
# default: YOUR_HOME_DIR/ghorg
# flag (--path, -p) eg: --path=/tmp/ghorg
GHORG_ABSOLUTE_PATH_TO_CLONE_TO:
# Folder ghorg will clone all repos into. Cloning will result in: GHORG_ABSOLUTE_PATH_TO_CLONE_TO/GHORG_OUTPUT_DIR/repo
# See https://github.com/gabrie30/ghorg#changing-clone-directories for example
# default: org/user you are cloning, e.g. 'ghorg clone kubernetes' would create a kubernetes directory inside your ghorg directory
# flag (--output-dir) eg: --output-dir=testing
GHORG_OUTPUT_DIR:
# Type of entity to clone (user or org)
# flag (--clone-type, -c) eg: --clone-type=user
GHORG_CLONE_TYPE: org
# Change SCM api base url, this is for on self hosted scm instances only
# For http gitlab instances see GHORG_INSECURE_GITLAB_CLIENT
# default: github/gitlab/bitbucket public apis
# flag (--base-url) eg: --base-url=https://my.self.hosted.scm.instance.com
GHORG_SCM_BASE_URL:
# Include submodules in all clone and pull operations.
# flag (--include-submodules)
GHORG_INCLUDE_SUBMODULES: false
# Allows you to pass arguments to git's filter flag e.g. git clone --filter=<args> this requires git version 2.19 or greater.
# Useful for filtering out binary objects from repos
# Few caveats, only works on inital clones, however if done on inital clone all subsequent clones will also honor the settings.
# More info at https://stackoverflow.com/questions/49917616/what-is-the-git-clone-filter-options-syntax
# flag (--git-filter) eg: --git-filter=blob:none
GHORG_GIT_FILTER:
# Deletes all files/directories found in your local clone directory that are not found on the remote (e.g., after remote deletion). With GHORG_SKIP_ARCHIVED set, archived repositories will also be pruned from your local clone.
# Will prompt before deleting any files unless used in combination with --prune-no-confirm
# flag (--prune)
GHORG_PRUNE: false
# Skip interactive y/n prompt when pruning clones (can only be used in combination with --prune).
# flag (--prune-no-confirm)
GHORG_PRUNE_NO_CONFIRM: false
# Color output (enabled, disabled)
# flag (--color) eg: --color=disabled
GHORG_COLOR: disabled
# Skip archived repos, currently github/gitlab/gitea only
# flag (--skip-archived)
GHORG_SKIP_ARCHIVED: false
# Skip repos that are forks, currently github/gitlab/gitea only
# flag (--skip-forks)
GHORG_SKIP_FORKS: false
# Backup mode, clone as mirror, no working copy (ignores branch parameter)
# flag (--backup)
GHORG_BACKUP: false
# Max goroutines created while cloning
# flag (--concurrency)
GHORG_CONCURRENCY: 25
# A comma separated list of topics to filter by, currently github/gitlab/gitea only
# flag (--topics) eg: --topics=frontend
# If any topics exist here, ghorg will only clone repos that match at least one of these topics
GHORG_TOPICS:
# Only clone repos with matching prefix, can be a comma separated list
# flag (--match-prefix) eg: --match-prefix=backend
GHORG_MATCH_PREFIX:
# Exclude cloning repos with matching prefix, can be a comma separated list
# flag (--exclude-match-prefix) eg: --exclude-match-prefix=backend
GHORG_EXCLUDE_MATCH_PREFIX:
# Only clone repos that match name to regex provided
# flag (--match-regex) eg: --match-regex=^foo
GHORG_MATCH_REGEX:
# Exclude cloning repos that match name to regex provided
# flag (--exclude-match-regex) eg: --exclude-match-regex=^foo
GHORG_EXCLUDE_MATCH_REGEX:
# Only clones new repos and does not perform a git clean on existing repos. Useful if you don't want to lose changes made to repos in the org/user directory.
# flag (--no-clean)
GHORG_NO_CLEAN: false
# Additionally clone the wiki page for repo
# flag (--clone-wiki)
GHORG_CLONE_WIKI: false
# Fetches all remote branches for each repo by running a git fetch --all
# flag (--fetch-all)
GHORG_FETCH_ALL: false
# If you want to set a path other than $HOME/.config/ghorg/ghorgignore for your ghorgignore
# flag (--ghorgignore-path)
GHORG_IGNORE_PATH:
# Only emit critical output.
# flag (--quiet)
GHORG_QUIET: false
# Perform a dry run of the clone; fetches repos but does not clone them.
# flag (--dry-run)
GHORG_DRY_RUN: false
# Branch ghorg resets and leaves checked out
# default: default branch
# NOTE: if no default branch is found on the repo, will fallback to using master
# flag (--branch, -b) eg: --branch=develop
GHORG_BRANCH:
# Allows you to control the exit code when ghorg runs into a problem (info level message) cloning a repo from the remote.
# Info messages will appear after a clone is complete, similar to success messages
# flag (--exit-code-on-clone-infos)
GHORG_EXIT_CODE_ON_CLONE_INFOS: 0
# Allows you to control the exit code when ghorg runs into a problem (issue level message) cloning a repo from the remote.
# Issue messages will appear after a clone is complete, similar to success messages.
# flag (--exit-code-on-clone-issues)
GHORG_EXIT_CODE_ON_CLONE_ISSUES: 1
# Specifies the location of your ghorg conf.yaml, allowing you to have many configuration files, or none at all
# default: ghorg looks in $HOME/.config/ghorg/conf.yaml, if not set in that location nor as a commandline flag, ghorg will use all default values
# NOTE: this cannot be set in the configuration file. Its supported through CLI flag and ENV var only.
# flag (--config)
# GHORG_CONFIG:
# +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |G|I|T|H|U|B| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# Add your GitHub token
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_GITHUB_TOKEN:
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# |G|I|T|L|A|B| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# Add your GitLab token
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_GITLAB_TOKEN:
# clones repos in a directory structure that matches gitlab namespaces eg company/unit/subunit/app would clone into ghorg/org/unit/subunit/app
# flag (--preserve-dir)
GHORG_PRESERVE_DIRECTORY_STRUCTURE: false
# Skip TLS certificate verification for hosted gitlab instances
# flag (--insecure-gitlab-client)
GHORG_INSECURE_GITLAB_CLIENT:
# Exclude gitlab groups by regex
# flag (--gitlab-group-exclude-match-regex)
GHORG_GITLAB_GROUP_EXCLUDE_MATCH_REGEX:
# +-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |G|I|T|E|A| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# Add your Gitea token
# Settings -> Applications -> Generate Token
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_GITEA_TOKEN:
# +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# |B|I|T|B|U|C|K|E|T| |S|P|E|C|I|F|I|C|
# +-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
# When using this OAuth/PAT token, do not set the bitbucket username flag. Do not set both this value and the GHORG_BITBUCKET_APP_PASSWORD
# https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_BITBUCKET_OAUTH_TOKEN:
# Add your Bitbucket app password. Do not set both this value and the GHORG_BITBUCKET_OAUTH_TOKEN
# https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html
# flag (--token, -t) eg: --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
GHORG_BITBUCKET_APP_PASSWORD:
# Used with GHORG_BITBUCKET_APP_PASSWORD. Should not be set when using GHORG_BITBUCKET_OAUTH_TOKEN
# flag (--bitbucket-username) eg: --bitbucket-username=user123
GHORG_BITBUCKET_USERNAME:
# +-+-+-+-+-+ +-+-+-+-+-+-+-+
# |G|H|O|R|G| |R|E|C|L|O|N|E|
# +-+-+-+-+-+ +-+-+-+-+-+-+-+
# Configuration for ghorg reclone command
# See https://github.com/gabrie30/ghorg#reclone-command for more information on how to setup and use
# If set allows you to specify the location of your reclone.yaml
# Defaults to $HOME/.config/ghorg/reclone.yaml
# flag (--reclone-path)
GHORG_RECLONE_PATH:
# Get more verbose logging with reclone command
# flag (--verbose)
GHORG_RECLONE_VERBOSE: false
# Quiet logging output with reclone command
# flag (--quiet)
GHORG_RECLONE_QUIET: false

View file

View file

@ -1,60 +0,0 @@
display-name = "Paul DURANT"
downloads-dir = "~/Downloads"
signature = "Cordialement,\nPaul DURANT"
email-listing-page-size = 50
[gmail]
default = true
email = "p.durant@gmail.com"
backend = "imap"
imap-host = "imap.gmail.com"
imap-port = 993
imap-login = "p.durant@gmail.com"
imap-passwd-cmd = "pass show gmail"
sender = "smtp"
smtp-host = "smtp.gmail.com"
smtp-port = 465
smtp-login = "p.durant@gmail.com"
smtp-passwd-cmd = "pass show gmail"
[gmail.folder-aliases]
sent = "[Gmail]/Sent Mail"
drafts = "[Gmail]/Drafts"
[outlook]
email = "pdurant@outlook.com"
email-listing-page-size = 25
signature = """
Regards,
Paul DURANT
Sent from Outlook
"""
sender = "sendmail"
sendmail-cmd = "/usr/bin/msmtp"
backend = "imap"
imap-host = "outlook.office365.com"
imap-port = 993
imap-login = "pdurant@outlook.com"
imap-passwd-cmd = "security find-internet-password -gs outlook -w"
[posteo-local]
email = "paul.durant@localhost"
display-name = "Paul D."
downloads-dir = "~/Downloads/posteo"
backend = "maildir"
maildir-root-dir = "~/Maildir"
sender = "smtp"
smtp-host = "posteo.de"
smtp-port = 465
smtp-login = "paul.durant@posteo.com"
smtp-passwd-cmd = "security find-internet-password -gs posteo -w"
[posteo-local.mailboxes]
sent = "Sent" # points to ~/Maildir/.Sent
drafts = "~/Maildir/custom/drafts"

View file

@ -1,29 +0,0 @@
[activities]
04d7cd19-ecc3-44be-a8fc-798b7de54897=Fedora
18e6a400-7ecc-4f72-9e6a-4e438c771dc5=Ubuntu
50b1ad0b-bf48-42be-9204-b01493c35d8b=Windows
5b446b3b-9b08-4b3d-9afe-dc753f3a710e=Qubes
8bf397ae-a194-4deb-97b9-e937c3ddc0a9=Debian
8f1051f7-65fb-4f46-80bb-f1c672949c61=Archlinux
f7333f42-4e75-4952-8802-c68f6c266a7d=macOS
[activities-descriptions]
04d7cd19-ecc3-44be-a8fc-798b7de54897=Fedora 37 desktop
18e6a400-7ecc-4f72-9e6a-4e438c771dc5=Ubuntu 22.04 desktop
50b1ad0b-bf48-42be-9204-b01493c35d8b=Windows 11 desktop
5b446b3b-9b08-4b3d-9afe-dc753f3a710e=Qubes 4.1 desktop
8bf397ae-a194-4deb-97b9-e937c3ddc0a9=Debian 11 desktop
8f1051f7-65fb-4f46-80bb-f1c672949c61=Archlinux desktop
f7333f42-4e75-4952-8802-c68f6c266a7d=macOS Monterey desktop
[activities-icons]
04d7cd19-ecc3-44be-a8fc-798b7de54897=distributor-logo-fedora
18e6a400-7ecc-4f72-9e6a-4e438c771dc5=distributor-logo-ubuntu
50b1ad0b-bf48-42be-9204-b01493c35d8b=windows-logo
5b446b3b-9b08-4b3d-9afe-dc753f3a710e=qubes-logo-icon
8bf397ae-a194-4deb-97b9-e937c3ddc0a9=distributor-logo-debian
8f1051f7-65fb-4f46-80bb-f1c672949c61=distributor-logo-archlinux
f7333f42-4e75-4952-8802-c68f6c266a7d=macos-logo
[main]
currentActivity=5b446b3b-9b08-4b3d-9afe-dc753f3a710e

View file

@ -1,76 +0,0 @@
#
# Powerline Themer Block - Tmux Theme
# Originally created by Jim Myhrberg <contact@jimeh.me>.
# Modified for use by Themer by Tom Selvi <tomselvi@gmail.com>.
#
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
#
# Requires terminal to be using a powerline compatible font, find one here:
# https://github.com/Lokaltog/powerline-fonts
#
# Status update interval
set -g status-interval 1
# Basic status bar colors
set -g status-fg "#60646f"
set -g status-bg "#2f323e"
# Left side of status bar
set -g status-left-bg "#2f323e"
set -g status-left-fg "#9295a0"
set -g status-left-length 40
set -g status-left "#[fg=#161925,bg=#ed254e,bold] #S #[fg=#ed254e,bg=#797c87,nobold]#[fg=#2f323e,bg=#797c87] #(whoami) #[fg=#797c87,bg=#474b56]#[fg=#797c87,bg=#474b56] #I:#P #[fg=#474b56,bg=#2f323e,nobold]"
# Right side of status bar
set -g status-right-bg "#2f323e"
set -g status-right-fg "#9295a0"
set -g status-right-length 150
set -g status-right "#[fg=#474b56,bg=#2f323e]#[fg=#797c87,bg=#474b56] %H:%M:%S #[fg=#797c87,bg=#474b56]#[fg=#2f323e,bg=#797c87] %d-%b-%y #[fg=#aaaeb8,bg=#797c87]#[fg=#161925,bg=#aaaeb8,bold] #H "
# Window status
set -g window-status-format "#[fg=#c3c7d1]#[bg=#2f323e] #I:#W#F "
set -g window-status-current-format "#[fg=#dcdfe4,bg=black] #I:#W#F "
# Current window status
set -g window-status-current-bg "#ed254e"
set -g window-status-current-fg "#161925"
# Window with activity status
set -g window-status-activity-bg "#dcdfe4" # fg and bg are flipped here due to
set -g window-status-activity-fg "#2f323e" # a bug in tmux
# Window separator
set -g window-status-separator ""
# Window status alignment
set -g status-justify centre
# Pane border
set -g pane-border-bg default
set -g pane-border-fg "#60646f"
# Active pane border
set -g pane-active-border-bg default
set -g pane-active-border-fg "#ed254e"
# Pane number indicator
set -g display-panes-colour "#2f323e"
set -g display-panes-active-colour "#aaaeb8"
# Clock mode
set -g clock-mode-colour "#ed254e"
set -g clock-mode-style 24
# Message
set -g message-bg "#ed254e"
set -g message-fg black
# Command message
set -g message-command-bg "#2f323e"
set -g message-command-fg black
# Mode
set -g mode-bg "#ed254e"
set -g mode-fg "#c3c7d1"

View file

@ -1,23 +0,0 @@
accent: "#c3c7d1"
background: "#161925"
foreground: "#c3c7d1"
details: "darker"
terminal_colors:
normal:
black: "#161925"
red: "#ed254e"
green: "#71f79f"
yellow: "#f9dc5c"
blue: "#7cb7ff"
magenta: "#c74d89"
cyan: "#00c1e4"
white: "#aaaeb8"
bright:
black: "#2f323e"
red: "#dcdfe4"
green: "#00c1e4"
yellow: "#f9dc5c"
blue: "#7cb7ff"
magenta: "#c74d89"
cyan: "#00c1e4"
white: "#c3c7d1"

View file

@ -1,23 +0,0 @@
accent: "#4c5058"
background: "#ffffff"
foreground: "#4c5058"
details: "lighter"
terminal_colors:
normal:
black: "#4c5058"
red: "#ff4972"
green: "#95ffc3"
yellow: "#ffff80"
blue: "#a0dbff"
magenta: "#eb71ad"
cyan: "#24e5ff"
white: "#e5e6e7"
bright:
black: "#666970"
red: "#dcdfe4"
green: "#24e5ff"
yellow: "#ffff80"
blue: "#a0dbff"
magenta: "#eb71ad"
cyan: "#24e5ff"
white: "#ffffff"

View file

@ -1,3 +0,0 @@
---
# TODO
#authtoken: '{{ .Env.NGROK_AUTH_TOKEN }}'

View file

@ -1,127 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": false,
"osc99": true,
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "shell",
"style": "diamond",
"leading_diamond": "╭─",
"trailing_diamond": "",
"foreground": "#ffffff",
"background": "#0077c2",
"properties": {
}
},
{
"type": "root",
"style": "diamond",
"leading_diamond": "",
"trailing_diamond": "",
"foreground": "#FFFB38",
"background": "#ef5350",
"properties": {
"root_icon": "\uf292",
"prefix": "<parentBackground>\uE0B0</> "
}
},
{
"type": "path",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#E4E4E4",
"background": "#444444",
"properties": {
"style": "full",
"enable_hyperlink": true
}
},
{
"type": "git",
"style": "powerline",
"powerline_symbol": "\uE0B0",
"foreground": "#011627",
"background": "#FFFB38",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}",
"{{ if gt .Ahead 0 }}#C792EA{{ end }}",
"{{ if gt .Behind 0 }}#C792EA{{ end }}"
],
"properties": {
"branch_icon": "\ue725 ",
"fetch_status": true,
"fetch_upstream_icon": true,
"template": "{{ .HEAD }} {{ if .Working.Changed }}{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uF046 {{ .Staging.String }}</>{{ end }}"
}
}
]
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "node",
"style": "diamond",
"leading_diamond": " \uE0B6",
"trailing_diamond": "\uE0B4",
"foreground": "#3C873A",
"background": "#303030",
"properties": {
"prefix": "\uE718 ",
"postfix": "",
"display_package_manager": true,
"yarn_icon": " <#348cba></>",
"npm_icon": " <#cc3a3a></> "
}
},
{
"type": "time",
"style": "diamond",
"invert_powerline": true,
"leading_diamond": " \uE0B6",
"trailing_diamond": "\uE0B4",
"background": "#40c4ff",
"foreground": "#ffffff",
"properties": {
"prefix": " \uf5ef ",
"postfix": " "
}
}
]
},
{
"type": "prompt",
"alignment": "left",
"newline": true,
"segments": [
{
"type": "text",
"style": "plain",
"foreground": "#21c7c7",
"properties": {
"prefix": "",
"postfix": "",
"text": "╰─"
}
},
{
"type": "exit",
"style": "plain",
"foreground": "#e0f8ff",
"properties": {
"prefix": "\u276F",
"display_exit_code": false,
"always_enabled": true,
"error_color": "#ef5350"
}
}
]
}
]
}

View file

@ -1,43 +0,0 @@
# set PowerShell to UTF-8
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
Set-Prompt
Import-Module posh-git
Import-Module oh-my-posh
$omp_config = Join-Path $PSScriptRoot ".\takuya.omp.json"
oh-my-posh --init --shell pwsh --config $omp_config | Invoke-Expression
Set-Theme Paradox
Import-Module -Name Terminal-Icons
# PSReadLine
Set-PSReadLineOption -EditMode Vim
Set-PSReadLineOption -BellStyle None
Set-PSReadLineKeyHandler -Chord 'Ctrl+d' -Function DeleteChar
Set-PSReadLineOption -PredictionSource History
# Fzf
Import-Module PSFzf
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r'
### zoxide
Invoke-Expression (& {
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' }
(zoxide init --hook $hook powershell | Out-String)
})
# Env
$env:GIT_SSH = "C:\Windows\system32\OpenSSH\ssh.exe"
### Aliases
Set-Alias grep findstr
### Utilities
function which ($command) {
Get-Command -Name $command -ErrorAction SilentlyContinue |
Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
}

View file

@ -1,21 +0,0 @@
# Don't let ripgrep vomit really long lines to my terminal, and show a preview.
--max-columns=150
--max-columns-preview
# Add my 'web' type.
--type-add
web:*.{html,css,js}*
# Using glob patterns to include/exclude files or folders
--glob=!git/*
# or
--glob
!git/*
# Set the colors.
--colors=line:none
--colors=line:style:bold
# Because who cares about case!?
--smart-case

View file

@ -1,25 +0,0 @@
#!/usr/bin/env bash
export LEXICON_CLOUDFLARE_USERNAME={{ .user.CLOUDFLARE_USERNAME }}
export ANSIBLE_GALAXY_TOKEN=""
export ANSIBLE_VAULT_PASSWORD=""
export CLOUDSDK_CORE_PROJECT={{ .user.CLOUDSDK_CORE_PROJECT }}
export GCE_SERVICE_ACCOUNT_EMAIL={{ .user.GCE_SERVICE_ACCOUNT_EMAIL }}
export GCE_CREDENTIALS_FILE={{ .user.GCE_CREDENTIALS_FILE }}
export DOCKERHUB_TOKEN=""
export DOCKERHUB_REGISTRY_PASSWORD="$DOCKERHUB_TOKEN"
export GH_TOKEN=""
export GITHUB_TOKEN="$GH_TOKEN"
export GL_TOKEN=""
export GITLAB_TOKEN="$GL_TOKEN"
export HEROKU_API_KEY=""
export LEXICON_CLOUDFLARE_TOKEN=""
export NPM_TOKEN=""
export PYPI_TOKEN=""
export SNAPCRAFT_EMAIL={{ .user.SNAPCRAFT_EMAIL }}
export SNAPCRAFT_MACAROON=""
export SNAPCRAFT_UNBOUND_DISCHARGE=""
export VAGRANT_CLOUD_TOKEN=""
export FULLY_AUTOMATED_TASKS=true

View file

@ -1,138 +0,0 @@
# Install WebDriverAgent on iOS device
appiumwebdriver() {
# read -r "Enter the UDID of the device you wish to install WebDriverAgent on: " UDID_INPUT
mkdir -p Resources/WebDriverAgent.bundle
bash ./Scripts/bootstrap.sh -d
cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent || return
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=${UDID_INPUT}" test
}
asdf-update () {
asdf update > /dev/null 2>&1
asdf plugin update --all > /dev/null 2>&1
diff <(cat ~/.tool-versions | awk '{print $1}' | xargs -I {} bash -c 'echo {} $(asdf latest {})') <(cat ~/.tool-versions)
}
# Change directories and view contents at the same time
cl() {
DIR="$*"
# if no DIR given, go home
if [ $# -lt 1 ]; then
DIR=$HOME
fi
builtin cd "${DIR}" &&
# use your preferred ls command
ls -F --color=auto
}
# Safer cp with progress bar and backup to /tmp
cpv() {
rsync -pogbr -hhh --backup-dir="/tmp/rsync-${USERNAME}" -e /dev/null --progress "$@"
}
# Checks status of a website on downforeveryoneorjustme.com
down4me() {
curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g'
}
# Easier version of find command
find() {
if [ $# = 1 ]; then
# shellcheck disable=SC2145
command find . -iname "*$@*"
else
command find "$@"
fi
}
# Opens current repository in browser
gitopen() {
git remote -v | head -n 1 | awk -F "@" '{print $2}' | awk -F " " '{print $1}' | sed 's/:/\//g' | sed 's/.git//g' | awk '{print "http://"$1}' | xargs open
}
# Open Mac OS X desktop on a Linux machine
macosx() {
docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:big-sur
}
# Generate a random string of X length
randomstring() {
if [ -z "$1" ]; then
head /dev/urandom | tr -dc A-Za-z0-9 | head -c "$1"
else
echo "Pass the number of characters you would like the string to be. Example: randomstring 14"
fi
}
# Reset Docker to factory settings
resetdocker() {
set +e
CONTAINER_COUNT="$(docker ps -a -q | wc -l)"
if [ "$CONTAINER_COUNT" -gt 0 ]; then
docker stop "$(docker ps -a -q)"
docker rm "$(docker ps -a -q)"
fi
VOLUME_COUNT="$(docker volume ls -q | wc -l)"
if [ "$VOLUME_COUNT" -gt 0 ]; then
docker volume rm "$(docker volume ls -q)"
fi
NETWORK_COUNT="$(docker network ls -q | wc -l)"
if [ "$NETWORK_COUNT" -gt 0 ]; then
docker network rm "$(docker network ls -q)"
fi
docker system prune -a --force
}
# ripgrep-all
rgafzf() {
RG_PREFIX="rga --files-with-matches"
local file
file="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
--phony -q "$1" \
--bind "change:reload:$RG_PREFIX {q}" \
--preview-window="70%:wrap"
)" &&
echo "opening $file" &&
xdg-open "$file"
}
# Easy file sharing from the command line, using transfer.sh
transfer() {
if [ $# -eq 0 ]; then
echo -e "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>" >&2
return 1
fi
if tty -s; then
file="$1"
file_name=$(basename "$file")
if [ ! -e "$file" ]; then
echo "$file: No such file or directory" >&2
return 1
fi
if [ -d "$file" ]; then
file_name="$file_name.zip"
(cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null,
else
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" <"$file" | tee /dev/null
fi
else
file_name=$1
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
fi
}
update-all() {
brew update
brew upgrade
brew upgrade --cask --greedy
brew cleanup --prune=1
asdf update || true
asdf plugin-update --all
rustup self update || true
rustup update || true
npm update -g || true
chezmoi upgrade
z4h update
}

View file

@ -1,25 +0,0 @@
### MOTD
# Add file named .hushlogin in the user's home directory to disable the MOTD
if [ "$BASH_SUPPORT" = 'true' ] && [ ! -f ~/.hushlogin ] && [ "$SHLVL" -eq 1 ]; then
if [ -f "$HOME/.local/scripts/motd.bash" ] && { [ -n "$SSH_CONNECTION" ] && [[ $- == *i* ]]; } || command -v qubes-vmexec > /dev/null || command -v qubes-dom0-update > /dev/null || { [ -d /Applications ] && [ -d /System ]; }; then
if { [ -z "$MOTD" ] || [ "$MOTD" -ne 0 ]; } && [[ "$(hostname)" != *'-minimal' ]]; then
. "$HOME/.local/scripts/motd.bash"
# TODO - -- services
if [ -n "$SSH_CONNECTION" ]; then
# SSH
bash_motd --banner --processor --memory --diskspace --docker --updates --letsencrypt --login
elif command -v qubes-vmexec > /dev/null; then
# Qubes AppVM
bash_motd --banner --memory --diskspace --docker --updates
elif command -v qubes-dom0-update > /dev/null; then
# Qubes dom0
bash_motd --banner --updates
elif [ -d /Applications ] && [ -d /System ]; then
# macOS
bash_motd --banner
else
bash_motd --banner --processor --memory --diskspace --docker --updates --letsencrypt --login
fi
fi
fi
fi

View file

@ -1,149 +0,0 @@
# shellcheck disable=SC1090,SC1091
# Aliases / Functions / Exports
export XDG_CONFIG_HOME="$HOME/.config"
if [ -f "$XDG_CONFIG_HOME/shell/exports" ]; then
. "$XDG_CONFIG_HOME/shell/exports"
fi
if [ -f "$XDG_CONFIG_HOME/shell/aliases" ]; then
. "$XDG_CONFIG_HOME/shell/aliases"
fi
if [ -f "$XDG_CONFIG_HOME/shell/functions" ]; then
. "$XDG_CONFIG_HOME/shell/functions"
fi
### Colorize
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias diff='diff --color=auto'
alias ip='ip --color=auto'
alias pacman='pacman --color=auto'
### Aliases (better defaults for simple commands)
alias cp='cp -v'
alias rm='rm -I'
alias mv='mv -iv'
alias ln='ln -sriv'
alias xclip='xclip -selection c'
command -v vim > /dev/null && alias vi='vim'
### TOP - order based on preference of "top" application (last item will always be chosen if installed, e.g. glances)
command -v htop > /dev/null && alias top='htop'
command -v gotop > /dev/null && alias top='gotop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")'
command -v ytop > /dev/null && alias top='ytop -p $([ "$COLOR_SCHEME" = "light" ] && echo "-c default-dark")'
command -v btm > /dev/null && alias top='btm $([ "$COLOR_SCHEME" = "light" ] && echo "--color default-light")'
# themes for light/dark color-schemes inside ~/.config/bashtop; Press ESC to open the menu and change the theme
command -v bashtop > /dev/null && alias top='bashtop'
command -v bpytop > /dev/null && alias top='bpytop'
command -v glances > /dev/null && alias top='glances'
### Bash / ZSH
if [ "$BASH_SUPPORT" = 'true' ]; then
### OS Detection
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = 'alpine' ]; then
OS_ICON=""
elif [ "$ID" = 'arch' ]; then
OS_ICON=""
elif [ "$ID" = 'centos' ]; then
OS_ICON=""
elif [ "$ID" = 'coreos' ]; then
OS_ICON=""
elif [ "$ID" = 'debian' ]; then
OS_ICON=""
elif [ "$ID" = 'deepin' ]; then
OS_ICON=""
elif [ "$ID" = 'elementary' ]; then
OS_ICON=""
elif [ "$ID" = 'endeavour' ]; then
OS_ICON=""
elif [ "$ID" = 'freebsd' ]; then
OS_ICON=""
elif [ "$ID" = 'gentoo' ]; then
OS_ICON=""
elif [ "$ID" = 'kali' ]; then
OS_ICON=""
elif [ "$ID" = 'linuxmint' ]; then
OS_ICON=""
elif [ "$ID" = 'manjaro' ]; then
OS_ICON=""
elif [ "$ID" = 'nixos' ]; then
OS_ICON=""
elif [ "$ID" = 'openbsd' ]; then
OS_ICON=""
elif [ "$ID" = 'opensuse' ]; then
OS_ICON=""
elif [ "$ID" = 'parrot' ]; then
OS_ICON=""
elif [ "$ID" = 'pop_os' ]; then
OS_ICON=""
elif [ "$ID" = 'raspberry_pi' ]; then
OS_ICON=""
elif [ "$ID" = 'redhat' ]; then
OS_ICON=""
elif [ "$ID" = 'fedora' ]; then
OS_ICON=""
elif [ "$ID" = 'ubuntu' ]; then
OS_ICON=""
else
OS_ICON=""
fi
else
if [ -d /Applications ] && [ -d /Library ] && [ -d /System ]; then
# macOS
OS_ICON=""
else
OS_ICON=""
fi
fi
### ASDF
if [ -f "$ASDF_DIR/asdf.sh" ]; then
. "$ASDF_DIR/asdf.sh"
fi
### Directory Colors
if [ -f "$XDG_CONFIG_HOME/shell/lscolors.sh" ]; then
. "$XDG_CONFIG_HOME/shell/lscolors.sh"
fi
### fzf-git
#if [ -f "$HOME/.local/scripts/fzf-git.bash" ]; then
# . "$HOME/.local/scripts/fzf-git.bash"
#fi
### MOTD
if [ -f "$XDG_CONFIG_HOME/shell/motd" ]; then
. "$XDG_CONFIG_HOME/shell/motd"
fi
fi
### Cargo
if [ -f "$CARGO_HOME/env" ]; then
. "$CARGO_HOME/env"
fi
### Docker Functions / Aliases
if [ -f "$HOME/.local/scripts/docker-functions.bash" ]; then
. "$HOME/.local/scripts/docker-functions.bash"
fi
### fzf-tmux
#if [ -f "$HOME/.local/scripts/fzf-tmux.bash" ]; then
# . "$HOME/.local/scripts/fzf-tmux.bash"
#fi
### SDKMan
if command -v brew > /dev/null && command -v sdkman-cli > /dev/null; then
export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec"
. "$SDKMAN_DIR/bin/sdkman-init.sh"
elif [ -f "$SDKMAN_DIR/bin/sdkman-init.sh" ]; then
export SDKMAN_DIR="$XDG_DATA_HOME/sdkman"
. "$SDKMAN_DIR/bin/sdkman-init.sh"
fi
### VIM
export GVIMINIT='let $MYGVIMRC="$XDG_CONFIG_HOME/vim/gvimrc" | source $MYGVIMRC'
export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC'

View file

@ -1,88 +0,0 @@
{
"slack_token": "yourslacktokenhere",
// OPTIONAL: set the width of the sidebar (between 1 and 11), default is 1
"sidebar_width": 1,
// OPTIONAL: turn on desktop notifications for all incoming messages, set
// the value as: "all". For only mentions and im messages set the
// value as: "mention", default is turned off: ""
"notify": "",
// OPTIONAL: turn on emoji's, default is false
"emoji": false,
// OPTIONAL: define custom key mappings, defaults are:
"key_map": {
"command": {
"i": "mode-insert",
"/": "mode-search",
"k": "channel-up",
"j": "channel-down",
"g": "channel-top",
"G": "channel-bottom",
"K": "thread-up",
"J": "thread-down",
"<previous>": "chat-up",
"C-b": "chat-up",
"C-u": "chat-up",
"<next>": "chat-down",
"C-f": "chat-down",
"C-d": "chat-down",
"n": "channel-search-next",
"N": "channel-search-previous",
"'": "channel-jump",
"q": "quit",
"<f1>": "help"
},
"insert": {
"<left>": "cursor-left",
"<right>": "cursor-right",
"<enter>": "send",
"<escape>": "mode-command",
"<backspace>": "backspace",
"C-8": "backspace",
"<delete>": "delete",
"<space>": "space"
},
"search": {
"<left>": "cursor-left",
"<right>": "cursor-right",
"<escape>": "clear-input",
"<enter>": "clear-input",
"<backspace>": "backspace",
"C-8": "backspace",
"<delete>": "delete",
"<space>": "space"
}
},
// OPTIONAL: override the default theme, defaults are:
"theme": {
"view": {
"fg": "white",
"bg": "default",
"border_fg": "white",
"border_bg": "",
"label_fg": "white",
"label_bg": ""
},
"channel": {
"prefix": "",
"icon": "",
"text": ""
},
"message": {
// This uses golang time formatting:
// - https://yourbasic.org/golang/format-parse-string-time-date-example/
// - https://golang.org/pkg/time/#Time.Format
"time_format": "15:04",
// You can use 'colorize' to give every name an individual color
"name": "",
"time": "",
"text": ""
}
}
}

View file

@ -1,199 +0,0 @@
---
version: 3
hotkeys:
toggle-window:
- Ctrl-Space
copy:
- ⌘-C
paste:
- ⌘-V
home:
- ⌘-Left
- Home
end:
- ⌘-Right
- End
previous-word:
- ⌥-Left
next-word:
- ⌥-Right
delete-previous-word:
- ⌥-Backspace
delete-next-word:
- ⌥-Delete
clear:
- ⌘-K
zoom-in:
- ⌘-=
- ⌘-Shift-=
zoom-out:
- ⌘--
- ⌘-Shift--
reset-zoom:
- ⌘-0
ctrl-c:
- Ctrl-C
copy-current-path: []
search:
- ⌘-F
pane-focus-all:
- ⌘-Shift-I
scroll-to-bottom: []
restart-telnet-session: []
restart-ssh-session: []
launch-winscp: []
settings:
- ⌘-,
settings-tab: {}
serial:
- Alt-K
restart-serial-session: []
new-window:
- ⌘-N
new-tab:
- ⌘-T
workspace-profile-1: []
workspace-profile-2: []
workspace-profile-3: []
workspace-profile-4: []
workspace-profile-5: []
profile-selector:
- ⌘-E
toggle-fullscreen:
- Ctrl+⌘+F
rename-tab:
- ⌘-R
close-tab:
- ⌘-W
reopen-tab:
- ⌘-Shift-T
toggle-last-tab: []
next-tab:
- Ctrl-Tab
previous-tab:
- Ctrl-Shift-Tab
move-tab-left:
- ⌘-Shift-Left
move-tab-right:
- ⌘-Shift-Right
rearrange-panes:
- ⌘-Shift
duplicate-tab: []
explode-tab:
- ⌘-Shift-.
combine-tabs:
- ⌘-Shift-,
tab-1:
- ⌘-1
tab-2:
- ⌘-2
tab-3:
- ⌘-3
tab-4:
- ⌘-4
tab-5:
- ⌘-5
tab-6:
- ⌘-6
tab-7:
- ⌘-7
tab-8:
- ⌘-8
tab-9:
- ⌘-9
tab-10:
- ⌘-0
tab-11: []
tab-12: []
tab-13: []
tab-14: []
tab-15: []
tab-16: []
tab-17: []
tab-18: []
tab-19: []
tab-20: []
split-right:
- ⌘-Shift-D
split-bottom:
- ⌘-D
split-left: []
split-top: []
pane-maximize:
- ⌘-⌥-Enter
pane-nav-up:
- ⌘-⌥-Up
pane-nav-down:
- ⌘-⌥-Down
pane-nav-left:
- ⌘-⌥-Left
pane-nav-right:
- ⌘-⌥-Right
pane-nav-previous:
- ⌘-⌥-[
pane-nav-next:
- ⌘-⌥-]
switch-profile:
- ⌘-Shift-E
close-pane:
- ⌘-Shift-W
pane-increase-vertical: []
pane-decrease-vertical: []
pane-increase-horizontal: []
pane-decrease-horizontal: []
profile: {}
profile-selectors: {}
select-all:
- ⌘-A
terminal:
searchOptions: {}
colorScheme:
name: Betelgeuse
foreground: '#eceff1'
background: '#161925'
selection: null
cursor: '#FFCC00'
cursorAccent: null
colors:
- '#000000'
- '#D62341'
- '#9ECE58'
- '#FAED70'
- '#396FE2'
- '#BB80B3'
- '#2DDAFD'
- '#d0d0d0'
- rgba(255, 255, 255, 0.2)
- '#FF5370'
- '#C3E88D'
- '#FFCB6B'
- '#82AAFF'
- '#C792EA'
- '#89DDFF'
- '#ffffff'
customColorSchemes: []
autoOpen: true
scrollbackLines: 100000
frontend: xterm-webgl
font: Hack Nerd Font
ligatures: true
background: colorScheme
showTabProfileIcon: true
ssh:
warnOnClose: true
configSync:
parts: {}
token: XXX
clickableLinks:
modifier: metaKey
workspaceManager: {}
accessibility: {}
appearance:
flexTabs: true
frame: full
hacks: {}
pluginBlacklist: []
profileDefaults: {}
profiles: []
enableAnalytics: false
enableWelcomeTab: false

View file

@ -1,38 +0,0 @@
# Use the server-provided last modification date, if available
timestamping = on
# Do not go up in the directory structure when downloading recursively
no_parent = on
# Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!)
timeout = 60
# Retry a few times when a download fails, but dont overdo it. (The default is 20!)
tries = 3
# Retry even when the connection was refused
retry_connrefused = on
# Use the last component of a redirection URL for the local file name
trust_server_names = on
# Follow FTP links from HTML documents by default
follow_ftp = on
# Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one
adjust_extension = on
# Use UTF-8 as the default system encoding
# Disabled as it makes `wget` builds that dont support this feature unusable.
# Does anyone know how to conditionally configure a wget setting?
# http://unix.stackexchange.com/q/34730/6040
#local_encoding = UTF-8
# Ignore `robots.txt` and `<meta name=robots content=nofollow>`
robots = off
# Print the HTTP and FTP server responses
server_response = on
# Disguise as IE 9 on Windows 7
user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

View file

View file

@ -1,85 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFdt07cBEADGBsfWMKLODNkW8ro4ltREGK7KVgI1ETvgc1inGa79lW33F5/z
cP8vwVTwn1ntb6hFvQPD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MUqcGeUVwAR
AQABiQIlBBgBCAAPAhsMBQJZHNOaBQkUSg0HAAoJEJaz7l8pERFFhpkQAJ09mjjp
n9f18JGSMzP41fVucPuLBZ5XJL/hy2boII1FvgfmOETzNxLPblHdkJVjZS5iMrhL
EJ1jv+GQDtf68/0jO+HXuQIBmUJ53YwbuuQlLWH7CI2AxlSAKAn2kOApWMKsjnAv
JwS3eNGukOKWRfEKTqz2Vwi1H7M7ppypZ9keoyAoSIWb61gm7rXbfT+tVBetHfrU
EM5vz3AS3pJk6Yfqn10IZfiexXmsBD+SpJBNzMBsznCcWO2y4qZNLjFferBoizvV
34UnZyd1bkSN0T/MKp8sgJwqDJBS72tH6ZIM8NNoy29aPDkeaa8XlhkWiBdRizqL
BcxrV/1n3xdzfY9FX6s4KGudo+gYsVpY0mrpZU8jG8YUNLDXQTXnRo4CQOtRJJbA
RFDoZfsDqToZftuEhIsk+MaKlyXoA0eIYqGe6lXa/jEwvViqLYubCNLu0+kgNQ3v
hKF8Pf7eXFDAePw7guuvDvBOMQqBCaKCxsz1HoKRNYBEdUYrEQBJnX235Q4IsdI/
GcQ/dvERJXaDCG8EPhnwc517EMUJDiJ1CxT4+VMHphmFbiVqmctz0upIj+D037Xk
CcgxNte6LZorGRZ/l1MYINliGJKtCCFK7XGVPKiJ8zyGSyPj1FfwtBy5hUX3aQtm
bvP0H2BRCKoelsbRENu58BkU6YhiUry7pVul
=SJij
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -1,104 +0,0 @@
---
version: '3'
# This is your local Taskfile.yml file. You can define tasks and scripts while leveraging some of the nifty
# features of https://taskfile.dev. You can safely place your scripts here and they will be combined with
# a veteran stack of Taskfile.yml files. You can access the tasks defined here by running
# `run local:default` for example. You must keep all the tasks in this file without including other files
# because the main Taskfile.yml is a symlinked one. Anyway, try `run local:default`.
tasks:
default: echo "Get started on https://taskfile.dev"
browser:profile:save:brave:
vars:
BrowserProfile: >
{{if eq OS "darwin"}}~/Library/Application\ Support/BraveSoftware/Brave-Browser/Default{{end}}
{{if eq OS "linux"}}{{end}}
{{if eq OS "windows"}}{{end}}
cmds:
- tar -czpf ~/brave-profile.tar.gz {{.BrowserProfile}}
browser:profile:save:chrome:
vars:
BrowserProfile: >
{{if eq OS "darwin"}}~/Library/Application\ Support/BraveSoftware/Brave-Browser/Default{{end}}
{{if eq OS "linux"}}{{end}}
{{if eq OS "windows"}}{{end}}
cmds:
- tar -czpf ~/brave-profile.tar.gz {{.BrowserProfile}}
browser:profile:save:edge:
vars:
BrowserProfile: >
{{if eq OS "darwin"}}~/Library/Application\ Support/BraveSoftware/Brave-Browser/Default{{end}}
{{if eq OS "linux"}}{{end}}
{{if eq OS "windows"}}{{end}}
cmds:
- tar -czpf ~/brave-profile.tar.gz {{.BrowserProfile}}
browser:profile:save:firefox:
vars:
BrowserProfile: >
{{if eq OS "darwin"}}~/Library/Application\ Support/BraveSoftware/Brave-Browser/Default{{end}}
{{if eq OS "linux"}}{{end}}
{{if eq OS "windows"}}{{end}}
cmds:
- tar -czpf ~/brave-profile.tar.gz {{.BrowserProfile}}
provision:
desc: Provision the environment
summary: |
# Provision the Environment
This task will provision the current environment using a variety of tools.
It will prompt you for details like what type of environment you are provisioning.
Optionally, you can skip the prompt by passing a CLI argument like so:
**Example:**
`run localhost:provision -- terminal`
The above example will run the `localhost:provision:terminal` task.
cmds:
- |
if [ "{{.CLI_ARGS}}" != "" ]; then
run localhost:provision:{{.CLI_ARGS}}
else
run localhost:provision:prompt
fi
provision:prompt:
deps:
- :install:software:gum
cmds:
- logg prompt 'Select the type of environment you would like to provision'
- logg prompt '`Terminal` - Installs standard CLI tools that augment the terminal experience'
- logg prompt '`Development` - Provisions Terminal and also installs useful tools for development'
- logg prompt '`Full` - Provisions with both Terminal and Development and then it installs all the Brewfile-supported software from the Gas Station project (e.g. https://gitlab.com/megabyte-labs/gas-station).'
- |
CHOICE="$(logg choose "Terminal" "Development" "Full")"
if [ "$CHOICE" = 'Development' ]; then
run localhost:provision:dev
elif [ "$CHOICE" = 'Terminal' ]; then
run localhost:provision:terminal
elif [ "$CHOICE" = 'Full' ]; then
run localhost:provision:full
fi
provision:dev:
deps:
- :install:software:bundle
- provision:terminal
cmds:
- brew bundle --file "$HOME/.local/Brewfile.dev"
provision:full:
deps:
- :install:software:bundle
- provision:dev
cmds:
- brew bundle --file "$HOME/.local/Brewfile.full"
provision:terminal:
deps:
- :install:software:bundle
cmds:
- brew bundle --file "$HOME/.local/Brewfile.terminal"

View file

@ -1,127 +0,0 @@
# Fix for auto expansion (source: https://wiki.archlinux.org/title/Sudo#Passing_aliases)
alias sudo='sudo '
# Reload current shell
alias reload="exec ${SHELL} -l"
# Create an Authelia password hash
alias autheliapassword='docker run authelia/authelia:latest authelia hash-password'
# Shows IP addresses that are currently banned by fail2ban
alias banned='sudo zgrep "Ban" /var/log/fail2ban.log*'
alias connections='nm-connection-editor'
# Make copy command verbose
alias cp='cp -v'
# Command-line DNS utility
alias dog="docker run -it --rm dog"
# Download a file
alias download='curl --continue-at - --location --progress-bar --remote-name --remote-time'
# Download a website
alias downloadsite='wget --mirror -p --convert-links -P'
# Flush DNS
alias flushdns='sudo systemd-resolve --flush-caches && sudo systemd-resolve --statistics'
# FontBook for macOS
alias fontbook="open -b com.apple.FontBook"
# Get the possible GRUB resolutions
alias grubresolutions='sudo hwinfo --framebuffer'
# Execute git command with sudo priviledges while retaining .gitconfig
alias gsudo='sudo git -c "include.path="${XDG_CONFIG_DIR:-$HOME/.config}/git/config\" -c \"include.path=$HOME/.gitconfig\"'
# Create hashed password for Ansible user creation
alias hashpassword='mkpasswd --method=sha-512'
# Show full output when using ls
alias ls='ls -AlhF --color=auto'
# Create parent directories automatically
alias mkdir='mkdir -pv'
# Make mount command output readable
alias mount='mount | column -t'
# Make mv command verbose
alias mv='mv -v'
# Show IP address
alias myip='curl http://ipecho.net/plain; echo'
# Shows local IP addresses
alias mylocalip="ifconfig | grep -Eo 'inet (addr:|adr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'"
# Link pip to pip3
alias pip='pip3'
# Show open ports
alias ports='sudo netstat -tulanp'
# Shuts down the computer, skipping the shutdown scripts
alias poweroff='sudo /sbin/poweroff'
# Open the Rclone web GUI
alias rclonegui='rclone rcd --rc-web-gui --rc-user=admin --rc-pass=pass --rc-serve'
# Reboot the computer
alias reboot='sudo /sbin/reboot'
# Make rm command verbose
alias rm='rm -vi'
# Launch the Python Simple HTTP Server
alias serve='python -m SimpleHTTPServer'
# Generate a SHA1 digest
alias sha1='openssl sha1'
# Shutdown the computer
alias shutdown='sudo /sbin/shutdown'
# Speed test
alias speedtest='wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip'
# Shortcut for config file
alias sshconfig='${EDITOR:code} ~/.ssh/config'
# Pastebin
alias sprunge='curl -F "sprunge=<-" http://sprunge.us'
# Disable Tor for current shell
alias toroff='source torsocks off'
# Enable Tor for current shell
alias toron='source torsocks on'
# Test Tor connection
alias tortest='curl --socks5-hostname 127.0.0.1:9050 --silent https://check.torproject.org/ | head -25'
# Unban IP address (e.g. unban 10.14.24.14)
alias unban='sudo fail2ban-client set sshd unbanip'
# Recursively encrypts files using Ansible Vault
alias unvaultdir='find . -type f -printf "%h/\"%f\" " | xargs ansible-vault decrypt'
# Alias for updating software
alias update='sudo apt-get update && sudo apt-get upgrade'
# Sets v as an alias for vim
alias v='vim'
# Recursively encrypts files using Ansible Vault
alias vaultdir='find . -type f -printf "%h/\"%f\" " | xargs ansible-vault encrypt'
# Shows nice looking report of weather
alias weather='curl -A curl wttr.in'
# Change .wget-hsts file location
alias wget="wget --hsts-file ~/.config/.wget-hsts"
# Running this will update GPG to point to the current YubiKey
alias yubikey-gpg-stub='gpg-connect-agent "scd serialno" "learn --force" /bye'

File diff suppressed because it is too large Load diff

View file

@ -1,25 +0,0 @@
#!/bin/sh
# Exit on error
set -e
# Command to copy to clipboard
COPY="wl-copy"
# Get list of all logins as json
logins="$(bw list items)"
# Grab the name of every login and pip them into fzf
name="$(echo "$logins" | jq -r '.[].name' | fzf)"
# Find the login with the selected name (as a json)
selected="$(echo "$logins" | jq -r ".[] | select(.name == \"$name\")")"
# Print the name of the selected login
echo "Name: $(echo "$selected" | jq -r '.name')"
echo "> Copying Username"
# Copy the username to the clipboard
printf '%s' "$(echo "$selected" | jq -r '.login.username')" | $COPY
echo "Press any key to copy password..."
# Wait for user input before coping the password
read -r
echo "> Copying Password"
# Copy the password to the clipboard
printf '%s' "$(echo "$selected" | jq -r '.login.password')" | $COPY

View file

@ -1,12 +0,0 @@
#!/bin/bash
# FONTTEST SCRIPT
# -----------------
# Print all avaliable variants of chosen terminal font
echo -en "regular "
echo -en "\e[3m italic \e[0m"
echo -en "\e[1m bold \e[0m"
echo -en "\e[3m\e[1m bold-italic \e[0m"
echo -en " \e[4munderline\e[0m "
echo -e " \e[9mstrikethrough\e[0m"

View file

@ -1,133 +0,0 @@
#!/usr/bin/env bash
# Alias logg function to true if it is not available
if ! command -v logg > /dev/null; then
alias logg='true'
fi
# Clear ZSH cached stuff
if [ -f "$HOME/.zshrc.zwc" ]; then
rm -f "$HOME/.zshrc.zwc"
fi
if [ -d "$HOME/.local/antigen" ]; then
rm -rf "$HOME/.local/antigen"
fi
if [ -d "$HOME/.zsh_sessions" ]; then
rm -rf "$HOME/.zsh_sessions"
fi
if [ -f '/etc/qubes-release' ]; then
# Qubes dom0
logg info 'Ensuring provision VM is present'
qvm-create --label red --template debian-11 provision &> /dev/null || EXIT_CODE=$?
logg info 'Downloading dotfile assets with provision VM'
qvm-run --pass-io provision 'if [ -d ~/Downloads/professor-dotfiles ]; then cd ~/Downloads/professor-dotfiles && git config pull.rebase false && rm -rf dotfiles/.local/asdf && rm -rf dotfiles/.local/common/shared && git pull origin master && git clone https://github.com/asdf-vm/asdf.git dotfiles/.local/asdf --branch v0.10.2 && mkdir -p dotfiles/.local/common/shared && git clone https://gitlab.com/megabyte-labs/common/shared.git dotfiles/.local/common/shared; else git clone https://gitlab.com/megabyte-labs/dotfiles.git ~/Downloads/professor-dotfiles; cd ~/Downloads/professor-dotfiles/dotfiles/.local && git clone https://github.com/asdf-vm/asdf.git asdf --branch v0.10.2 && mkdir common && git clone https://gitlab.com/megabyte-labs/common/shared.git common/shared; fi; cd ~/Downloads; tar -zcvf /tmp/professor-dotfiles.tar.gz professor-dotfiles'
logg info 'Transferring dotfiles to dom0 from provision VM'
qvm-run --pass-io provision "cat /tmp/professor-dotfiles.tar.gz" > "/tmp/dotfiles.tar.gz"
logg info 'Unpacking dotfile assets to /usr/local/src/professor-dotfiles'
tar -xzf "/tmp/dotfiles.tar.gz" -C "$HOME"
rm -f "/tmp/dotfiles.tar.gz"
sudo rm -rf /usr/local/src/professor-dotfiles
sudo mv "$HOME/professor-dotfiles" /usr/local/src/professor-dotfiles
else
if [ ! -w /usr/local/src/professor-dotfiles ]; then
logg info 'Using sudo because /usr/local/src/professor-dotfiles is not writable'
SUDO_PREFIX="sudo"
fi
if [ -d /usr/local/src/professor-dotfiles/.git ]; then
logg info 'Updating dotfiles already present in /usr/local/src/professor-dotfiles'
cd /usr/local/src/professor-dotfiles
${SUDO_PREFIX} git config pull.rebase false
${SUDO_PREFIX} rm -rf dotfiles/.local/asdf
${SUDO_PREFIX} rm -rf dotfiles/.local/common/shared
${SUDO_PREFIX} git pull origin master
${SUDO_PREFIX} git clone https://github.com/asdf-vm/asdf.git dotfiles/.local/asdf --branch v0.10.2
${SUDO_PREFIX} git clone https://gitlab.com/megabyte-labs/common/shared.git dotfiles/.local/common/shared
${SUDO_PREFIX} chown -Rf "$USER":"$(id -g -n)" /usr/local/src/professor-dotfiles
cd ~/
else
logg info 'Cloning new dotfiles to /usr/local/src/professor-dotfiles'
${SUDO_PREFIX} rm -rf /usr/local/src/professor-dotfiles
${SUDO_PREFIX} git clone https://gitlab.com/megabyte-labs/dotfiles.git /usr/local/src/professor-dotfiles
${SUDO_PREFIX} git clone https://github.com/asdf-vm/asdf.git /usr/local/src/professor-dotfiles/dotfiles/.local/asdf --branch v0.10.2
${SUDO_PREFIX} mkdir -p /usr/local/src/professor-dotfiles/dotfiles/.local/common/shared
${SUDO_PREFIX} git clone https://gitlab.com/megabyte-labs/common/shared.git /usr/local/src/professor-dotfiles/dotfiles/.local/common/shared
${SUDO_PREFIX} chown -Rf "$USER":"$(id -g -n)" /usr/local/src/professor-dotfiles
fi
if [ -n "$CREATE_PACKAGE" ]; then
logg info 'Creating /tmp/professor-dotfiles.tar.gz'
cd /usr/local/src
${SUDO_PREFIX} tar -zcvf /tmp/professor-dotfiles.tar.gz professor-dotfiles
cd ~/
fi
fi
# Copy dotfile folders
logg info 'Copying dotfiles folders to user $HOME directory'
while read DOTFILE_FOLDER; do
BASENAME_FOLDER="$(basename "$DOTFILE_FOLDER")"
if [ ! -d "$HOME/$BASENAME_FOLDER" ]; then
mkdir -p "$HOME/$BASENAME_FOLDER"
fi
cp -rf "$DOTFILE_FOLDER/"* "$HOME/$BASENAME_FOLDER"
done < <(find /usr/local/src/professor-dotfiles/dotfiles -maxdepth 1 -mindepth 1 -type d)
# Copy dotfile files
logg info 'Copying dotfiles files to user $HOME directory'
while read DOTFILE_FILE; do
BASENAME_FILE="$(basename "$DOTFILE_FILE")"
cp "$DOTFILE_FILE" "$HOME/$BASENAME_FILE"
chmod 600 "$HOME/$BASENAME_FILE"
done < <(find /usr/local/src/professor-dotfiles/dotfiles -maxdepth 1 -mindepth 1 -type f)
# Ensure .local/bin contents are executable
logg info 'Ensuring programs in ~/.local/bin are executable'
while read LOCAL_BIN; do
chmod +x "${LOCAL_BIN}"
done < <(find "$HOME/.local/bin" -maxdepth 1 -mindepth 1 -type f)
if [ -d /Applications ] && [ -d /System ]; then
logg info 'Adding Hack font to ~/Library/Fonts'
mkdir -p "$HOME/Library/Fonts"
cp "$HOME/.local/share/fonts/Hack Bold Nerd Font Complete.ttf" "$HOME/Library/Fonts/Hack Bold Nerd Font Complete.ttf"
logg info 'Configuring the Terminal.app'
theme=$(<$HOME/.local/theme/Betelgeuse.macOS.terminal)
plutil -replace Window\ Settings.Betelgeuse -xml "$theme" ~/Library/Preferences/com.apple.Terminal.plist
defaults write com.apple.Terminal "Default Window Settings" -string "Betelgeuse"
defaults write com.apple.Terminal "Startup Window Settings" -string "Betelgeuse"
/usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse:columnCount integer 124" ~/Library/Preferences/com.apple.Terminal.plist
/usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betelgeuse:rowCount integer 35" ~/Library/Preferences/com.apple.Terminal.plist
/usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betel-Bash:columnCount integer 124" ~/Library/Preferences/com.apple.Terminal.plist
/usr/libexec/PlistBuddy -c "Add :Window\ Settings:Betel-Bash:rowCount integer 35" ~/Library/Preferences/com.apple.Terminal.plist
# macOS desktop background
if command -v m > /dev/null; then
logg info 'Updating desktop wallpaper'
m wallpaper "/Users/$(whoami)/.local/theme/background.jpg"
fi
fi
# Update local Betelgeuse theme files (if not on macOS system)
if [ ! -d /Applications ] && [ ! -d /Library ]; then
logg info 'Updating Betelgeuse theme files'
if [ -f '/etc/qubes-release' ]; then
# Qubes dom0
qvm-create --label red --template debian-11 provision &> /dev/null || EXIT_CODE=$?
qvm-run --pass-io provision 'rm -f ~/Downloads/betelgeuse-master.tar.gz && curl -sSL https://gitlab.com/megabyte-labs/misc/betelgeuse/-/archive/master/betelgeuse-master.tar.gz > /tmp/betelgeuse-master.tar.gz'
qvm-run --pass-io provision "cat /tmp/betelgeuse-master.tar.gz" > "/tmp/betelgeuse-master.tar.gz"
cd /tmp
tar -xvf betelgeuse-master.tar.gz > /dev/null
rm betelgeuse-master.tar.gz
cp -rf betelgeuse-master/share/ "$HOME/.local/share"
rm -rf betelgeuse-master
else
curl -sSL https://gitlab.com/megabyte-labs/misc/betelgeuse/-/archive/master/betelgeuse-master.tar.gz > betelgeuse-master.tar.gz
tar -xzf betelgeuse-master.tar.gz > /dev/null
rm betelgeuse-master.tar.gz
cp -rf betelgeuse-master/share/ "$HOME/.local/share"
rm -rf betelgeuse-master
fi
fi
# grep -q QT_QPA_PLATFORMTHEME=qt5ct /etc/environment || echo QT_QPA_PLATFORMTHEME=qt5ct | sudo tee -a /etc/environment
# sudo cp -rv "$HOME/.local/share/qt5ct" /usr/share

View file

@ -1,314 +0,0 @@
#!/bin/bash
#################################################################
# #
# GNOME Shell Extension Installer v1.2.1 #
# #
# A simple (scriptable) way to install GNOME Shell Extensions! #
# #
# Author: Cyrus Frost #
# License: MIT #
# #
# https://github.com/cyfrost/install-gnome-extensions #
# #
#################################################################
#vars
script_revision="v1.2.1"
args_count="$#"
dependencies=(wget curl jq unzip tput sed egrep sed awk gnome-shell cut basename)
deps_install_apt="sudo apt install -y wget curl jq unzip sed"
deps_install_dnf="sudo dnf install -y wget curl jq unzip sed"
EXTENSIONS_TO_INSTALL=()
OVERWRITE_EXISTING=false
ENABLE_ALL=false
INSTALLED_EXT_COUNT=''
INSTALLED_EXTs=''
# message colors.
info_text_blue=$(tput setaf 7)
normal_text=$(tput sgr0)
error_text=$(tput setaf 1)
status_text_yellow=$(tput setaf 3)
# Bail immediately if running as root.
function CheckIfRunningAsRoot() {
if [ "$(id -u)" = 0 ]; then
printf "
%s Running this script as root is discouraged and won't work since it needs user directories to operate. Retry as normal user.
Note: If you're trying to install extensions for another user on this computer, try 'su <user_account_name>' and proceed.
Abort.
%s" "$error_text" "$normal_text"
exit 1
fi
}
# Bail immediately if running as root.
CheckIfRunningAsRoot
# Trap SIGINT and SIGTERM.
function _term() {
printf "\n\n%s" "$normal_text"
trap - INT TERM # clear the trap
kill -- -$$
}
# Trap SIGINT and SIGTERM for cleanup.
trap _term INT TERM
# This function can check for binaries/commands to be available in Env PATH and report otherwise.
function CheckDependencies() {
# echo -en "\n${info_text_blue}Checking dependencies...${normal_text}";
dependencies=("$@")
for name in "${dependencies[@]}"; do
command -v "$name" >/dev/null 2>&1 || {
echo -en "${error_text}\n[Error] Command not found: \"$name\"${normal_text}"
deps=1
}
done
[[ $deps -ne 1 ]] || {
echo -en "${error_text}\n\nOne or more dependencies is unavailable. Please make sure the above commands are available and re-run this script.\n\n${status_text_yellow}For Ubuntu and similar distros, try: $deps_install_apt\n\nFor Fedora and similar distros, try: $deps_install_dnf\n\n${normal_text}"
exit 1
}
}
# Fail if dependencies unmet.
CheckDependencies "${dependencies[@]}"
function confirm_action() {
while true; do
printf "\n%s" "$normal_text"
read -r -p "$1" -n 1 yn
case $yn in
[Yy]*) return 0 ;;
[Nn]*) return 1 ;;
*) printf "\nPlease answer with 'y' or 'n'." ;;
esac
done
}
# check if current (active) desktop instance is GNOME.
function IsEnvGNOME() {
if [ "$XDG_CURRENT_DESKTOP" = "" ]; then
desktop=$(echo "$XDG_DATA_DIRS" | grep -Po '(xfce|kde|gnome)' | tail -n 1)
#sed 's/.*\(xfce\|kde\|gnome\).*/\1/')
else
desktop=$XDG_CURRENT_DESKTOP
fi
desktop=${desktop,,}
if [[ $desktop == *"gnome"* ]]; then
return 0
else
return 1
fi
}
function enable_extension() {
ext_uuid="$1"
gnome-extensions enable "$ext_uuid" >/dev/null 2>&1
}
function disable_extension() {
ext_uuid="$1"
gnome-extensions disable "$ext_uuid" >/dev/null 2>&1
}
function get_installed_extensions_list() {
user_extensions_path="/home/$USER/.local/share/gnome-shell/extensions"
array=()
while IFS="" read -r line; do array+=("$line"); done < <(find "$user_extensions_path" -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f\n")
ext_list=$(printf "'%s'," "${array[@]}")
ext_list=${ext_list%,}
INSTALLED_EXT_COUNT="${#array[@]}"
INSTALLED_EXTs=$(printf '%s\n' "${array[@]}")
# echo $ext_list
}
function install_shell_extensions() {
for ext_id in "${EXTENSIONS_TO_INSTALL[@]}"; do
request_url="https://extensions.gnome.org/extension-info/?pk=$ext_id&shell_version=$GNOME_SHELL_VERSION"
http_response="$(curl -s -o /dev/null -I -w "%{http_code}" "$request_url")"
if [ "$http_response" = 404 ]; then
printf "\n%sError: No extension exists matching the ID: %s and GNOME Shell version %s (Skipping this).\n" "$error_text" "$ext_id" "$GNOME_SHELL_VERSION"
continue
fi
printf "%s\n" "$normal_text"
ext_info="$(curl -s "$request_url")"
extension_name="$(echo "$ext_info" | jq -r '.name')"
direct_dload_url="$(echo "$ext_info" | jq -r '.download_url')"
ext_uuid="$(echo "$ext_info" | jq -r '.uuid')"
ext_version="$(echo "$ext_info" | jq -r '.version')"
ext_homepage="$(echo "$ext_info" | jq -r '.link')"
ext_description="$(echo "$ext_info" | jq -r '.description')"
download_url="https://extensions.gnome.org"$direct_dload_url
target_installation_dir="/home/$USER/.local/share/gnome-shell/extensions/$ext_uuid"
printf "%s\nDownloading and installing extension \"%s\"%s" "$status_text_yellow" "$extension_name" "$normal_text"
printf "%s" "$info_text_blue"
printf "\nDescription: %s" "$ext_description"
printf "\nExtension ID: %s" "$ext_id"
printf "\nExtension Version: v%s" "$ext_version"
printf "\nHomepage: https://extensions.gnome.org%s" "$ext_homepage"
printf "\nUUID: \"%s\"" "$ext_uuid"
printf "\nInstalling to: \"%s\"" "$target_installation_dir"
if [ -d "$target_installation_dir" ] && [ "$OVERWRITE_EXISTING" = "false" ]; then
confirm_action "${normal_text}This extension is already installed. Do you want to overwrite it? (y/n): " || continue
fi
printf "\n%sPlease wait...\n" "$info_text_blue"
filename="$(basename "$download_url")"
wget -q "$download_url" \
&& mkdir -p "$target_installation_dir" \
&& unzip -o -q "$filename" -d "$target_installation_dir" \
&& sleep 1 \
&& rm "$filename"
schemas_dir="$target_installation_dir/schemas"
if [ -d "$schemas_dir" ]; then
printf "%sInstall GLib Schemas for dconf storage, this step will require sudo access...\n" "$info_text_blue"
cd "$schemas_dir" || {
echo "$0: Directory do not exist"
exit 1
}
sudo cp ./*.xml "/usr/share/glib-2.0/schemas/"
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/ >/dev/null 2>&1
fi
if [ ! "$ENABLE_ALL" = "false" ]; then
enable_extension "$ext_uuid"
fi
printf "%sDone!\n%s" "$info_text_blue" "$normal_text"
done
printf "\n"
}
# Check if arg is number.
function IsNumber() {
re='^[0-9]+$'
if [[ "$1" =~ $re ]]; then
return 0
fi
return 1
}
function print_usage() {
print_banner
# -u, --update Updates existing extensions to latest available versions.
printf "
Usage: ./install-gnome-extensions.sh [options] <extension_ids> | [links_file]
Options:
-e, --enable Enable extension after installing it.
-o, --overwrite Overwrites existing extensions.
-l. --list Lists the UUIDs of installed extensions.
-f, --file Specify a file containing extension links to install.
-h, --help Display this help message.
Example usages:
---------------
1) ./install-gnome-extensions.sh 6 8 19 --enable
Installs and enables extensions with IDs 6, 8, and 19.
2) ./install-gnome-extensions.sh -e --file links.txt
Installs and enables the extensions from the URLs specified in \"links.txt\" file.
"
}
function print_banner() {
printf "%s
===========================================================
GNOME Shell Extensions Installer %s
A simple (scriptable) way to install GNOME Shell extensions.
https://github.com/cyfrost/install-gnome-extensions
===========================================================\n" "$normal_text" "$script_revision"
}
function trim_file() {
file="$1"
sed -i '/^[[:blank:]]*$/ d' "$file" && awk '{$1=$1};1' "$file" >tmp && mv tmp "$file"
}
function install_exts_from_links_file() {
file="$1"
if [ ! -f "$file" ] || [ ! -s "$file" ]; then
printf "\n%sError: Supplied argument (\"%s\") is either not a valid file or is empty. %s\n\nPlease gather all extension links in a text file (line-by-line) and try again.\n\nSample usage: ./install-gnome-extensions --file links.txt\n\n" "$error_text" "$1" "$normal_text"
exit 1
fi
trim_file "$file"
printf "\nParsing file \"%s\" for extension links...\n" "$file"
while IFS="" read -r p || [ -n "$p" ]; do
url="$(echo "$p" | sed '/^[[:space:]]*$/d')"
ext_id="$(echo "$url" | tr '\n' ' ' | sed -e 's/[^0-9]/ /g' -e 's/^ *//g' -e 's/ *$//g' | tr -s ' ' | awk '{print $1;}')"
IsNumber "$ext_id" && EXTENSIONS_TO_INSTALL+=("$ext_id") || printf "\n%sError: Invalid URL: %s (Skipping this).%s" "$error_text" "$url" "$normal_text"
done <"$file"
printf "\n"
}
function begin_install() {
exts_list="$(printf '%s, ' "${EXTENSIONS_TO_INSTALL[@]}")"
exts_list=${exts_list%, }
print_banner
printf "\n%s[Info] Detected GNOME Shell version: %s\n\nInstalling %s extensions (%s)...\n%s" "$info_text_blue" "$GNOME_SHELL_VERSION" "$extensions_count" "$exts_list" "$normal_text"
install_shell_extensions
printf "\n%sComplete!\n\n" "$normal_text"
IsEnvGNOME || printf "%sPlease login to GNOME desktop to see the installed/enabled extensions.\n\n" "$normal_text"
}
# Obtain GNOME Shell version.
GNOME_SHELL_VERSION="$(gnome-shell --version | cut --delimiter=' ' --fields=3 | cut --delimiter='.' --fields=1,2)"
while test $# -gt 0; do
case "$1" in
-e | --enable)
ENABLE_ALL=true
;;
# -u|--update)
# UPDATE=true
# ;;
-o | --overwrite)
OVERWRITE_EXISTING=true
;;
-h | --help)
print_usage
exit 0
;;
-l | --list)
get_installed_extensions_list
printf "\n============================\nInstalled extensions (UUIDs)\n============================\n\n%s\n\n%s extensions are installed.\n\nDone!\n\n" "$INSTALLED_EXTs" "$INSTALLED_EXT_COUNT"
exit 0
;;
-f | --file)
install_exts_from_links_file "$2"
;;
esac
IsNumber "$1" && EXTENSIONS_TO_INSTALL+=("$1")
shift
done
extensions_count="${#EXTENSIONS_TO_INSTALL[@]}"
if [ "$args_count" -eq 0 ]; then
printf "\n%sInvalid usage.\n%s" "$error_text" "$normal_text"
print_usage
elif [ "$extensions_count" -eq 0 ]; then
printf "\n%sError: Could not find any valid extension IDs or URLs for installation.\n%s\n" "$error_text" "$normal_text"
exit 1
else
begin_install
fi

View file

@ -1,685 +0,0 @@
#!/usr/bin/env zx
const execSync = require('child_process').execSync
$.log = (entry) => {
if (entry.kind === 'cmd' && entry.cmd.substring(0, 4) === 'logg') {
//execSync(entry.cmd, {stdio: 'inherit', shell: true})
} else {
log(entry)
}
}
let installData
const installOrders = {};
const installOrdersPre = [];
const installOrdersPost = [];
const osType = await OSType();
let osID = osType
if(osType === 'linux') {
osID = await realeaseID()
}
// Download the installation map
async function downloadInstallData() {
const response = await fetch(
"https://gitlab.com/megabyte-labs/misc/dotfiles/-/raw/master/.local/share/chezmoi/software.yml"
);
if (response.ok) {
const text = await response.text()
return YAML.parse(text)
} else {
await $`logg error 'Failed to download the installation map'`
}
}
// Creates the installOrders object which maps package managers to arrays of packages to install
async function generateInstallOrders() {
const packagesToInstall = process.argv.slice(3);
const installerPreference = await OSTypeInstallerKey()
await $`logg info 'Installer preference category detected as ${installerPreference}'`
const preferenceOrder = installData.installerPreference[installerPreference];
await $`logg info 'Preference order acquired:'`
console.log(preferenceOrder)
const softwarePackages = installData.softwarePackages;
for (let pkg of packagesToInstall) {
let packageKey;
if (softwarePackages[pkg + ":" + osID]) {
packageKey = pkg + ":" + osID;
} else if (softwarePackages[pkg + ":" + osType]) {
packageKey = pkg + ":" + osType;
} else if (softwarePackages[pkg]) {
packageKey = pkg
} else {
await $`logg warn 'The package \`${pkg}\` was not found in the installation map'`
continue;
}
for (let preference of preferenceOrder) {
if (softwarePackages[packageKey][preference + ":" + osID]) {
await updateInstallMaps(
preference,
softwarePackages[packageKey],
preference + ":" + osID,
pkg,
packageKey
);
break
} else if (softwarePackages[packageKey][preference + ":" + osType]) {
await updateInstallMaps(
preference,
softwarePackages[packageKey],
preference + ":" + osType,
pkg,
packageKey
);
break
} else if (softwarePackages[packageKey][preference]) {
await updateInstallMaps(preference, softwarePackages[packageKey], preference, pkg, packageKey);
break
}
}
}
return installOrders;
}
// Update install, pre-hook, and post-hook objects
async function updateInstallMaps(preference, packages, scopedPreference, pkg, packageKey) {
const preHook = getHook(packages, "pre", scopedPreference, preference);
if (preHook) {
installOrdersPre.concat(typeof preHook === "string" ? [preHook] : preHook);
}
const postHook = getHook(packages, "post", scopedPreference, preference);
if (postHook) {
installOrdersPost.concat(
typeof postHook === "string" ? [postHook] : postHook
);
}
if (!installOrders[preference]) {
installOrders[preference] = [];
}
await $`logg info 'Found a match for the package \`${pkg}\` (${packageKey} via ${scopedPreference})'`
const newPackages = packages[scopedPreference];
installOrders[preference] = installOrders[preference].concat(
typeof newPackages === "string" ? [newPackages] : newPackages
);
}
// Get pre / post install hooks
function getHook(packages, hook, scopedPreference, preference) {
const hookLabel = "_" + hook + ":";
if (packages[hookLabel + scopedPreference]) {
return packages[hookLabel + scopedPreference];
} else if (packages[hookLabel + preference]) {
return packages[hookLabel + preference];
} else if (packages[hookLabel + osID]) {
return packages;
} else if (packages[hookLabel + osType]) {
return packages[hookLabel + osType];
} else if (packages["_" + hook]) {
return packages["_" + hook];
}
}
// Acquire OS type installer key (for the installerPreference data key)
async function OSTypeInstallerKey() {
const apt = which.sync('apt-get', { nothrow: true })
const dnf = which.sync('dnf', { nothrow: true })
const freebsd = which.sync('pkg', { nothrow: true })
const pacman = which.sync('pacman', { nothrow: true })
const yum = which.sync('yum', { nothrow: true })
const zypper = which.sync('zypper', { nothrow: true })
if (apt) {
return 'apt'
} else if (dnf || yum) {
return 'dnf'
} else if(pacman) {
return 'pacman'
} else if(zypper) {
return 'zypper'
} else if (freebsd) {
return 'freebsd'
} else {
try {
await $`test -d /Applications && test -d /Library`
return 'darwin'
} catch (e) {
return 'windows'
}
}
}
// Acquire OS type
async function OSType() {
try {
await $`test -d /Applications && test -d /Library`
return 'darwin'
} catch(e) {
try {
await $`test -f /etc/os-release`
return 'linux'
} catch (e) {
return 'windows'
}
}
}
// Acquire release ID (for Linux)
async function releaseID() {
const ID = await $`
if [ -f /etc/os-release ]; then
. /etc/os-release
echo -n $ID
fi
`;
return ID.stdout;
}
// Post-install hook
async function afterInstall(packageManager) {
if (packageManager === 'appimage') {
} else if (packageManager === 'ansible') {
await $`logg info 'Ensuring temporary passwordless sudo privileges used by Ansible are removed'`
await $`sudo sed -i '/# TEMPORARY FOR ANSIBLE INSTALL/d' /etc/sudoers`
} else if (packageManager === 'apk') {
} else if (packageManager === 'apt') {
} else if (packageManager === 'basher') {
} else if (packageManager === 'binary') {
} else if (packageManager === 'brew' || packageManager === 'cask') {
} else if (packageManager === 'cargo') {
} else if (packageManager === 'choco') {
} else if (packageManager === 'crew') {
} else if (packageManager === 'dnf') {
} else if (packageManager === 'flatpak') {
} else if (packageManager === 'gem') {
} else if (packageManager === 'go') {
} else if (packageManager === 'nix') {
} else if (packageManager === 'npm') {
} else if (packageManager === 'pacman') {
} else if (packageManager === 'pipx') {
} else if (packageManager === 'pkg') {
} else if (packageManager === 'port') {
} else if (packageManager === 'scoop') {
} else if (packageManager === 'crew') {
} else if (packageManager === 'dnf') {
} else if (packageManager === 'flatpak') {
} else if (packageManager === 'snap') {
} else if (packageManager === 'whalebrew') {
} else if (packageManager === 'winget') {
} else if (packageManager === 'yay') {
} else if (packageManager === 'zypper') {
}
}
// Pre-install hook
async function beforeInstall(packageManager) {
if (packageManager === 'appimage') {
} else if (packageManager === 'ansible') {
await $`logg info 'Temporarily enabling passwordless sudo for Ansible role installations'`
await $`sudo echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR ANSIBLE INSTALL" > /etc/sudoers`
} else if (packageManager === 'apk') {
} else if (packageManager === 'apt') {
await $`sudo apt-get update`
} else if (packageManager === 'basher') {
} else if (packageManager === 'binary') {
} else if (packageManager === 'brew' || packageManager === 'cask') {
} else if (packageManager === 'cargo') {
} else if (packageManager === 'choco') {
} else if (packageManager === 'crew') {
} else if (packageManager === 'dnf') {
} else if (packageManager === 'flatpak') {
} else if (packageManager === 'gem') {
} else if (packageManager === 'go') {
} else if (packageManager === 'nix') {
} else if (packageManager === 'npm') {
} else if (packageManager === 'pacman') {
await $`sudo pacman -Syu`
} else if (packageManager === 'pipx') {
} else if (packageManager === 'pkg') {
} else if (packageManager === 'port') {
} else if (packageManager === 'scoop') {
} else if (packageManager === 'crew') {
} else if (packageManager === 'dnf') {
} else if (packageManager === 'flatpak') {
} else if (packageManager === 'snap') {
} else if (packageManager === 'whalebrew') {
if (osType === 'darwin') {
const docker = which.sync('docker', { nothrow: true })
if (!docker) {
await $`brew install --cask docker`
}
try {
await $`docker run --rm hello-world`
} catch (e) {
await $`logg warn 'The command \`docker run --rm hello-world\` failed'`
try {
const promises = [$`test -d /Applications/Docker.app`, $`logg info 'Attempting to open \`/Applications/Docker.app\` (Docker Desktop for macOS). This should take about 30 seconds.'`, $`open /Applications/Docker.app`]
await Promise.all(promises)
const gum = which.sync('gum', { nothrow: true })
if (gum) {
execSync('gum spin --spinner dot --title "Waiting for Docker Desktop to start up.." -- sleep 30', {stdio: 'inherit', shell: true})
} else {
await $`sleep 30`
}
} catch (e) {
await $`logg warn 'Docker Desktop appears to not be installed!'`
}
}
}
} else if (packageManager === 'winget') {
} else if (packageManager === 'yay') {
} else if (packageManager === 'zypper') {
}
}
async function ensureInstalled(bin, callback) {
const installed = which.sync(bin, { nothrow: true })
if (installed) {
await $`logg info '\`${bin}\` is available'`
} else {
await $`logg warn '\`${bin}\` is not installed!'`
if (callback) {
await callback
} else {
await $`logg error 'There does not appear to be an installation method available for \`${bin}\`'`
}
}
}
async function ensurePackageManagerAnsible() {
await $`pipx install ansible`
await $`pipx inject ansible PyObjC PyObjC-core docker lxml netaddr pexpect python-vagrant pywinrm requests-credssp watchdog`
await $`touch "$HOME/.cache/megabytelabs/ansible-installed"`
await $`logg info 'Ansible and its supporting packages are now installed via pipx'`
}
// Ensure the package manager is available
let packageManagerInstalled = {};
async function ensurePackageManager(packageManager) {
await $`logg info 'Ensuring \`${packageManager}\` is set up'`
if (packageManagerInstalled[packageManager]) {
return;
} else {
packageManagerInstalled[packageManager] = true;
}
if (packageManager === "ansible") {
await ensurePackageManager("pipx");
}
if (
packageManager === "gem" ||
packageManager === "go" ||
packageManager === "npm" ||
packageManager === "pipx" ||
packageManager === "whalebrew"
) {
await ensurePackageManager("brew");
}
if (packageManager === 'appimage') {
} else if (packageManager === 'ansible') {
try {
await $`test -f "$HOME/.cache/megabytelabs/ansible-installed"`
const ansible = which.sync('ansible', { nothrow: true })
if (ansible) {
await $`logg info '\`ansible\` and its supporting packages appear to be installed'`
} else {
await ensurePackageManagerAnsible()
}
} catch (e) {
await ensurePackageManagerAnsible()
}
} else if (packageManager === 'apk') {
await ensureInstalled('apk', false)
} else if (packageManager === 'apt') {
await ensureInstalled('apt', false)
} else if (packageManager === 'basher') {
await ensureInstalled('basher', $`
# TODO
echo "Bash script that installs basher here"
`)
} else if (packageManager === 'binary') {
} else if (packageManager === 'bpkg') {
await ensureInstalled('bpkg', $`
# TODO
echo "Bash script that installs bpkg here"
`)
} else if (packageManager === 'brew' || packageManager === 'cask') {
const brew = which.sync('brew', { nothrow: true })
if (!brew) {
await ensureInstalled('brew', $`
if command -v sudo > /dev/null && sudo -n true; then
echo | bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
logg info 'Homebrew is not installed. Password may be required.'
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || BREW_EXIT_CODE="$?"
if [ -n "$BREW_EXIT_CODE" ]; then
if command -v brew > /dev/null; then
logg warn 'Homebrew was installed but part of the installation failed. Attempting to fix..'
BREW_DIRS="share/man share/doc share/zsh/site-functions etc/bash_completion.d"
for BREW_DIR in $BREW_DIRS; do
if [ -d "$(brew --prefix)/$BREW_DIR" ]; then
sudo chown -R "$(whoami)" "$(brew --prefix)/$BREW_DIR"
fi
done
brew update --force --quiet
fi
fi
fi
`)
}
} else if (packageManager === 'cargo') {
await ensureInstalled('cargo', $`
# TODO Bash script that installs cargo
`)
} else if (packageManager === 'choco') {
await ensureInstalled('choco', $`
powershell "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
`)
} else if (packageManager === 'crew') {
await ensureInstalled('crew', $`
# TODO Bash script that installs crew here
# Source: https://github.com/chromebrew/chromebrew
curl -Ls git.io/vddgY | bash
`)
} else if (packageManager === 'dnf') {
const dnf = which.sync('dnf', { nothrow: true })
const yum = which.sync('yum', { nothrow: true })
if (dnf) {
await $`logg info '\`dnf\` is available'`
} else if (yum) {
await $`logg info '\`yum\` is available'`
} else {
await $`logg error 'Both \`dnf\` and \`yum\` are not available'`
}
} else if (packageManager === 'flatpak') {
const flatpak = which.sync('flatpak', { nothrow: true })
if (flatpak) {
await $`logg info '\`flatpak\` is available'`
} else {
const apk = which.sync('apk', { nothrow: true })
const apt = which.sync('apt', { nothrow: true })
const dnf = which.sync('dnf', { nothrow: true })
const yum = which.sync('yum', { nothrow: true })
const pacman = which.sync('pacman', { nothrow: true })
const zypper = which.sync('zypper', { nothrow: true })
if (apk) {
$`sudo apk add flatpak`
} else if(apt) {
$`
sudo apt install -y flatpak
if [ -f /usr/bin/gnome-shell ]; then
sudo apt install -y gnome-software-plugin-flatpak
fi
if [ -f /usr/bin/plasmashell ]; then
sudo apt install -y plasmashell
fi
`
} else if(dnf) {
await $`sudo dnf install -y flatpak`
} else if(yum) {
await $`sudo yum install -y flatpak`
} else if (pacman) {
await $`sudo pacman -Sy flatpak`
} else if (zypper) {
await $`sudo zypper install -y flatpak`
}
const flatpakPost = which.sync('flatpak', { nothrow: true })
if (flatpakPost) {
await $`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`
} else {
await $`logg error '\`flatpak\` failed to install!'`
}
await $`logg info '\`flatpak\` was installed. It may require a reboot to function correctly.'`
}
} else if (packageManager === 'gem') {
await ensureInstalled('gem', $`brew install ruby`)
} else if (packageManager === 'go') {
await ensureInstalled('gem', $`brew install go`)
} else if (packageManager === 'nix') {
await ensureInstalled('nix', $`
if [ -d /Applications ] && [ -d /Library ]; then
sh <(curl -L https://nixos.org/nix/install)
else
sh <(curl -L https://nixos.org/nix/install) --daemon
fi
`)
} else if (packageManager === 'npm') {
const npm = which('npm', { nothrow: true })
const node = which('node', { nothrow: true })
const volta = which('volta', { nothrow: true })
if (npm && node && volta) {
await $`logg info '\`npm\`, \`node\`, and \`volta\` are available'`
} else {
if (!volta) {
await $`brew install volta`
}
await $`
if [ -z "$VOLTA_HOME" ]; then
volta setup
fi
export PATH="$VOLTA_HOME/bin:$PATH"
volta install node
`
}
} else if (packageManager === 'pacman') {
await ensureInstalled('pacman', false)
} else if (packageManager === 'pipx') {
await ensureInstalled('pipx', $`brew install pipx && pipx ensurepath`)
} else if (packageManager === 'pkg') {
await ensureInstalled('pkg', false)
} else if (packageManager === 'port') {
await ensureInstalled('port', $`
echo -n "TODO - script that installs port on macOS here"
`)
} else if (packageManager === 'scoop') {
await ensureInstalled('scoop', $`
powershell 'Set-ExecutionPolicy RemoteSigned -Scope CurrentUser'
powershell 'irm get.scoop.sh | iex
`)
} else if (packageManager === 'snap') {
const apk = which.sync('apk', { nothrow: true })
const apt = which.sync('apt-get', { nothrow: true })
const dnf = which.sync('dnf', { nothrow: true })
const yum = which.sync('yum', { nothrow: true })
const pacman = which.sync('pacman', { nothrow: true })
const zypper = which.sync('zypper', { nothrow: true })
if (apt) {
await $`
if [ -f /etc/apt/preferences.d/nosnap.pref ]; then
sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/nosnap.pref.bak
fi
sudo apt install -y snapd
`
// TODO Following may be required on Kali -> https://snapcraft.io/docs/installing-snap-on-kali
// systemctl enable --now snapd apparmor
} else if (dnf) {
await $`
sudo dnf install -y snapd
if [ ! -d /snap ]; then
sudo ln -s /var/lib/snapd/snap /snap
fi
`
} else if (yum) {
await $`
sudo yum install -y snapd
sudo systemctl enable --now snapd.socket
if [ ! -d /snap ]; then
sudo ln -s /var/lib/snapd/snap /snap
fi
`
} else if (pacman) {
await $`
if [ -f /etc/arch-release ]; then
sudo git clone https://aur.archlinux.org/snapd.git /usr/local/src/snapd
cd /usr/local/src/snapd
sudo makepkg -si
else
sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
if [ ! -d /snap ]; then
sudo ln -s /var/lib/snapd/snap /snap
fi
fi
`
} else if (zypper) {
// TODO See https://snapcraft.io/docs/installing-snap-on-opensuse
await $`
echo "TODO - Bash script that installs snap w/ zypper"
`
}
const snap = which.sync('snap', { nothrow: true })
if (snap) {
$`sudo snap install core`
}
} else if (packageManager === 'whalebrew') {
await ensureInstalled('whalebrew', $`brew install whalebrew`)
} else if (packageManager === 'winget') {
await ensureInstalled('winget', $`
echo "TODO - Script that installs winget here"
`)
} else if (packageManager === 'yay') {
const yay = which.sync('yay', { nothrow: true })
await $`sudo pacman -S --needed base-devel git`
await $`
if [ -d /usr/local/src ]; then
git clone https://aur.archlinux.org/yay.git /usr/local/src/yay
cd /usr/local/src/yay
makepkg -si
fi
`
} else if (packageManager === 'zypper') {
await ensureInstalled('zypper', false)
}
}
// Installs a list of packages via the specified package manager
async function installPackageList(packageManager, packages) {
let pkg = packages
try {
if (packageManager === 'appimage') {
} else if (packageManager === 'ansible') {
for (const role of packages) {
await $`ansible localhost -m include_role -a name=${role}`
}
} else if (packageManager === 'apk') {
await $`sudo apk add ${packages}`
} else if (packageManager === 'apt') {
await $`sudo apt-get install -y ${packages}`
} else if (packageManager === 'basher') {
} else if (packageManager === 'binary') {
} else if (packageManager === 'brew') {
await $`brew install ${packages}`
} else if (packageManager === 'cask') {
await $`brew install --cask ${packages}`
} else if (packageManager === 'cargo') {
for (const pkg of packages) {
await $`cargo install ${pkg}`
}
} else if (packageManager === 'choco') {
await $`choco install -y ${packages}`
} else if (packageManager === 'crew') {
} else if (packageManager === 'dnf') {
const dnf = which.sync('dnf', { nothrow: true })
const yum = which.sync('yum', { nothrow: true })
if (dnf) {
await $`dnf install -y ${packages}`
} else if (yum) {
await $`yum install -y ${packages}`
}
} else if (packageManager === 'flatpak') {
for (let pkg of packages) {
await $`sudo flatpak install flathub ${pkg}`
}
} else if (packageManager === 'gem') {
for (let pkg of packages) {
await $`gem install ${pkg}`
}
} else if (packageManager === 'go') {
for (let pkg of packages) {
await $`go install ${pkg}`
}
} else if (packageManager === 'nix') {
} else if (packageManager === 'npm') {
for (let pkg of packages) {
await $`volta install ${pkg}`
}
} else if (packageManager === 'pacman') {
await $`sudo pacman -Sy --noconfirm --needed ${packages}`
} else if (packageManager === 'pipx') {
for (let pkg of packages) {
await $`pipx install ${pkg}`
}
} else if (packageManager === 'pkg') {
} else if (packageManager === 'port') {
for (let pkg of packages) {
await $`sudo port install ${pkg}`
}
} else if (packageManager === 'scoop') {
for (let pkg of packages) {
await $`scoop install ${pkg}`
}
} else if (packageManager === 'snap') {
for (let pkg of packages) {
await $`sudo snap install -y ${pkg}`
}
} else if (packageManager === 'whalebrew') {
for (let pkg of packages) {
await $`whalebrew install ${pkg}`
}
} else if (packageManager === 'winget') {
} else if (packageManager === 'yay') {
for (let pkg of packages) {
await $`yay -Sy --noconfirm --needed ${pkg}`
}
} else if (packageManager === 'zypper') {
await $`sudo zypper install -y ${packages}`
}
} catch (e) {
await $`logg error 'Possibly encountered an error while installing via \`${packageManager}\`'`
await $`logg info 'Error was encountered while installing: ${pkg}'`
await $`logg info 'Proceeding with the installation..'`
}
}
// main process
async function main() {
await $`logg info 'Fetching the latest version of the installation map'`
installData = await downloadInstallData();
await $`logg info 'Calculating the install orders'`
await generateInstallOrders();
await $`logg info 'Ensuring any package managers that will be used are installed / configured'`
const packageManagers = Object.keys(installOrders);
for (const packageManager of packageManagers) {
await ensurePackageManager(packageManager);
}
await $`logg info 'The install orders were generated:'`
console.log(installOrders)
await $`logg info 'Running package manager pre-installation steps'`
for (const packageManager of packageManagers) {
await beforeInstall(packageManager);
}
await $`logg info 'Running package-specific pre-installation steps'`
for (const script of installOrdersPre) {
await $`${script}`;
}
await $`logg info 'Installing the packages'`
for (const packageManager of packageManagers) {
const asyncOrders = [];
asyncOrders.push(
Promise.resolve(
installPackageList(packageManager, installOrders[packageManager])
)
);
await Promise.all(asyncOrders);
}
await $`logg info 'Running package-specific post-installation steps'`
for (const script of installOrdersPost) {
await $`${script}`;
}
await $`logg info 'Running package manager post-installation steps'`
for (const packageManager of packageManagers) {
await afterInstall(packageManager);
}
await $`logg success 'Done!'`
}
// Start the main process
await main();

File diff suppressed because it is too large Load diff

View file

@ -1,107 +0,0 @@
#!/usr/bin/env python3
import time
import dbus
import argparse
import glob
import random
import os
import subprocess
from pathlib import Path
HOME = str(Path.home())
SCREEN_LOCK_CONFIG = HOME+"/.config/kscreenlockerrc"
def setwallpaper(filepath, plugin='org.kde.image'):
jscript = """
var allDesktops = desktops();
print (allDesktops);
for (i=0;i<allDesktops.length;i++) {
d = allDesktops[i];
d.wallpaperPlugin = "%s";
d.currentConfigGroup = Array("Wallpaper", "%s", "General");
d.writeConfig("Image", "file://%s")
}
"""
bus = dbus.SessionBus()
plasma = dbus.Interface(bus.get_object(
'org.kde.plasmashell', '/PlasmaShell'), dbus_interface='org.kde.PlasmaShell')
plasma.evaluateScript(jscript % (plugin, plugin, filepath))
def set_lockscreen_wallpaper(filepath,plugin='org.kde.image'):
if os.path.exists(SCREEN_LOCK_CONFIG):
new_data=[]
with open(SCREEN_LOCK_CONFIG, "r") as kscreenlockerrc:
new_data = kscreenlockerrc.readlines()
is_wallpaper_section=False
for num,line in enumerate(new_data,1):
if "[Greeter][Wallpaper]["+plugin+"][General]" in line:
is_wallpaper_section = True
if "Image=" in line and is_wallpaper_section:
new_data[num-1] = "Image="+filepath+"\n"
break
with open(SCREEN_LOCK_CONFIG, "w") as kscreenlockerrc:
kscreenlockerrc.writelines(new_data)
def is_locked():
is_locked=subprocess.check_output("qdbus org.kde.screensaver /ScreenSaver org.freedesktop.ScreenSaver.GetActive",shell=True,universal_newlines=True).strip()
if is_locked == "true":
is_locked = True
else:
is_locked = False
return is_locked
def get_walls_from_folder(directory):
return glob.glob(directory+'/*')
def wallpaper_slideshow(wallapapers, plugin, timer, lock_screen):
if timer > 0:
wallpaper_count = len(wallapapers)
delta_s = timer
s = int(delta_s % 60)
m = int((delta_s / 60) % 60)
h = int((delta_s / 3600) % 3600)
if h > 0:
timer_show = f"{h}h {m}m {s}s"
elif m > 0:
timer_show = f"{m}m {s}s"
elif s > 0:
timer_show = f"{s}s"
print(
f"Looping through {wallpaper_count} wallpapers every {timer_show}")
while True:
if is_locked() != True:
random_int = random.randint(0, wallpaper_count-1)
wallpaper_now = wallapapers[random_int]
setwallpaper(wallpaper_now, plugin)
if lock_screen == True:
set_lockscreen_wallpaper(wallpaper_now, plugin)
time.sleep(timer)
else:
raise ValueError('Invalid --timer value')
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='KDE Wallpaper setter')
parser.add_argument('--file','-f', help='Wallpaper file name', default=None)
parser.add_argument(
'--plugin', '-p', help='Wallpaper plugin (default is org.kde.image)', default='org.kde.image')
parser.add_argument('--dir', '-d', type=str,
help='Absolute path of folder containging your wallpapers for slideshow', default=None)
parser.add_argument('--timer', '-t', type=int,
help='Time in seconds between wallpapers', default=900)
parser.add_argument('--lock-screen', '-l', action="store_true",
help="Set lock screen wallpaper")
args = parser.parse_args()
if args.file != None:
setwallpaper(filepath=args.file, plugin=args.plugin)
if args.lock_screen == True:
set_lockscreen_wallpaper(filepath=args.file, plugin=args.plugin)
elif args.dir != None:
wallpapers = get_walls_from_folder(args.dir)
wallpaper_slideshow(wallapapers=wallpapers,
plugin=args.plugin, timer=args.timer,lock_screen=args.lock_screen)
else:
print("Need help? use -h or --help")

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
logg

View file

@ -1,413 +0,0 @@
#!/usr/bin/env bash
# @file .config/log
# @brief Logger / prompt library that logs pretty console messages and provides several prompt methods
# @description
# This file contains several functions that log content in different formats. It also provides an
# interface for [Gum](https://github.com/charmbracelet/gum) based prompts. The available methods include:
#
# * `choose` - Prompt user with choices
# * `confirm` - Fancy Yes/No confirmation prompt
# * `error` - Logs an error message
# * `filter` - Filterable list of choices (with choices passed in as a line-return seperated file)
# * `info` - Logs a regular message
# * `input` - Prompt for a text input
# * `md` - Render a markdown file with [Glow](https://github.com/charmbracelet/glow)
# * `password` - Prompt for text that is masked by the prompt
# * `prompt` - Log a description for a prompt that follows
# * `spin` - Show a spinner while background job completes
# * `star` - Logs a message with a star icon at the beginning
# * `start` - Log a job start message
# * `success` - Logs a success message
# * `warn` - Logs a warning message
# * `write` - Multi-line input prompt
#
# If the `docker` environment variable is not set, the script / library will ensure both Gum and Glow are installed.
# @description Installs glow (a markdown renderer) from GitHub releases
# @example installGlow
installGlow() {
# TODO: Add support for other architecture types
if [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; then
GLOW_DOWNLOAD_URL="https://github.com/charmbracelet/glow/releases/download/v1.4.1/glow_1.4.1_Darwin_x86_64.tar.gz"
elif [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
GLOW_DOWNLOAD_URL="https://github.com/charmbracelet/glow/releases/download/v1.4.1/glow_1.4.1_linux_x86_64.tar.gz"
fi
if type curl &> /dev/null; then
if { [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; } || [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
TMP="$(mktemp)"
TMP_DIR="$(dirname "$TMP")"
curl -sSL "$GLOW_DOWNLOAD_URL" > "$TMP"
tar -xzf "$TMP" -C "$TMP_DIR"
if [ -n "$HOME" ]; then
if mkdir -p "$HOME/.local/bin" && mv "$TMP_DIR/glow" "$HOME/.local/bin/glow"; then
GLOW_PATH="$HOME/.local/bin/glow"
else
GLOW_PATH="$(dirname "${BASH_SOURCE[0]}")/glow"
mv "$TMP_DIR/gum" "$GLOW_PATH"
fi
chmod +x "$GLOW_PATH"
else
echo "WARNING: The HOME environment variable is not set! (Glow)"
fi
else
echo "WARNING: Unable to detect system type. (Glow)"
fi
fi
}
# @description Installs gum (a logging CLI) from GitHub releases
# @example installGum
installGum() {
# TODO: Add support for other architecture types
if [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; then
GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.4.0/gum_0.4.0_Darwin_x86_64.tar.gz"
elif [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.4.0/gum_0.4.0_linux_x86_64.tar.gz"
fi
if type curl &> /dev/null; then
if { [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; } || [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
TMP="$(mktemp)"
TMP_DIR="$(dirname "$TMP")"
curl -sSL "$GUM_DOWNLOAD_URL" > "$TMP"
tar -xzf "$TMP" -C "$TMP_DIR"
if [ -n "$HOME" ]; then
if mkdir -p "$HOME/.local/bin" && mv "$TMP_DIR/gum" "$HOME/.local/bin/gum"; then
GUM_PATH="$HOME/.local/bin/gum"
else
GUM_PATH="$(dirname "${BASH_SOURCE[0]}")/gum"
mv "$TMP_DIR/gum" "$GLOW_PATH"
fi
chmod +x "$GUM_PATH"
else
echo "WARNING: The HOME environment variable is not set! (Gum)"
fi
else
echo "WARNING: Unable to detect system type. (Gum)"
fi
fi
}
# @description Configure the logger to use echo or gum
if [ "${container:=}" != 'docker' ]; then
# Acquire gum's path or attempt to install it
if type gum &> /dev/null; then
GUM_PATH="$(which gum)"
elif [ -f "$HOME/.local/bin/gum" ]; then
GUM_PATH="$HOME/.local/bin/gum"
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/gum" ]; then
GUM_PATH="$(dirname "${BASH_SOURCE[0]}")/gum"
elif type brew &> /dev/null; then
brew install gum
GUM_PATH="$(which gum)"
else
installGum
fi
# If gum's path was set, then turn on enhanced logging
if [ -n "$GUM_PATH" ]; then
chmod +x "$GUM_PATH"
ENHANCED_LOGGING=true
fi
fi
# @description Disable logging for Semantic Release because it tries to parse it as JSON
if [ -n "$SEMANTIC_RELEASE" ]; then
NO_LOGGING=true
fi
# @description Logs using Node.js
# @example logger info "An informative log"
logger() {
if [ "$1" == 'error' ]; then
"$GUM_PATH" style --border="thick" "$("$GUM_PATH" style --foreground="#ff0000" "✖") $("$GUM_PATH" style --bold --background="#ff0000" --foreground="#ffffff" " ERROR ") $("$GUM_PATH" style --bold "$(format "$2")")"
elif [ "$1" == 'info' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00ffff" "○") $("$GUM_PATH" style --faint "$(formatFaint "$2")")"
elif [ "$1" == 'md' ]; then
# @description Ensure glow is installed
if [ "${container:=}" != 'docker' ]; then
if type glow &> /dev/null; then
GLOW_PATH="$(which glow)"
elif [ -f "$HOME/.local/bin/glow" ]; then
GLOW_PATH="$HOME/.local/bin/glow"
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/glow" ]; then
GLOW_PATH="$(dirname "${BASH_SOURCE[0]}")/glow"
elif type brew &> /dev/null; then
brew install glow
GLOW_PATH="$(which glow)"
else
installGlow
fi
if [ -n "$GLOW_PATH" ]; then
chmod +x "$GLOW_PATH"
ENHANCED_LOGGING=true
fi
fi
"$GLOW_PATH" "$2"
elif [ "$1" == 'prompt' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00008b" "▶") $("$GUM_PATH" style --bold "$(format "$2")")"
elif [ "$1" == 'star' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#d1d100" "◆") $("$GUM_PATH" style --bold "$(format "$2")")"
elif [ "$1" == 'start' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00ff00" "▶") $("$GUM_PATH" style --bold "$(format "$2")")"
elif [ "$1" == 'success' ]; then
"$GUM_PATH" style "$("$GUM_PATH" style --foreground="#00ff00" "✔") $("$GUM_PATH" style --bold "$(format "$2")")"
elif [ "$1" == 'warn' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#d1d100" "◆") $("$GUM_PATH" style --bold --background="#ffff00" --foreground="#000000" " WARNING ") $("$GUM_PATH" style --bold "$(format "$2")")"
else
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00ff00" "▶") $("$GUM_PATH" style --bold "$(format "$2")")"
fi
}
format() {
# shellcheck disable=SC2001,SC2016
ANSI_STR_FORMATTED="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`.*/\1\\u001b[47;30m \2 \\e[49;m/')"
ANSI_STR="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`\(.*\)$/\3/')"
if [ "$ANSI_STR_FORMATTED" != "$ANSI_STR" ]; then
if [[ $ANSI_STR == *'`'*'`'* ]]; then
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$(format "$("$GUM_PATH" style --bold "$ANSI_STR")")"
else
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$("$GUM_PATH" style --bold "$ANSI_STR")"
fi
fi
echo -e "$ANSI_STR_FORMATTED"
}
formatFaint() {
# shellcheck disable=SC2001,SC2016
ANSI_STR_FORMATTED="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`.*/\1\\u001b[47;30m \2 \\e[49;m/')"
ANSI_STR="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`\(.*\)$/\3/')"
if [ "$ANSI_STR_FORMATTED" != "$ANSI_STR" ]; then
if [[ $ANSI_STR == *'`'*'`'* ]]; then
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$(formatFaint "$("$GUM_PATH" style --faint "$ANSI_STR")")"
else
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$("$GUM_PATH" style --faint "$ANSI_STR")"
fi
fi
echo -e "$ANSI_STR_FORMATTED"
}
# @description Display prompt that allows you to choose between options
# @example RESPONSE="$(.config/log choose "file.png" "another-file.jpg")"
choose() {
if type gum &> /dev/null; then
CHOOSE_ARGS="gum choose"
for CURRENT_VAR in "$@"; do
CHOOSE_ARGS="$CHOOSE_ARGS \"$CURRENT_VAR\""
done
eval $CHOOSE_ARGS
else
echo "ERROR: gum is not installed!"
fi
}
# @description Display a confirmation prompt that returns an exit code if "No" is selected
# @example RESPONSE="$(.config/log confirm "Are you sure?" "Yeah" "Naa")"
confirm() {
if type gum &> /dev/null; then
GUM_OPTS=""
if [ -n "$2" ]; then
# shellcheck disable=SC089
GUM_OPTS="$GUM_OPTS --affirmative=""'$2'"
fi
if [ -n "$3" ]; then
GUM_OPTS="$GUM_OPTS --negative=""'$3'"
fi
if [ -n "$1" ]; then
if [ -n "$GUM_OPTS" ]; then
gum confirm "$1" "$GUM_OPTS"
else
gum confirm "$1"
fi
else
gum confirm
fi
else
echo "ERROR: gum is not installed!"
fi
}
# @description Logs an error message
# @example .config/log error "Something happened!"
error() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger error "$1"
else
echo -e "\e[1;41m ERROR \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Display a filterable prompt that is populated with options from a text file
# @example echo Strawberry >> flavors.text && echo Banana >> flavors.text && RESPONSE="$(.config/log filter flavors.txt)"
filter() {
if type gum &> /dev/null; then
TMP="$(mktemp)"
gum filter < "$1"
else
echo "ERROR: gum is not installed!"
fi
}
# @description Logs an info message
# @example .config/log info "Here is some information"
info() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger info "$1"
else
echo -e "\e[1;46m INFO \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Displays an input with masked characters
# @example INPUT="$(.config/log input 'Enter the value..')"
input() {
if type gum &> /dev/null; then
if [ -n "$1" ]; then
gum input --placeholder="$1"
else
gum input
fi
else
echo "ERROR: gum is not installed!"
fi
}
# @description Logs a message written in markdown
# @example .config/log md "[styled_link](https://google.com)"
# @example .config/log md mymarkdown/file.md
md() {
if [ ! -f "$1" ]; then
echo "ERROR: A markdown file must be passed in as the parameter" && exit 1
fi
if [ -n "$ENHANCED_LOGGING" ]; then
logger md "$1"
fi
}
# @description Displays an input with masked characters
# @example PASSWORD="$(.config/log password 'Enter the Ansible vault password')"
password() {
if type gum &> /dev/null; then
if [ -n "$1" ]; then
gum input --password --placeholder="$1"
else
gum input --password
fi
else
echo "ERROR: gum is not installed!"
fi
}
# @description Logs a message that describes a prompt
# @example .config/log prompt "Enter text into the following prompt"
prompt() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger prompt "$1"
else
echo -e "\e[1;104m PROMPT \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Display a spinner that stays until a command is completed
# @example .config/log spin "brew install yq" "Installing yq..")"
spin() {
if type gum &> /dev/null; then
if [ -n "$1" ] && [ -n "$2" ]; then
gum spin --title="$2" "$1"
elif [ -n "$1" ]; then
gum spin "$1"
else
gum input
fi
else
echo "ERROR: gum is not installed!"
fi
}
# @description Logs a message that starts with a star emoji
# @example .config/log star "Congratulations"
star() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger star "$1"
else
echo -e "\e[1;104m LINK \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Logs a message at the beginning of a task
# @example .config/log start "Starting the process.."
start() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger start "$1"
else
echo -e "\e[1;46m START \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Logs a success message
# @example .config/log success "Yay!"
success() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger success "$1"
else
echo -e "\e[1;42m SUCCESS \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Logs a warning message
# @example .config/log warn "Just so you know.."
warn() {
if [ -z "$NO_LOGGING" ]; then
if [ -n "$ENHANCED_LOGGING" ]; then
logger warn "$1"
else
echo -e "\e[1;43m WARNING \e[0m $(format "$1")\e[0;39m"
fi
fi
}
# @description Displays a multi-line prompt for text input
# @example .config/log write "Write something..")"
write() {
if type gum &> /dev/null; then
if [ -n "$1" ]; then
gum write --placeholder="$1"
else
gum write
fi
else
echo "ERROR: gum is not installed!"
fi
}
if [ -n "$1" ] && [ -n "$2" ]; then
# Public functions that require at least two parameters to be used
if [ "$1" == 'warn' ] || [ "$1" == 'success' ] || [ "$1" == 'star' ] || [ "$1" == 'info' ] \
|| [ "$1" == 'error' ] || [ "$1" == 'md' ] || [ "$1" == 'write' ] || [ "$1" == 'start' ] \
|| [ "$1" == 'spin' ] || [ "$1" == 'prompt' ] || [ "$1" == 'filter' ] || [ "$1" == 'input' ] \
|| [ "$1" == 'confirm' ] || [ "$1" == 'password' ]; then
"$1" "$2"
elif [[ "$1" == 'choose' ]]; then
"$@"
fi
elif [ -n "$1" ]; then
# Public functions that can run with only one argument passed to .config/log (i.e. `.config/log password`)
if [ "$1" == 'write' ] || [ "$1" == 'password' ] || [ "$1" == 'confirm' ] || [ "$1" == 'input' ]; then
"$1"
else
info "$1"
fi
fi

View file

@ -1,264 +0,0 @@
#!/usr/bin/env bash
# @file /usr/bin/opener
# @brief Opens a file type with the appropriate program based on the mime-type
# @description
# This script heavily borrows from [opener](https://github.com/Docbroke/shell_tools/blob/main/opener).
# It makes some minor tweaks including linting fixes. It is configured
# to properly work with [Gas Station](https://github.com/megabyte-labs/Gas-Station).
# It is used to handle cross-VM links when Gas Station is used to provision [Qubes](https://www.qubes-os.org/).
# When called with -d, the default program is used.
# Default to system open executable on macOS
if [ -d /Applications ] && [ -d /Library ]; then
\open $@
fi
# shellcheck disable=SC2124
getopts d: name
case $name in
d) file=$OPTARG
default=true ;;
*) file="$@" ;;
esac
[[ -z $file || ! -e $file ]] &&
exit 1
## mimetype from perl-file-mimeinfo gives better results compared to file
type mimetype &> /dev/null && mime_type="$(mimetype -b "$file")" || \
mime_type="$(file -b --mime-type "$file")"
## create some lists
XBROWSERS=("firefox" "chromium" "vimb" "qutebrowser" "weaver" "vivaldi")
TBROWSERS=("w3m" "links" "lynx" "elinks")
XEDITORS=("gvim" "geany" "leafpad" "mousepad")
TEDITORS=("cat" "less" "vim" "vis" "nano" "micro")
XFMS=("pcmanfm" "nautilus" "rof" "thunar")
TFMS=("ncdu" "du -h" "vifm" "ranger" "mc" "fff" "nnn" "clifm")
PDFVIEWERS=("llpp" "xournalpp" "mupdf" "qpdfview")
DOCVIEWERS=("llpp" "foliate" "mupdf" "qpdfview")
CHMVIEWERS=("kchmviewer" "xchm" "chmopen")
BOOKVIEWERS=("$TERMINAL --geometry=1920x1050 -p Large -x epy.py" "foliate" "llpp" "mupdf")
ARCHIVERS=("als" "lsar" "unar" "aunpack -D")
VIEWERS=("feh" "sxiv" "gifview -a" "display" "mtpaint" "gimp" "viewnoir" "fbi" "lp")
VPLAYERS=("mpv --player-operation-mode=pseudo-gui" "vlc" "cvlc" "ffplay" "ffprobe" "mediainfo")
APLAYERS=("mpv --player-operation-mode=pseudo-gui" "vlc" "cvlc" "ffplay" "ffprobe" "mediainfo" "soxi" "mpg123")
## some defaults
if [[ -n "$DISPLAY" ]]; then
PLAYER="mpv --player-operation-mode=pseudo-gui"
else
PLAYER="mpv --vo=drm"
fi
if [[ -n "$DISPLAY" ]]; then
VIEWER="sxiv -fbq $file $PWD"
else
VIEWER=fbi
fi
TERMINAL=terminator
EDITOR=vis
BROWSER=weaver
PDFVIEWER=llpp
DOCVIEWER=llpp
CHMVIEWER=kchmviewer
BOOKVIEWER="$TERMINAL --geometry=1920x1050 -p Large -x epy.py"
case "$mime_type" in
text/html|text/xml|application/x-mimearchive|message/rfc822)
if [[ $default == true ]]; then
$BROWSER "$file" && exit
elif [[ $TERM = linux && -n $DISPLAY ]]; then
select ops in exit "${XBROWSERS[@]}" "${TBROWSERS[@]}" $EDITOR; do
[[ $ops = exit ]] && exit
[[ $ops = w3m || $ops = links || $ops = elinks || $EDITOR ]] && $TERMINAL -x "$ops" "$file" &
"$ops" "$file" &> /dev/null &
done
elif [[ $TERM != linux && -n $DISPLAY ]]; then
select ops in exit "${XBROWSERS[@]}" "${TBROWSERS[@]}" $EDITOR; do
[[ $ops = exit ]] && exit
"$ops" "$file"
done
else
select ops in exit "${TBROWSERS[@]}" $EDITOR; do
[[ $ops = exit ]] && exit
"$ops" "$file"
done
fi
;;
text/*|*/xml|application/x-httpd-php3|application/x-httpd-php4|application/x-httpd-php5|application/x-shellscript)
[[ $default == true ]] && \
if [[ $TERM = linux && -n $DISPLAY ]]; then
$TERMINAL -x "${VISUAL:-${EDITOR:-vis}}" "$file"
else
"${VISUAL:-${EDITOR:-vis}}" "$file"
fi && exit
select ops in exit "${XEDITORS[@]}" "${TEDITORS[@]}"; do
[[ $ops = exit ]] && exit
"$ops" "$file"
done
;;
image/*)
[[ $default == true ]] && $VIEWER "$file" && exit
select ops in exit "${VIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &> /dev/null &
done
;;
video/*|application/x-matroska)
[[ $default == true ]] && $PLAYER "$file" && exit
if [[ -n $DISPLAY ]]; then
select ops in exit "${VPLAYERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &
done
else
mpv --vo=drm -- "$file"
fi
;;
audio/*| application/ogg|application/x-ogg|application/mxf|application/sdp|application/smil|application/x-smil|application/streamingmedia|application/x-streamingmedia|application/vnd.rn-realmedia|application/vnd.rn-realmedia-vbr)
[[ $default == true ]] && $PLAYER "$file" && exit
select ops in exit "${APLAYERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &
done
;;
application/pdf|application/x-pdf)
[[ $default == true ]] && $PDFVIEWER "$file" && exit
if [[ -n $DISPLAY ]]; then
select ops in exit "${PDFVIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &> /dev/null &
done
else
fbgs "$file"
fi
;;
application/x-cbz|applilcation/oxps|application/vnd.ms-xpsdocument)
[[ $default == true ]] && $DOCVIEWER "$file" && exit
select ops in exit "${DOCVIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &> /dev/null &
done
;;
application/octet-stream)
case "$file" in
*.chm|*.CHM)
[[ $default == true ]] && $CHMVIEWER "$file" && exit
select ops in exit "${CHMVIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &
done
;;
*.gpg)
gpg -d "$file"
;;
*.mobi)
[[ $default == true ]] && $BOOKVIEWER "$file" && exit
select ops in exit "${BOOKVIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &> /dev/null &
done
;;
*)
echo "unknow filetype, probably binary"
;;
esac
;;
application/vnd.ms-htmlhelp)
[[ $default == true ]] && $CHMVIEWER "$file" && exit
select ops in exit "${CHMVIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &
done
;;
application/vnd.comicbook*)
select ops in exit llpp mupdf foliate; do
[[ $ops = exit ]] && break
$ops "$file" &
done
;;
application/epub+zip|application/x-mobipocket-ebook)
[[ $default == true ]] && $BOOKVIEWER "$file" && exit
select ops in exit "${BOOKVIEWERS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file" &> /dev/null &
done
;;
application/pgp-encrypted)
gpg -d "$file"
;;
application/*zip*|application/x-?ar|application/x-?z*|application/x-compressed*|application/vnd.rar|application/x-*-image|application/x-msi)
case "$file" in
*.xoj|*.xopp) xournalpp "$file" &> /dev/null ;;
*.cb?)
select ops in exit llpp mupdf foliate als unar; do
[[ $ops = exit ]] && break
[[ $ops = als || $ops = unar ]] && "$ops" "$file"
"$ops" "$file" &> /dev/null &
done
;;
*)
if [[ $default == true ]]; then
mkdir "$file.tmp"
archivemount "$file" "$file.tmp"
echo -e "$file mounted at $file.tmp directory\n remove with fusermount -u $file.tmp"
else
select ops in exit "${ARCHIVERS[@]}" ; do
[[ $ops = exit ]] && break
# [[ $ops = aunpack ]] && aunpack -D "$file"
$ops "$file"
done
fi
;;
esac
;;
*opendocument*|*openxmlformats*|*msword|*ms-excel|*ms-powerpoint|*abiword|*write*)
[[ -n $DISPLAY ]] && libreoffice "$file" --norestore &> /dev/null
[[ -z $DISPLAY ]] && \
case "$file" in
*.odt|*.odp|*.ods|*.sxw) odt2txt "$file" ;;
*.doc) antiword "$file" ;;
*.docx) docx2txt "$file" - | $PAGER ;;
*) echo "unable to open" ;;
esac
;;
inode/directory)
select ops in exit "${TFMS[@]}" "${XFMS[@]}"; do
[[ $ops = exit ]] && break
$ops "$file"
done
;;
inode/x-empty)
echo "empty file"
rm -i "$file"
;;
inode/mount-point)
## unmount by default
# select ops in exit unmount; do
# [[ $ops = exit ]] && break
# [[ $ops = unmount ]] && fusermount -zu "$file" && rmdir "$file"
fusermount -zu "$file" && rmdir "$file" && echo "$file unmounted and removed"
# done
;;
*)
case "$file" in
*) echo "no filetype association for $file" ;;
esac
;;
esac

View file

@ -1,410 +0,0 @@
#!/usr/bin/env bash
# @description Installs glow (a markdown renderer) from GitHub releases
# @example installGlow
installGlow() {
# TODO: Add support for other architecture types
if [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; then
GLOW_DOWNLOAD_URL="https://github.com/charmbracelet/glow/releases/download/v1.4.1/glow_1.4.1_Darwin_x86_64.tar.gz"
elif [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
GLOW_DOWNLOAD_URL="https://github.com/charmbracelet/glow/releases/download/v1.4.1/glow_1.4.1_linux_x86_64.tar.gz"
fi
if type curl &> /dev/null; then
if { [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; } || [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
TMP="$(mktemp)"
TMP_DIR="$(dirname "$TMP")"
curl -sSL "$GLOW_DOWNLOAD_URL" > "$TMP"
tar -xzf "$TMP" -C "$TMP_DIR"
if [ -n "$HOME" ]; then
if mkdir -p "$HOME/.local/bin" && mv "$TMP_DIR/glow" "$HOME/.local/bin/glow"; then
GLOW_PATH="$HOME/.local/bin/glow"
else
GLOW_PATH="$(dirname "${BASH_SOURCE[0]}")/glow"
mv "$TMP_DIR/gum" "$GLOW_PATH"
fi
chmod +x "$GLOW_PATH"
else
echo "WARNING: The HOME environment variable is not set! (Glow)"
fi
else
echo "WARNING: Unable to detect system type. (Glow)"
fi
fi
}
# @description Installs gum (a logging CLI) from GitHub releases
# @example installGum
installGum() {
# TODO: Add support for other architecture types
if [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; then
GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.4.0/gum_0.4.0_Darwin_x86_64.tar.gz"
elif [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
GUM_DOWNLOAD_URL="https://github.com/charmbracelet/gum/releases/download/v0.4.0/gum_0.4.0_linux_x86_64.tar.gz"
fi
if type curl &> /dev/null; then
if { [ -d '/Applications' ] && [ -d '/Library' ] && [ -d '/Users' ]; } || [ -f '/etc/ubuntu-release' ] || [ -f '/etc/debian_version' ] || [ -f '/etc/redhat-release' ] || [ -f '/etc/SuSE-release' ] || [ -f '/etc/arch-release' ] || [ -f '/etc/alpine-release' ]; then
TMP="$(mktemp)"
TMP_DIR="$(dirname "$TMP")"
curl -sSL "$GUM_DOWNLOAD_URL" > "$TMP"
tar -xzf "$TMP" -C "$TMP_DIR"
if [ -n "$HOME" ]; then
if mkdir -p "$HOME/.local/bin" && mv "$TMP_DIR/gum" "$HOME/.local/bin/gum"; then
GUM_PATH="$HOME/.local/bin/gum"
else
GUM_PATH="$(dirname "${BASH_SOURCE[0]}")/gum"
mv "$TMP_DIR/gum" "$GLOW_PATH"
fi
chmod +x "$GUM_PATH"
else
echo "WARNING: The HOME environment variable is not set! (Gum)"
fi
else
echo "WARNING: Unable to detect system type. (Gum)"
fi
fi
}
# @description Configure the logger to use echo or gum
if [ "${container:=}" != 'docker' ]; then
# Acquire gum's path or attempt to install it
if type gum &> /dev/null; then
GUM_PATH="$(which gum)"
elif [ -f "$HOME/.local/bin/gum" ]; then
GUM_PATH="$HOME/.local/bin/gum"
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/gum" ]; then
GUM_PATH="$(dirname "${BASH_SOURCE[0]}")/gum"
elif type brew &> /dev/null; then
brew install gum
GUM_PATH="$(which gum)"
else
if ! command -v qubesctl > /dev/null; then
# Qubes dom0
installGum
fi
fi
# If gum's path was set, then turn on enhanced logging
if [ -n "$GUM_PATH" ]; then
chmod +x "$GUM_PATH"
ENHANCED_LOGGING=true
fi
fi
format() {
# shellcheck disable=SC2001,SC2016
ANSI_STR_FORMATTED="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`.*/\1\\u001b[47;30m \2 \\e[49;m/')"
ANSI_STR="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`\(.*\)$/\3/')"
if [ "$ANSI_STR_FORMATTED" != "$ANSI_STR" ]; then
if [[ $ANSI_STR == *'`'*'`'* ]]; then
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$(format "$("$GUM_PATH" style --bold "$ANSI_STR")")"
else
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$("$GUM_PATH" style --bold "$ANSI_STR")"
fi
fi
echo -e "$ANSI_STR_FORMATTED"
}
formatFaint() {
# shellcheck disable=SC2001,SC2016
ANSI_STR_FORMATTED="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`.*/\1\\u001b[47;30m \2 \\e[49;m/')"
ANSI_STR="$(echo "$1" | sed 's/^\([^`]*\)`\([^`]*\)`\(.*\)$/\3/')"
if [ "$ANSI_STR_FORMATTED" != "$ANSI_STR" ]; then
if [[ $ANSI_STR == *'`'*'`'* ]]; then
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$(formatFaint "$("$GUM_PATH" style --faint "$ANSI_STR")")"
else
ANSI_STR_FORMATTED="$ANSI_STR_FORMATTED$("$GUM_PATH" style --faint "$ANSI_STR")"
fi
fi
echo -e "$ANSI_STR_FORMATTED"
}
# @description Logs using Node.js
# @example logger info "An informative log"
logg() {
TYPE="$1"
MSG="$2"
if [ "$TYPE" == 'error' ]; then
"$GUM_PATH" style --border="thick" "$("$GUM_PATH" style --foreground="#ff0000" "✖") $("$GUM_PATH" style --bold --background="#ff0000" --foreground="#ffffff" " ERROR ") $("$GUM_PATH" style --bold "$(format "$MSG")")"
elif [ "$TYPE" == 'info' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00ffff" "○") $("$GUM_PATH" style --faint "$(formatFaint "$MSG")")"
elif [ "$TYPE" == 'md' ]; then
# @description Ensure glow is installed
if [ "${container:=}" != 'docker' ]; then
if type glow &> /dev/null; then
GLOW_PATH="$(which glow)"
elif [ -f "$HOME/.local/bin/glow" ]; then
GLOW_PATH="$HOME/.local/bin/glow"
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/glow" ]; then
GLOW_PATH="$(dirname "${BASH_SOURCE[0]}")/glow"
elif type brew &> /dev/null; then
brew install glow
GLOW_PATH="$(which glow)"
else
if ! command -v qubesctl > /dev/null; then
# Qubes dom0
installGlow
fi
fi
if [ -n "$GLOW_PATH" ]; then
chmod +x "$GLOW_PATH"
ENHANCED_LOGGING=true
fi
fi
"$GLOW_PATH" "$MSG"
elif [ "$TYPE" == 'prompt' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00008b" "▶") $("$GUM_PATH" style --bold "$(format "$MSG")")"
elif [ "$TYPE" == 'star' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#d1d100" "◆") $("$GUM_PATH" style --bold "$(format "$MSG")")"
elif [ "$TYPE" == 'start' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00ff00" "▶") $("$GUM_PATH" style --bold "$(format "$MSG")")"
elif [ "$TYPE" == 'success' ]; then
"$GUM_PATH" style "$("$GUM_PATH" style --foreground="#00ff00" "✔") $("$GUM_PATH" style --bold "$(format "$MSG")")"
elif [ "$TYPE" == 'warn' ]; then
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#d1d100" "◆") $("$GUM_PATH" style --bold --background="#ffff00" --foreground="#000000" " WARNING ") $("$GUM_PATH" style --bold "$(format "$MSG")")"
else
"$GUM_PATH" style " $("$GUM_PATH" style --foreground="#00ff00" "▶") $("$GUM_PATH" style --bold "$(format "$TYPE")")"
fi
}
### Qubes dom0
if command -v qubesctl > /dev/null; then
# The VM name that will manage the Ansible provisioning (for Qubes dom0)
ANSIBLE_PROVISION_VM="provision"
# Ensure sys-whonix is configured (for Qubes dom0)
CONFIG_WIZARD_COUNT=0
ENABLE_OBFSC='false'
function configureWizard() {
if xwininfo -root -tree | grep "Anon Connection Wizard"; then
WINDOW_ID="$(xwininfo -root -tree | grep "Anon Connection Wizard" | sed 's/^ *\([^ ]*\) .*/\1/')"
xdotool windowactivate "$WINDOW_ID" && sleep 1 && xdotool key 'Enter' && sleep 1 && xdotool key 'Tab Tab Enter' && sleep 24 && xdotool windowactivate "$WINDOW_ID" && sleep 1 && xdotool key 'Enter' && sleep 300
qvm-shutdown --wait sys-whonix
sleep 3
qvm-start sys-whonix
if xwininfo -root -tree | grep "systemcheck | Whonix" > /dev/null; then
WINDOW_ID_SYSCHECK="$(xwininfo -root -tree | grep "systemcheck | Whonix" | sed 's/^ *\([^ ]*\) .*/\1/')"
if xdotool windowactivate "$WINDOW_ID_SYS_CHECK"; then
sleep 1
xdotool key 'Enter'
fi
fi
else
sleep 3
CONFIG_WIZARD_COUNT=$((CONFIG_WIZARD_COUNT + 1))
if [[ "$CONFIG_WIZARD_COUNT" == '4' ]]; then
echo "The sys-whonix anon-connection-wizard utility did not open."
else
echo "Checking for anon-connection-wizard again.."
configureWizard
fi
fi
}
### Ensure dom0 is updated
if [ ! -f /root/dom0-updated ]; then
sudo qubesctl --show-output state.sls update.qubes-dom0
sudo qubes-dom0-update --clean -y
touch /root/dom0-updated
fi
### Ensure sys-whonix is running
if ! qvm-check --running sys-whonix; then
qvm-start sys-whonix --skip-if-running
configureWizard > /dev/null
fi
### Ensure TemplateVMs are updated
if [ ! -f /root/templatevms-updated ]; then
# timeout of 10 minutes is added here because the whonix-gw VM does not like to get updated
# with this method. Anyone know how to fix this?
sudo timeout 600 qubesctl --show-output --skip-dom0 --templates state.sls update.qubes-vm &> /dev/null || EXIT_CODE=$?
while read RESTART_VM; do
qvm-shutdown --wait "$RESTART_VM"
done< <(qvm-ls --all --no-spinner --fields=name,state | grep Running | grep -v sys-net | grep -v sys-firewall | grep -v sys-whonix | grep -v dom0 | awk '{print $1}')
sudo touch /root/templatevms-updated
fi
### Ensure provisioning VM can run commands on any VM
echo "/bin/bash" | sudo tee /etc/qubes-rpc/qubes.VMShell
sudo chmod 755 /etc/qubes-rpc/qubes.VMShell
echo "$ANSIBLE_PROVISION_VM"' dom0 allow' | sudo tee /etc/qubes-rpc/policy/qubes.VMShell
echo "$ANSIBLE_PROVISION_VM"' $anyvm allow' | sudo tee -a /etc/qubes-rpc/policy/qubes.VMShell
sudo chown "$(whoami):$(whoami)" /etc/qubes-rpc/policy/qubes.VMShell
sudo chmod 644 /etc/qubes-rpc/policy/qubes.VMShell
### Create provisioning VM and initialize the provisioning process from there
qvm-create --label red --template debian-11 "$ANSIBLE_PROVISION_VM" &> /dev/null || EXIT_CODE=$?
qvm-volume extend "$ANSIBLE_PROVISION_VM:private" "40G"
if [ -f ~/.vaultpass ]; then
qvm-run "$ANSIBLE_PROVISION_VM" 'rm -f ~/QubesIncoming/dom0/.vaultpass'
qvm-copy-to-vm "$ANSIBLE_PROVISION_VM" ~/.vaultpass
qvm-run "$ANSIBLE_PROVISION_VM" 'cp ~/QubesIncoming/dom0/.vaultpass ~/.vaultpass'
fi
qvm-run --pass-io "$ANSIBLE_PROVISION_VM" 'curl -sSL https://install.doctor/start > ~/start.sh && bash ~/start.sh'
exit 0
fi
### System package manager update / Homebrew dependencies
if ! command -v curl > /dev/null || ! command -v git > /dev/null; then
logg info 'Ensuring `curl` and `git` are installed via the system package manager'
if command -v apt-get > /dev/null; then
# Debian / Ubuntu
sudo apt-get update
sudo apt-get install -y curl git
elif command -v dnf > /dev/null; then
# Fedora
sudo dnf install -y curl git
elif command -v yum > /dev/null; then
# CentOS
sudo yum install -y curl git
elif command -v pacman > /dev/null; then
# Archlinux
sudo pacman update
sudo pacman -Sy curl git
elif command -v zypper > /dev/null; then
# OpenSUSE
sudo zypper install -y curl git nodejs
elif command -v apk > /dev/null; then
# Alpine
apk add curl git
elif [ -d /Applications ] && [ -d /Library ]; then
# macOS
sudo xcode-select -p >/dev/null 2>&1 || xcode-select --install
elif command -v nix-env > /dev/null; then
# NixOS
echo "TODO - Add support for NixOS"
elif [[ "$OSTYPE" == 'freebsd'* ]]; then
# FreeBSD
echo "TODO - Add support for FreeBSD"
elif command -v pkg > /dev/null; then
# Termux
echo "TODO - Add support for Termux"
elif command -v xbps-install > /dev/null; then
# Void
echo "TODO - Add support for Void"
elif [[ "$OSTYPE" == 'cygwin' ]] || [[ "$OSTYPE" == 'msys' ]] || [[ "$OSTYPE" == 'win32' ]]; then
# Windows
choco install -y curl git node
fi
fi
### Install Homebrew
ensurePackageManagerHomebrew() {
if ! command -v brew > /dev/null; then
logg info 'Installing Homebrew'
if command -v sudo > /dev/null && sudo -n true; then
echo | bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
logg info 'Looks like the user does not have passwordless sudo privileges. A sudo password may be required.'
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" || BREW_EXIT_CODE="$?"
if [ -n "$BREW_EXIT_CODE" ]; then
if command -v brew > /dev/null; then
logg warn 'Homebrew was installed but part of the installation failed. Attempting to fix..'
BREW_DIRS="share/man share/doc share/zsh/site-functions etc/bash_completion.d"
for BREW_DIR in $BREW_DIRS; do
if [ -d "$(brew --prefix)/$BREW_DIR" ]; then
sudo chown -R "$(whoami)" "$(brew --prefix)/$BREW_DIR"
fi
done
brew update --force --quiet
fi
fi
fi
fi
}
ensurePackageManagerHomebrew
### Install installer dependencies via Homebrew
installBrewPackage() {
if ! command -v "$1" > /dev/null; then
logg 'Installing `'"$1"'`'
brew install "$1"
fi
}
if command -v brew > /dev/null; then
installBrewPackage chezmoi
installBrewPackage glow
installBrewPackage gum
installBrewPackage node
installBrewPackage zx
fi
### Ensure source files are present
logg 'Ensuring /usr/local/src/hiawatha is owned by the user'
if [ -d /usr/local/src/hiawatha ] && [ ! -w /usr/local/src/hiawatha ]; then
sudo chown -Rf "$USER":"$(id -g -n)" /usr/local/src/hiawatha
fi
if [ -d /usr/local/src/hiawatha/.git ]; then
logg info 'Pulling the latest changes from https://gitlab.com/megabyte-labs/dotfiles.git to /usr/local/src/hiawatha'
cd /usr/local/src/hiawatha
git config pull.rebase false
git reset --hard HEAD
git clean -fxd
git pull origin master
else
logg info 'Cloning https://gitlab.com/megabyte-labs/dotfiles.git to /usr/local/src/hiawatha'
rm -rf /usr/local/src/hiawatha
sudo git clone https://gitlab.com/megabyte-labs/dotfiles.git /usr/local/src/hiawatha
chown -Rf "$USER":"$(id -g -n)" /usr/local/src/hiawatha
fi
### Copy folders
logg info 'Copying folders from /usr/local/src/hiawatha to the HOME directory'
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type d | while read FOLDER; do
BASENAME="$(basename "$FOLDER")"
# Prevent initial-scaffolding of OS-specific files since Chezmoi will handle them
if [ "$BASENAME" != 'AppData' ] && [ "$BASENAME" != 'Library' ] && [ "$BASENAME" != '.git' ]; then
if [ ! -d "$HOME/$BASENAME" ]; then
mkdir -p "$HOME/$BASENAME"
fi
cp -rf "$FOLDER/"* "$HOME/$BASENAME"
fi
done
### Copy files
logg info 'Copying files from /usr/local/src/hiawatha to the HOME directory'
find /usr/local/src/hiawatha -maxdepth 1 -mindepth 1 -type f | while read FILE; do
BASENAME="$(basename "$FILE")"
# Prevent repository-specific files from being copied over to user's HOME
if [[ "$BASENAME" != *'.md' ]] && [[ "$BASENAME" != *'.sh' ]] && [ "$BASENAME" != '.chezmoiroot' ] && [ "$BASENAME" != 'logo.png' ] && [ "$BASENAME" != '.gitlab-ci.yml' ]; then
cp "$FILE" "$HOME/$BASENAME"
chmod 600 "$HOME/$BASENAME"
fi
done
### Ensure ~/.local/bin files are executable
logg info 'Ensuring scripts in ~/.local/bin are executable'
find "$HOME/.local/bin" -maxdepth 1 -mindepth 1 -type f | while read BINFILE; do
chmod +x "$BINFILE"
done
### Run chezmoi init
if [ ! -f "$HOME/.config/chezmoi/chezmoi.yaml" ]; then
### Show README.md snippet
if command -v glow > /dev/null; then
glow "$HOME/.local/share/chezmoi/docs/CHEZMOI-INTRO.md"
fi
### Prompt for variables
if command -v gum > /dev/null; then
if [ -z "$SOFTWARE_GROUP" ]; then
logg prompt 'Select the software group you would like to install. If your environment is a macOS, Windows, or environment with the DISPLAY environment variable then desktop software will be installed too. The software groups are in the ~/.local/share/chezmoi/home/.chezmoidata.yaml file.'
SOFTWARE_GROUP="$(gum choose "Basic" "Standard" "Full")"
export SOFTWARE_GROUP
fi
fi
logg info 'Running `chezmoi init` since the ~/.config/chezmoi/chezmoi.yaml is not present'
chezmoi init
fi
### Run chezmoi apply
logg info 'Running `chezmoi apply`'
if [ -n "$FORCE_CHEZMOI" ]; then
chezmoi apply --force
else
chezmoi apply
fi

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# Creates a Qube on RAM disk and opens Firefox if the Qube does not already exist.
# If the Qube already exists, then running this will delete it.
# Source: https://github.com/unman/stuff/blob/main/ramqube.sh
# Source: https://github.com/unman/stuff/blob/main/rmram.sh
if [ -f '/home/user/RQube' ]; then
mkdir /home/user/RQube
sudo mount -t tmpfs -o size=2G rqube /home/user/RQube/
qvm-pool --add rqubepool file -o revisions_to_keep=1,dir_path=/home/user/RQube/
qvm-create rqube -P rqubepool -t debian-11 -l purple --property netvm=tor
qvm-run rqube firefox-esr
else
read -p "RAM Qube alredy exists. Press ENTER to delete."
qvm-kill rqube
qvm-remove -f rqube
qvm-pool -r rqubepool
sudo umount rqube
rm -rf /home/user/RQube
sudo rm -rf /var/log/libvirt/libxl/new.log
sudo rm -rf /var/log/libvirt/libxl/new.log
sudo rm -rf /var/log/qubes/vm-new.log
sudo rm -rf /var/log/guid/new.log
sudo rm -rf /var/log/qrexec.new.log
sudo rm -rf /var/log/pacat.new.log
sudo rm -rf /var/log/qubesdb.new.log
fi

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
task --taskfile $HOME/.local/src/shared-common/Taskfile.yml $@

View file

@ -1,2 +0,0 @@
#!/bin/bash
exec firejail /usr/bin/slack --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland &> /dev/null &

View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
# Example: find . -type l -exec /path/tos/script {} +
set -e
for link; do
test -h "$link" || continue
dir=$(dirname "$link")
reltarget=$(readlink "$link")
case $reltarget in
/*) abstarget=$reltarget;;
*) abstarget=$dir/$reltarget;;
esac
rm -fv "$link"
cp -afv "$abstarget" "$link" || {
# on failure, restore the symlink
rm -rfv "$link"
ln -sfv "$reltarget" "$link"
}
done

View file

@ -1,309 +0,0 @@
[delta "collared-trogon"]
# author: https://github.com/clnoll
commit-decoration-style = bold box ul
dark = true
file-decoration-style = none
file-style = omit
hunk-header-decoration-style = "#022b45" box ul
hunk-header-file-style = "#999999"
hunk-header-line-number-style = bold "#003300"
hunk-header-style = file line-number syntax
line-numbers = true
line-numbers-left-style = "#022b45"
line-numbers-minus-style = "#80002a"
line-numbers-plus-style = "#003300"
line-numbers-right-style = "#022b45"
line-numbers-zero-style = "#999999"
minus-emph-style = normal "#80002a"
minus-style = normal "#330011"
plus-emph-style = syntax "#003300"
plus-style = syntax "#001a00"
syntax-theme = Nord
[delta "coracias-caudatus"]
# author: https://github.com/clnoll
commit-decoration-style = ol "#7536ff"
commit-style = "#200078"
file-decoration-style = none
file-style = omit
hunk-header-decoration-style = "#cfd6ff" ul
hunk-header-file-style = "#858dff"
hunk-header-line-number-style = "#7536ff"
hunk-header-style = file line-number syntax
light = true
line-numbers = true
line-numbers-left-format = "{nm:>4} ."
line-numbers-left-style = "#e3ab02"
line-numbers-minus-style = "#ff38b6"
line-numbers-plus-style = "#00e0c2"
line-numbers-right-format = "{np:>4} "
line-numbers-right-style = white
line-numbers-zero-style = "#cccccc"
minus-emph-style = bold "#ff3838" "#ffe3f7"
minus-style = "#ff0080"
plus-emph-style = "#008a81" bold "#00ffbf"
plus-style = syntax "#cffff3"
syntax-theme = Github
[delta "hoopoe"]
# author: https://github.com/dandavison
light = true
pink = "#ffe0e0"
dark-pink = "#ffc0c0"
green = "#d0ffd0"
dark-green = "#a0efa0"
dark-green-2 = "#067a00"
minus-style = normal hoopoe.pink
minus-emph-style = normal hoopoe.dark-pink
minus-non-emph-style = minus-style
plus-style = syntax hoopoe.green
plus-emph-style = syntax hoopoe.dark-green
plus-non-emph-style = plus-style
minus-empty-line-marker-style = minus-style
plus-empty-line-marker-style = plus-style
commit-decoration-style = blue ol
commit-style = raw
file-style = omit
hunk-header-decoration-style = blue box
hunk-header-file-style = red
hunk-header-line-number-style = hoopoe.dark-green-2
hunk-header-style = file line-number syntax
syntax-theme = GitHub
zero-style = syntax
[delta "tangara-chilensis"]
# author: https://github.com/clnoll
commit-decoration-style = bold box ul "#34fd50"
dark = true
file-decoration-style = none
file-style = omit
hunk-header-decoration-style = "#00b494" box ul
hunk-header-file-style = "#999999"
hunk-header-line-number-style = bold "#03a4ff"
hunk-header-style = file line-number syntax
line-numbers = true
line-numbers-left-style = black
line-numbers-minus-style = "#B10036"
line-numbers-plus-style = "#03a4ff"
line-numbers-right-style = black
line-numbers-zero-style = "#999999"
minus-emph-style = normal "#de004e"
minus-style = normal "#990017"
plus-emph-style = syntax "#03a4ff"
plus-style = syntax "#450eff"
side-by-side = true
syntax-theme = Vibrant Sunburst
[delta "villsau"]
# author: https://github.com/torarnv
dark = true
file-style = omit
hunk-header-decoration-style = omit
hunk-header-file-style = magenta
hunk-header-line-number-style = dim magenta
hunk-header-style = file line-number syntax
line-numbers = false
minus-emph-style = bold red 52
minus-empty-line-marker-style = normal "#3f0001"
minus-non-emph-style = dim red
minus-style = bold red
plus-emph-style = bold green 22
plus-empty-line-marker-style = normal "#002800"
plus-non-emph-style = dim green
plus-style = bold green
syntax-theme = OneHalfDark
whitespace-error-style = reverse red
zero-style = dim syntax
[delta "woolly-mammoth"]
# author: https://github.com/Kr1ss-XD
commit-decoration-style = 232 130 box
commit-style = 232 bold italic 130
dark = true
file-added-label = [+]
file-copied-label = [C]
file-decoration-style = "#606018" overline
file-modified-label = [M]
file-removed-label = [-]
file-renamed-label = [R]
file-style = 232 bold 184
hunk-header-decoration-style = none
hunk-header-style = syntax bold italic 237
line-numbers = true
line-numbers-left-format = "{nm:>1}┊"
line-numbers-left-style = red
line-numbers-minus-style = red italic black
line-numbers-plus-style = green italic black
line-numbers-right-format = "{np:>1}┊"
line-numbers-right-style = green
line-numbers-zero-style = "#545474" italic
minus-emph-style = syntax bold "#780000"
minus-style = syntax "#400000"
plus-emph-style = syntax bold "#007800"
plus-style = syntax "#004000"
syntax-theme = Vibrant Sunburst
whitespace-error-style = "#280050" reverse
zero-style = syntax
blame-format = "{author:<18} ({commit:>7}) ┊{timestamp:^16}┊ "
blame-palette = "#101010 #200020 #002800 #000028 #202000 #280000 #002020 #002800 #202020"
[delta "calochortus-lyallii"]
# author: https://github.com/manojkarthick
commit-decoration-style = none
dark = true
file-added-label = [+]
file-copied-label = [C]
file-decoration-style = none
file-modified-label = [M]
file-removed-label = [-]
file-renamed-label = [R]
file-style = 232 bold 184
hunk-header-decoration-style = none
hunk-header-file-style = "#999999"
hunk-header-line-number-style = bold "#03a4ff"
hunk-header-style = file line-number syntax
line-numbers = true
line-numbers-left-style = black
line-numbers-minus-style = "#B10036"
line-numbers-plus-style = "#03a4ff"
line-numbers-right-style = black
line-numbers-zero-style = "#999999"
minus-emph-style = syntax bold "#780000"
minus-style = syntax "#400000"
plus-emph-style = syntax bold "#007800"
plus-style = syntax "#004000"
whitespace-error-style = "#280050" reverse
zero-style = syntax
syntax-theme = Nord
[delta "mantis-shrimp"]
#author: https://github.com/2kabhishek
dark = true
side-by-side = true
navigate = true
keep-plus-minus-markers = true
hyperlinks = true
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
file-style = omit
zero-style = syntax
syntax-theme = Monokai Extended
commit-decoration-style ="#11ce16" box
commit-style = "#ffd21a" bold italic
hunk-header-decoration-style = "#1688f0" box ul
hunk-header-file-style = "#c63bee" ul bold
hunk-header-line-number-style = "#ffd21a" box bold
hunk-header-style = file line-number syntax bold italic
line-numbers = true
line-numbers-left-format = "{nm:>1}|"
line-numbers-left-style = "#1688f0"
line-numbers-minus-style = "#ff0051" bold
line-numbers-plus-style = "#03e57f" bold
line-numbers-right-format = "{np:>1}|"
line-numbers-right-style = "#1688f0"
line-numbers-zero-style = "#aaaaaa" italic
minus-emph-style = syntax bold "#b80000"
minus-style = syntax "#5d001e"
plus-emph-style = syntax bold "#007800"
plus-style = syntax "#004433"
whitespace-error-style = "#280050"
[delta "mantis-shrimp-lite"]
#author: https://github.com/2kabhishek
dark = true
side-by-side = true
navigate = true
keep-plus-minus-markers = true
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
file-style = omit
zero-style = syntax
syntax-theme = Monokai Extended
commit-decoration-style = green box
commit-style = yellow bold italic
hunk-header-decoration-style = blue box ul
hunk-header-file-style = purple ul bold
hunk-header-line-number-style = yellow box bold
hunk-header-style = file line-number syntax bold italic
line-numbers = true
line-numbers-left-format = "{nm:>1}|"
line-numbers-left-style = blue
line-numbers-minus-style = red bold
line-numbers-plus-style = green bold
line-numbers-right-format = "{np:>1}|"
line-numbers-right-style = blue
line-numbers-zero-style = white italic
minus-emph-style = syntax bold red
plus-emph-style = syntax bold green
whitespace-error-style = purple bold
[delta "zebra-dark"]
minus-style = syntax "#330f0f"
minus-emph-style = syntax "#4f1917"
plus-style = syntax "#0e2f19"
plus-emph-style = syntax "#174525"
map-styles = \
bold purple => syntax "#330f29", \
bold blue => syntax "#271344", \
bold cyan => syntax "#0d3531", \
bold yellow => syntax "#222f14"
zero-style = syntax
whitespace-error-style = "#aaaaaa"
[delta "zebra-light"]
minus-style = syntax "#fbdada"
minus-emph-style = syntax "#f6b6b6"
plus-style = syntax "#d6ffd6"
plus-emph-style = syntax "#adffad"
map-styles = \
bold purple => syntax "#feecf7", \
bold blue => syntax "#e5dff6", \
bold cyan => syntax "#d8fdf6", \
bold yellow => syntax "#f4ffe0"
zero-style = syntax
whitespace-error-style = "#aaaaaa"
[delta "chameleon"]
#author: https://github.com/AirOnSkin
dark = true
line-numbers = true
side-by-side = true
keep-plus-minus-markers = false
syntax-theme = Nord
file-style = "#434C5E" bold
file-decoration-style = "#434C5E" ul
file-added-label = [+]
file-copied-label = [==]
file-modified-label = [*]
file-removed-label = [-]
file-renamed-label = [->]
hunk-header-style = omit
line-numbers-left-format = " {nm:>3} │"
line-numbers-left-style = red
line-numbers-right-format = " {np:>3} │"
line-numbers-right-style = green
line-numbers-minus-style = red italic black
line-numbers-plus-style = green italic black
line-numbers-zero-style = "#434C5E" italic
minus-style = bold red
minus-emph-style = bold "#202020" "#FF5555"
minus-non-emph-style = bold
plus-style = bold green
plus-emph-style = bold "#202020" "#50FA7B"
plus-non-emph-style = bold
zero-style = syntax
blame-code-style = syntax
blame-format = "{author:<18} ({commit:>9}) {timestamp:^16}"
blame-palette = "#2E3440" "#3B4252" "#434C5E" "#4C566A"
merge-conflict-begin-symbol = ~
merge-conflict-end-symbol = ~
merge-conflict-ours-diff-header-style = "#F1FA8C" bold
merge-conflict-ours-diff-header-decoration-style = "#434C5E" box
merge-conflict-theirs-diff-header-style = "#F1FA8C" bold
merge-conflict-theirs-diff-header-decoration-style = "#434C5E" box

File diff suppressed because it is too large Load diff

View file

@ -1,118 +0,0 @@
# Install WebDriverAgent on iOS device
appiumwebdriver() {
# read -r "Enter the UDID of the device you wish to install WebDriverAgent on: " UDID_INPUT
mkdir -p Resources/WebDriverAgent.bundle
bash ./Scripts/bootstrap.sh -d
cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent || return
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=${UDID_INPUT}" test
}
# Change directories and view contents at the same time
cl() {
DIR="$*"
# if no DIR given, go home
if [ $# -lt 1 ]; then
DIR=$HOME
fi
builtin cd "${DIR}" &&
# use your preferred ls command
ls -F --color=auto
}
# Safer cp with progress bar and backup to /tmp
cpv() {
rsync -pogbr -hhh --backup-dir="/tmp/rsync-${USERNAME}" -e /dev/null --progress "$@"
}
# Checks status of a website on downforeveryoneorjustme.com
down4me() {
curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g'
}
# Easier version of find command
find() {
if [ $# = 1 ]; then
# shellcheck disable=SC2145
command find . -iname "*$@*"
else
command find "$@"
fi
}
# Opens current repository in browser
gitopen() {
git remote -v | head -n 1 | awk -F "@" '{print $2}' | awk -F " " '{print $1}' | sed 's/:/\//g' | sed 's/.git//g' | awk '{print "http://"$1}' | xargs open
}
# Open Mac OS X desktop on a Linux machine
macosx() {
docker run -it --device /dev/kvm -p 50922:10022 -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:big-sur
}
# Generate a random string of X length
randomstring() {
if [ -z "$1" ]; then
head /dev/urandom | tr -dc A-Za-z0-9 | head -c "$1"
else
echo "Pass the number of characters you would like the string to be. Example: randomstring 14"
fi
}
# Reset Docker to factory settings
resetdocker() {
set +e
CONTAINER_COUNT="$(docker ps -a -q | wc -l)"
if [ "$CONTAINER_COUNT" -gt 0 ]; then
docker stop "$(docker ps -a -q)"
docker rm "$(docker ps -a -q)"
fi
VOLUME_COUNT="$(docker volume ls -q | wc -l)"
if [ "$VOLUME_COUNT" -gt 0 ]; then
docker volume rm "$(docker volume ls -q)"
fi
NETWORK_COUNT="$(docker network ls -q | wc -l)"
if [ "$NETWORK_COUNT" -gt 0 ]; then
docker network rm "$(docker network ls -q)"
fi
docker system prune -a --force
}
# ripgrep-all
rgafzf() {
RG_PREFIX="rga --files-with-matches"
local file
file="$(
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \
fzf --sort --preview="[[ ! -z {} ]] && rga --pretty --context 5 {q} {}" \
--phony -q "$1" \
--bind "change:reload:$RG_PREFIX {q}" \
--preview-window="70%:wrap"
)" &&
echo "opening $file" &&
xdg-open "$file"
}
# Easy file sharing from the command line, using transfer.sh
transfer() {
if [ $# -eq 0 ]; then
echo -e "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>" >&2
return 1
fi
if tty -s; then
file="$1"
file_name=$(basename "$file")
if [ ! -e "$file" ]; then
echo "$file: No such file or directory" >&2
return 1
fi
if [ -d "$file" ]; then
file_name="$file_name.zip"
(cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null,
else
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" <"$file" | tee /dev/null
fi
else
file_name=$1
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
fi
}

View file

@ -1,669 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC1090,SC1091
BAR_ELEMENT="-"
BAR_HEALTHY_COLOR="32"
BAR_WARNING_THRESHOLD=70
BAR_WARNING_COLOR="33"
BAR_CRITICAL_THRESHOLD=90
BAR_CRITICAL_COLOR="31"
BANNER_KERNEL_ICON=""
BANNER_KERNEL_COLOR="33"
BANNER_UPTIME_ICON=""
BANNER_UPTIME_COLOR="94"
BANNER_DEBIAN_ICON=""
BANNER_DEBIAN_COLOR="95"
BANNER_FEDORA_ICON=""
BANNER_FEDORA_COLOR="34"
BANNER_FONTPATH=""
BANNER_TEXT="$(hostname -s)"
PROCESSOR_LOADAVG_ICON="ﲯ"
PROCESSOR_LOADAVG_HEALTHY_COLOR="32"
PROCESSOR_LOADAVG_WARNING_THRESHOLD=2
PROCESSOR_LOADAVG_WARNING_COLOR="33"
PROCESSOR_LOADAVG_CRITICAL_THRESHOLD=4
PROCESSOR_LOADAVG_CRITICAL_COLOR="31"
PROCESSOR_MODEL_ICON=""
MEMORY_ICON=""
SWAP_ICON=""
DISKSPACE_ICON=""
SERVICES_UP_ICON=""
SERVICES_UP_COLOR="32"
SERVICES_DOWN_ICON=""
SERVICES_DOWN_COLOR="31"
SERVICES_FILE=".bashrc_motd_services.txt"
# TODO - Fill this in if Podman is ever used
PODMAN_VERSION_ICON="#"
PODMAN_IMAGES_ICON="#"
PODMAN_RUNNING_ICON="#"
PODMAN_RUNNING_COLOR="32"
PODMAN_OTHER_ICON="#"
PODMAN_OTHER_COLOR="90"
DOCKER_VERSION_ICON=""
DOCKER_IMAGES_ICON=""
DOCKER_RUNNING_ICON=""
DOCKER_RUNNING_COLOR="32"
DOCKER_OTHER_ICON=""
DOCKER_OTHER_COLOR="90"
UPDATES_ZERO_ICON=""
UPDATES_ZERO_COLOR="32"
UPDATES_AVAILIABLE_ICON="ﮮ"
UPDATES_AVAILIABLE_COLOR="33"
UPDATES_SECURITY_ICON="撚"
UPDATES_SECURITY_COLOR="31"
LETSENCRYPT_VALID_ICON="ﲘ"
LETSENCRYPT_VALID_COLOR="32"
LETSENCRYPT_WARNING_ICON="ﲙ"
LETSENCRYPT_WARNING_COLOR="33"
LETSENCRYPT_INVALID_ICON=""
LETSENCRYPT_INVALID_COLOR="31"
LETSENCRYPT_CERTPATH="/etc/letsencrypt/live"
LOGIN_LOGIN_ICON="﫻"
LOGIN_LOGOUT_ICON="﫼"
LOGIN_IP_ICON="ﯱ"
INCLUDE_FILE="ownscript.sh"
generate_unit_byte() {
# 1 - unit in M
if [ "$1" -ge 1024 ]; then
unit_symbol="G"
unit_value=$(echo "$1/1024" | bc -l | LANG=C xargs printf "%.1f\n")
else
unit_symbol="M"
unit_value=$1
fi
echo "$unit_value$unit_symbol"
}
generate_space() {
# 1 - already used
# 2 - total
space_fill=$(($2 - ${#1}))
space_chars=""
while [ $space_fill -ge 0 ]; do
space_chars="$space_chars "
space_fill=$((space_fill - 1))
done
echo "$space_chars"
}
generate_bar() {
# 1 - icon
# 2 - total
# 3 - used_1
# 4 - [ used_2 ]
bar_percent=$(($3 * 100 / $2))
bar_separator=$(($3 * 100 * 10 / $2 / 25))
if [ $bar_percent -ge "$BAR_WARNING_THRESHOLD" ]; then
bar_color=$BAR_WARNING_COLOR
elif [ $bar_percent -ge "$BAR_CRITICAL_THRESHOLD" ]; then
bar_color=$BAR_CRITICAL_COLOR
else
bar_color=$BAR_HEALTHY_COLOR
fi
printf " %s \\033[%dm" "$1" "$bar_color"
if [ -z "$4" ]; then
bar_piece=0
while [ $bar_piece -le 40 ]; do
if [ "$bar_piece" -ne "$bar_separator" ]; then
printf "%s" "$BAR_ELEMENT"
else
printf "%s\\033[1;30m" "$BAR_ELEMENT"
fi
bar_piece=$((bar_piece + 1))
done
else
bar_cached_val=$(($3 + $4))
bar_cached_separator=$((bar_cached_val * 100 * 10 / $2 / 25))
bar_piece=0
while [ $bar_piece -le 40 ]; do
if [ $bar_piece -eq $bar_separator ]; then
printf "%s\\033[1;36m" "$BAR_ELEMENT"
elif [ $bar_piece -eq $bar_cached_separator ]; then
printf "%s\\033[1;30m" "$BAR_ELEMENT"
else
printf "%s" "$BAR_ELEMENT"
fi
bar_piece=$((bar_piece + 1))
done
fi
printf "\\033[0m\\n"
}
generate_bar_memory() {
# 1 - icon
# 2 - total memory in M
# 3 - used memory in M
# 4 - cached memory in M
bar_memory_used=$(generate_unit_byte "$3")
bar_memory_cached=$(generate_unit_byte "$4")
bar_memory_available=$(generate_unit_byte $(($2 - $3)))
printf " %s used / %s cached / %s available\\n" "$bar_memory_used" "$bar_memory_cached" "$bar_memory_available"
generate_bar "$1" "$2" "$3" "$4"
}
generate_bar_swap() {
# 1 - icon
# 2 - total swap in M
# 3 - used swap in M
bar_swap_used=$(generate_unit_byte "$3")
bar_swap_available=$(($2 - $3))
bar_swap_available=$(generate_unit_byte "$bar_swap_available")
printf " %s used / %s available\\n" "$bar_swap_used" "$bar_swap_available"
generate_bar "$1" "$2" "$3"
}
generate_bar_disk() {
# 1 - icon
# 2 - total size in M
# 3 - used space in M
# 4 - mount path
bar_disk_mount="$4$(generate_space "$4" 10)"
bar_disk_used="$(generate_unit_byte "$3")"
bar_disk_used="$(generate_space "$bar_disk_used" 5)$bar_disk_used used"
bar_disk_available="$(($2 - $3))"
bar_disk_available="$(generate_unit_byte "$bar_disk_available") available"
printf " %s%s / %s\\n" "$bar_disk_mount" "$bar_disk_used" "$bar_disk_available"
generate_bar "$1" "$2" "$3"
}
print_banner() {
if command -v lolcat >/dev/null && command -v figlet >/dev/null; then
if [[ "${#HOSTNAME}" -lt 14 ]]; then
figlet "$(hostname)" | lolcat -f
else
printf "\\n"
printf " \\033[1;37mHostname:\\033[0m %s\\n" "$(hostname)"
fi
elif command -v figlet >/dev/null; then
printf "\\n%s\\n" "$(figlet -t -f "$BANNER_FONTPATH" " $BANNER_TEXT")"
else
printf "\\n"
printf " \\033[1;37mHostname:\\033[0m %s\\n" "$(hostname)"
fi
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "debian" ]; then
banner_distro_icon="$BANNER_DEBIAN_ICON"
banner_distro_color="$BANNER_DEBIAN_COLOR"
banner_distro_name="Debian"
banner_distro_version="$(cat /etc/debian_version)"
elif [ "$ID" = "fedora" ]; then
banner_distro_icon="$BANNER_FEDORA_ICON"
banner_distro_color="$BANNER_FEDORA_COLOR"
banner_distro_name="Fedora"
banner_distro_version="$VERSION_ID"
else
banner_distro_icon="$OS_ICON"
banner_distro_color="0"
if [ -n "$NAME" ]; then
banner_distro_name="$NAME"
elif [ -n "$PRETTY_NAME" ]; then
banner_distro_name="$PRETTY_NAME"
else
banner_distro_name="Linux"
fi
if [ -n "$VERSION" ]; then
banner_distro_version="$VERSION"
elif [ -n "$VERSION_ID" ]; then
banner_distro_version="$VERSION_ID"
elif [ -n "$BUILD_ID" ]; then
banner_distro_version="$BUILD_ID"
else
banner_distro_version="Version Unknown"
fi
fi
banner_distro_space="$(generate_space "$banner_distro_name" 13)"
if [ "$(hostname)" = 'dom0' ]; then
# Qubes dom0
banner_distro_space="$(generate_space "$NAME" 13)"
printf " \\033[%sm%s %s\\033[0m%s%s\\n" "$banner_distro_color" "" "$NAME" "$banner_distro_space" "$VERSION"
else
printf " \\033[%sm%s %s\\033[0m%s%s\\n" "$banner_distro_color" "$banner_distro_icon" "$banner_distro_name" "$banner_distro_space" "$banner_distro_version"
fi
printf " \\033[%sm%s Linux\\033[0m %s\\n" "$BANNER_KERNEL_COLOR" "$BANNER_KERNEL_ICON" "$(cut -d ' ' -f 3 </proc/version)"
printf " \\033[%sm%s Uptime\\033[0m %s\\n" "$BANNER_UPTIME_COLOR" "$BANNER_UPTIME_ICON" "$(uptime -p | cut -d ' ' -f 2-)"
else
if [ -d '/Applications' ] && [ -d '/System' ]; then
printf " \\033[%sm%s OS \\033[0m %s\\n" "$UPDATES_ZERO_COLOR" "" "macOS $(sw_vers -productVersion) / Build $(sw_vers -buildVersion)"
printf " \\033[%sm%s UUID \\033[0m %s\\n" "$PODMAN_RUNNING_COLOR" "" "$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')"
printf " \\033[%sm%s LAN IP \\033[0m %s\\n" "$BANNER_KERNEL_COLOR" "ﯱ" "$(ifconfig en0 2>/dev/null | grep 'inet ' | cut -d ' ' -f 2)"
IP_ADDR_PUB="$(timeout 1 sh -c 'curl -sSL ifconfig.me')"
if [ -n "$IP_ADDR_PUB" ]; then
printf " \\033[%sm%s Public IP\\033[0m %s\\n" "$UPDATES_SECURITY_COLOR" "" "$IP_ADDR_PUB"
fi
fi
fi
}
print_processor() {
printf "\\n"
printf " \\033[1;37mProcessor:\\033[0m\\n"
processor_loadavg="$(cut -d " " -f 1,2,3 </proc/loadavg)"
if [ "$(echo "$processor_loadavg" | cut -d "." -f 1)" -ge "$PROCESSOR_LOADAVG_CRITICAL_THRESHOLD" ]; then
processor_loadavg_color="$PROCESSOR_LOADAVG_CRITICAL_COLOR"
elif [ "$(echo "$processor_loadavg" | cut -d "." -f 1)" -ge "$PROCESSOR_LOADAVG_WARNING_THRESHOLD" ]; then
processor_loadavg_color="$PROCESSOR_LOADAVG_WARNING_COLOR"
else
processor_loadavg_color="$PROCESSOR_LOADAVG_HEALTHY_COLOR"
fi
processor_info=$(cat /proc/cpuinfo)
processor_arch=$(uname -m)
if [ "$processor_arch" = "x86_64" ]; then
processor_model="$(echo "$processor_info" | grep "model name" | sort -u | cut -d ':' -f 2)"
processor_count=$(echo "$processor_info" | grep "physical id" | sort -u | wc -l)
processor_cores=$(echo "$processor_info" | grep "cpu cores" | sort -u | cut -d ':' -f 2)
processor_threads=$(($(echo "$processor_info" | grep "siblings" | tail -n 1 | cut -d ':' -f 2)))
if [ ! "$processor_cores" -eq $processor_threads ]; then
processor_threads=", $processor_threads Threads"
else
processor_threads=""
fi
elif [ "$processor_arch" = "mips64" ]; then
processor_model="$(echo "$processor_info" | grep "cpu model" | sort -u | cut -d ':' -f 2)"
processor_count=$(echo "$processor_info" | grep "package" | sort -u | wc -l)
processor_cores=$(echo "$processor_info" | grep -c processor)
processor_threads=""
else
processor_model="?"
processor_count=0
processor_cores=0
processor_threads=0
fi
processor_model="${processor_model//\(R\)/}"
processor_model="${processor_model//\(tm\)/}"
processor_model="${processor_model// @/,}"
processor_model="${processor_model// CPU/}"
processor_model="${processor_model// / }"
# shellcheck disable=SC2001
processor_model="$(echo "$processor_model" | sed "s/^ //g")"
processor_cores=$((processor_cores * processor_count))
if [ "$processor_count" -gt 1 ]; then
processor_count="$processor_count""x "
else
processor_count=""
fi
printf " %s \\033[%dm%s\\033[0m\\n" "$PROCESSOR_LOADAVG_ICON" "$processor_loadavg_color" "$processor_loadavg"
printf " %s %s%s = %s Cores%s\\n" "$PROCESSOR_MODEL_ICON" "$processor_count" "$processor_model" "$processor_cores" "$processor_threads"
}
print_memory() {
printf "\\n"
printf " \\033[1;37mMemory:\\033[0m\\n"
memory_usage=$(LANG=C free --mega | grep "Mem:")
memory_total=$(echo "$memory_usage" | awk '{ print $2 }')
memory_used=$(echo "$memory_usage" | awk '{ print $3 }')
memory_cached=$(echo "$memory_usage" | awk '{ print $6 }')
generate_bar_memory "$MEMORY_ICON" "$memory_total" "$memory_used" "$memory_cached"
}
print_swap() {
swap_usage=$(LANG=C free --mega | grep "Swap:")
swap_total=$(echo "$swap_usage" | awk '{ print $2 }')
swap_used=$(echo "$swap_usage" | awk '{ print $3 }')
if [ "$swap_total" -ne 0 ]; then
printf "\\n"
printf " \\033[1;37mSwap:\\033[0m\\n"
generate_bar_swap "$SWAP_ICON" "$swap_total" "$swap_used"
fi
}
print_diskspace() {
if command -v jq >/dev/null; then
printf "\\n"
printf " \\033[1;37mDiskspace:\\033[0m\\n"
diskspace_devices=$(lsblk -Jlo NAME,MOUNTPOINT | jq -c '.blockdevices | sort_by(.mountpoint) | .[] | select( .mountpoint != null and .mountpoint != "[SWAP]" )')
diskspace_partitions=$(df -B M 2> /dev/null | sed -e "s/M//g")
diskspace_index=0
echo "$diskspace_devices" | while read -r line; do
diskspace_disk_name="$(echo "$line" | jq -r '.name')"
diskspace_disk_mount="$(echo "$line" | jq -r '.mountpoint')"
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $2 }')"
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $3 }')"
if [[ "$diskspace_disk_mount" != '/var/lib/snapd/snap'* ]] && [[ "$diskspace_disk_mount" != '/snap/'* ]]; then
if [ -z "$diskspace_disk_size" ]; then
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $2 }')"
fi
if [ -z "$diskspace_disk_used" ]; then
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $3 }')"
fi
if [ "$diskspace_index" -ne 0 ]; then
printf "\\n"
fi
diskspace_index=$((diskspace_index + 1))
generate_bar_disk "$DISKSPACE_ICON" "$diskspace_disk_size" "$diskspace_disk_used" "$diskspace_disk_mount"
fi
done
fi
}
print_services() {
if [ -f $SERVICES_FILE ] && [ "$(wc -l <$SERVICES_FILE)" != 0 ]; then
printf "\\n"
printf " \\033[1;37mServices:\\033[0m \\033[1;37mVersion:\\033[0m\\n"
while read -r line; do
service_description=$(echo "$line" | cut -d ';' -f 1)
service_name=$(echo "$line" | cut -d ';' -f 2)
service_package=$(echo "$line" | cut -d ';' -f 3)
if [ -n "$service_description" ] && [ -n "$service_name" ]; then
if systemctl is-active --quiet "$service_name".service; then
service_icon="$SERVICES_UP_ICON"
service_color="$SERVICES_UP_COLOR"
else
service_icon="$SERVICES_DOWN_ICON"
service_color="$SERVICES_DOWN_COLOR"
fi
service_space=$(generate_space "$service_description" 34)
if [ -n "$service_package" ]; then
if [ -f /usr/bin/apt ]; then
package_version=$(dpkg -s "$service_package" | grep '^Version:' | cut -d ' ' -f 2 | cut -d ':' -f 2 | cut -d '-' -f 1)
elif [ -f /usr/bin/rpm ]; then
package_version=$(rpm -q --queryformat '%{VERSION}' "$service_package")
else
package_version="?"
fi
else
package_version="--"
fi
fi
printf " \\033[%sm%s\\033[0m %s%s%s\\n" "$service_color" "$service_icon" "$service_description" "$service_space" "$package_version"
done <"$SERVICES_FILE" | grep -v '#'
fi
}
print_podman() {
if command -v jq >/dev/null; then
printf "\\n"
printf " \\033[1;37mPodman:\\033[0m\\n"
podman_version="$(sudo podman version --format json | jq -r '.Client.Version')"
podman_space="$(generate_space "$podman_version" 23)"
podman_images="$(sudo podman images --format json | jq '. | length')"
printf " %s Version %s%s%s %s Images\\n\\n" "$PODMAN_VERSION_ICON" "$podman_version" "$podman_space" "$PODMAN_IMAGES_ICON" "$podman_images"
podman_list=$(sudo podman pod ls --sort name --format json)
podman_pods=$(echo "$podman_list" | jq -r '.[] .Name')
echo "$podman_pods" | while read -r pod; do
if [ "$(echo "$podman_list" | jq -r ".[] | select(.Name == \"$pod\") | .Status")" = "Running" ]; then
pod_space=$(generate_space "$pod" 34)
pod_container_running="$(echo "$podman_list" | jq -r ".[] | select(.Name == \"$pod\") | .Containers[] | select(.Status == \"running\") | .Status" | wc -l)"
if [ "$pod_container_running" -ne 0 ]; then
pod_container_running=$(printf "\\033[%um%u Running\\033[0m" "$PODMAN_RUNNING_COLOR" "$pod_container_running")
fi
pod_container_other="$(echo "$podman_list" | jq -r ".[] | select(.Name == \"$pod\") | .Containers[] | select(.Status != \"running\") | .Status" | wc -l)"
if [ "$pod_container_other" -ne 0 ]; then
pod_container_other=$(printf ", \\033[%um%u Other\\033[0m" "$PODMAN_OTHER_COLOR" "$pod_container_other")
else
pod_container_other=""
fi
pod_status="$pod_container_running$pod_container_other"
printf " \\033[%um%s\\033[0m %s%s%s\\n" "$PODMAN_RUNNING_COLOR" "$PODMAN_RUNNING_ICON" "$pod" "$pod_space" "$pod_status"
else
printf " \\033[%um%s\\033[0m \\033[%um%s\\033[0m\\n" "$PODMAN_OTHER_COLOR" "$PODMAN_OTHER_ICON" "$PODMAN_OTHER_COLOR" "$pod"
fi
done
fi
}
print_docker() {
if command -v jq >/dev/null && [ "$(systemctl is-active docker.service)" = "active" ]; then
printf "\\n"
printf " \\033[1;37mDocker:\\033[0m\\n"
docker_info=$(sudo curl -sf --unix-socket /var/run/docker.sock http:/v1.40/info)
docker_version=$(echo "$docker_info" | jq -r '.ServerVersion')
docker_space=$(generate_space "$docker_version" 23)
docker_images=$(echo "$docker_info" | jq -r '.Images')
printf " %s Version %s%s%s %s Images\\n" "$DOCKER_VERSION_ICON" "$docker_version" "$docker_space" "$DOCKER_IMAGES_ICON" "$docker_images"
docker_list_curl="$(sudo curl -sf --unix-socket /var/run/docker.sock "http://v1.40/containers/json?all=true")"
docker_list_curl_length="$(echo "$docker_list_curl" | jq -c '. | length')"
docker_list="$(echo "$docker_list_curl" | jq -c ' .[]')"
if [ "$docker_list_curl_length" != '0' ]; then
echo "$docker_list" | while read -r line; do
container_name="$(echo "$line" | jq -r '.Names[]' | sed 's/\///')"
container_status="$(echo "$line" | jq -r '.Status' | sed 's/.*/\l&/')"
container_space=$(generate_space "$container_name" 34)
if [ "$(echo "$line" | jq -r '.State')" = "running" ]; then
printf " \\033[%um%s\\033[0m %s%s%s\\n" "$DOCKER_RUNNING_COLOR" "$DOCKER_RUNNING_ICON" "$container_name" "$container_space" "$container_status"
else
printf " \\033[%um%s\\033[0m \\033[%um%s\\033[0m%s\\033[%um%s\\033[0m\\n" "$DOCKER_OTHER_COLOR" "$DOCKER_OTHER_ICON" "$DOCKER_OTHER_COLOR" "$container_name" "$container_space" "$DOCKER_OTHER_COLOR" "$container_status"
fi
done
fi
fi
}
print_updates() {
printf "\\n"
printf " \\033[1;37mHealth:\\033[0m\\n"
if [ -f /usr/bin/apt ]; then
updates_count_regular=$(apt-get -qq -y --ignore-hold --allow-change-held-packages --allow-unauthenticated -s dist-upgrade | grep ^Inst | grep -c -v Security)
updates_count_security=$(apt-get -qq -y --ignore-hold --allow-change-held-packages --allow-unauthenticated -s dist-upgrade | grep ^Inst | grep -c Security)
if [ "$updates_count_regular" -ne 0 ]; then
if [ -n "$updates_count_security" ] && [ "$updates_count_security" -ne 0 ]; then
updates_icon=$UPDATES_SECURITY_ICON
updates_color=$UPDATES_SECURITY_COLOR
updates_message="$updates_count_regular packages can be updated, $updates_count_security are security updates."
else
updates_icon=$UPDATES_AVAILIABLE_ICON
updates_color=$UPDATES_AVAILIABLE_COLOR
updates_message="$updates_count_regular packages can be updated."
fi
else
updates_icon=$UPDATES_ZERO_ICON
updates_color=$UPDATES_ZERO_COLOR
updates_message="The system apt packages are up-to-date!"
fi
printf " \\033[%sm%s \\033[0m %s\\n" "$updates_color" "$updates_icon" "$updates_message"
elif [ -f /usr/bin/dnfTODO ]; then
# TODO - Find way of quickly acquiring details
mkdir -p "$HOME/.local/labs" > /dev/null
(command dnf list updates | grep updates | wc -l > "$HOME/.local/labs/dnf-updates-reg" &)
(command dnf updateinfo list --security --available | grep '/Sec. ' | wc -l > "$HOME/.local/labs/dnf-updates-sec" &)
updates_count_security="0"
updates_count_reg="0"
if [ -f "$HOME/.local/labs/dnf-updates-sec" ]; then
updates_count_security="$(cat "$HOME/.local/labs/dnf-updates-sec")"
fi
if [ -f "$HOME/.local/labs/dnf-updates-reg" ]; then
updates_count_reg="$(cat "$HOME/.local/labs/dnf-updates-reg")"
fi
if [ -n "$updates_count_regular" ] && [ "$updates_count_regular" -ne 0 ]; then
if [ -n "$updates_count_security" ] && [ "$updates_count_security" -ne 0 ]; then
updates_icon=$UPDATES_SECURITY_ICON
updates_color=$UPDATES_SECURITY_COLOR
updates_message="$(generate_space "$updates_count_regular" 5) packages can be updated, $updates_count_security are security updates."
else
updates_icon=$UPDATES_AVAILIABLE_ICON
updates_color=$UPDATES_AVAILIABLE_COLOR
updates_message="$(generate_space "$bar_disk_used" 5) packages can be updated."
fi
else
updates_icon=$UPDATES_ZERO_ICON
updates_color=$UPDATES_ZERO_COLOR
updates_message="The system dnf packages are up-to-date!"
fi
printf " \\033[%sm%s \\033[0m %s\\n" "$updates_color" "$updates_icon" "$updates_message"
fi
if command -v systemctl > /dev/null; then
running_services_count="$(systemctl --type=service --plain | grep 'active running' | wc -l)"
failed_services_count="$(systemctl --type=service --failed | grep 'failed failed' | wc -l)"
if [ "$failed_services_count" -eq 0 ]; then
printf " \\033[%sm%s \\033[0m All enabled services are running!\\n" "32" ""
elif [ "$failed_services_count" -eq 1 ]; then
printf " \\033[%sm%s \\033[0m %s services are are currently running\\n" "32" "" "$running_services_count"
printf " \\033[%sm%s \\033[0m 1 service failed to start (%s)\\n" "31" "" "$(systemctl --type=service --failed | grep 'failed failed' | sed 's/..\([^ ]*\).service.*/\1/')"
elif [ "$failed_services_count" -gt 1 ]; then
printf " \\033[%sm%s \\033[0m %s services are are currently running\\n" "32" "" "$running_services_count"
printf " \\033[%sm%s \\033[0m %s services failed to start (see \`systemctl --type=service\`)\\n" "31" "" "$failed_services_count"
fi
fi
}
print_letsencrypt() {
if [ -d $LETSENCRYPT_CERTPATH ] && [ "$(ls -a $LETSENCRYPT_CERTPATH)" ]; then
printf "\\n"
printf " \\033[1;37mSSL / lets encrypt:\\033[0m\\n"
cert_list=$(sudo find $LETSENCRYPT_CERTPATH -name cert.pem)
for cert_file in $cert_list; do
sudo openssl x509 -checkend $((25 * 86400)) -noout -in "$cert_file" >>/dev/null
result=$?
cert_name=$(echo "$cert_file" | rev | cut -d '/' -f 2 | rev)
if [ "$result" -eq 0 ]; then
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_VALID_COLOR" "$LETSENCRYPT_VALID_ICON" "$cert_name"
else
sudo openssl x509 -checkend $((0 * 86400)) -noout -in "$cert_file" >>/dev/null
result=$?
if [ "$result" -eq 0 ]; then
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_WARNING_COLOR" "$LETSENCRYPT_WARNING_ICON" "$cert_name"
else
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_INVALID_COLOR" "$LETSENCRYPT_INVALID_ICON" "$cert_name"
fi
fi
done
fi
}
print_login() {
login_last="$(last -n 2 -a -d --time-format iso "$(whoami)" | head -n 2 | tail -n 1)"
if [ "$(echo "$login_last" | awk '{ print $1 }')" = "$(whoami)" ]; then
login_ip="$(echo "$login_last" | awk '{ print $7 }')"
login_login="$(date -d "$(echo "$login_last" | awk '{ print $3 }' | cut -d '+' -f 1 | sed "s/T/ /")" "+%a, %d.%m.%y %H:%M")"
login_space=$(generate_space "$login_login" 25)
if [ "$(echo "$login_last" | awk '{ print $4 }')" = "still" ]; then
login_logout="still connected"
else
login_logout="$(date -d "$(echo "$login_last" | awk '{ print $5 }' | cut -d '+' -f 1 | sed "s/T/ /")" "+%a, %d.%m.%y %H:%M")"
fi
printf "\\n"
printf " \\033[1;37mLast login for %s:\\033[0m\\n" "$(echo "$login_last" | awk '{ print $1 }')"
printf " %s %s%s%s %s\\n" "$LOGIN_LOGIN_ICON" "$login_login" "$login_space" "$LOGIN_LOGOUT_ICON" "$login_logout"
printf " %s %s\\n" "$LOGIN_IP_ICON" "$login_ip"
fi
}
print_include() {
. $INCLUDE_FILE
}
bash_motd() {
for module in "$@"; do
if [ "$module" = "--banner" ]; then
print_banner
elif [ "$module" = "--processor" ]; then
print_processor
elif [ "$module" = "--memory" ]; then
print_memory
elif [ "$module" = "--swap" ]; then
print_swap
elif [ "$module" = "--diskspace" ]; then
print_diskspace
elif [ "$module" = "--services" ]; then
print_services
elif [ "$module" = "--podman" ]; then
print_podman
elif [ "$module" = "--docker" ]; then
print_docker
elif [ "$module" = "--updates" ]; then
print_updates
elif [ "$module" = "--letsencrypt" ]; then
print_letsencrypt
elif [ "$module" = "--login" ]; then
print_login
elif [ "$module" = "--include" ]; then
print_include
fi
done
printf "\\n"
}

File diff suppressed because it is too large Load diff

View file

@ -1,10 +0,0 @@
_direnv_hook() {
local previous_exit_status=$?;
trap -- '' SIGINT;
eval "$("/usr/local/bin/direnv" export bash)";
trap - SIGINT;
return $previous_exit_status;
};
if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then
PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
fi

File diff suppressed because it is too large Load diff

View file

@ -1,102 +0,0 @@
# ____ ____
# / __/___ / __/
# / /_/_ / / /_
# / __/ / /_/ __/
# /_/ /___/_/ key-bindings.bash
#
# - $FZF_TMUX_OPTS
# - $FZF_CTRL_T_COMMAND
# - $FZF_CTRL_T_OPTS
# - $FZF_CTRL_R_OPTS
# - $FZF_ALT_C_COMMAND
# - $FZF_ALT_C_OPTS
# Key bindings
# ------------
__fzf_select__() {
local cmd opts
cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | cut -b3-"}"
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
eval "$cmd" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
while read -r item; do
printf '%q ' "$item" # escape special chars
done
}
if [[ $- =~ i ]]; then
__fzfcmd() {
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
fzf-file-widget() {
local selected="$(__fzf_select__ "$@")"
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$(( READLINE_POINT + ${#selected} ))
}
__fzf_cd__() {
local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | cut -b3-"}"
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
dir=$(eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)) && printf 'builtin cd -- %q' "$dir"
}
__fzf_history__() {
local output opts script
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
output=$(
builtin fc -lnr -2147483648 |
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return
READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then
echo "$READLINE_LINE"
else
READLINE_POINT=0x7fffffff
fi
}
# Required to refresh the prompt after fzf
bind -m emacs-standard '"\er": redraw-current-line'
bind -m vi-command '"\C-z": emacs-editing-mode'
bind -m vi-insert '"\C-z": emacs-editing-mode'
bind -m emacs-standard '"\C-z": vi-editing-mode'
if (( BASH_VERSINFO[0] < 4 )); then
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
else
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
bind -m vi-command -x '"\C-t": fzf-file-widget'
bind -m vi-insert -x '"\C-t": fzf-file-widget'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard -x '"\C-r": __fzf_history__'
bind -m vi-command -x '"\C-r": __fzf_history__'
bind -m vi-insert -x '"\C-r": __fzf_history__'
fi
# ALT-C - cd into the selected directory
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
fi

View file

@ -1,357 +0,0 @@
# ____ ____
# / __/___ / __/
# / /_/_ / / /_
# / __/ / /_/ __/
# /_/ /___/_/ completion.bash
#
# - $FZF_TMUX (default: 0)
# - $FZF_TMUX_OPTS (default: empty)
# - $FZF_COMPLETION_TRIGGER (default: '**')
# - $FZF_COMPLETION_OPTS (default: empty)
if [[ $- =~ i ]]; then
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path > /dev/null; then
_fzf_compgen_path() {
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
if ! declare -f _fzf_compgen_dir > /dev/null; then
_fzf_compgen_dir() {
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
###########################################################
# To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2> /dev/null
__fzf_comprun() {
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
shift
fzf "$@"
fi
}
__fzf_orig_completion() {
local l comp f cmd
while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
comp="${BASH_REMATCH[1]}"
f="${BASH_REMATCH[2]}"
cmd="${BASH_REMATCH[3]}"
[[ "$f" = _fzf_* ]] && continue
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
fi
fi
done
}
_fzf_opts_completion() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="
-x --extended
-e --exact
--algo
-i +i
-n --nth
--with-nth
-d --delimiter
+s --no-sort
--tac
--tiebreak
-m --multi
--no-mouse
--bind
--cycle
--no-hscroll
--jump-labels
--height
--literal
--reverse
--margin
--inline-info
--prompt
--pointer
--marker
--header
--header-lines
--ansi
--tabstop
--color
--no-bold
--history
--history-size
--preview
--preview-window
-q --query
-1 --select-1
-0 --exit-0
-f --filter
--print-query
--expect
--sync"
case "${prev}" in
--tiebreak)
COMPREPLY=( $(compgen -W "length begin end index" -- "$cur") )
return 0
;;
--color)
COMPREPLY=( $(compgen -W "dark light 16 bw" -- "$cur") )
return 0
;;
--history)
COMPREPLY=()
return 0
;;
esac
if [[ "$cur" =~ ^-|\+ ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- "$cur") )
return 0
fi
return 0
}
_fzf_handle_dynamic_completion() {
local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1"
shift
orig_cmd="$1"
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var-}"
orig="${orig##*#}"
if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then
$orig "$@"
elif [[ -n "${_fzf_completion_loader-}" ]]; then
orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"
else
eval "$orig_complete"
fi
fi
return $ret
fi
}
__fzf_generic_path_completion() {
local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then
cmd="${cmd:1}"
fi
cmd="${cmd//[^A-Za-z0-9_=]/_}"
COMPREPLY=()
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
base=${cur:0:${#cur}-${#trigger}}
eval "base=$base"
dir=
[[ $base = *"/"* ]] && dir="$base"
while true; do
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
leftover=${base/#"$dir"}
leftover=${leftover/#\/}
[[ -z "$dir" ]] && dir='.'
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
printf "%q " "${item%$3}$3"
done)
matches=${matches% }
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
if [[ -n "$matches" ]]; then
COMPREPLY=( "$matches" )
else
COMPREPLY=( "$cur" )
fi
printf '\e[5n'
return 0
fi
dir=$(dirname "$dir")
[[ "$dir" =~ /$ ]] || dir="$dir"/
done
else
shift
shift
shift
_fzf_handle_dynamic_completion "$cmd" "$@"
fi
}
_fzf_complete() {
# Split arguments around --
local args rest str_arg i sep
args=("$@")
sep=
for i in "${!args[@]}"; do
if [[ "${args[$i]}" = -- ]]; then
sep=$i
break
fi
done
if [[ -n "$sep" ]]; then
str_arg=
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
args=("${args[@]:0:$sep}")
else
str_arg=$1
args=()
shift
rest=("$@")
fi
local cur selected trigger cmd post
post="$(caller 0 | awk '{print $2}')_post"
type -t "$post" > /dev/null 2>&1 || post=cat
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
cur=${cur:0:${#cur}-${#trigger}}
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
if [[ -n "$selected" ]]; then
COMPREPLY=("$selected")
else
COMPREPLY=("$cur")
fi
printf '\e[5n'
return 0
else
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
fi
}
_fzf_path_completion() {
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
}
# Deprecated. No file only completion.
_fzf_file_completion() {
_fzf_path_completion "$@"
}
_fzf_dir_completion() {
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
}
_fzf_complete_kill() {
_fzf_proc_completion "$@"
}
_fzf_proc_completion() {
_fzf_complete -m --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -ef | sed 1d
)
}
_fzf_proc_completion_post() {
awk '{print $2}'
}
_fzf_host_completion() {
_fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
awk '{if (length($2) > 0) {print $2}}' | sort -u
)
}
_fzf_var_completion() {
_fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
)
}
_fzf_alias_completion() {
_fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p'
)
}
# fzf options
complete -o default -F _fzf_opts_completion fzf
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
# itself. As a quick improvement we take fzf's completion. Adding the few extra
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
complete -o default -F _fzf_opts_completion fzf-tmux
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
a_cmds="
awk cat diff diff3
emacs emacsclient ex file ftp g++ gcc gvim head hg java
javac ld less more mvim nvim patch perl python ruby
sed sftp sort source tail tee uniq vi view vim wc xdg-open
basename bunzip2 bzip2 chmod chown curl cp dirname du
find git grep gunzip gzip hg jar
ln ls mv open rm rsync scp
svn tar unzip zip"
# Preserve existing completion
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null)
if type _completion_loader > /dev/null 2>&1; then
_fzf_completion_loader=1
fi
__fzf_defc() {
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
opts="$3"
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
orig="${!orig_var-}"
if [[ -n "$orig" ]]; then
printf -v def "$orig" "$func"
eval "$def"
else
complete -F "$func" $opts "$cmd"
fi
}
# Anything
for cmd in $a_cmds; do
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
done
# Directory
for cmd in $d_cmds; do
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
done
unset cmd d_cmds a_cmds
_fzf_setup_completion() {
local kind fn cmd
kind=$1
fn=_fzf_${1}_completion
if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
return 1
fi
shift
__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)
for cmd in "$@"; do
case "$kind" in
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
esac
done
}
# Environment variables / Aliases / Hosts / Process
_fzf_setup_completion 'var' export unset
_fzf_setup_completion 'alias' unalias
_fzf_setup_completion 'host' ssh telnet
_fzf_setup_completion 'proc' kill
fi

View file

@ -1,83 +0,0 @@
_python_argcomplete() {
local IFS='
'
local prefix=
typeset -i n
(( lastw=${#COMP_WORDS[@]} -1))
if [[ ${COMP_WORDS[lastw]} == --*=* ]]; then
# for bash version 3.2
flag=${COMP_WORDS[lastw]%%=*}
set -- "$1" "$2" '='
elif [[ $3 == '=' ]]; then
flag=${COMP_WORDS[-3]}
fi
if [[ $3 == ssh && $2 == *@* ]] ;then
# handle ssh user@instance specially
prefix=${2%@*}@
COMP_LINE=${COMP_LINE%$2}"${2#*@}"
elif [[ $3 == '=' ]] ; then
# handle --flag=value
prefix=$flag=$2
line=${COMP_LINE%$prefix};
COMP_LINE=$line${prefix/=/ };
prefix=
fi
if [[ $2 == *,* ]]; then
# handle , separated list
prefix=${2%,*},
set -- "$1" "${2#$prefix}" "$3"
COMP_LINE==${COMP_LINE%$prefix*}$2
fi
# Treat --flag=<TAB> as --flag <TAB> to work around bash 4.x bug
if [[ ${COMP_LINE} == *= && ${COMP_WORDS[-2]} == --* ]]; then
COMP_LINE=${COMP_LINE%=}' '
fi
COMPREPLY=( $(IFS="$IFS" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" _ARGCOMPLETE=1 "$1" 8>&1 9>&2 1>/dev/null 2>/dev/null) )
if [[ $? != 0 ]]; then
unset COMPREPLY
return
fi
if [[ $prefix != '' ]]; then
for ((n=0; n < ${#COMPREPLY[@]}; n++)); do
COMPREPLY[$n]=$prefix${COMPREPLY[$n]}
done
fi
for ((n=0; n < ${#COMPREPLY[@]}; n++)); do
match=${COMPREPLY[$n]%' '}
if [[ $match != '' ]]; then
COMPREPLY[$n]=${match//? /' '}' '
fi
done
# if flags argument has a single completion and ends in '= ', delete ' '
if [[ ${#COMPREPLY[@]} == 1 && ${COMPREPLY[0]} == -* &&
${COMPREPLY[0]} == *'= ' ]]; then
COMPREPLY[0]=${COMPREPLY[0]%' '}
fi
}
complete -o nospace -F _python_argcomplete "gcloud"
_completer() {
command=$1
name=$2
eval '[[ "$'"${name}"'_COMMANDS" ]] || '"${name}"'_COMMANDS="$('"${command}"')"'
set -- $COMP_LINE
shift
while [[ $1 == -* ]]; do
shift
done
[[ $2 ]] && return
grep -q "${name}\s*$" <<< $COMP_LINE &&
eval 'COMPREPLY=($'"${name}"'_COMMANDS)' &&
return
[[ "$COMP_LINE" == *" " ]] && return
[[ $1 ]] &&
eval 'COMPREPLY=($(echo "$'"${name}"'_COMMANDS" | grep ^'"$1"'))'
}
unset bq_COMMANDS
_bq_completer() {
_completer "CLOUDSDK_COMPONENT_MANAGER_DISABLE_UPDATE_CHECK=1 bq help | grep '^[^ ][^ ]* ' | sed 's/ .*//'" bq
}
complete -F _bq_completer bq
complete -o nospace -F _python_argcomplete gsutil

View file

@ -1,325 +0,0 @@
# bash completion V2 for gh -*- shell-script -*-
__gh_debug()
{
if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
fi
}
# Macs have bash3 for which the bash-completion package doesn't include
# _init_completion. This is a minimal version of that function.
__gh_init_completion()
{
COMPREPLY=()
_get_comp_words_by_ref "$@" cur prev words cword
}
# This function calls the gh program to obtain the completion
# results and the directive. It fills the 'out' and 'directive' vars.
__gh_get_completion_results() {
local requestComp lastParam lastChar args
# Prepare the command to request completions for the program.
# Calling ${words[0]} instead of directly gh allows to handle aliases
args=("${words[@]:1}")
requestComp="${words[0]} __complete ${args[*]}"
lastParam=${words[$((${#words[@]}-1))]}
lastChar=${lastParam:$((${#lastParam}-1)):1}
__gh_debug "lastParam ${lastParam}, lastChar ${lastChar}"
if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go method.
__gh_debug "Adding extra empty parameter"
requestComp="${requestComp} ''"
fi
# When completing a flag with an = (e.g., gh -n=<TAB>)
# bash focuses on the part after the =, so we need to remove
# the flag part from $cur
if [[ "${cur}" == -*=* ]]; then
cur="${cur#*=}"
fi
__gh_debug "Calling ${requestComp}"
# Use eval to handle any environment variables and such
out=$(eval "${requestComp}" 2>/dev/null)
# Extract the directive integer at the very end of the output following a colon (:)
directive=${out##*:}
# Remove the directive
out=${out%:*}
if [ "${directive}" = "${out}" ]; then
# There is not directive specified
directive=0
fi
__gh_debug "The completion directive is: ${directive}"
__gh_debug "The completions are: ${out}"
}
__gh_process_completion_results() {
local shellCompDirectiveError=1
local shellCompDirectiveNoSpace=2
local shellCompDirectiveNoFileComp=4
local shellCompDirectiveFilterFileExt=8
local shellCompDirectiveFilterDirs=16
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
# Error code. No completion.
__gh_debug "Received error from custom completion go code"
return
else
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__gh_debug "Activating no space"
compopt -o nospace
else
__gh_debug "No space directive not supported in this version of bash"
fi
fi
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__gh_debug "Activating no file completion"
compopt +o default
else
__gh_debug "No file completion directive not supported in this version of bash"
fi
fi
fi
# Separate activeHelp from normal completions
local completions=()
local activeHelp=()
__gh_extract_activeHelp
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local fullFilter filter filteringCmd
# Do not use quotes around the $completions variable or else newline
# characters will be kept.
for filter in ${completions[*]}; do
fullFilter+="$filter|"
done
filteringCmd="_filedir $fullFilter"
__gh_debug "File filtering command: $filteringCmd"
$filteringCmd
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
# Use printf to strip any trailing newline
local subdir
subdir=$(printf "%s" "${completions[0]}")
if [ -n "$subdir" ]; then
__gh_debug "Listing directories in $subdir"
pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
else
__gh_debug "Listing directories in ."
_filedir -d
fi
else
__gh_handle_completion_types
fi
__gh_handle_special_char "$cur" :
__gh_handle_special_char "$cur" =
# Print the activeHelp statements before we finish
if [ ${#activeHelp} -ne 0 ]; then
printf "\n";
printf "%s\n" "${activeHelp[@]}"
printf "\n"
# The prompt format is only available from bash 4.4.
# We test if it is available before using it.
if (x=${PS1@P}) 2> /dev/null; then
printf "%s" "${PS1@P}${COMP_LINE[@]}"
else
# Can't print the prompt. Just print the
# text the user had typed, it is workable enough.
printf "%s" "${COMP_LINE[@]}"
fi
fi
}
# Separate activeHelp lines from real completions.
# Fills the $activeHelp and $completions arrays.
__gh_extract_activeHelp() {
local activeHelpMarker="_activeHelp_ "
local endIndex=${#activeHelpMarker}
while IFS='' read -r comp; do
if [ "${comp:0:endIndex}" = "$activeHelpMarker" ]; then
comp=${comp:endIndex}
__gh_debug "ActiveHelp found: $comp"
if [ -n "$comp" ]; then
activeHelp+=("$comp")
fi
else
# Not an activeHelp line but a normal completion
completions+=("$comp")
fi
done < <(printf "%s\n" "${out}")
}
__gh_handle_completion_types() {
__gh_debug "__gh_handle_completion_types: COMP_TYPE is $COMP_TYPE"
case $COMP_TYPE in
37|42)
# Type: menu-complete/menu-complete-backward and insert-completions
# If the user requested inserting one completion at a time, or all
# completions at once on the command-line we must remove the descriptions.
# https://github.com/spf13/cobra/issues/1508
local tab=$'\t' comp
while IFS='' read -r comp; do
[[ -z $comp ]] && continue
# Strip any description
comp=${comp%%$tab*}
# Only consider the completions that match
if [[ $comp == "$cur"* ]]; then
COMPREPLY+=("$comp")
fi
done < <(printf "%s\n" "${completions[@]}")
;;
*)
# Type: complete (normal completion)
__gh_handle_standard_completion_case
;;
esac
}
__gh_handle_standard_completion_case() {
local tab=$'\t' comp
# Short circuit to optimize if we don't have descriptions
if [[ "${completions[*]}" != *$tab* ]]; then
IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur")
return 0
fi
local longest=0
local compline
# Look for the longest completion so that we can format things nicely
while IFS='' read -r compline; do
[[ -z $compline ]] && continue
# Strip any description before checking the length
comp=${compline%%$tab*}
# Only consider the completions that match
[[ $comp == "$cur"* ]] || continue
COMPREPLY+=("$compline")
if ((${#comp}>longest)); then
longest=${#comp}
fi
done < <(printf "%s\n" "${completions[@]}")
# If there is a single completion left, remove the description text
if [ ${#COMPREPLY[*]} -eq 1 ]; then
__gh_debug "COMPREPLY[0]: ${COMPREPLY[0]}"
comp="${COMPREPLY[0]%%$tab*}"
__gh_debug "Removed description from single completion, which is now: ${comp}"
COMPREPLY[0]=$comp
else # Format the descriptions
__gh_format_comp_descriptions $longest
fi
}
__gh_handle_special_char()
{
local comp="$1"
local char=$2
if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then
local word=${comp%"${comp##*${char}}"}
local idx=${#COMPREPLY[*]}
while [[ $((--idx)) -ge 0 ]]; do
COMPREPLY[$idx]=${COMPREPLY[$idx]#"$word"}
done
fi
}
__gh_format_comp_descriptions()
{
local tab=$'\t'
local comp desc maxdesclength
local longest=$1
local i ci
for ci in ${!COMPREPLY[*]}; do
comp=${COMPREPLY[ci]}
# Properly format the description string which follows a tab character if there is one
if [[ "$comp" == *$tab* ]]; then
__gh_debug "Original comp: $comp"
desc=${comp#*$tab}
comp=${comp%%$tab*}
# $COLUMNS stores the current shell width.
# Remove an extra 4 because we add 2 spaces and 2 parentheses.
maxdesclength=$(( COLUMNS - longest - 4 ))
# Make sure we can fit a description of at least 8 characters
# if we are to align the descriptions.
if [[ $maxdesclength -gt 8 ]]; then
# Add the proper number of spaces to align the descriptions
for ((i = ${#comp} ; i < longest ; i++)); do
comp+=" "
done
else
# Don't pad the descriptions so we can fit more text after the completion
maxdesclength=$(( COLUMNS - ${#comp} - 4 ))
fi
# If there is enough space for any description text,
# truncate the descriptions that are too long for the shell width
if [ $maxdesclength -gt 0 ]; then
if [ ${#desc} -gt $maxdesclength ]; then
desc=${desc:0:$(( maxdesclength - 1 ))}
desc+="…"
fi
comp+=" ($desc)"
fi
COMPREPLY[ci]=$comp
__gh_debug "Final comp: $comp"
fi
done
}
__start_gh()
{
local cur prev words cword split
COMPREPLY=()
# Call _init_completion from the bash-completion package
# to prepare the arguments properly
if declare -F _init_completion >/dev/null 2>&1; then
_init_completion -n "=:" || return
else
__gh_init_completion -n "=:" || return
fi
__gh_debug
__gh_debug "========= starting completion logic =========="
__gh_debug "cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword"
# The user could have moved the cursor backwards on the command-line.
# We need to trigger completion from the $cword location, so we need
# to truncate the command-line ($words) up to the $cword location.
words=("${words[@]:0:$cword+1}")
__gh_debug "Truncated words[*]: ${words[*]},"
local out directive
__gh_get_completion_results
__gh_process_completion_results
}
if [[ $(type -t compopt) = "builtin" ]]; then
complete -o default -F __start_gh gh
else
complete -o default -o nospace -F __start_gh gh
fi
# ex: ts=4 sw=4 et filetype=sh

View file

@ -1,82 +0,0 @@
#
# Rudimentary Bash completion definition for googler.
#
# Author:
# Zhiming Wang <zmwangx@gmail.com>
#
_googler () {
COMPREPLY=()
local IFS=$' \n'
local cur=$2 prev=$3
local -a opts opts_with_args
opts=(
-h --help
-s --start
-n --count
-N --news
-V --videos
-c --tld
-l --lang
-g --geoloc
-x --exact
--colorize
-C --nocolor
--colors
-j --first --lucky
-t --time
--from
--to
-w --site
-e --exclude
--unfilter
-p --proxy
--notweak
--json
--url-handler
--show-browser-logs
--np --noprompt
-u --upgrade
--include-git
-v --version
-d --debug
)
opts_with_arg=(
-s --start
-n --count
-c --tld
-l --lang
-g --geoloc
--colorize
--colors
-t --time
--from
--to
-w --site
-e --exclude
-p --proxy
--url-handler
)
if [[ $cur == -* ]]; then
# The current argument is an option -- complete option names.
COMPREPLY=( $(compgen -W "${opts[*]}" -- "$cur") )
else
# Do not complete option arguments; only autocomplete positional
# arguments (queries).
for opt in "${opts_with_arg[@]}"; do
[[ $opt == $prev ]] && return 1
done
local completion
COMPREPLY=()
while IFS= read -r completion; do
# Quote spaces for `complete -W wordlist`
COMPREPLY+=( "${completion// /\\ }" )
done < <(googler --complete "$cur")
fi
return 0
}
complete -F _googler googler

View file

@ -1,381 +0,0 @@
__gradle-completion-print-timestamp() {
echo "$(($(gdate +'%s * 1000 + %-N / 1000000'))) - $1"
}
__gradle-set-project-root-dir() {
local dir=$(pwd)
project_root_dir=$(pwd)
while [[ "$dir" != '/' ]]; do
if [[ -f "$dir/settings.gradle" || -f "$dir/settings.gradle.kts" || -f "$dir/gradlew" ]]; then
project_root_dir="$dir"
return 0
fi
dir="$(dirname "$dir")"
done
return 1
}
__gradle-init-cache-dir() {
cache_dir="$HOME/.gradle/completion"
mkdir -p "$cache_dir"
}
__gradle-set-settings-file() {
# In order of precedence: --settings-file=filename, settings.gradle, settings.gradle.kts
local default_gradle_settings_file="$project_root_dir/settings.gradle"
if [[ ! -f $default_gradle_settings_file ]]; then
default_gradle_settings_file="$project_root_dir/settings.gradle.kts"
fi
gradle_settings_file=$default_gradle_settings_file
}
__gradle-set-build-file() {
__gradle-set-settings-file
# In order of precedence: --build-file=filename, rootProject.buildFileName, build.gradle, build.gradle.kts
local default_gradle_build_file_name="build.gradle"
if [[ -f $gradle_settings_file ]]; then
local build_file_name=$(grep "^rootProject\.buildFileName" $gradle_settings_file | \
sed -n -e "s/rootProject\.buildFileName = [\'\"]\(.*\)[\'\"]/\1/p")
default_gradle_build_file_name="${build_file_name:-build.gradle}"
fi
gradle_build_file="$project_root_dir/$default_gradle_build_file_name"
if [[ ! -f $gradle_build_file ]]; then
gradle_build_file="$project_root_dir/build.gradle.kts"
fi
}
__gradle-set-cache-name() {
# Cache name is constructed from the absolute path of the build file.
cache_name="${gradle_build_file//\//_}"
}
__gradle-set-files-checksum() {
# Cache MD5 sum of all Gradle scripts and modified timestamps
if builtin command -v md5 > /dev/null; then
gradle_files_checksum=$(md5 -q -s "$(cat "$cache_dir/$cache_name" | xargs ls -o 2>/dev/null)")
elif builtin command -v md5sum > /dev/null; then
gradle_files_checksum=$(cat "$cache_dir/$cache_name" | xargs ls -o 2>/dev/null | md5sum | awk '{print $1}')
else
echo "Cannot generate completions as neither md5 nor md5sum exist on \$PATH"
fi
}
__gradle-generate-script-cache() {
# Invalidate cache after 3 weeks by default
local cache_ttl_mins=${GRADLE_CACHE_TTL_MINUTES:-30240}
local script_exclude_pattern=${GRADLE_COMPLETION_EXCLUDE_PATTERN:-"/(.git|build|integTest|samples|templates|smokeTest|testFixtures|out)/"}
if [[ ! $(find "$cache_dir/$cache_name" -mmin "-${cache_ttl_mins}" 2>/dev/null) ]]; then
# Cache all Gradle scripts
local gradle_build_scripts=$(find "$project_root_dir" -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | egrep -v "$script_exclude_pattern")
printf "%s\n" "${gradle_build_scripts[@]}" >| "$cache_dir/$cache_name"
fi
}
__gradle-long-options() {
local cur
_get_comp_words_by_ref -n : cur
local args="--build-cache - Enables the Gradle build cache
--build-file - Specifies the build file
--configuration-cache - Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds. [incubating]
--configuration-cache-problems - Configures how the configuration cache handles problems (fail or warn). Defaults to fail. [incubating]
--configure-on-demand - Only relevant projects are configured
--console - Type of console output to generate (plain auto rich verbose)
--continue - Continues task execution after a task failure
--continuous - Continuous mode. Automatically re-run build after changes
--daemon - Use the Gradle Daemon
--debug - Log at the debug level
--dry-run - Runs the build with all task actions disabled
--exclude-task - Specify a task to be excluded
--full-stacktrace - Print out the full (very verbose) stacktrace
--gradle-user-home - Specifies the Gradle user home directory
--gui - Launches the Gradle GUI app (Deprecated)
--help - Shows a help message
--include-build - Run the build as a composite, including the specified build
--info - Set log level to INFO
--init-script - Specifies an initialization script
--max-workers - Set the maximum number of workers that Gradle may use
--no-build-cache - Do not use the Gradle build cache
--no-configuration-cache - Disables the configuration cache. [incubating]
--no-configure-on-demand - Disables configuration on demand
--no-daemon - Do not use the Gradle Daemon
--no-parallel - Disables parallel execution to build projects
--no-rebuild - Do not rebuild project dependencies
--no-scan - Do not create a build scan
--no-search-upwards - Do not search parent directories for a settings.gradle (removed)
--no-watch-fs - Do not watch the filesystem for changes
--offline - Build without accessing network resources
--parallel - Build projects in parallel
--profile - Profile build time and create report
--priority - Set priority for Gradle worker processes (low normal)
--project-cache-dir - Specifies the project-specific cache directory
--project-dir - Specifies the start directory for Gradle
--project-prop - Sets a project property of the root project
--quiet - Log errors only
--recompile-scripts - Forces scripts to be recompiled, bypassing caching
--refresh-dependencies - Refresh the state of dependencies
--rerun-tasks - Specifies that any task optimization is ignored
--scan - Create a build scan
--settings-file - Specifies the settings file
--stacktrace - Print out the stacktrace also for user exceptions
--status - Print Gradle Daemon status
--stop - Stop all Gradle Daemons
--system-prop - Set a system property
--update-locks - Perform a partial update of the dependency lock
--version - Prints Gradle version info
--warn - Log warnings and errors only
--warning-mode - Set types of warnings to log (all summary none)
--watch-fs - Gradle watches filesystem for incremental builds
--write-locks - Persists dependency resolution for locked configurations"
COMPREPLY=( $(compgen -W "$args" -- "$cur") )
}
__gradle-properties() {
local cur
_get_comp_words_by_ref -n : cur
local args="-Dorg.gradle.cache.reserved.mb= - Reserve Gradle Daemon memory for operations
-Dorg.gradle.caching= - Set true to enable Gradle build cache
-Dorg.gradle.console= - Set type of console output to generate (plain auto rich verbose)
-Dorg.gradle.daemon.debug= - Set true to debug Gradle Daemon
-Dorg.gradle.daemon.idletimeout= - Kill Gradle Daemon after # idle millis
-Dorg.gradle.debug= - Set true to debug Gradle Client
-Dorg.gradle.jvmargs= - Set JVM arguments
-Dorg.gradle.java.home= - Set JDK home dir
-Dorg.gradle.logging.level= - Set default Gradle log level (quiet warn lifecycle info debug)
-Dorg.gradle.parallel= - Set true to enable parallel project builds (incubating)
-Dorg.gradle.priority= - Set priority for Gradle worker processes (low normal)
-Dorg.gradle.unsafe.watch-fs= - Set true to enable Gradle file watcher
-Dorg.gradle.warning.mode= - Set types of warnings to log (all summary none)
-Dorg.gradle.workers.max= - Set the number of workers Gradle is allowed to use"
COMPREPLY=( $(compgen -W "$args" -- "$cur") )
return 0
}
__gradle-short-options() {
local cur
_get_comp_words_by_ref -n : cur
local args="-? - Shows a help message
-a - Do not rebuild project dependencies
-b - Specifies the build file
-c - Specifies the settings file
-d - Log at the debug level
-g - Specifies the Gradle user home directory
-h - Shows a help message
-i - Set log level to INFO
-m - Runs the build with all task actions disabled
-p - Specifies the start directory for Gradle
-q - Log errors only
-s - Print out the stacktrace also for user exceptions
-t - Continuous mode. Automatically re-run build after changes
-u - Do not search parent directories for a settings.gradle
-v - Prints Gradle version info
-w - Log warnings and errors only
-x - Specify a task to be excluded
-D - Set a system property
-I - Specifies an initialization script
-P - Sets a project property of the root project
-S - Print out the full (very verbose) stacktrace"
COMPREPLY=( $(compgen -W "$args" -- "$cur") )
}
__gradle-tasks() {
local cur
_get_comp_words_by_ref -n : cur
__gradle-init-cache-dir
__gradle-set-project-root-dir
__gradle-set-build-file
if [[ -f "$gradle_build_file" ]]; then
__gradle-set-cache-name
__gradle-generate-script-cache
__gradle-set-files-checksum
# The cache key is md5 sum of all gradle scripts, so it's valid if it exists.
if [[ -f "$cache_dir/$cache_name.md5" ]]; then
local cached_checksum="$(cat "$cache_dir/$cache_name.md5")"
local -a cached_tasks
if [[ -z "$cur" ]]; then
cached_tasks=( $(grep -v "^:" "$cache_dir/$cached_checksum") )
else
cached_tasks=( $(grep "^$cur" "$cache_dir/$cached_checksum") )
fi
COMPREPLY=( $(compgen -W "${cached_tasks[*]}" -- "$cur") )
else
__gradle-notify-tasks-cache-build
fi
# Regenerate tasks cache in the background
if [[ "$gradle_files_checksum" != "$(cat "$cache_dir/$cache_name.md5")" || ! -f "$cache_dir/$gradle_files_checksum" || $(wc -c < $cache_dir/$gradle_files_checksum) -le 1 ]]; then
$(__gradle-generate-tasks-cache 1>&2 2>/dev/null &)
fi
else
# Default tasks available outside Gradle projects
local args="buildEnvironment - Displays all buildscript dependencies declared in root project.
components - Displays the components produced by root project.
dependencies - Displays all dependencies declared in root project.
dependencyInsight - Displays the insight into a specific dependency in root project.
dependentComponents - Displays the dependent components of components in root project.
help - Displays a help message.
init - Initializes a new Gradle build.
model - Displays the configuration model of root project.
projects - Displays the sub-projects of root project.
properties - Displays the properties of root project.
tasks - Displays the tasks runnable from root project.
wrapper - Generates Gradle wrapper files."
COMPREPLY=( $(compgen -W "$args" -- "$cur") )
fi
# Prevent colons from messing up completion
[[ -n "$(type -t __ltrim_colon_completions)" ]] && __ltrim_colon_completions "$cur"
}
__gradle-options-arguments() {
local cur prev
_get_comp_words_by_ref -n : cur
_get_comp_words_by_ref -n : -p prev
case "$prev" in
-b|--build-file|-c|--settings-file|-I|--init-script)
COMPREPLY=( $(compgen -f -A file -o filenames -X '!*.gradle*' "$cur") )
return 0
;;
-g|--gradle-user-home|--include-build|--project-cache-dir|--project-dir)
COMPREPLY=( $(compgen -d "$cur") )
return 0
;;
*)
__gradle-tasks
return 0
;;
esac
}
__gradle-notify-tasks-cache-build() {
# Notify user of cache rebuild
echo -e " (Building completion cache. Please wait)\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\c"
__gradle-generate-tasks-cache
# Remove "please wait" message by writing a bunch of spaces then moving back to the left
echo -e " \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\c"
}
__gradle-generate-tasks-cache() {
__gradle-set-files-checksum
# Use Gradle wrapper when it exists.
local gradle_cmd="gradle"
if [[ -x "$project_root_dir/gradlew" ]]; then
gradle_cmd="$project_root_dir/gradlew"
fi
# Run gradle to retrieve possible tasks and cache.
# Reuse Gradle Daemon if IDLE but don't start a new one.
local gradle_tasks_output
if [[ ! -z "$("$gradle_cmd" --status 2>/dev/null | grep IDLE)" ]]; then
gradle_tasks_output="$("$gradle_cmd" -b "$gradle_build_file" --daemon --no-scan --console=plain -q tasks --all)"
else
gradle_tasks_output="$("$gradle_cmd" -b "$gradle_build_file" --no-daemon --no-scan --console=plain -q tasks --all)"
fi
local output_line
local task_description
local -a gradle_all_tasks=()
local -a root_tasks=()
local -a subproject_tasks=()
for output_line in ${gradle_tasks_output}; do
if [[ "$output_line" =~ ^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
task_name="${BASH_REMATCH[1]}"
task_description="${BASH_REMATCH[3]}"
gradle_all_tasks+=( "$task_name - $task_description" )
# Completion for subproject tasks with ':' prefix
if [[ "$task_name" =~ ^([[:alnum:][:punct:]]+):([[:alnum:]]+) ]]; then
gradle_all_tasks+=( ":$task_name - $task_description" )
subproject_tasks+=( "${BASH_REMATCH[2]}" )
else
root_tasks+=( "$task_name" )
fi
fi
done
# subproject tasks can be referenced implicitly from root project
if [[ "$GRADLE_COMPLETION_UNQUALIFIED_TASKS" == "true" ]]; then
local -a implicit_tasks=()
implicit_tasks=( $(comm -23 <(printf "%s\n" "${subproject_tasks[@]}" | sort) <(printf "%s\n" "${root_tasks[@]}" | sort)) )
for task in $(printf "%s\n" "${implicit_tasks[@]}"); do
gradle_all_tasks+=( "$task" )
done
fi
printf "%s\n" "${gradle_all_tasks[@]}" >| "$cache_dir/$gradle_files_checksum"
echo "$gradle_files_checksum" >| "$cache_dir/$cache_name.md5"
}
__gradle-completion-init() {
local cache_dir cache_name gradle_build_file gradle_files_checksum project_root_dir
local OLDIFS="$IFS"
local IFS=$'\n'
__gradle-init-cache-dir
__gradle-set-project-root-dir
__gradle-set-build-file
if [[ -f "$gradle_build_file" ]]; then
__gradle-set-cache-name
__gradle-generate-script-cache
__gradle-set-files-checksum
__gradle-notify-tasks-cache-build
fi
IFS="$OLDIFS"
return 0
}
_gradle() {
local cache_dir cache_name gradle_build_file gradle_files_checksum project_root_dir
local cur prev
_get_comp_words_by_ref -n : cur
_get_comp_words_by_ref -n : -p prev
# Set bash internal field separator to '\n'
# This allows us to provide descriptions for options and tasks
local OLDIFS="$IFS"
local IFS=$'\n'
if [[ ${cur} == --* ]]; then
__gradle-long-options
elif [[ ${cur} == -D* ]]; then
__gradle-properties
elif [[ ${cur} == -* ]]; then
__gradle-short-options
elif [[ ${prev} == -* ]]; then
__gradle-options-arguments
else
__gradle-tasks
fi
IFS="$OLDIFS"
# Remove description ("[:space:]" and after) if only one possibility
if [[ ${#COMPREPLY[*]} -eq 1 ]]; then
COMPREPLY=( ${COMPREPLY[0]%% *} )
fi
return 0
}
complete -F _gradle gradle
complete -F _gradle gradle.bat
complete -F _gradle gradlew
complete -F _gradle gradlew.bat
complete -F _gradle ./gradlew
complete -F _gradle ./gradlew.bat
if hash gw 2>/dev/null || alias gw >/dev/null 2>&1; then
complete -F _gradle gw
fi

View file

@ -1,325 +0,0 @@
# bash completion V2 for helm -*- shell-script -*-
__helm_debug()
{
if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
fi
}
# Macs have bash3 for which the bash-completion package doesn't include
# _init_completion. This is a minimal version of that function.
__helm_init_completion()
{
COMPREPLY=()
_get_comp_words_by_ref "$@" cur prev words cword
}
# This function calls the helm program to obtain the completion
# results and the directive. It fills the 'out' and 'directive' vars.
__helm_get_completion_results() {
local requestComp lastParam lastChar args
# Prepare the command to request completions for the program.
# Calling ${words[0]} instead of directly helm allows to handle aliases
args=("${words[@]:1}")
requestComp="${words[0]} __complete ${args[*]}"
lastParam=${words[$((${#words[@]}-1))]}
lastChar=${lastParam:$((${#lastParam}-1)):1}
__helm_debug "lastParam ${lastParam}, lastChar ${lastChar}"
if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go method.
__helm_debug "Adding extra empty parameter"
requestComp="${requestComp} ''"
fi
# When completing a flag with an = (e.g., helm -n=<TAB>)
# bash focuses on the part after the =, so we need to remove
# the flag part from $cur
if [[ "${cur}" == -*=* ]]; then
cur="${cur#*=}"
fi
__helm_debug "Calling ${requestComp}"
# Use eval to handle any environment variables and such
out=$(eval "${requestComp}" 2>/dev/null)
# Extract the directive integer at the very end of the output following a colon (:)
directive=${out##*:}
# Remove the directive
out=${out%:*}
if [ "${directive}" = "${out}" ]; then
# There is not directive specified
directive=0
fi
__helm_debug "The completion directive is: ${directive}"
__helm_debug "The completions are: ${out}"
}
__helm_process_completion_results() {
local shellCompDirectiveError=1
local shellCompDirectiveNoSpace=2
local shellCompDirectiveNoFileComp=4
local shellCompDirectiveFilterFileExt=8
local shellCompDirectiveFilterDirs=16
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
# Error code. No completion.
__helm_debug "Received error from custom completion go code"
return
else
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__helm_debug "Activating no space"
compopt -o nospace
else
__helm_debug "No space directive not supported in this version of bash"
fi
fi
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__helm_debug "Activating no file completion"
compopt +o default
else
__helm_debug "No file completion directive not supported in this version of bash"
fi
fi
fi
# Separate activeHelp from normal completions
local completions=()
local activeHelp=()
__helm_extract_activeHelp
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local fullFilter filter filteringCmd
# Do not use quotes around the $completions variable or else newline
# characters will be kept.
for filter in ${completions[*]}; do
fullFilter+="$filter|"
done
filteringCmd="_filedir $fullFilter"
__helm_debug "File filtering command: $filteringCmd"
$filteringCmd
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
# Use printf to strip any trailing newline
local subdir
subdir=$(printf "%s" "${completions[0]}")
if [ -n "$subdir" ]; then
__helm_debug "Listing directories in $subdir"
pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
else
__helm_debug "Listing directories in ."
_filedir -d
fi
else
__helm_handle_completion_types
fi
__helm_handle_special_char "$cur" :
__helm_handle_special_char "$cur" =
# Print the activeHelp statements before we finish
if [ ${#activeHelp} -ne 0 ]; then
printf "\n";
printf "%s\n" "${activeHelp[@]}"
printf "\n"
# The prompt format is only available from bash 4.4.
# We test if it is available before using it.
if (x=${PS1@P}) 2> /dev/null; then
printf "%s" "${PS1@P}${COMP_LINE[@]}"
else
# Can't print the prompt. Just print the
# text the user had typed, it is workable enough.
printf "%s" "${COMP_LINE[@]}"
fi
fi
}
# Separate activeHelp lines from real completions.
# Fills the $activeHelp and $completions arrays.
__helm_extract_activeHelp() {
local activeHelpMarker="_activeHelp_ "
local endIndex=${#activeHelpMarker}
while IFS='' read -r comp; do
if [ "${comp:0:endIndex}" = "$activeHelpMarker" ]; then
comp=${comp:endIndex}
__helm_debug "ActiveHelp found: $comp"
if [ -n "$comp" ]; then
activeHelp+=("$comp")
fi
else
# Not an activeHelp line but a normal completion
completions+=("$comp")
fi
done < <(printf "%s\n" "${out}")
}
__helm_handle_completion_types() {
__helm_debug "__helm_handle_completion_types: COMP_TYPE is $COMP_TYPE"
case $COMP_TYPE in
37|42)
# Type: menu-complete/menu-complete-backward and insert-completions
# If the user requested inserting one completion at a time, or all
# completions at once on the command-line we must remove the descriptions.
# https://github.com/spf13/cobra/issues/1508
local tab=$'\t' comp
while IFS='' read -r comp; do
[[ -z $comp ]] && continue
# Strip any description
comp=${comp%%$tab*}
# Only consider the completions that match
if [[ $comp == "$cur"* ]]; then
COMPREPLY+=("$comp")
fi
done < <(printf "%s\n" "${completions[@]}")
;;
*)
# Type: complete (normal completion)
__helm_handle_standard_completion_case
;;
esac
}
__helm_handle_standard_completion_case() {
local tab=$'\t' comp
# Short circuit to optimize if we don't have descriptions
if [[ "${completions[*]}" != *$tab* ]]; then
IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur")
return 0
fi
local longest=0
local compline
# Look for the longest completion so that we can format things nicely
while IFS='' read -r compline; do
[[ -z $compline ]] && continue
# Strip any description before checking the length
comp=${compline%%$tab*}
# Only consider the completions that match
[[ $comp == "$cur"* ]] || continue
COMPREPLY+=("$compline")
if ((${#comp}>longest)); then
longest=${#comp}
fi
done < <(printf "%s\n" "${completions[@]}")
# If there is a single completion left, remove the description text
if [ ${#COMPREPLY[*]} -eq 1 ]; then
__helm_debug "COMPREPLY[0]: ${COMPREPLY[0]}"
comp="${COMPREPLY[0]%%$tab*}"
__helm_debug "Removed description from single completion, which is now: ${comp}"
COMPREPLY[0]=$comp
else # Format the descriptions
__helm_format_comp_descriptions $longest
fi
}
__helm_handle_special_char()
{
local comp="$1"
local char=$2
if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then
local word=${comp%"${comp##*${char}}"}
local idx=${#COMPREPLY[*]}
while [[ $((--idx)) -ge 0 ]]; do
COMPREPLY[$idx]=${COMPREPLY[$idx]#"$word"}
done
fi
}
__helm_format_comp_descriptions()
{
local tab=$'\t'
local comp desc maxdesclength
local longest=$1
local i ci
for ci in ${!COMPREPLY[*]}; do
comp=${COMPREPLY[ci]}
# Properly format the description string which follows a tab character if there is one
if [[ "$comp" == *$tab* ]]; then
__helm_debug "Original comp: $comp"
desc=${comp#*$tab}
comp=${comp%%$tab*}
# $COLUMNS stores the current shell width.
# Remove an extra 4 because we add 2 spaces and 2 parentheses.
maxdesclength=$(( COLUMNS - longest - 4 ))
# Make sure we can fit a description of at least 8 characters
# if we are to align the descriptions.
if [[ $maxdesclength -gt 8 ]]; then
# Add the proper number of spaces to align the descriptions
for ((i = ${#comp} ; i < longest ; i++)); do
comp+=" "
done
else
# Don't pad the descriptions so we can fit more text after the completion
maxdesclength=$(( COLUMNS - ${#comp} - 4 ))
fi
# If there is enough space for any description text,
# truncate the descriptions that are too long for the shell width
if [ $maxdesclength -gt 0 ]; then
if [ ${#desc} -gt $maxdesclength ]; then
desc=${desc:0:$(( maxdesclength - 1 ))}
desc+="…"
fi
comp+=" ($desc)"
fi
COMPREPLY[ci]=$comp
__helm_debug "Final comp: $comp"
fi
done
}
__start_helm()
{
local cur prev words cword split
COMPREPLY=()
# Call _init_completion from the bash-completion package
# to prepare the arguments properly
if declare -F _init_completion >/dev/null 2>&1; then
_init_completion -n "=:" || return
else
__helm_init_completion -n "=:" || return
fi
__helm_debug
__helm_debug "========= starting completion logic =========="
__helm_debug "cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword"
# The user could have moved the cursor backwards on the command-line.
# We need to trigger completion from the $cword location, so we need
# to truncate the command-line ($words) up to the $cword location.
words=("${words[@]:0:$cword+1}")
__helm_debug "Truncated words[*]: ${words[*]},"
local out directive
__helm_get_completion_results
__helm_process_completion_results
}
if [[ $(type -t compopt) = "builtin" ]]; then
complete -o default -F __start_helm helm
else
complete -o default -o nospace -F __start_helm helm
fi
# ex: ts=4 sw=4 et filetype=sh

View file

@ -1,174 +0,0 @@
_hyperfine() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${i}" in
"$1")
cmd="hyperfine"
;;
*)
;;
esac
done
case "${cmd}" in
hyperfine)
opts="-h -V -w -m -M -r -s -p -c -P -D -L -S -N -i -u -n --help --version --warmup --min-runs --max-runs --runs --setup --prepare --cleanup --parameter-scan --parameter-step-size --parameter-list --style --shell --ignore-failure --time-unit --export-asciidoc --export-csv --export-json --export-markdown --export-orgmode --show-output --output --command-name --min-benchmarking-time --debug-mode <command>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--warmup)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-w)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--min-runs)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-m)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--max-runs)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-M)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--runs)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-r)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--setup)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-s)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--prepare)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-p)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--cleanup)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-c)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--parameter-scan)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-P)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--parameter-step-size)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-D)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--parameter-list)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-L)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--style)
COMPREPLY=($(compgen -W "auto basic full nocolor color none" -- "${cur}"))
return 0
;;
--shell)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-S)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--time-unit)
COMPREPLY=($(compgen -W "millisecond second" -- "${cur}"))
return 0
;;
-u)
COMPREPLY=($(compgen -W "millisecond second" -- "${cur}"))
return 0
;;
--export-asciidoc)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--export-csv)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--export-json)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--export-markdown)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--export-orgmode)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--output)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--command-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-n)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--min-benchmarking-time)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
}
complete -F _hyperfine -o bashdefault -o default hyperfine

View file

@ -1,302 +0,0 @@
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# bash completion V2 for kubectl -*- shell-script -*-
__kubectl_debug()
{
if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
fi
}
# Macs have bash3 for which the bash-completion package doesn't include
# _init_completion. This is a minimal version of that function.
__kubectl_init_completion()
{
COMPREPLY=()
_get_comp_words_by_ref "$@" cur prev words cword
}
# This function calls the kubectl program to obtain the completion
# results and the directive. It fills the 'out' and 'directive' vars.
__kubectl_get_completion_results() {
local requestComp lastParam lastChar args
# Prepare the command to request completions for the program.
# Calling ${words[0]} instead of directly kubectl allows to handle aliases
args=("${words[@]:1}")
requestComp="${words[0]} __completeNoDesc ${args[*]}"
lastParam=${words[$((${#words[@]}-1))]}
lastChar=${lastParam:$((${#lastParam}-1)):1}
__kubectl_debug "lastParam ${lastParam}, lastChar ${lastChar}"
if [ -z "${cur}" ] && [ "${lastChar}" != "=" ]; then
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go method.
__kubectl_debug "Adding extra empty parameter"
requestComp="${requestComp} ''"
fi
# When completing a flag with an = (e.g., kubectl -n=<TAB>)
# bash focuses on the part after the =, so we need to remove
# the flag part from $cur
if [[ "${cur}" == -*=* ]]; then
cur="${cur#*=}"
fi
__kubectl_debug "Calling ${requestComp}"
# Use eval to handle any environment variables and such
out=$(eval "${requestComp}" 2>/dev/null)
# Extract the directive integer at the very end of the output following a colon (:)
directive=${out##*:}
# Remove the directive
out=${out%:*}
if [ "${directive}" = "${out}" ]; then
# There is not directive specified
directive=0
fi
__kubectl_debug "The completion directive is: ${directive}"
__kubectl_debug "The completions are: ${out[*]}"
}
__kubectl_process_completion_results() {
local shellCompDirectiveError=1
local shellCompDirectiveNoSpace=2
local shellCompDirectiveNoFileComp=4
local shellCompDirectiveFilterFileExt=8
local shellCompDirectiveFilterDirs=16
if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
# Error code. No completion.
__kubectl_debug "Received error from custom completion go code"
return
else
if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__kubectl_debug "Activating no space"
compopt -o nospace
else
__kubectl_debug "No space directive not supported in this version of bash"
fi
fi
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__kubectl_debug "Activating no file completion"
compopt +o default
else
__kubectl_debug "No file completion directive not supported in this version of bash"
fi
fi
fi
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local fullFilter filter filteringCmd
# Do not use quotes around the $out variable or else newline
# characters will be kept.
for filter in ${out[*]}; do
fullFilter+="$filter|"
done
filteringCmd="_filedir $fullFilter"
__kubectl_debug "File filtering command: $filteringCmd"
$filteringCmd
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
# Use printf to strip any trailing newline
local subdir
subdir=$(printf "%s" "${out[0]}")
if [ -n "$subdir" ]; then
__kubectl_debug "Listing directories in $subdir"
pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
else
__kubectl_debug "Listing directories in ."
_filedir -d
fi
else
__kubectl_handle_completion_types
fi
__kubectl_handle_special_char "$cur" :
__kubectl_handle_special_char "$cur" =
}
__kubectl_handle_completion_types() {
__kubectl_debug "__kubectl_handle_completion_types: COMP_TYPE is $COMP_TYPE"
case $COMP_TYPE in
37|42)
# Type: menu-complete/menu-complete-backward and insert-completions
# If the user requested inserting one completion at a time, or all
# completions at once on the command-line we must remove the descriptions.
# https://github.com/spf13/cobra/issues/1508
local tab comp
tab=$(printf '\t')
while IFS='' read -r comp; do
# Strip any description
comp=${comp%%$tab*}
# Only consider the completions that match
comp=$(compgen -W "$comp" -- "$cur")
if [ -n "$comp" ]; then
COMPREPLY+=("$comp")
fi
done < <(printf "%s\n" "${out[@]}")
;;
*)
# Type: complete (normal completion)
__kubectl_handle_standard_completion_case
;;
esac
}
__kubectl_handle_standard_completion_case() {
local tab comp
tab=$(printf '\t')
local longest=0
# Look for the longest completion so that we can format things nicely
while IFS='' read -r comp; do
# Strip any description before checking the length
comp=${comp%%$tab*}
# Only consider the completions that match
comp=$(compgen -W "$comp" -- "$cur")
if ((${#comp}>longest)); then
longest=${#comp}
fi
done < <(printf "%s\n" "${out[@]}")
local completions=()
while IFS='' read -r comp; do
if [ -z "$comp" ]; then
continue
fi
__kubectl_debug "Original comp: $comp"
comp="$(__kubectl_format_comp_descriptions "$comp" "$longest")"
__kubectl_debug "Final comp: $comp"
completions+=("$comp")
done < <(printf "%s\n" "${out[@]}")
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${completions[*]}" -- "$cur")
# If there is a single completion left, remove the description text
if [ ${#COMPREPLY[*]} -eq 1 ]; then
__kubectl_debug "COMPREPLY[0]: ${COMPREPLY[0]}"
comp="${COMPREPLY[0]%% *}"
__kubectl_debug "Removed description from single completion, which is now: ${comp}"
COMPREPLY=()
COMPREPLY+=("$comp")
fi
}
__kubectl_handle_special_char()
{
local comp="$1"
local char=$2
if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then
local word=${comp%"${comp##*${char}}"}
local idx=${#COMPREPLY[*]}
while [[ $((--idx)) -ge 0 ]]; do
COMPREPLY[$idx]=${COMPREPLY[$idx]#"$word"}
done
fi
}
__kubectl_format_comp_descriptions()
{
local tab
tab=$(printf '\t')
local comp="$1"
local longest=$2
# Properly format the description string which follows a tab character if there is one
if [[ "$comp" == *$tab* ]]; then
desc=${comp#*$tab}
comp=${comp%%$tab*}
# $COLUMNS stores the current shell width.
# Remove an extra 4 because we add 2 spaces and 2 parentheses.
maxdesclength=$(( COLUMNS - longest - 4 ))
# Make sure we can fit a description of at least 8 characters
# if we are to align the descriptions.
if [[ $maxdesclength -gt 8 ]]; then
# Add the proper number of spaces to align the descriptions
for ((i = ${#comp} ; i < longest ; i++)); do
comp+=" "
done
else
# Don't pad the descriptions so we can fit more text after the completion
maxdesclength=$(( COLUMNS - ${#comp} - 4 ))
fi
# If there is enough space for any description text,
# truncate the descriptions that are too long for the shell width
if [ $maxdesclength -gt 0 ]; then
if [ ${#desc} -gt $maxdesclength ]; then
desc=${desc:0:$(( maxdesclength - 1 ))}
desc+="…"
fi
comp+=" ($desc)"
fi
fi
# Must use printf to escape all special characters
printf "%q" "${comp}"
}
__start_kubectl()
{
local cur prev words cword split
COMPREPLY=()
# Call _init_completion from the bash-completion package
# to prepare the arguments properly
if declare -F _init_completion >/dev/null 2>&1; then
_init_completion -n "=:" || return
else
__kubectl_init_completion -n "=:" || return
fi
__kubectl_debug
__kubectl_debug "========= starting completion logic =========="
__kubectl_debug "cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword"
# The user could have moved the cursor backwards on the command-line.
# We need to trigger completion from the $cword location, so we need
# to truncate the command-line ($words) up to the $cword location.
words=("${words[@]:0:$cword+1}")
__kubectl_debug "Truncated words[*]: ${words[*]},"
local out directive
__kubectl_get_completion_results
__kubectl_process_completion_results
}
if [[ $(type -t compopt) = "builtin" ]]; then
complete -o default -F __start_kubectl kubectl
else
complete -o default -o nospace -F __start_kubectl kubectl
fi
# ex: ts=4 sw=4 et filetype=sh

View file

@ -1,85 +0,0 @@
#!/bin/bash
# Ensure stdin is a tty
# Avoid loading this file more than once
if [[ -t 0 ]] && [[ "$__MCFLY_LOADED" != "loaded" ]]; then
__MCFLY_LOADED="loaded"
# Ensure HISTFILE exists.
export HISTFILE="${HISTFILE:-$HOME/.bash_history}"
if [[ ! -r "${HISTFILE}" ]]; then
echo "McFly: ${HISTFILE} does not exist or is not readable. Please fix this or set HISTFILE to something else before using McFly."
return 1
fi
# MCFLY_SESSION_ID is used by McFly internally to keep track of the commands from a particular terminal session.
MCFLY_SESSION_ID="$(command dd if=/dev/urandom bs=256 count=1 2> /dev/null | LC_ALL=C command tr -dc 'a-zA-Z0-9' | command head -c 24)"
export MCFLY_SESSION_ID
# Find the binary
MCFLY_PATH=${MCFLY_PATH:-$(command -v mcfly)}
if [ -z "$MCFLY_PATH" ]; then
echo "Cannot find the mcfly binary, please make sure that mcfly is in your path before sourcing mcfly.bash."
return 1
fi
# Ignore commands with a leading space
export HISTCONTROL="${HISTCONTROL:-ignorespace}"
# Append new history items to .bash_history
shopt -s histappend
# Setup a function to be used by $PROMPT_COMMAND.
function mcfly_prompt_command {
local exit_code=$? # Record exit status of previous command.
# Populate McFly's temporary, per-session history file from recent commands in the shell's primary HISTFILE.
if [[ ! -f "${MCFLY_HISTORY}" ]]; then
MCFLY_HISTORY=$(mktemp -t mcfly.XXXXXXXX)
export MCFLY_HISTORY
command tail -n100 "${HISTFILE}" >| "${MCFLY_HISTORY}"
fi
history -a "${MCFLY_HISTORY}" # Append history to $MCFLY_HISTORY.
# Run mcfly with the saved code. It will:
# * append commands to $HISTFILE, (~/.bash_history by default)
# for backwards compatibility and to load in new terminal sessions;
# * find the text of the last command in $MCFLY_HISTORY and save it to the database.
$MCFLY_PATH add --exit ${exit_code} --append-to-histfile
# Clear the in-memory history and reload it from $MCFLY_HISTORY
# (to remove instances of '#mcfly: ' from the local session history).
history -cr "${MCFLY_HISTORY}"
return ${exit_code} # Restore the original exit code by returning it.
}
# Set $PROMPT_COMMAND run mcfly_prompt_command, preserving any existing $PROMPT_COMMAND.
if [ -z "$PROMPT_COMMAND" ]
then
PROMPT_COMMAND="mcfly_prompt_command"
elif [[ ! "$PROMPT_COMMAND" =~ "mcfly_prompt_command" ]]
then
PROMPT_COMMAND="mcfly_prompt_command;${PROMPT_COMMAND#;}"
fi
# If this is an interactive shell, take ownership of ctrl-r.
if [[ $- =~ .*i.* ]]; then
if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
# shellcheck disable=SC2016
bind -x '"\C-r": "echo \#mcfly: ${READLINE_LINE[@]} >> $MCFLY_HISTORY ; READLINE_LINE= ; mcfly search"'
else
# The logic here is:
# 1. Jump to the beginning of the edit buffer, add 'mcfly: ', and comment out the current line. We comment out the line
# to ensure that all possible special characters, including backticks, are ignored. This commented out line will
# end up as the most recent entry in the $MCFLY_HISTORY file.
# 2. Type "mcfly search" and then run the command. McFly will pull the last line from the $MCFLY_HISTORY file,
# which should be the commented-out search from step #1. It will then remove that line from the history file and
# render the search UI pre-filled with it.
if set -o | grep "vi " | grep -q on; then
bind "'\C-r': '\e0i#mcfly: \e\C-m mcfly search\C-m'"
else
bind "'\C-r': '\C-amcfly: \e# mcfly search\C-m'"
fi
fi
fi
fi

View file

@ -1,171 +0,0 @@
#!/usr/bin/env bash
###############################################################################
# __ _
# \ \ _ __ | |__
# \ \ | '_ \| '_ \
# / / | | | | |_) |
# /_/ |_| |_|_.__/
#
# [nb] Command line and local web note-taking, bookmarking, and archiving with
# plain text data storage, encryption, filtering and search, pinning, #tagging,
# Git-backed versioning and syncing, Pandoc-backed conversion, global and local
# notebooks, customizable color themes, [[wiki-style linking]], plugins, and
# more in a single portable, user-friendly script.
#
# https://github.com/xwmx/nb
###############################################################################
_nb_subcommands() {
# _nb_cache_completions()
#
# Usage:
# _nb_cache_completions <path>
#
# Description:
# Cache completions for `nb`. Generating completions can be slow and
# native shell caching doesn't appear to help.
_nb_cache_completions() {
local _cache_path="${1:-}"
[[ -z "${_cache_path:-}" ]] && return 0
# Remove outdated cache files.
local _base_cache_path="${_cache_path%-*}"
local __suffix=
for __suffix in "zsh" "v1"
do
if [[ -e "${_base_cache_path:?}-${__suffix:?}" ]]
then
rm -f "${_base_cache_path:?}-${__suffix:?}"
fi
done
# Rebuild completion cache.
local _commands=()
IFS=$'\n' _commands=($(nb subcommands))
local _notebooks=()
IFS=$'\n' _notebooks=($(nb notebooks --names --no-color --unarchived))
local _completions=()
IFS=$'\n' _completions=(${_commands[@]})
local _commands_cached=
local _notebooks_cached=
if [[ -e "${_cache_path}" ]]
then
local _counter=0
while IFS= read -r __line
do
_counter=$((_counter+1))
if [[ "${_counter}" == 1 ]]
then
_commands_cached="${__line}"
elif [[ "${_counter}" == 2 ]]
then
_notebooks_cached="${__line}"
else
break
fi
done < "${_cache_path}"
fi
if [[ "${_commands_cached}" != "${_commands[*]:-}" ]] ||
[[ "${_notebooks_cached}" != "${_notebooks[*]:-}" ]]
then
# Construct <notebook>:<subcommand> completions.
local __notebook=
for __notebook in "${_notebooks[@]}"
do
local __command=
for __command in "${_commands[@]}"
do
if [[ -n "${__notebook:-}" ]] &&
[[ -n "${__command:-}" ]]
then
_completions+=("${__notebook}:${__command}")
fi
done
done
local _directory_path=
_directory_path="$(dirname "${_cache_path}")"
mkdir -p "${_directory_path}"
if [[ -f "${_cache_path:?}" ]]
then
rm -f "${_cache_path:?}"
fi
touch "${_cache_path:?}"
{
(IFS=$' '; printf "%s\\n" "${_commands[*]}")
(IFS=$' '; printf "%s\\n" "${_notebooks[*]}")
printf "%s\\n" "${_completions[@]}"
} >> "${_cache_path}"
fi
}
local _nb_dir=
_nb_dir="$(nb env | grep 'NB_DIR' | cut -d = -f 2)"
if [[ -z "${_nb_dir:?}" ]] ||
[[ ! -e "${_nb_dir}" ]]
then
return 0
elif [[ -L "${_nb_dir}" ]]
then
if hash "realpath" 2>/dev/null
then
_nb_dir="$(realpath "${_nb_dir}")"
else
_nb_dir="$(readlink "${_nb_dir}")"
fi
fi
if [[ ! -d "${_nb_dir}" ]]
then
return 0
fi
local _cache_path="${_nb_dir:?}/.cache/nb-completion-cache-v2"
local _completions_cached=()
if [[ ! -e "${_cache_path}" ]]
then
_nb_cache_completions "${_cache_path}"
fi
if [[ -e "${_cache_path}" ]]
then
local _counter=0
local __line=
while IFS= read -r __line
do
_counter=$((_counter+1))
if [[ "${_counter}" -gt 2 ]]
then
_completions_cached+=("${__line}")
fi
done < "${_cache_path}"
(_nb_cache_completions "${_cache_path}" &)
fi
local _current="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=()
COMPREPLY=($(compgen -W "${_completions_cached[*]}" -- "${_current}"))
}
complete -F _nb_subcommands nb

View file

@ -1,74 +0,0 @@
#
# Rudimentary Bash completion definition for nnn.
#
# Author:
# Arun Prakash Jana <engineerarun@gmail.com>
#
_nnn ()
{
COMPREPLY=()
local IFS=$'\n'
local cur=$2 prev=$3
local -a opts
opts=(
-a
-A
-b
-B
-c
-C
-d
-D
-e
-E
-f
-g
-H
-i
-J
-K
-l
-n
-o
-p
-P
-Q
-r
-R
-s
-S
-t
-T
-u
-U
-V
-x
-h
)
if [[ $prev == -b ]]; then
local bookmarks=$(echo $NNN_BMS | awk -F: -v RS=\; '{print $1}')
COMPREPLY=( $(compgen -W "$bookmarks" -- "$cur") )
elif [[ $prev == -l ]]; then
return 1
elif [[ $prev == -p ]]; then
COMPREPLY=( $(compgen -f -d -- "$cur") )
elif [[ $prev == -P ]]; then
local plugins=$(echo $NNN_PLUG | awk -F: -v RS=\; '{print $1}')
COMPREPLY=( $(compgen -W "$plugins" -- "$cur") )
elif [[ $prev == -s ]]; then
local sessions_dir=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/sessions
COMPREPLY=( $(cd "$sessions_dir" && compgen -f -d -- "$cur") )
elif [[ $prev == -t ]]; then
return 1
elif [[ $prev == -T ]]; then
local keys=$(echo "a d e r s t v" | awk -v RS=' ' '{print $0}')
COMPREPLY=( $(compgen -W "$keys" -- "$cur") )
elif [[ $cur == -* ]]; then
COMPREPLY=( $(compgen -W "${opts[*]}" -- "$cur") )
else
COMPREPLY=( $(compgen -f -d -- "$cur") )
fi
}
complete -o filenames -F _nnn nnn

View file

@ -1,200 +0,0 @@
_poetry_d45857f4284b6851_complete()
{
local cur script coms opts com
COMPREPLY=()
_get_comp_words_by_ref -n : cur words
# for an alias, get the real script behind it
if [[ $(type -t ${words[0]}) == "alias" ]]; then
script=$(alias ${words[0]} | sed -E "s/alias ${words[0]}='(.*)'/\1/")
else
script=${words[0]}
fi
# lookup for command
for word in ${words[@]:1}; do
if [[ $word != -* ]]; then
com=$word
break
fi
done
# completing for an option
if [[ ${cur} == --* ]] ; then
opts="--ansi --help --no-ansi --no-cache --no-interaction --no-plugins --quiet --verbose --version"
case "$com" in
(about)
opts="${opts} "
;;
(add)
opts="${opts} --allow-prereleases --dev --dry-run --editable --extras --group --lock --optional --platform --python --source"
;;
(build)
opts="${opts} --format"
;;
(cache clear)
opts="${opts} --all"
;;
(cache list)
opts="${opts} "
;;
(check)
opts="${opts} "
;;
(config)
opts="${opts} --list --local --unset"
;;
(debug info)
opts="${opts} "
;;
(debug resolve)
opts="${opts} --extras --install --python --tree"
;;
(env info)
opts="${opts} --path"
;;
(env list)
opts="${opts} --full-path"
;;
(env remove)
opts="${opts} --all"
;;
(env use)
opts="${opts} "
;;
(export)
opts="${opts} --dev --extras --format --only --output --with --with-credentials --without --without-hashes --without-urls"
;;
(help)
opts="${opts} "
;;
(init)
opts="${opts} --author --dependency --description --dev-dependency --license --name --python"
;;
(install)
opts="${opts} --all-extras --dry-run --extras --no-dev --no-root --only --only-root --remove-untracked --sync --with --without"
;;
(list)
opts="${opts} "
;;
(lock)
opts="${opts} --check --no-update"
;;
(new)
opts="${opts} --name --readme --src"
;;
(publish)
opts="${opts} --build --cert --client-cert --dry-run --password --repository --skip-existing --username"
;;
(remove)
opts="${opts} --dev --dry-run --group"
;;
(run)
opts="${opts} "
;;
(search)
opts="${opts} "
;;
(self add)
opts="${opts} --allow-prereleases --dry-run --editable --extras --source"
;;
(self install)
opts="${opts} --dry-run --sync"
;;
(self lock)
opts="${opts} --check --no-update"
;;
(self remove)
opts="${opts} --dry-run"
;;
(self show)
opts="${opts} --addons --latest --outdated --tree"
;;
(self show plugins)
opts="${opts} "
;;
(self update)
opts="${opts} --dry-run --preview"
;;
(shell)
opts="${opts} "
;;
(show)
opts="${opts} --all --latest --no-dev --only --outdated --tree --why --with --without"
;;
(source add)
opts="${opts} --default --secondary"
;;
(source remove)
opts="${opts} "
;;
(source show)
opts="${opts} "
;;
(update)
opts="${opts} --dry-run --lock --no-dev --only --with --without"
;;
(version)
opts="${opts} --dry-run --short"
;;
esac
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
__ltrim_colon_completions "$cur"
return 0;
fi
# completing for a command
if [[ $cur == $com ]]; then
coms="about add build cache clear cache list check config debug info debug resolve env info env list env remove env use export help init install list lock new publish remove run search self add self install self lock self remove self show self show plugins self update shell show source add source remove source show update version"
COMPREPLY=($(compgen -W "${coms}" -- ${cur}))
__ltrim_colon_completions "$cur"
return 0
fi
}
complete -o default -F _poetry_d45857f4284b6851_complete poetry
complete -o default -F _poetry_d45857f4284b6851_complete /Users/bzalewski/.local/poetry/venv/bin/poetry

View file

@ -1,289 +0,0 @@
_volta() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${i}" in
volta)
cmd="volta"
;;
completions)
cmd+="__completions"
;;
fetch)
cmd+="__fetch"
;;
help)
cmd+="__help"
;;
install)
cmd+="__install"
;;
list)
cmd+="__list"
;;
ls)
cmd+="__ls"
;;
pin)
cmd+="__pin"
;;
run)
cmd+="__run"
;;
setup)
cmd+="__setup"
;;
uninstall)
cmd+="__uninstall"
;;
use)
cmd+="__use"
;;
which)
cmd+="__which"
;;
*)
;;
esac
done
case "${cmd}" in
volta)
opts=" -v -h --verbose --quiet --version --help fetch install uninstall pin list completions which use setup run help ls"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__completions)
opts=" -f -h -V -o --force --help --version --verbose --quiet --output <shell> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--output)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-o)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__fetch)
opts=" -h -V --help --version --verbose --quiet <tool[@version]>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__help)
opts=" -h -V --help --version --verbose --quiet "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__install)
opts=" -h -V --help --version --verbose --quiet <tool[@version]>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__list)
opts=" -c -d -h -V --current --default --help --version --verbose --quiet --format <tool> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--format)
COMPREPLY=($(compgen -W "human plain" -- "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__ls)
opts=" -c -d -h -V --current --default --help --version --verbose --quiet --format <tool> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--format)
COMPREPLY=($(compgen -W "human plain" -- "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__pin)
opts=" -h -V --help --version --verbose --quiet <tool[@version]>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__run)
opts=" -h -V --bundled-npm --no-yarn --help --version --verbose --quiet --node --npm --yarn --env <command> <args>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--node)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--npm)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--yarn)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--env)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__setup)
opts=" -h -V --help --version --verbose --quiet "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__uninstall)
opts=" -h -V --help --version --verbose --quiet <tool> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__use)
opts=" -h -V --help --version --verbose --quiet <anything>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
volta__which)
opts=" -h -V --help --version --verbose --quiet <binary> "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
}
complete -F _volta -o bashdefault -o default volta

View file

@ -1,23 +0,0 @@
# bash completion for the `wp` command
_wp_complete() {
local OLD_IFS="$IFS"
local cur=${COMP_WORDS[COMP_CWORD]}
IFS=$'\n'; # want to preserve spaces at the end
local opts="$(wp cli completions --line="$COMP_LINE" --point="$COMP_POINT")"
if [[ "$opts" =~ \<file\>\s* ]]
then
COMPREPLY=( $(compgen -f -- $cur) )
elif [[ $opts = "" ]]
then
COMPREPLY=( $(compgen -f -- $cur) )
else
COMPREPLY=( ${opts[*]} )
fi
IFS="$OLD_IFS"
return 0
}
complete -o nospace -F _wp_complete wp

View file

@ -1,127 +0,0 @@
# =============================================================================
#
# Utility functions for zoxide.
#
# pwd based on the value of _ZO_RESOLVE_SYMLINKS.
function __zoxide_pwd() {
\builtin pwd -L
}
# cd + custom logic based on the value of _ZO_ECHO.
function __zoxide_cd() {
# shellcheck disable=SC2164
\builtin cd -- "$@"
}
# =============================================================================
#
# Hook configuration for zoxide.
#
# Hook to add new entries to the database.
__zoxide_oldpwd="$(__zoxide_pwd)"
function __zoxide_hook() {
\builtin local -r retval="$?"
\builtin local pwd_tmp
pwd_tmp="$(__zoxide_pwd)"
if [[ ${__zoxide_oldpwd} != "${pwd_tmp}" ]]; then
__zoxide_oldpwd="${pwd_tmp}"
\command zoxide add -- "${__zoxide_oldpwd}"
fi
return "${retval}"
}
# Initialize hook.
if [[ ${PROMPT_COMMAND:=} != *'__zoxide_hook'* ]]; then
PROMPT_COMMAND="__zoxide_hook;${PROMPT_COMMAND#;}"
fi
# =============================================================================
#
# When using zoxide with --no-cmd, alias these internal functions as desired.
#
__zoxide_z_prefix='z#'
# Jump to a directory using only keywords.
function __zoxide_z() {
# shellcheck disable=SC2199
if [[ $# -eq 0 ]]; then
__zoxide_cd ~
elif [[ $# -eq 1 && $1 == '-' ]]; then
__zoxide_cd "${OLDPWD}"
elif [[ $# -eq 1 && -d $1 ]]; then
__zoxide_cd "$1"
elif [[ ${@: -1} == "${__zoxide_z_prefix}"* ]]; then
# shellcheck disable=SC2124
\builtin local result="${@: -1}"
__zoxide_cd "${result:${#__zoxide_z_prefix}}"
else
\builtin local result
# shellcheck disable=SC2312
result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -- "$@")" &&
__zoxide_cd "${result}"
fi
}
# Jump to a directory using interactive search.
function __zoxide_zi() {
\builtin local result
result="$(\command zoxide query -i -- "$@")" && __zoxide_cd "${result}"
}
# =============================================================================
#
# Commands for zoxide. Disable these using --no-cmd.
#
\builtin unalias z &>/dev/null || \builtin true
function z() {
__zoxide_z "$@"
}
\builtin unalias zi &>/dev/null || \builtin true
function zi() {
__zoxide_zi "$@"
}
# Load completions.
# - Bash 4.4+ is required to use `@Q`.
# - Completions require line editing. Since Bash supports only two modes of
# line editing (`vim` and `emacs`), we check if either them is enabled.
# - Completions don't work on `dumb` terminals.
if [[ ${BASH_VERSINFO[0]:-0} -eq 4 && ${BASH_VERSINFO[1]:-0} -ge 4 || ${BASH_VERSINFO[0]:-0} -ge 5 ]] &&
[[ :"${SHELLOPTS}": =~ :(vi|emacs): && ${TERM} != 'dumb' ]]; then
# Use `printf '\e[5n'` to redraw line after fzf closes.
\builtin bind '"\e[0n": redraw-current-line' &>/dev/null
function __zoxide_z_complete() {
# Only show completions when the cursor is at the end of the line.
[[ ${#COMP_WORDS[@]} -eq $((COMP_CWORD + 1)) ]] || return
# If there is only one argument, use `cd` completions.
if [[ ${#COMP_WORDS[@]} -eq 2 ]]; then
\builtin mapfile -t COMPREPLY < <(
\builtin compgen -A directory -- "${COMP_WORDS[-1]}" || \builtin true
)
# If there is a space after the last word, use interactive selection.
elif [[ -z ${COMP_WORDS[-1]} ]]; then
\builtin local result
# shellcheck disable=SC2312
result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -i -- "${COMP_WORDS[@]:1:${#COMP_WORDS[@]}-2}")" &&
COMPREPLY=("${__zoxide_z_prefix}${result}/")
\builtin printf '\e[5n'
fi
}
\builtin complete -F __zoxide_z_complete -o filenames -- z
\builtin complete -r zi &>/dev/null || \builtin true
fi
# =============================================================================
#
# To initialize zoxide, add this to your configuration (usually ~/.bashrc):
#
# eval "$(zoxide init bash)"

View file

@ -1,162 +0,0 @@
#!/usr/bin/env bash
### Initialize
COMPLETION_DIR="$HOME/.local/share/bash-completion/completions"
mkdir -p "$COMPLETION_DIR"
FALLBACK_URL="https://gitlab.com/megabyte-labs/misc/dotfiles/-/raw/master/dotfiles/.local/share/bash-completion/completions"
### Deno
if command -v deno > /dev/null; then
deno completions bash > "$COMPLETION_DIR/deno.bash"
elif [ -f "$COMPLETION_DIR/deno.bash" ]; then
rm "$COMPLETION_DIR/deno.bash"
fi
### direnv
if command -v direnv > /dev/null; then
direnv hook bash > "$COMPLETION_DIR/direnv.bash"
elif [ -f "$COMPLETION_DIR/direnv.bash" ]; then
rm "$COMPLETION_DIR/direnv.bash"
fi
### fd
if command -v fd > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix fd)/etc/bash_completion.d/fd" ]; then
cp "$(brew --prefix fd)/etc/bash_completion.d/fd" "$COMPLETION_DIR/fd.bash"
elif command -v fd > /dev/null; then
curl -sSL "$FALLBACK_URL/fd.bash" > "$COMPLETION_DIR/fd.bash"
elif [ -f "$COMPLETION_DIR/fd.bash" ]; then
rm "$COMPLETION_DIR/fd.bash"
fi
### fig
if command -v fig > /dev/null; then
fig completion bash > "$COMPLETION_DIR/fig.bash"
elif [ -f "$COMPLETION_DIR/fig.bash" ]; then
rm "$COMPLETION_DIR/fig.bash"
fi
### fzf
if command -v fzf > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix fzf)/shell/completion.bash" ]; then
cp "$(brew --prefix fzf)/shell/completion.bash" "$COMPLETION_DIR/fzf.bash"
cp "$(brew --prefix fzf)/shell/key-bindings.bash" "$COMPLETION_DIR/fzf-key-bindings.bash"
elif command -v fzf > /dev/null; then
curl -sSL "$FALLBACK_URL/fzf.bash" > "$COMPLETION_DIR/fzf.bash"
curl -sSL "$FALLBACK_URL/fzf-key-bindings.bash" > "$COMPLETION_DIR/fzf-key-bindings.bash"
elif [ -f "$COMPLETION_DIR/fzf.bash" ]; then
rm "$COMPLETION_DIR/fzf.bash"
rm "$COMPLETION_DIR/fzf-key-bindings.bash"
fi
### gh
if command -v gh > /dev/null; then
gh completion -s bash > "$COMPLETION_DIR/gh.bash"
elif [ -f "$COMPLETION_DIR/gh.bash" ]; then
rm "$COMPLETION_DIR/gh.bash"
fi
### Google Cloud SDK
if command -v gcloud > /dev/null; then
curl -sSL "$FALLBACK_URL/gcloud.bash" > "COMPLETION_DIR/gcloud.bash"
elif [ -f "$COMPLETION_DIR/gcloud.bash" ]; then
rm "$COMPLETION_DIR/gcloud.bash"
fi
### Googler
if command -v googler > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix googler)/etc/bash_completion.d/googler-completion.bash" ]; then
cp "$(brew --prefix googler)/etc/bash_completion.d/googler-completion.bash" "$COMPLETION_DIR/googler.bash"
elif command -v googler > /dev/null; then
curl -sSL "$FALLBACK_URL/googler.bash" > "$COMPLETION_DIR/googler.bash"
elif [ -f "$COMPLETION_DIR/googler.bash" ]; then
rm "$COMPLETION_DIR/googler.bash"
fi
### Gradle
if command -v gradle > /dev/null; then
curl -sSL https://raw.githubusercontent.com/eriwen/gradle-completion/master/gradle-completion.bash > "$COMPLETION_DIR/gradle.bash"
elif [ -f "$COMPLETION_DIR/gradle.bash" ]; then
rm "$COMPLETION_DIR/gradle.bash"
fi
### Helm
if command -v helm > /dev/null; then
helm completion bash > "$COMPLETION_DIR/helm.bash"
elif [ -f "$COMPLETION_DIR/helm.bash" ]; then
rm "$COMPLETION_DIR/helm.bash"
fi
### Hyperfine
if command -v hyperfine > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix hyperfine)/etc/bash_completion.d/hyperfine.bash" ]; then
cp "$(brew --prefix hyperfine)/etc/bash_completion.d/hyperfine.bash" "$COMPLETION_DIR/hyperfine.bash"
elif command -v hyperfine > /dev/null; then
curl -sSL "$FALLBACK_URL/hyperfine.bash" > "$COMPLETION_DIR/hyperfine.bash"
elif [ -f "$COMPLETION_DIR/hyperfine.bash" ]; then
rm "$COMPLETION_DIR/hyperfine.bash"
fi
### kubectl
if command -v kubectl > /dev/null; then
kubectl completion bash > "$COMPLETION_DIR/kubectl.bash"
elif [ -f "$COMPLETION_DIR/kubectl.bash" ]; then
rm "$COMPLETION_DIR/kubectl.bash"
fi
### mcfly
export MCFLY_KEY_SCHEME=vim
if command -v mcfly > /dev/null; then
mcfly init bash > "$COMPLETION_DIR/mcfly.bash"
elif [ -f "$COMPLETION_DIR/mcfly.bash" ]; then
rm "$COMPLETION_DIR/mcfly.bash"
fi
### nb
if command -v nb > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix nb)/etc/bash_completion.d/nb.bash" ]; then
cp "$(brew --prefix nb)/etc/bash_completion.d/nb.bash" "$COMPLETION_DIR/nb.bash"
elif command -v nb > /dev/null; then
curl -sSL "$FALLBACK_URL/nb.bash" > "$COMPLETION_DIR/nb.bash"
elif [ -f "$COMPLETION_DIR/nb.bash" ]; then
rm "$COMPLETION_DIR/nb.bash"
fi
### nnn
if command -v nnn > /dev/null && command -v brew > /dev/null && [ -f "$(brew --prefix nnn)/etc/bash_completion.d/nnn-completion.bash" ]; then
cp "$(brew --prefix nnn)/etc/bash_completion.d/nnn-completion.bash" "$COMPLETION_DIR/nnn.bash"
elif command -v nnn > /dev/null; then
curl -sSL "$FALLBACK_URL/nnn.bash" > "$COMPLETION_DIR/nnn.bash"
elif [ -f "$COMPLETION_DIR/nnn.bash" ]; then
rm "$COMPLETION_DIR/nnn.bash"
fi
### npm
if command -v npm > /dev/null; then
npm completion > "$COMPLETION_DIR/npm.bash"
elif [ -f "$COMPLETION_DIR/npm.bash" ]; then
rm "$COMPLETION_DIR/npm.bash"
fi
### Poetry
if command -v poetry > /dev/null; then
poetry completions bash > "$COMPLETION_DIR/poetry.bash"
elif [ -f "$COMPLETION_DIR/poetry.bash" ]; then
rm "$COMPLETION_DIR/poetry.bash"
fi
### Volta
if command -v volta > /dev/null; then
volta completions bash > "$COMPLETION_DIR/volta.bash"
elif [ -f "$COMPLETION_DIR/volta.bash" ]; then
rm "$COMPLETION_DIR/volta.bash"
fi
### wp-cli (only bash available)
if command -v wp > /dev/null; then
curl -sSL https://raw.githubusercontent.com/wp-cli/wp-cli/v2.7.1/utils/wp-completion.bash > "$COMPLETION_DIR/wp.bash"
elif [ -f "$COMPLETION_DIR/wp.bash" ]; then
rm "$COMPLETION_DIR/wp.bash"
fi
### zoxide
if command -v zoxide >/dev/null; then
zoxide init bash > "$COMPLETION_DIR/zoxide.bash"
elif [ -f "$COMPLETION_DIR/zoxide.bash" ]; then
rm "$COMPLETION_DIR/zoxide.bash"
fi

View file

@ -1 +0,0 @@
home

View file

@ -1,52 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF60TuYBEADLS1MP7XrMlRkn1Y54cb2UclUMH8HkIRfBrhk5Leo9kNZc/2QD
LmdQbi3UbZkz0uVkHqbFDgV5lAnukCnxgr9BqnL0GJpO78le7gCCbM5bR4rTJ6Ar
OOtIKf25smGTIpbSwNdj8BOLqiExGFj/9L5X9S5kfq3vtuYt+lmxKkIrEPjSYnFR
TQ2mTL8RM932GJod/5VJ2+6YvrCjtPu5/rW02H1U2ZHiTtX6ZGnIvv/sprKyFRqT
x4Ib+o9XwXof/LuxTMpVwIHSzCYanH5hPc7yRGKzIntBS+dDom+h9smx7FTgpHwt
QRFGLtVoHXqON6nXTLFDkEzxr+fXq/bgB1Kc1TuzvoK601ztQGhhDaEPloKqNWM8
Ho7JU1RpnoWr5jOFTYiPM9uyCtFNsJmD9mt4K8sQQN7T2inR5Us0o510FqePRFeX
wOJUMi1CbeYqVHfKQ5cWYujcK8pv3l1a6dSBmFfcdxtwIoA16JzCrgsCeumTDvKu
hOiTctb28srL/9WwlijUzZy6R2BGBbhP937f2NbMS/rpby7M1WizKeo2tkKVyK+w
SUWSw6EtFJi7kRSkH7rvy/ysU9I2ma88T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EyzTK85O0HUZVj1NYNINsdYiFh1qHrdAN0
RGJkkOKfrYtl/3ER+MI6PeHuaj8akQEmmyvs65tq38VBBnYjIpCbmqVJAJ/fKwuI
aBoCTnTKDuMumLVTxZOlnUXJ/uBvd/SEXd5TuOdDiw/zbtR0XaLLMhmlQwX7XFiW
PRmrTsEr8wluewET8fekxMosM8cMwn43agCc1IjfB6pGP1CyCoN6T3EnNcu8UxoY
CjpmiHZg3mKwE2cDs5WvAt+3Oxww1IiIAKUm2/siNZeshUpBmw==
=qJcP
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Betelgeuse</string>
<key>type</key>
<string>Window Settings</string>
<key>BackgroundColor</key>
<data>YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcwLjA4NjI3NDUwOTggMC4wOTgwMzkyMTU3IDAuMTQ1MDk4MDM5MgAQAYAC0hAREhNaJGNsYXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAAAAAZAAAAAAAAAAAAAAAAAAAA2Q==</data>
<key>TextColor</key>
<data>YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcwLjY2NjY2NjY2NjcgMC42ODIzNTI5NDEy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YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcwLjc2NDcwNTg4MjQgMC43ODAzOTIxNTY5IDAuODE5NjA3ODQzMQAQAYAC0hAREhNaJGNsYXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hpdmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAAAAAZAAAAAAAAAAAAAAAAAAAA2Q==</data>
<key>Font</key>
<data>YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGkCwwVFlUkbnVsbNQNDg8QERITFFZOU1NpemVYTlNmRmxhZ3NWTlNOYW1lViRjbGFzcyNAJgAAAAAAABAQgAKAA18QGUhhY2tOZXJkRm9udENvbXBsZXRlLUJvbGTSFxgZGlokY2xhc3NuYW1lWCRjbGFzc2VzVk5TRm9udKIZG1hOU09iamVjdAgRGiQpMjdJTFFTWF5nbnd+hY6QkpSwtcDJ0NMAAAAAAAABAQAAAAAAAAAcAAAAAAAAAAAAAAAAAAAA3A==</data>
</dict>
</plist>

View file

@ -1,15 +0,0 @@
[Appearance]
ColorScheme=Betelgeuse
[General]
Environment=TERM=xterm-256color,COLORTERM=truecolor
Name=Default
Parent=FALLBACK/
TerminalColumns=124
TerminalRows=35
[Scrolling]
HistoryMode=2
[Terminal Features]
UrlHintsModifiers=67108864

View file

@ -1,669 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=SC1090,SC1091
BAR_ELEMENT="-"
BAR_HEALTHY_COLOR="32"
BAR_WARNING_THRESHOLD=70
BAR_WARNING_COLOR="33"
BAR_CRITICAL_THRESHOLD=90
BAR_CRITICAL_COLOR="31"
BANNER_KERNEL_ICON=""
BANNER_KERNEL_COLOR="33"
BANNER_UPTIME_ICON=""
BANNER_UPTIME_COLOR="94"
BANNER_DEBIAN_ICON=""
BANNER_DEBIAN_COLOR="95"
BANNER_FEDORA_ICON=""
BANNER_FEDORA_COLOR="34"
BANNER_FONTPATH=""
BANNER_TEXT="$(hostname -s)"
PROCESSOR_LOADAVG_ICON="ﲯ"
PROCESSOR_LOADAVG_HEALTHY_COLOR="32"
PROCESSOR_LOADAVG_WARNING_THRESHOLD=2
PROCESSOR_LOADAVG_WARNING_COLOR="33"
PROCESSOR_LOADAVG_CRITICAL_THRESHOLD=4
PROCESSOR_LOADAVG_CRITICAL_COLOR="31"
PROCESSOR_MODEL_ICON=""
MEMORY_ICON=""
SWAP_ICON=""
DISKSPACE_ICON=""
SERVICES_UP_ICON=""
SERVICES_UP_COLOR="32"
SERVICES_DOWN_ICON=""
SERVICES_DOWN_COLOR="31"
SERVICES_FILE=".bashrc_motd_services.txt"
# TODO - Fill this in if Podman is ever used
PODMAN_VERSION_ICON="#"
PODMAN_IMAGES_ICON="#"
PODMAN_RUNNING_ICON="#"
PODMAN_RUNNING_COLOR="32"
PODMAN_OTHER_ICON="#"
PODMAN_OTHER_COLOR="90"
DOCKER_VERSION_ICON=""
DOCKER_IMAGES_ICON=""
DOCKER_RUNNING_ICON=""
DOCKER_RUNNING_COLOR="32"
DOCKER_OTHER_ICON=""
DOCKER_OTHER_COLOR="90"
UPDATES_ZERO_ICON=""
UPDATES_ZERO_COLOR="32"
UPDATES_AVAILIABLE_ICON="ﮮ"
UPDATES_AVAILIABLE_COLOR="33"
UPDATES_SECURITY_ICON="撚"
UPDATES_SECURITY_COLOR="31"
LETSENCRYPT_VALID_ICON="ﲘ"
LETSENCRYPT_VALID_COLOR="32"
LETSENCRYPT_WARNING_ICON="ﲙ"
LETSENCRYPT_WARNING_COLOR="33"
LETSENCRYPT_INVALID_ICON=""
LETSENCRYPT_INVALID_COLOR="31"
LETSENCRYPT_CERTPATH="/etc/letsencrypt/live"
LOGIN_LOGIN_ICON="﫻"
LOGIN_LOGOUT_ICON="﫼"
LOGIN_IP_ICON="ﯱ"
INCLUDE_FILE="ownscript.sh"
generate_unit_byte() {
# 1 - unit in M
if [ "$1" -ge 1024 ]; then
unit_symbol="G"
unit_value=$(echo "$1/1024" | bc -l | LANG=C xargs printf "%.1f\n")
else
unit_symbol="M"
unit_value=$1
fi
echo "$unit_value$unit_symbol"
}
generate_space() {
# 1 - already used
# 2 - total
space_fill=$(($2 - ${#1}))
space_chars=""
while [ $space_fill -ge 0 ]; do
space_chars="$space_chars "
space_fill=$((space_fill - 1))
done
echo "$space_chars"
}
generate_bar() {
# 1 - icon
# 2 - total
# 3 - used_1
# 4 - [ used_2 ]
bar_percent=$(($3 * 100 / $2))
bar_separator=$(($3 * 100 * 10 / $2 / 25))
if [ $bar_percent -ge "$BAR_WARNING_THRESHOLD" ]; then
bar_color=$BAR_WARNING_COLOR
elif [ $bar_percent -ge "$BAR_CRITICAL_THRESHOLD" ]; then
bar_color=$BAR_CRITICAL_COLOR
else
bar_color=$BAR_HEALTHY_COLOR
fi
printf " %s \\033[%dm" "$1" "$bar_color"
if [ -z "$4" ]; then
bar_piece=0
while [ $bar_piece -le 40 ]; do
if [ "$bar_piece" -ne "$bar_separator" ]; then
printf "%s" "$BAR_ELEMENT"
else
printf "%s\\033[1;30m" "$BAR_ELEMENT"
fi
bar_piece=$((bar_piece + 1))
done
else
bar_cached_val=$(($3 + $4))
bar_cached_separator=$((bar_cached_val * 100 * 10 / $2 / 25))
bar_piece=0
while [ $bar_piece -le 40 ]; do
if [ $bar_piece -eq $bar_separator ]; then
printf "%s\\033[1;36m" "$BAR_ELEMENT"
elif [ $bar_piece -eq $bar_cached_separator ]; then
printf "%s\\033[1;30m" "$BAR_ELEMENT"
else
printf "%s" "$BAR_ELEMENT"
fi
bar_piece=$((bar_piece + 1))
done
fi
printf "\\033[0m\\n"
}
generate_bar_memory() {
# 1 - icon
# 2 - total memory in M
# 3 - used memory in M
# 4 - cached memory in M
bar_memory_used=$(generate_unit_byte "$3")
bar_memory_cached=$(generate_unit_byte "$4")
bar_memory_available=$(generate_unit_byte $(($2 - $3)))
printf " %s used / %s cached / %s available\\n" "$bar_memory_used" "$bar_memory_cached" "$bar_memory_available"
generate_bar "$1" "$2" "$3" "$4"
}
generate_bar_swap() {
# 1 - icon
# 2 - total swap in M
# 3 - used swap in M
bar_swap_used=$(generate_unit_byte "$3")
bar_swap_available=$(($2 - $3))
bar_swap_available=$(generate_unit_byte "$bar_swap_available")
printf " %s used / %s available\\n" "$bar_swap_used" "$bar_swap_available"
generate_bar "$1" "$2" "$3"
}
generate_bar_disk() {
# 1 - icon
# 2 - total size in M
# 3 - used space in M
# 4 - mount path
bar_disk_mount="$4$(generate_space "$4" 10)"
bar_disk_used="$(generate_unit_byte "$3")"
bar_disk_used="$(generate_space "$bar_disk_used" 5)$bar_disk_used used"
bar_disk_available="$(($2 - $3))"
bar_disk_available="$(generate_unit_byte "$bar_disk_available") available"
printf " %s%s / %s\\n" "$bar_disk_mount" "$bar_disk_used" "$bar_disk_available"
generate_bar "$1" "$2" "$3"
}
print_banner() {
if command -v lolcat >/dev/null && command -v figlet >/dev/null; then
if [[ "${#HOSTNAME}" -lt 14 ]]; then
figlet "$(hostname)" | lolcat -f
else
printf "\\n"
printf " \\033[1;37mHostname:\\033[0m %s\\n" "$(hostname)"
fi
elif command -v figlet >/dev/null; then
printf "\\n%s\\n" "$(figlet -t -f "$BANNER_FONTPATH" " $BANNER_TEXT")"
else
printf "\\n"
printf " \\033[1;37mHostname:\\033[0m %s\\n" "$(hostname)"
fi
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" = "debian" ]; then
banner_distro_icon="$BANNER_DEBIAN_ICON"
banner_distro_color="$BANNER_DEBIAN_COLOR"
banner_distro_name="Debian"
banner_distro_version="$(cat /etc/debian_version)"
elif [ "$ID" = "fedora" ]; then
banner_distro_icon="$BANNER_FEDORA_ICON"
banner_distro_color="$BANNER_FEDORA_COLOR"
banner_distro_name="Fedora"
banner_distro_version="$VERSION_ID"
else
banner_distro_icon="$OS_ICON"
banner_distro_color="0"
if [ -n "$NAME" ]; then
banner_distro_name="$NAME"
elif [ -n "$PRETTY_NAME" ]; then
banner_distro_name="$PRETTY_NAME"
else
banner_distro_name="Linux"
fi
if [ -n "$VERSION" ]; then
banner_distro_version="$VERSION"
elif [ -n "$VERSION_ID" ]; then
banner_distro_version="$VERSION_ID"
elif [ -n "$BUILD_ID" ]; then
banner_distro_version="$BUILD_ID"
else
banner_distro_version="Version Unknown"
fi
fi
banner_distro_space="$(generate_space "$banner_distro_name" 13)"
if [ "$(hostname)" = 'dom0' ]; then
# Qubes dom0
banner_distro_space="$(generate_space "$NAME" 13)"
printf " \\033[%sm%s %s\\033[0m%s%s\\n" "$banner_distro_color" "" "$NAME" "$banner_distro_space" "$VERSION"
else
printf " \\033[%sm%s %s\\033[0m%s%s\\n" "$banner_distro_color" "$banner_distro_icon" "$banner_distro_name" "$banner_distro_space" "$banner_distro_version"
fi
printf " \\033[%sm%s Linux\\033[0m %s\\n" "$BANNER_KERNEL_COLOR" "$BANNER_KERNEL_ICON" "$(cut -d ' ' -f 3 </proc/version)"
printf " \\033[%sm%s Uptime\\033[0m %s\\n" "$BANNER_UPTIME_COLOR" "$BANNER_UPTIME_ICON" "$(uptime -p | cut -d ' ' -f 2-)"
else
if [ -d '/Applications' ] && [ -d '/System' ]; then
printf " \\033[%sm%s OS \\033[0m %s\\n" "$UPDATES_ZERO_COLOR" "" "macOS $(sw_vers -productVersion) / Build $(sw_vers -buildVersion)"
printf " \\033[%sm%s UUID \\033[0m %s\\n" "$PODMAN_RUNNING_COLOR" "" "$(ioreg -d2 -c IOPlatformExpertDevice | awk -F\" '/IOPlatformUUID/{print $(NF-1)}')"
printf " \\033[%sm%s LAN IP \\033[0m %s\\n" "$BANNER_KERNEL_COLOR" "ﯱ" "$(ifconfig en0 2>/dev/null | grep 'inet ' | cut -d ' ' -f 2)"
IP_ADDR_PUB="$(timeout 1 sh -c 'curl -sSL ifconfig.me')"
if [ -n "$IP_ADDR_PUB" ]; then
printf " \\033[%sm%s Public IP\\033[0m %s\\n" "$UPDATES_SECURITY_COLOR" "" "$IP_ADDR_PUB"
fi
fi
fi
}
print_processor() {
printf "\\n"
printf " \\033[1;37mProcessor:\\033[0m\\n"
processor_loadavg="$(cut -d " " -f 1,2,3 </proc/loadavg)"
if [ "$(echo "$processor_loadavg" | cut -d "." -f 1)" -ge "$PROCESSOR_LOADAVG_CRITICAL_THRESHOLD" ]; then
processor_loadavg_color="$PROCESSOR_LOADAVG_CRITICAL_COLOR"
elif [ "$(echo "$processor_loadavg" | cut -d "." -f 1)" -ge "$PROCESSOR_LOADAVG_WARNING_THRESHOLD" ]; then
processor_loadavg_color="$PROCESSOR_LOADAVG_WARNING_COLOR"
else
processor_loadavg_color="$PROCESSOR_LOADAVG_HEALTHY_COLOR"
fi
processor_info=$(cat /proc/cpuinfo)
processor_arch=$(uname -m)
if [ "$processor_arch" = "x86_64" ]; then
processor_model="$(echo "$processor_info" | grep "model name" | sort -u | cut -d ':' -f 2)"
processor_count=$(echo "$processor_info" | grep "physical id" | sort -u | wc -l)
processor_cores=$(echo "$processor_info" | grep "cpu cores" | sort -u | cut -d ':' -f 2)
processor_threads=$(($(echo "$processor_info" | grep "siblings" | tail -n 1 | cut -d ':' -f 2)))
if [ ! "$processor_cores" -eq $processor_threads ]; then
processor_threads=", $processor_threads Threads"
else
processor_threads=""
fi
elif [ "$processor_arch" = "mips64" ]; then
processor_model="$(echo "$processor_info" | grep "cpu model" | sort -u | cut -d ':' -f 2)"
processor_count=$(echo "$processor_info" | grep "package" | sort -u | wc -l)
processor_cores=$(echo "$processor_info" | grep -c processor)
processor_threads=""
else
processor_model="?"
processor_count=0
processor_cores=0
processor_threads=0
fi
processor_model="${processor_model//\(R\)/}"
processor_model="${processor_model//\(tm\)/}"
processor_model="${processor_model// @/,}"
processor_model="${processor_model// CPU/}"
processor_model="${processor_model// / }"
# shellcheck disable=SC2001
processor_model="$(echo "$processor_model" | sed "s/^ //g")"
processor_cores=$((processor_cores * processor_count))
if [ "$processor_count" -gt 1 ]; then
processor_count="$processor_count""x "
else
processor_count=""
fi
printf " %s \\033[%dm%s\\033[0m\\n" "$PROCESSOR_LOADAVG_ICON" "$processor_loadavg_color" "$processor_loadavg"
printf " %s %s%s = %s Cores%s\\n" "$PROCESSOR_MODEL_ICON" "$processor_count" "$processor_model" "$processor_cores" "$processor_threads"
}
print_memory() {
printf "\\n"
printf " \\033[1;37mMemory:\\033[0m\\n"
memory_usage=$(LANG=C free --mega | grep "Mem:")
memory_total=$(echo "$memory_usage" | awk '{ print $2 }')
memory_used=$(echo "$memory_usage" | awk '{ print $3 }')
memory_cached=$(echo "$memory_usage" | awk '{ print $6 }')
generate_bar_memory "$MEMORY_ICON" "$memory_total" "$memory_used" "$memory_cached"
}
print_swap() {
swap_usage=$(LANG=C free --mega | grep "Swap:")
swap_total=$(echo "$swap_usage" | awk '{ print $2 }')
swap_used=$(echo "$swap_usage" | awk '{ print $3 }')
if [ "$swap_total" -ne 0 ]; then
printf "\\n"
printf " \\033[1;37mSwap:\\033[0m\\n"
generate_bar_swap "$SWAP_ICON" "$swap_total" "$swap_used"
fi
}
print_diskspace() {
if command -v jq >/dev/null; then
printf "\\n"
printf " \\033[1;37mDiskspace:\\033[0m\\n"
diskspace_devices=$(lsblk -Jlo NAME,MOUNTPOINT | jq -c '.blockdevices | sort_by(.mountpoint) | .[] | select( .mountpoint != null and .mountpoint != "[SWAP]" )')
diskspace_partitions=$(df -B M 2> /dev/null | sed -e "s/M//g")
diskspace_index=0
echo "$diskspace_devices" | while read -r line; do
diskspace_disk_name="$(echo "$line" | jq -r '.name')"
diskspace_disk_mount="$(echo "$line" | jq -r '.mountpoint')"
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $2 }')"
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $3 }')"
if [[ "$diskspace_disk_mount" != '/var/lib/snapd/snap'* ]] && [[ "$diskspace_disk_mount" != '/snap/'* ]]; then
if [ -z "$diskspace_disk_size" ]; then
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $2 }')"
fi
if [ -z "$diskspace_disk_used" ]; then
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $3 }')"
fi
if [ "$diskspace_index" -ne 0 ]; then
printf "\\n"
fi
diskspace_index=$((diskspace_index + 1))
generate_bar_disk "$DISKSPACE_ICON" "$diskspace_disk_size" "$diskspace_disk_used" "$diskspace_disk_mount"
fi
done
fi
}
print_services() {
if [ -f $SERVICES_FILE ] && [ "$(wc -l <$SERVICES_FILE)" != 0 ]; then
printf "\\n"
printf " \\033[1;37mServices:\\033[0m \\033[1;37mVersion:\\033[0m\\n"
while read -r line; do
service_description=$(echo "$line" | cut -d ';' -f 1)
service_name=$(echo "$line" | cut -d ';' -f 2)
service_package=$(echo "$line" | cut -d ';' -f 3)
if [ -n "$service_description" ] && [ -n "$service_name" ]; then
if systemctl is-active --quiet "$service_name".service; then
service_icon="$SERVICES_UP_ICON"
service_color="$SERVICES_UP_COLOR"
else
service_icon="$SERVICES_DOWN_ICON"
service_color="$SERVICES_DOWN_COLOR"
fi
service_space=$(generate_space "$service_description" 34)
if [ -n "$service_package" ]; then
if [ -f /usr/bin/apt ]; then
package_version=$(dpkg -s "$service_package" | grep '^Version:' | cut -d ' ' -f 2 | cut -d ':' -f 2 | cut -d '-' -f 1)
elif [ -f /usr/bin/rpm ]; then
package_version=$(rpm -q --queryformat '%{VERSION}' "$service_package")
else
package_version="?"
fi
else
package_version="--"
fi
fi
printf " \\033[%sm%s\\033[0m %s%s%s\\n" "$service_color" "$service_icon" "$service_description" "$service_space" "$package_version"
done <"$SERVICES_FILE" | grep -v '#'
fi
}
print_podman() {
if command -v jq >/dev/null; then
printf "\\n"
printf " \\033[1;37mPodman:\\033[0m\\n"
podman_version="$(sudo podman version --format json | jq -r '.Client.Version')"
podman_space="$(generate_space "$podman_version" 23)"
podman_images="$(sudo podman images --format json | jq '. | length')"
printf " %s Version %s%s%s %s Images\\n\\n" "$PODMAN_VERSION_ICON" "$podman_version" "$podman_space" "$PODMAN_IMAGES_ICON" "$podman_images"
podman_list=$(sudo podman pod ls --sort name --format json)
podman_pods=$(echo "$podman_list" | jq -r '.[] .Name')
echo "$podman_pods" | while read -r pod; do
if [ "$(echo "$podman_list" | jq -r ".[] | select(.Name == \"$pod\") | .Status")" = "Running" ]; then
pod_space=$(generate_space "$pod" 34)
pod_container_running="$(echo "$podman_list" | jq -r ".[] | select(.Name == \"$pod\") | .Containers[] | select(.Status == \"running\") | .Status" | wc -l)"
if [ "$pod_container_running" -ne 0 ]; then
pod_container_running=$(printf "\\033[%um%u Running\\033[0m" "$PODMAN_RUNNING_COLOR" "$pod_container_running")
fi
pod_container_other="$(echo "$podman_list" | jq -r ".[] | select(.Name == \"$pod\") | .Containers[] | select(.Status != \"running\") | .Status" | wc -l)"
if [ "$pod_container_other" -ne 0 ]; then
pod_container_other=$(printf ", \\033[%um%u Other\\033[0m" "$PODMAN_OTHER_COLOR" "$pod_container_other")
else
pod_container_other=""
fi
pod_status="$pod_container_running$pod_container_other"
printf " \\033[%um%s\\033[0m %s%s%s\\n" "$PODMAN_RUNNING_COLOR" "$PODMAN_RUNNING_ICON" "$pod" "$pod_space" "$pod_status"
else
printf " \\033[%um%s\\033[0m \\033[%um%s\\033[0m\\n" "$PODMAN_OTHER_COLOR" "$PODMAN_OTHER_ICON" "$PODMAN_OTHER_COLOR" "$pod"
fi
done
fi
}
print_docker() {
if command -v jq >/dev/null && [ "$(systemctl is-active docker.service)" = "active" ]; then
printf "\\n"
printf " \\033[1;37mDocker:\\033[0m\\n"
docker_info=$(sudo curl -sf --unix-socket /var/run/docker.sock http:/v1.40/info)
docker_version=$(echo "$docker_info" | jq -r '.ServerVersion')
docker_space=$(generate_space "$docker_version" 23)
docker_images=$(echo "$docker_info" | jq -r '.Images')
printf " %s Version %s%s%s %s Images\\n" "$DOCKER_VERSION_ICON" "$docker_version" "$docker_space" "$DOCKER_IMAGES_ICON" "$docker_images"
docker_list_curl="$(sudo curl -sf --unix-socket /var/run/docker.sock "http://v1.40/containers/json?all=true")"
docker_list_curl_length="$(echo "$docker_list_curl" | jq -c '. | length')"
docker_list="$(echo "$docker_list_curl" | jq -c ' .[]')"
if [ "$docker_list_curl_length" != '0' ]; then
echo "$docker_list" | while read -r line; do
container_name="$(echo "$line" | jq -r '.Names[]' | sed 's/\///')"
container_status="$(echo "$line" | jq -r '.Status' | sed 's/.*/\l&/')"
container_space=$(generate_space "$container_name" 34)
if [ "$(echo "$line" | jq -r '.State')" = "running" ]; then
printf " \\033[%um%s\\033[0m %s%s%s\\n" "$DOCKER_RUNNING_COLOR" "$DOCKER_RUNNING_ICON" "$container_name" "$container_space" "$container_status"
else
printf " \\033[%um%s\\033[0m \\033[%um%s\\033[0m%s\\033[%um%s\\033[0m\\n" "$DOCKER_OTHER_COLOR" "$DOCKER_OTHER_ICON" "$DOCKER_OTHER_COLOR" "$container_name" "$container_space" "$DOCKER_OTHER_COLOR" "$container_status"
fi
done
fi
fi
}
print_updates() {
printf "\\n"
printf " \\033[1;37mHealth:\\033[0m\\n"
if [ -f /usr/bin/apt ]; then
updates_count_regular=$(apt-get -qq -y --ignore-hold --allow-change-held-packages --allow-unauthenticated -s dist-upgrade | grep ^Inst | grep -c -v Security)
updates_count_security=$(apt-get -qq -y --ignore-hold --allow-change-held-packages --allow-unauthenticated -s dist-upgrade | grep ^Inst | grep -c Security)
if [ "$updates_count_regular" -ne 0 ]; then
if [ -n "$updates_count_security" ] && [ "$updates_count_security" -ne 0 ]; then
updates_icon=$UPDATES_SECURITY_ICON
updates_color=$UPDATES_SECURITY_COLOR
updates_message="$updates_count_regular packages can be updated, $updates_count_security are security updates."
else
updates_icon=$UPDATES_AVAILIABLE_ICON
updates_color=$UPDATES_AVAILIABLE_COLOR
updates_message="$updates_count_regular packages can be updated."
fi
else
updates_icon=$UPDATES_ZERO_ICON
updates_color=$UPDATES_ZERO_COLOR
updates_message="The system apt packages are up-to-date!"
fi
printf " \\033[%sm%s \\033[0m %s\\n" "$updates_color" "$updates_icon" "$updates_message"
elif [ -f /usr/bin/dnfTODO ]; then
# TODO - Find way of quickly acquiring details
mkdir -p "$HOME/.local/labs" > /dev/null
(command dnf list updates | grep updates | wc -l > "$HOME/.local/labs/dnf-updates-reg" &)
(command dnf updateinfo list --security --available | grep '/Sec. ' | wc -l > "$HOME/.local/labs/dnf-updates-sec" &)
updates_count_security="0"
updates_count_reg="0"
if [ -f "$HOME/.local/labs/dnf-updates-sec" ]; then
updates_count_security="$(cat "$HOME/.local/labs/dnf-updates-sec")"
fi
if [ -f "$HOME/.local/labs/dnf-updates-reg" ]; then
updates_count_reg="$(cat "$HOME/.local/labs/dnf-updates-reg")"
fi
if [ -n "$updates_count_regular" ] && [ "$updates_count_regular" -ne 0 ]; then
if [ -n "$updates_count_security" ] && [ "$updates_count_security" -ne 0 ]; then
updates_icon=$UPDATES_SECURITY_ICON
updates_color=$UPDATES_SECURITY_COLOR
updates_message="$(generate_space "$updates_count_regular" 5) packages can be updated, $updates_count_security are security updates."
else
updates_icon=$UPDATES_AVAILIABLE_ICON
updates_color=$UPDATES_AVAILIABLE_COLOR
updates_message="$(generate_space "$bar_disk_used" 5) packages can be updated."
fi
else
updates_icon=$UPDATES_ZERO_ICON
updates_color=$UPDATES_ZERO_COLOR
updates_message="The system dnf packages are up-to-date!"
fi
printf " \\033[%sm%s \\033[0m %s\\n" "$updates_color" "$updates_icon" "$updates_message"
fi
if command -v systemctl > /dev/null; then
running_services_count="$(systemctl --type=service --plain | grep 'active running' | wc -l)"
failed_services_count="$(systemctl --type=service --failed | grep 'failed failed' | wc -l)"
if [ "$failed_services_count" -eq 0 ]; then
printf " \\033[%sm%s \\033[0m All enabled services are running!\\n" "32" ""
elif [ "$failed_services_count" -eq 1 ]; then
printf " \\033[%sm%s \\033[0m %s services are are currently running\\n" "32" "" "$running_services_count"
printf " \\033[%sm%s \\033[0m 1 service failed to start (%s)\\n" "31" "" "$(systemctl --type=service --failed | grep 'failed failed' | sed 's/..\([^ ]*\).service.*/\1/')"
elif [ "$failed_services_count" -gt 1 ]; then
printf " \\033[%sm%s \\033[0m %s services are are currently running\\n" "32" "" "$running_services_count"
printf " \\033[%sm%s \\033[0m %s services failed to start (see \`systemctl --type=service\`)\\n" "31" "" "$failed_services_count"
fi
fi
}
print_letsencrypt() {
if [ -d $LETSENCRYPT_CERTPATH ] && [ "$(ls -a $LETSENCRYPT_CERTPATH)" ]; then
printf "\\n"
printf " \\033[1;37mSSL / lets encrypt:\\033[0m\\n"
cert_list=$(sudo find $LETSENCRYPT_CERTPATH -name cert.pem)
for cert_file in $cert_list; do
sudo openssl x509 -checkend $((25 * 86400)) -noout -in "$cert_file" >>/dev/null
result=$?
cert_name=$(echo "$cert_file" | rev | cut -d '/' -f 2 | rev)
if [ "$result" -eq 0 ]; then
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_VALID_COLOR" "$LETSENCRYPT_VALID_ICON" "$cert_name"
else
sudo openssl x509 -checkend $((0 * 86400)) -noout -in "$cert_file" >>/dev/null
result=$?
if [ "$result" -eq 0 ]; then
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_WARNING_COLOR" "$LETSENCRYPT_WARNING_ICON" "$cert_name"
else
printf " \\033[%sm%s\\033[0m %s\\n" "$LETSENCRYPT_INVALID_COLOR" "$LETSENCRYPT_INVALID_ICON" "$cert_name"
fi
fi
done
fi
}
print_login() {
login_last="$(last -n 2 -a -d --time-format iso "$(whoami)" | head -n 2 | tail -n 1)"
if [ "$(echo "$login_last" | awk '{ print $1 }')" = "$(whoami)" ]; then
login_ip="$(echo "$login_last" | awk '{ print $7 }')"
login_login="$(date -d "$(echo "$login_last" | awk '{ print $3 }' | cut -d '+' -f 1 | sed "s/T/ /")" "+%a, %d.%m.%y %H:%M")"
login_space=$(generate_space "$login_login" 25)
if [ "$(echo "$login_last" | awk '{ print $4 }')" = "still" ]; then
login_logout="still connected"
else
login_logout="$(date -d "$(echo "$login_last" | awk '{ print $5 }' | cut -d '+' -f 1 | sed "s/T/ /")" "+%a, %d.%m.%y %H:%M")"
fi
printf "\\n"
printf " \\033[1;37mLast login for %s:\\033[0m\\n" "$(echo "$login_last" | awk '{ print $1 }')"
printf " %s %s%s%s %s\\n" "$LOGIN_LOGIN_ICON" "$login_login" "$login_space" "$LOGIN_LOGOUT_ICON" "$login_logout"
printf " %s %s\\n" "$LOGIN_IP_ICON" "$login_ip"
fi
}
print_include() {
. $INCLUDE_FILE
}
bash_motd() {
for module in "$@"; do
if [ "$module" = "--banner" ]; then
print_banner
elif [ "$module" = "--processor" ]; then
print_processor
elif [ "$module" = "--memory" ]; then
print_memory
elif [ "$module" = "--swap" ]; then
print_swap
elif [ "$module" = "--diskspace" ]; then
print_diskspace
elif [ "$module" = "--services" ]; then
print_services
elif [ "$module" = "--podman" ]; then
print_podman
elif [ "$module" = "--docker" ]; then
print_docker
elif [ "$module" = "--updates" ]; then
print_updates
elif [ "$module" = "--letsencrypt" ]; then
print_letsencrypt
elif [ "$module" = "--login" ]; then
print_login
elif [ "$module" = "--include" ]; then
print_include
fi
done
printf "\\n"
}

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
[General]
theme=Betelgeuse

View file

@ -1,88 +0,0 @@
# Betelgeuse
schemes:
themer-dark: &dark
primary:
background: "#161925"
foreground: "#aaaeb8"
cursor:
text: "#161925"
cursor: "#c3c7d1"
selection:
text: "#161925"
background: "#7cb7ff"
normal:
black: "#474b56"
red: "#ed254e"
green: "#71f79f"
yellow: "#f9dc5c"
blue: "#7cb7ff"
magenta: "#c74d89"
cyan: "#00c1e4"
white: "#aaaeb8"
bright:
black: "#60646f"
red: "#E54568"
green: "#81EDA9"
yellow: "#EED873"
blue: "#8ABAF6"
magenta: "#C66597"
cyan: "#27C2E0"
white: "#c3c7d1"
dim:
black: "#2f323e"
red: "#C22346"
green: "#5FCB87"
yellow: "#CCB551"
blue: "#6897D3"
magenta: "#A44375"
cyan: "#049FBE"
white: "#9295a0"
themer-light: &light
primary:
background: "#ffffff"
foreground: "#666970"
cursor:
text: "#ffffff"
cursor: "#4c5058"
selection:
text: "#ffffff"
background: "#a0dbff"
normal:
black: "#666970"
red: "#ff4972"
green: "#95ffc3"
yellow: "#ffff80"
blue: "#a0dbff"
magenta: "#eb71ad"
cyan: "#24e5ff"
white: "#cccdcf"
bright:
black: "#7f8288"
red: "#FF6D8E"
green: "#AAFFCF"
yellow: "#FFFF99"
blue: "#B3E2FF"
magenta: "#EF8DBD"
cyan: "#50EAFF"
white: "#e5e6e7"
dim:
black: "#4c5058"
red: "#DB4A6D"
green: "#86DCAE"
yellow: "#DBDC78"
blue: "#8FBFDE"
magenta: "#CB6A9C"
cyan: "#2CC7DE"
white: "#b2b4b7"

View file

@ -1 +0,0 @@
color_theme="Betelgeuse"

View file

@ -1,11 +0,0 @@
# Set the theme to "TwoDark"
--theme="TwoDark"
# Show line numbers, Git modifications and file header (but no grid)
--style="numbers,changes,header"
# Use italic text on the terminal (not supported on all terminals)
--italic-text=always
# Use C++ syntax for Arduino .ino files
--map-syntax "*.ino:C++"

View file

@ -1,11 +0,0 @@
# enable wayland
--ozone-platform-hint=auto
# force GPU acceleration
--enable-gpu-rasterization
--enable-zero-copy
# enable vulkan
--use-vulkan
--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,VaapiVideoDecoder,VaapiVideoEncoder,WebUIDarkMode,WaylandWindowDecorations
# custom settings
--force-dark-mode
--password-store=basic

View file

@ -1,14 +0,0 @@
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
# 0 8 * * 0 $HOME/.scripts/domingobot.sh 2>&1 >> $HOME/.log/cron.log
# * * * * * command to be executed
# ┯ ┯ ┯ ┯ ┯
# │ │ │ │ │
# │ │ │ │ ╰───── day of week (0 - 6) (Sunday=0)
# │ │ │ ╰─────── month (1 - 12)
# │ │ ╰───────── day of month (1 - 31)
# │ ╰─────────── hour (0 - 23)
# ╰───────────── min (0 - 59)

View file

@ -1,2 +0,0 @@
[global]
load_dotenv = true

View file

@ -1,6 +0,0 @@
# EXCLUDE BACKUP FILES
*.bak
# EXCLUDE LIBRARIES ON MACOS
/Library/**
/Users/Library/**

View file

@ -1,14 +0,0 @@
include whitelist-runuser-common.inc
dbus-user.talk org.freedesktop.Notifications
dbus-user.talk org.freedesktop.portal.Desktop
ignore noroot
whitelist ${RUNUSER}/pipewire-0
whitelist /usr/share/pipewire/client.conf
dbus-user.talk org.freedesktop.portal.*
whitelist ${HOME}/pictures
whitelist ${HOME}/go
whitelist ${HOME}/git
whitelist ${HOME}/documents
whitelist ${HOME}/work
whitelist /usr/share/pipewire/

View file

@ -1,12 +0,0 @@
whitelist ${HOME}
whitelist ${HOME}/.local/share
noblacklist ${HOME}
noblacklist ${PATH}/bash
noblacklist ${PATH}/fish
ignore private-bin
ignore private-cache
ignore private-dev
ignore private-tmp
ignore noroot
ignore nosound
ignore noexec /tmp

View file

@ -1,4 +0,0 @@
# noblacklist ${HOME}
# noblacklist ${HOME}/.ssh/
# include allow-ssh.inc
# whitelist /tmp/ssh-*

View file

@ -1,14 +0,0 @@
include whitelist-runuser-common.inc
dbus-user.talk org.freedesktop.Notifications
dbus-user.talk org.freedesktop.portal.Desktop
ignore noroot
whitelist ${RUNUSER}/pipewire-0
whitelist /usr/share/pipewire/client.conf
dbus-user.talk org.freedesktop.portal.*
whitelist ${HOME}/pictures
whitelist ${HOME}/go
whitelist ${HOME}/git
whitelist ${HOME}/documents
whitelist ${HOME}/work
whitelist /usr/share/pipewire/

View file

@ -1,13 +0,0 @@
noblacklist ${PATH}/bash
noblacklist ${PATH}/csh
noblacklist ${PATH}/dash
noblacklist ${PATH}/fish
noblacklist ${PATH}/ksh
noblacklist ${PATH}/sh
noblacklist ${PATH}/tclsh
noblacklist ${PATH}/tcsh
noblacklist ${PATH}/zsh
ignore private-bin
ignore private-cache
ignore private-dev
ignore private-tmp

Some files were not shown because too many files have changed in this diff Show more