Compare commits
18 Commits
8ae028f1c7
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f380ff8824 | |||
| f71c4c3816 | |||
| 5d2c403f3d | |||
| fc5eb7a943 | |||
| 0112c73e02 | |||
| 7541db9354 | |||
| 20dfacce3e | |||
| 3020201a9d | |||
| c4c26404b1 | |||
| 663f18d4f7 | |||
| 9dfcfcce07 | |||
| 3b72e59529 | |||
| fcd61b1ee9 | |||
| 8d0f64d305 | |||
| 30cc51cb2f | |||
| 75a29f8d47 | |||
| 3d4731e61e | |||
| 0d8a50e8bd |
+41
-7
@@ -8,12 +8,12 @@ if ! command -v pacman >/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install prerequisetes
|
# Install prerequisetes
|
||||||
sudo pacman -S --needed --noconfirm git curl wget python3 python-pip
|
sudo pacman -S --needed --noconfirm git curl wget python3 python-pip neovim jdk-openjdk base-devel ripgrep fd lazygit curl tectonic tree-sittter sclip julia luarocks shfmt ast-grep nvm
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo 'This script will move your current nvim config to ~/.config/nvim.bak'
|
echo 'This script will move your current nvim config to ~/.config/nvim.bak'
|
||||||
echo "Press CTRL+C within 20 secconds if you don't want these actions to be made"
|
echo "Press CTRL+C within 10 secconds if you don't want these actions to be made"
|
||||||
sleep 20
|
sleep 10
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Remove old backups
|
# Remove old backups
|
||||||
@@ -73,7 +73,41 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
git clone https://github.com/alvinlollo/LazyVim ~/.config/nvim
|
git clone https://github.com/alvinlollo/LazyVim ~/.config/nvim
|
||||||
|
|
||||||
# Dependencys for Gdoc.vim
|
# Check if nvm is in shell path
|
||||||
#wget https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/requirements.txt
|
if command -v nvm &>/dev/null; then
|
||||||
#pip3 install -r requirements.txt --break-system-packages && rm requirements.txt
|
# Get current shell name
|
||||||
#echo "pip3 install -r requirements.txt"
|
CURRENT_SHELL=$(basename -- "$SHELL")
|
||||||
|
|
||||||
|
# 2. Source the correct configuration file safely
|
||||||
|
if [ "$CURRENT_SHELL" = "fish" ] && [ -f ~/.bashrc ]; then
|
||||||
|
|
||||||
|
# Check if fish is installed first, then check for fisher
|
||||||
|
if command -v fish &>/dev/null && fish -c "functions -q fisher" &>/dev/null; then
|
||||||
|
fisher install jorgebucaran/nvm.fish
|
||||||
|
source ~/.config/fish/config.fish
|
||||||
|
else
|
||||||
|
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source
|
||||||
|
fisher install jorgebucaran/fisher
|
||||||
|
fisher install jorgebucaran/nvm.fish
|
||||||
|
source ~/.config/fish/config.fish
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [ "$CURRENT_SHELL" = "zsh" ] && [ -f ~/.zshrc ]; then
|
||||||
|
|
||||||
|
echo -e "export NVM_DIR=\"$HOME/.nvm\"\n[ -s \"/usr/share/nvm/nvm.sh\" ] && \. \"/usr/share/nvm/nvm.sh\"\n[ -s \"/usr/share/nvm/init-nvm.sh\" ] && \. \"/usr/share/nvm/init-nvm.sh\"" >>~/.zshrc
|
||||||
|
source ~/.zshrc
|
||||||
|
|
||||||
|
elif [ "$CURRENT_SHELL" = "bash" ] && [ -f ~/.config/fish/config.fish ]; then
|
||||||
|
|
||||||
|
echo "source /usr/share/nvm/init-nvm.sh" >>~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Unsupported or unreadable shell configuration: $CURRENT_SHELL"
|
||||||
|
echo "Failed to add NVM to shell path. Please add it manually to your shell configuration file."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use NVM to install the latest LTS version of Node.js
|
||||||
|
nvm install lts
|
||||||
|
nvm use lts
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
skip_watermark=false
|
||||||
|
if [ "$1" = "--skip-watermark" ]; then
|
||||||
|
skip_watermark=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$skip_watermark" = false ]; then
|
||||||
|
echo '
|
||||||
|
____ _ _ _ _ _
|
||||||
|
| __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___
|
||||||
|
| _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \
|
||||||
|
| |_) | |_| | | (_| | |\ V /| | | | | | (_) | | | (_) |
|
||||||
|
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||||
|
|___/
|
||||||
|
|
||||||
|
--------------- bat Install Script ---------------
|
||||||
|
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. See the LICENCE for more detail
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install prerequisites
|
||||||
|
if ! command -v git >/dev/null && command -v curl >/dev/null; then
|
||||||
|
if command -v pacman >/dev/null; then
|
||||||
|
echo "pacman detected. Installing prerequisites"
|
||||||
|
sudo pacman -S zsh git curl --noconfirm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v apt >/dev/null; then
|
||||||
|
echo "apt detected. Installing prerequisites"
|
||||||
|
sudo apt install git curl -y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install bat
|
||||||
|
if ! command -v bat >/dev/null; then
|
||||||
|
if ! command -v zsh >/dev/null && command -v git >/dev/null && command -v curl >/dev/null && command -v fzf >/dev/null; then
|
||||||
|
if command -v pacman >/dev/null; then
|
||||||
|
echo "pacman detected. Installing bat"
|
||||||
|
sudo pacman -S bat batman --noconfirm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v apt >/dev/null; then
|
||||||
|
echo "apt detected. Installing bat"
|
||||||
|
sudo apt install bat batman -y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# 1. Detect the actual active shell name (not just the login default)
|
||||||
|
CURRENT_SHELL=$(basename -- "$SHELL")
|
||||||
|
|
||||||
|
# 2. Source the correct configuration file safely
|
||||||
|
if [ "$CURRENT_SHELL" = "bash" ] && [ -f ~/.bashrc ]; then
|
||||||
|
source ~/.bashrc
|
||||||
|
elif [ "$CURRENT_SHELL" = "zsh" ] && [ -f ~/.zshrc ]; then
|
||||||
|
source ~/.zshrc
|
||||||
|
elif [ "$CURRENT_SHELL" = "fish" ] && [ -f ~/.config/fish/config.fish ]; then
|
||||||
|
source ~/.config/fish/config.fish
|
||||||
|
else
|
||||||
|
echo "Unsupported or unreadable shell configuration: $CURRENT_SHELL"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install Catppuccin themes
|
||||||
|
source ~/.bashrc
|
||||||
|
mkdir -p "$(bat --config-dir)/themes"
|
||||||
|
wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme
|
||||||
|
bat cache --build
|
||||||
|
|
||||||
|
echo "--theme="Catppuccin Mocha"" >>"$(bat --config-dir)/themes"
|
||||||
|
|
||||||
|
# Detect shell name via POSIX standard
|
||||||
|
CURRENT_SHELL=$(basename "$0" 2>/dev/null || echo "$0")
|
||||||
|
CURRENT_SHELL="${CURRENT_SHELL#-}"
|
||||||
|
|
||||||
|
case "$CURRENT_SHELL" in
|
||||||
|
"bash") [ -f ~/.bashrc ] && echo "export MANPAGER="bat -plman"" >>~/.bashrc ;;
|
||||||
|
"zsh") [ -f ~/.zshrc ] && echo "export MANPAGER="bat -plman"" >>~/.zshrc ;;
|
||||||
|
"fish") exec fish -c "echo "export MANPAGER="bat -plman"" >> ~/.config/fish/config.fish" ;;
|
||||||
|
*) echo "Unsupported shell: $CURRENT_SHELL" ;;
|
||||||
|
esac
|
||||||
+7
-10
@@ -10,6 +10,11 @@ if [[ -f "/home/linusbrew/.linuxbrew/bin/brew" ]]; then
|
|||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Ghostty (If exists)
|
||||||
|
if [ -n "${GHOSTTY_RESOURCES_DIR}" ]; then
|
||||||
|
builtin source "${GHOSTTY_RESOURCES_DIR}/shell-integration/bash/ghostty.bash"
|
||||||
|
fi
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH=~/.oh-my-zsh
|
export ZSH=~/.oh-my-zsh
|
||||||
|
|
||||||
@@ -147,14 +152,6 @@ update () {
|
|||||||
omz update
|
omz update
|
||||||
}
|
}
|
||||||
|
|
||||||
tree () {
|
|
||||||
if [ "$1" >/dev/null ]; then
|
|
||||||
eza --tree --git --no-time --no-permissions --level $1
|
|
||||||
else
|
|
||||||
eza --tree --git --no-time --no-permissions
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Sudo last command with control + u
|
# Sudo last command with control + u
|
||||||
|
|
||||||
zle -N sudo-last-command-execute
|
zle -N sudo-last-command-execute
|
||||||
@@ -164,8 +161,8 @@ sudo-last-command-execute() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bind the widget to Control+U
|
# Bind the widget to Alt+S
|
||||||
bindkey '^U' sudo-last-command-execute
|
bindkey '^[S' sudo-last-command-execute
|
||||||
|
|
||||||
# Ydotool
|
# Ydotool
|
||||||
if [[ -f "/tmp/.ydotool_socket" ]]; then
|
if [[ -f "/tmp/.ydotool_socket" ]]; then
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Auto start Hyprland on tty1
|
||||||
|
if test -z "$DISPLAY" ;and test "$XDG_VTNR" -eq 1
|
||||||
|
mkdir -p ~/.cache
|
||||||
|
exec start-hyprland > ~/.cache/hyprland.log 2>&1
|
||||||
|
end
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
complete --command fisher --exclusive --long help --description "Print help"
|
||||||
|
complete --command fisher --exclusive --long version --description "Print version"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
|
||||||
|
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
complete --command nvm --exclusive
|
||||||
|
complete --command nvm --exclusive --long version --description "Print version"
|
||||||
|
complete --command nvm --exclusive --long help --description "Print help"
|
||||||
|
complete --command nvm --long silent --description "Suppress standard output"
|
||||||
|
|
||||||
|
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version"
|
||||||
|
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell"
|
||||||
|
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions"
|
||||||
|
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install"
|
||||||
|
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version"
|
||||||
|
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "(
|
||||||
|
test -e $nvm_data && string split ' ' <$nvm_data/.index
|
||||||
|
)"
|
||||||
|
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')"
|
||||||
|
complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version"
|
||||||
|
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "(
|
||||||
|
_nvm_list | string split ' ' | string replace system ''
|
||||||
|
)"
|
||||||
|
complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "(
|
||||||
|
set --query nvm_default_version && echo default
|
||||||
|
)"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||||
|
# the 'fish_key_bindings' variable from its old default scope (universal)
|
||||||
|
# to its new default scope (global). We recommend you delete this file
|
||||||
|
# and configure key bindings in ~/.config/fish/config.fish if needed.
|
||||||
|
|
||||||
|
# set --global fish_key_bindings fish_default_key_bindings
|
||||||
|
|
||||||
|
# Prior to version 4.3, fish shipped an event handler that runs
|
||||||
|
# `set --universal fish_key_bindings fish_default_key_bindings`
|
||||||
|
# whenever the fish_key_bindings variable is erased.
|
||||||
|
# This means that as long as any fish < 4.3 is still running on this system,
|
||||||
|
# we cannot complete the migration.
|
||||||
|
# As a workaround, erase the universal variable at every shell startup.
|
||||||
|
set --erase --universal fish_key_bindings
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||||
|
# the 'fish_key_bindings' variable from its old default scope (universal)
|
||||||
|
# to its new default scope (global). We recommend you delete this file
|
||||||
|
# and configure key bindings in ~/.config/fish/config.fish if needed.
|
||||||
|
|
||||||
|
# set --global fish_key_bindings fish_default_key_bindings
|
||||||
|
|
||||||
|
# Prior to version 4.3, fish shipped an event handler that runs
|
||||||
|
# `set --universal fish_key_bindings fish_default_key_bindings`
|
||||||
|
# whenever the fish_key_bindings variable is erased.
|
||||||
|
# This means that as long as any fish < 4.3 is still running on this system,
|
||||||
|
# we cannot complete the migration.
|
||||||
|
# As a workaround, erase the universal variable at every shell startup.
|
||||||
|
set --erase --universal fish_key_bindings
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||||
|
# theme variables from universal to global scope.
|
||||||
|
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
|
||||||
|
# To customize your theme, delete this file and see
|
||||||
|
# help interactive#syntax-highlighting
|
||||||
|
# or
|
||||||
|
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
|
||||||
|
# for appropriate commands to add to ~/.config/fish/config.fish instead.
|
||||||
|
# See also the release notes for fish 4.3.0 (run `help relnotes`).
|
||||||
|
|
||||||
|
set --global fish_color_autosuggestion 555 brblack
|
||||||
|
set --global fish_color_cancel -r
|
||||||
|
set --global fish_color_command blue
|
||||||
|
set --global fish_color_comment red
|
||||||
|
set --global fish_color_cwd green
|
||||||
|
set --global fish_color_cwd_root red
|
||||||
|
set --global fish_color_end green
|
||||||
|
set --global fish_color_error brred
|
||||||
|
set --global fish_color_escape brcyan
|
||||||
|
set --global fish_color_history_current --bold
|
||||||
|
set --global fish_color_host normal
|
||||||
|
set --global fish_color_host_remote yellow
|
||||||
|
set --global fish_color_normal normal
|
||||||
|
set --global fish_color_operator brcyan
|
||||||
|
set --global fish_color_param cyan
|
||||||
|
set --global fish_color_quote yellow
|
||||||
|
set --global fish_color_redirection cyan --bold
|
||||||
|
set --global fish_color_search_match --background=111
|
||||||
|
set --global fish_color_selection white --bold --background=brblack
|
||||||
|
set --global fish_color_status red
|
||||||
|
set --global fish_color_user brgreen
|
||||||
|
set --global fish_color_valid_path --underline
|
||||||
|
set --global fish_pager_color_completion normal
|
||||||
|
set --global fish_pager_color_description B3A06D yellow -i
|
||||||
|
set --global fish_pager_color_prefix cyan --bold --underline
|
||||||
|
set --global fish_pager_color_progress brwhite --background=cyan
|
||||||
|
set --global fish_pager_color_selected_background -r
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||||
|
# theme variables from universal to global scope.
|
||||||
|
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
|
||||||
|
# To customize your theme, delete this file and see
|
||||||
|
# help interactive#syntax-highlighting
|
||||||
|
# or
|
||||||
|
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
|
||||||
|
# for appropriate commands to add to ~/.config/fish/config.fish instead.
|
||||||
|
# See also the release notes for fish 4.3.0 (run `help relnotes`).
|
||||||
|
|
||||||
|
set --global fish_color_autosuggestion 555 brblack
|
||||||
|
set --global fish_color_cancel -r
|
||||||
|
set --global fish_color_command blue
|
||||||
|
set --global fish_color_comment red
|
||||||
|
set --global fish_color_cwd green
|
||||||
|
set --global fish_color_cwd_root red
|
||||||
|
set --global fish_color_end green
|
||||||
|
set --global fish_color_error brred
|
||||||
|
set --global fish_color_escape brcyan
|
||||||
|
set --global fish_color_history_current --bold
|
||||||
|
set --global fish_color_host normal
|
||||||
|
set --global fish_color_host_remote yellow
|
||||||
|
set --global fish_color_normal normal
|
||||||
|
set --global fish_color_operator brcyan
|
||||||
|
set --global fish_color_param cyan
|
||||||
|
set --global fish_color_quote yellow
|
||||||
|
set --global fish_color_redirection cyan --bold
|
||||||
|
set --global fish_color_search_match --background=111
|
||||||
|
set --global fish_color_selection white --bold --background=brblack
|
||||||
|
set --global fish_color_status red
|
||||||
|
set --global fish_color_user brgreen
|
||||||
|
set --global fish_color_valid_path --underline
|
||||||
|
set --global fish_pager_color_completion normal
|
||||||
|
set --global fish_pager_color_description B3A06D yellow -i
|
||||||
|
set --global fish_pager_color_prefix cyan --bold --underline
|
||||||
|
set --global fish_pager_color_progress brwhite --background=cyan
|
||||||
|
set --global fish_pager_color_selected_background -r
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
|
||||||
|
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
|
||||||
|
set --query nvm_data || set --global nvm_data $XDG_DATA_HOME/nvm
|
||||||
|
|
||||||
|
function _nvm_install --on-event nvm_install
|
||||||
|
test ! -d $nvm_data && command mkdir -p $nvm_data
|
||||||
|
echo "Downloading the Node distribution index..." 2>/dev/null
|
||||||
|
_nvm_index_update
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_update --on-event nvm_update
|
||||||
|
set --query --universal nvm_data && set --erase --universal nvm_data
|
||||||
|
set --query --universal nvm_mirror && set --erase --universal nvm_mirror
|
||||||
|
set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_uninstall --on-event nvm_uninstall
|
||||||
|
command rm -rf $nvm_data
|
||||||
|
|
||||||
|
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
|
||||||
|
|
||||||
|
set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source
|
||||||
|
functions --erase (functions --all | string match --entire --regex -- "^_nvm_")
|
||||||
|
end
|
||||||
|
|
||||||
|
if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version
|
||||||
|
nvm use --silent $nvm_default_version
|
||||||
|
end
|
||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
if status is-interactive
|
||||||
|
# No greeting
|
||||||
|
set fish_greeting
|
||||||
|
|
||||||
|
# Use starship
|
||||||
|
function starship_transient_prompt_func
|
||||||
|
starship module character
|
||||||
|
end
|
||||||
|
if test "$TERM" != "linux"
|
||||||
|
starship init fish | source
|
||||||
|
enable_transience
|
||||||
|
end
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
if test -f ~/.local/state/quickshell/user/generated/terminal/sequences.txt
|
||||||
|
cat ~/.local/state/quickshell/user/generated/terminal/sequences.txt
|
||||||
|
end
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
# kitty doesn't clear properly so we need to do this weird printing
|
||||||
|
alias clear "printf '\033[2J\033[3J\033[1;1H'"
|
||||||
|
alias celar "printf '\033[2J\033[3J\033[1;1H'"
|
||||||
|
alias claer "printf '\033[2J\033[3J\033[1;1H'"
|
||||||
|
alias pamcan pacman
|
||||||
|
alias q 'qs -c ii'
|
||||||
|
if test "$TERM" != "linux"
|
||||||
|
alias ls 'eza --icons'
|
||||||
|
end
|
||||||
|
if test "$TERM" = "xterm-kitty"
|
||||||
|
alias ssh 'kitten ssh'
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
jorgebucaran/fisher
|
||||||
|
jorgebucaran/nvm.fish
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR __fish_initialized:4300
|
||||||
|
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
|
||||||
|
SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:\x7e/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_list\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e\x7e/\x2econfig/fish/functions/nvm\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e\x7e/\x2econfig/fish/completions/nvm\x2efish
|
||||||
|
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/nvm\x2efish
|
||||||
|
SETUVAR _fisher_upgraded_to_4_4:\x1d
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
function _nvm_index_update
|
||||||
|
test ! -d $nvm_data && command mkdir -p $nvm_data
|
||||||
|
|
||||||
|
set --local index $nvm_data/.index
|
||||||
|
|
||||||
|
if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp
|
||||||
|
command rm -f $index.temp
|
||||||
|
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
command awk -v OFS=\t '
|
||||||
|
/v0.9.12/ { exit } # Unsupported
|
||||||
|
NR > 1 {
|
||||||
|
print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "")
|
||||||
|
}
|
||||||
|
' $index.temp >$index
|
||||||
|
|
||||||
|
command rm -f $index.temp
|
||||||
|
end
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
function _nvm_list
|
||||||
|
set --local versions $nvm_data/*
|
||||||
|
|
||||||
|
set --query versions[1] &&
|
||||||
|
string match --entire --regex -- (
|
||||||
|
string replace --all -- $nvm_data/ "" $versions |
|
||||||
|
string match --regex -- "v\d.+" |
|
||||||
|
string escape --style=regex |
|
||||||
|
string join "|"
|
||||||
|
) <$nvm_data/.index
|
||||||
|
|
||||||
|
command --all node |
|
||||||
|
string match --quiet --invert --regex -- "^$nvm_data" && echo system
|
||||||
|
end
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
function _nvm_version_activate --argument-names ver
|
||||||
|
set --global --export nvm_current_version $ver
|
||||||
|
set --prepend PATH $nvm_data/$ver/bin
|
||||||
|
end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
function _nvm_version_deactivate --argument-names ver
|
||||||
|
test "$nvm_current_version" = "$ver" && set --erase nvm_current_version
|
||||||
|
set --local index (contains --index -- $nvm_data/$ver/bin $PATH) &&
|
||||||
|
set --erase PATH[$index]
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
function edit --wraps=nvim --description 'alias edit=nvim'
|
||||||
|
nvim $argv
|
||||||
|
end
|
||||||
@@ -0,0 +1,251 @@
|
|||||||
|
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||||
|
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
||||||
|
set --local fisher_version 4.4.8
|
||||||
|
set --local fish_plugins $__fish_config_dir/fish_plugins
|
||||||
|
|
||||||
|
switch "$cmd"
|
||||||
|
case -v --version
|
||||||
|
echo "fisher, version $fisher_version"
|
||||||
|
case "" -h --help
|
||||||
|
echo "Usage: fisher install <plugins...> Install plugins"
|
||||||
|
echo " fisher remove <plugins...> Remove installed plugins"
|
||||||
|
echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
|
||||||
|
echo " fisher update <plugins...> Update installed plugins"
|
||||||
|
echo " fisher update Update all installed plugins"
|
||||||
|
echo " fisher list [<regex>] List installed plugins matching regex"
|
||||||
|
echo "Options:"
|
||||||
|
echo " -v, --version Print version"
|
||||||
|
echo " -h, --help Print this help message"
|
||||||
|
echo "Variables:"
|
||||||
|
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
|
||||||
|
case ls list
|
||||||
|
string match --entire --regex -- "$argv[2]" $_fisher_plugins
|
||||||
|
case install update remove uninstall
|
||||||
|
isatty || read --local --null --array stdin && set --append argv $stdin
|
||||||
|
|
||||||
|
test "$cmd" = uninstall && set cmd remove
|
||||||
|
|
||||||
|
set --local install_plugins
|
||||||
|
set --local update_plugins
|
||||||
|
set --local remove_plugins
|
||||||
|
set --local arg_plugins $argv[2..-1]
|
||||||
|
set --local old_plugins $_fisher_plugins
|
||||||
|
set --local new_plugins
|
||||||
|
|
||||||
|
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
|
||||||
|
|
||||||
|
if ! set --query argv[2]
|
||||||
|
if test "$cmd" != update
|
||||||
|
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
|
||||||
|
else if ! set --query file_plugins
|
||||||
|
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
|
||||||
|
end
|
||||||
|
set arg_plugins $file_plugins
|
||||||
|
else if test "$cmd" = install && ! set --query old_plugins[1]
|
||||||
|
set --append arg_plugins $file_plugins
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $arg_plugins
|
||||||
|
set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
|
||||||
|
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query argv[2]
|
||||||
|
for plugin in $new_plugins
|
||||||
|
if contains -- "$plugin" $old_plugins
|
||||||
|
test "$cmd" = remove &&
|
||||||
|
set --append remove_plugins $plugin ||
|
||||||
|
set --append update_plugins $plugin
|
||||||
|
else if test "$cmd" = install
|
||||||
|
set --append install_plugins $plugin
|
||||||
|
else
|
||||||
|
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for plugin in $new_plugins
|
||||||
|
contains -- "$plugin" $old_plugins &&
|
||||||
|
set --append update_plugins $plugin ||
|
||||||
|
set --append install_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $old_plugins
|
||||||
|
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local pid_list
|
||||||
|
set --local source_plugins
|
||||||
|
set --local fetch_plugins $update_plugins $install_plugins
|
||||||
|
set --local fish_path (status fish-path)
|
||||||
|
|
||||||
|
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
|
||||||
|
|
||||||
|
for plugin in $fetch_plugins
|
||||||
|
set --local source (command mktemp -d)
|
||||||
|
set --append source_plugins $source
|
||||||
|
|
||||||
|
command mkdir -p $source/{completions,conf.d,themes,functions}
|
||||||
|
|
||||||
|
$fish_path --command "
|
||||||
|
if test -e $plugin
|
||||||
|
command cp -Rf $plugin/* $source
|
||||||
|
else
|
||||||
|
set resp (command mktemp)
|
||||||
|
set temp (command mktemp -d)
|
||||||
|
set repo (string split -- \@ $plugin) || set repo[2] HEAD
|
||||||
|
|
||||||
|
if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
|
||||||
|
set name (string split -- / \$path)[-1]
|
||||||
|
set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
|
||||||
|
else
|
||||||
|
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
|
||||||
|
end
|
||||||
|
|
||||||
|
echo Fetching (set_color --underline)\$url(set_color normal)
|
||||||
|
|
||||||
|
set http (command curl -q --silent -L -o \$resp -w %{http_code} \$url)
|
||||||
|
|
||||||
|
if test \"\$http\" = 200 && command tar -xzC \$temp -f \$resp 2>/dev/null
|
||||||
|
command cp -Rf \$temp/*/* $source
|
||||||
|
else if test \"\$http\" = 403
|
||||||
|
echo fisher: GitHub API rate limit exceeded \(HTTP 403\) >&2
|
||||||
|
command rm -rf $source
|
||||||
|
else
|
||||||
|
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
|
||||||
|
command rm -rf $source
|
||||||
|
end
|
||||||
|
|
||||||
|
command rm -rf \$temp
|
||||||
|
end
|
||||||
|
|
||||||
|
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
|
||||||
|
" &
|
||||||
|
|
||||||
|
set --append pid_list (jobs --last --pid)
|
||||||
|
end
|
||||||
|
|
||||||
|
wait $pid_list 2>/dev/null
|
||||||
|
|
||||||
|
for plugin in $fetch_plugins
|
||||||
|
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
|
||||||
|
if set --local index (contains --index -- "$plugin" $install_plugins)
|
||||||
|
set --erase install_plugins[$index]
|
||||||
|
else
|
||||||
|
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $update_plugins $remove_plugins
|
||||||
|
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
|
||||||
|
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
|
||||||
|
|
||||||
|
if contains -- "$plugin" $remove_plugins
|
||||||
|
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
|
||||||
|
emit {$name}_uninstall
|
||||||
|
end
|
||||||
|
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
|
||||||
|
set --erase _fisher_plugins[$index]
|
||||||
|
end
|
||||||
|
|
||||||
|
command rm -rf (string replace -- \~ ~ $$plugin_files_var)
|
||||||
|
|
||||||
|
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
|
||||||
|
|
||||||
|
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
|
||||||
|
complete --erase --command $name
|
||||||
|
end
|
||||||
|
|
||||||
|
set --erase $plugin_files_var
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query update_plugins[1] || set --query install_plugins[1]
|
||||||
|
command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $update_plugins $install_plugins
|
||||||
|
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
|
||||||
|
set --local files $source/{functions,themes,conf.d,completions}/*
|
||||||
|
|
||||||
|
if set --local index (contains --index -- $plugin $install_plugins)
|
||||||
|
set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
|
||||||
|
set --local conflict_files
|
||||||
|
|
||||||
|
for file in (string replace -- $source/ $fisher_path/ $files)
|
||||||
|
contains -- $file $user_files && set --append conflict_files $file
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query conflict_files[1] && set --erase install_plugins[$index]
|
||||||
|
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for file in (string replace -- $source/ "" $files)
|
||||||
|
command cp -RLf $source/$file $fisher_path/$file
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
|
||||||
|
|
||||||
|
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
|
||||||
|
|
||||||
|
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
|
||||||
|
contains -- $plugin $install_plugins && set --local event install || set --local event update
|
||||||
|
|
||||||
|
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
|
||||||
|
|
||||||
|
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
|
||||||
|
source $file
|
||||||
|
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
|
||||||
|
emit {$name}_$event
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
command rm -rf $source_plugins
|
||||||
|
|
||||||
|
if set --query _fisher_plugins[1]
|
||||||
|
set --local commit_plugins
|
||||||
|
|
||||||
|
for plugin in $file_plugins
|
||||||
|
contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $_fisher_plugins
|
||||||
|
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
|
||||||
|
else
|
||||||
|
set --erase _fisher_plugins
|
||||||
|
command rm -f $fish_plugins
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
|
||||||
|
|
||||||
|
test "$total" != "0 0 0" && echo (string join ", " (
|
||||||
|
test $total[1] = 0 || echo "Installed $total[1]") (
|
||||||
|
test $total[2] = 0 || echo "Updated $total[2]") (
|
||||||
|
test $total[3] = 0 || echo "Removed $total[3]")
|
||||||
|
) plugin/s
|
||||||
|
case \*
|
||||||
|
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if ! set --query _fisher_upgraded_to_4_4
|
||||||
|
set --universal _fisher_upgraded_to_4_4
|
||||||
|
if functions --query _fisher_list
|
||||||
|
set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
|
||||||
|
command rm -rf $XDG_DATA_HOME/fisher
|
||||||
|
functions --erase _fisher_{list,plugin_parse}
|
||||||
|
fisher update >/dev/null 2>/dev/null
|
||||||
|
else
|
||||||
|
for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
|
||||||
|
set $var (string replace -- ~ \~ $$var)
|
||||||
|
end
|
||||||
|
functions --erase _fisher_fish_postexec
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
function lzd --wraps=lazydocker --description 'alias lzd=lazydocker'
|
||||||
|
lazydocker $argv
|
||||||
|
end
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
function nvm --description "Node version manager"
|
||||||
|
for silent in --silent -s
|
||||||
|
if set --local index (contains --index -- $silent $argv)
|
||||||
|
set --erase argv[$index] && break
|
||||||
|
end
|
||||||
|
set --erase silent
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local cmd $argv[1]
|
||||||
|
set --local ver $argv[2]
|
||||||
|
|
||||||
|
if set --query silent && ! set --query cmd[1]
|
||||||
|
echo "nvm: Version number not specified (see nvm -h for usage)" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if ! set --query ver[1] && contains -- "$cmd" install use
|
||||||
|
for file in .nvmrc .node-version
|
||||||
|
set file (_nvm_find_up $PWD $file) && read ver <$file && break
|
||||||
|
end
|
||||||
|
|
||||||
|
if ! set --query ver[1]
|
||||||
|
echo "nvm: Invalid version or missing \".nvmrc\" file" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local their_version $ver
|
||||||
|
|
||||||
|
switch "$cmd"
|
||||||
|
case -v --version
|
||||||
|
echo "nvm, version 2.2.18"
|
||||||
|
case "" -h --help
|
||||||
|
echo "Usage: nvm install <version> Download and activate the specified Node version"
|
||||||
|
echo " nvm install Install the version specified in the nearest .nvmrc file"
|
||||||
|
echo " nvm use <version> Activate the specified Node version in the current shell"
|
||||||
|
echo " nvm use Activate the version specified in the nearest .nvmrc file"
|
||||||
|
echo " nvm list List installed Node versions"
|
||||||
|
echo " nvm list-remote List available Node versions to install"
|
||||||
|
echo " nvm list-remote <regex> List Node versions matching a given regex pattern"
|
||||||
|
echo " nvm current Print the currently-active Node version"
|
||||||
|
echo " nvm uninstall <version> Uninstall the specified Node version"
|
||||||
|
echo "Options:"
|
||||||
|
echo " -s, --silent Suppress standard output"
|
||||||
|
echo " -v, --version Print the version of nvm"
|
||||||
|
echo " -h, --help Print this help message"
|
||||||
|
echo "Variables:"
|
||||||
|
echo " nvm_arch Override architecture, e.g. x64-musl"
|
||||||
|
echo " nvm_mirror Use a mirror for downloading Node binaries"
|
||||||
|
echo " nvm_default_version Set the default version for new shells"
|
||||||
|
echo " nvm_default_packages Install a list of packages every time a Node version is installed"
|
||||||
|
echo " nvm_data Set a custom directory for storing nvm data"
|
||||||
|
echo "Examples:"
|
||||||
|
echo " nvm install latest Install the latest version of Node"
|
||||||
|
echo " nvm use 14.15.1 Use Node version 14.15.1"
|
||||||
|
echo " nvm use system Activate the system's Node version"
|
||||||
|
|
||||||
|
case install
|
||||||
|
_nvm_index_update
|
||||||
|
|
||||||
|
string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias
|
||||||
|
|
||||||
|
if ! set --query ver[1]
|
||||||
|
echo "nvm: Invalid version number or alias: \"$their_version\"" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if test ! -e $nvm_data/$ver
|
||||||
|
set --local os (command uname -s | string lower)
|
||||||
|
set --local ext tar.gz
|
||||||
|
set --local arch (command uname -m)
|
||||||
|
set --local tarcmd tar
|
||||||
|
|
||||||
|
switch $os
|
||||||
|
case aix
|
||||||
|
set arch ppc64
|
||||||
|
case sunos
|
||||||
|
case linux
|
||||||
|
case darwin
|
||||||
|
case {msys_nt,mingw\*_nt}\*
|
||||||
|
set os win
|
||||||
|
set ext zip
|
||||||
|
set tarcmd bsdtar
|
||||||
|
case \*
|
||||||
|
echo "nvm: Unsupported operating system: \"$os\"" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
switch $arch
|
||||||
|
case i\*86
|
||||||
|
set arch x86
|
||||||
|
case x86_64
|
||||||
|
set arch x64
|
||||||
|
case arm64
|
||||||
|
string match --regex --quiet "v(?<major>\d+)" $ver
|
||||||
|
if test "$os" = darwin -a $major -lt 16
|
||||||
|
set arch x64
|
||||||
|
end
|
||||||
|
case armv6 armv6l
|
||||||
|
set arch armv6l
|
||||||
|
case armv7 armv7l
|
||||||
|
set arch armv7l
|
||||||
|
case armv8 armv8l aarch64
|
||||||
|
set arch arm64
|
||||||
|
end
|
||||||
|
|
||||||
|
set --query nvm_arch && set arch $nvm_arch
|
||||||
|
|
||||||
|
set --local dir "node-$ver-$os-$arch"
|
||||||
|
set --local url $nvm_mirror/$ver/$dir.$ext
|
||||||
|
|
||||||
|
command mkdir -p $nvm_data/$ver
|
||||||
|
|
||||||
|
if ! set --query silent
|
||||||
|
echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias"
|
||||||
|
echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m"
|
||||||
|
end
|
||||||
|
|
||||||
|
if ! command curl -q $silent --progress-bar --location $url |
|
||||||
|
command $tarcmd --extract --gzip --directory $nvm_data/$ver 2>/dev/null
|
||||||
|
command rm -rf $nvm_data/$ver
|
||||||
|
echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set --query silent || echo -en "\033[F\33[2K\x1b[0m"
|
||||||
|
|
||||||
|
if test "$os" = win
|
||||||
|
command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin
|
||||||
|
else
|
||||||
|
command mv $nvm_data/$ver/$dir/* $nvm_data/$ver
|
||||||
|
command rm -rf $nvm_data/$ver/$dir
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $ver != "$nvm_current_version"
|
||||||
|
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
|
||||||
|
_nvm_version_activate $ver
|
||||||
|
|
||||||
|
set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages
|
||||||
|
end
|
||||||
|
|
||||||
|
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
|
||||||
|
case use
|
||||||
|
test $ver = default && set ver $nvm_default_version
|
||||||
|
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
|
||||||
|
|
||||||
|
if ! set --query ver[1]
|
||||||
|
echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $ver != "$nvm_current_version"
|
||||||
|
set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version
|
||||||
|
test $ver != system && _nvm_version_activate $ver
|
||||||
|
end
|
||||||
|
|
||||||
|
set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info)
|
||||||
|
case uninstall
|
||||||
|
if test -z "$ver"
|
||||||
|
echo "nvm: Not enough arguments for command: \"$cmd\"" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version
|
||||||
|
|
||||||
|
_nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __
|
||||||
|
|
||||||
|
if ! set -q ver[1]
|
||||||
|
echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node")
|
||||||
|
|
||||||
|
_nvm_version_deactivate $ver
|
||||||
|
|
||||||
|
command rm -rf $nvm_data/$ver
|
||||||
|
case current
|
||||||
|
_nvm_current
|
||||||
|
case ls list
|
||||||
|
_nvm_list | _nvm_list_format (_nvm_current) $argv[2]
|
||||||
|
case lsr {ls,list}-remote
|
||||||
|
_nvm_index_update || return
|
||||||
|
_nvm_list | command awk '
|
||||||
|
FILENAME == "-" && (is_local[$1] = FNR == NR) { next } {
|
||||||
|
print $0 (is_local[$1] ? " ✓" : "")
|
||||||
|
}
|
||||||
|
' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2]
|
||||||
|
case \*
|
||||||
|
echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_find_up --argument-names path file
|
||||||
|
test -e "$path/$file" && echo $path/$file || begin
|
||||||
|
test ! -z "$path" || return
|
||||||
|
_nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_version_match --argument-names ver
|
||||||
|
string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver |
|
||||||
|
string replace --filter --regex -- '^v?(\d+)' 'v$1' |
|
||||||
|
string escape --style=regex || string lower '\b'$ver'(?:/\w+)?$'
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_list_format --argument-names current regex
|
||||||
|
command awk -v current="$current" -v regex="$regex" '
|
||||||
|
$0 ~ regex {
|
||||||
|
aliases[versions[i++] = $1] = $2 " " $3
|
||||||
|
pad = (n = length($1)) > pad ? n : pad
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
if (!i) exit 1
|
||||||
|
while (i--)
|
||||||
|
printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n",
|
||||||
|
versions[i], aliases[versions[i]])
|
||||||
|
}
|
||||||
|
'
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_current
|
||||||
|
command --search --quiet node || return
|
||||||
|
set --query nvm_current_version && echo $nvm_current_version || echo system
|
||||||
|
end
|
||||||
|
|
||||||
|
function _nvm_node_info
|
||||||
|
set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm)))
|
||||||
|
test -f $npm_path/package.json || set --local npm_version_default (command npm --version)
|
||||||
|
command node --eval "
|
||||||
|
console.log(process.version)
|
||||||
|
console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version)
|
||||||
|
console.log(process.execPath)
|
||||||
|
" | string replace -- ~ \~
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
function precmd --wraps="print -Pn '\\e]133;D;%?\\a\\e]133;A\\a'" --description "alias precmd=print -Pn '\\e]133;D;%?\\a\\e]133;A\\a'"
|
||||||
|
print -Pn '\e]133;D;%?\a\e]133;A\a' $argv
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
function preexec --wraps="print -Pn '\\e]133;B\\a\\e]133;C\\a'" --description "alias preexec=print -Pn '\\e]133;B\\a\\e]133;C\\a'"
|
||||||
|
print -Pn '\e]133;B\a\e]133;C\a' $argv
|
||||||
|
end
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
function update --description 'Automatically finds binarys and uses update commands'
|
||||||
|
if command -v pacman >/dev/null && command -v yay >/dev/null
|
||||||
|
echo "✅ 'pacman' and 'yay' found. Updating."
|
||||||
|
sudo pacman -Syu --noconfirm
|
||||||
|
yay -Syu --sudoloop --save --answerclean None --answerdiff None --noconfirm
|
||||||
|
else if command -v pacman >/dev/null
|
||||||
|
echo "✅ 'pacman' found. Updating."
|
||||||
|
sudo pacman -Syu --noconfirm
|
||||||
|
end
|
||||||
|
|
||||||
|
if command -v paru >/dev/null
|
||||||
|
echo "✅ 'paru' found. Updating."
|
||||||
|
paru -Syu
|
||||||
|
end
|
||||||
|
|
||||||
|
if command -v apt >/dev/null
|
||||||
|
echo "✅ 'apt' found. Updating."
|
||||||
|
sudo apt update && sudo apt full-upgrade -y
|
||||||
|
end
|
||||||
|
|
||||||
|
if command -v hyprpm >/dev/null
|
||||||
|
echo "✅ 'hyprpm' found. Updating."
|
||||||
|
hyprpm reload
|
||||||
|
sleep 2
|
||||||
|
hyprpm update
|
||||||
|
end
|
||||||
|
|
||||||
|
if command -v flatpak >/dev/null
|
||||||
|
echo "✅ 'flatpak' found. Updating."
|
||||||
|
flatpak update -y
|
||||||
|
end
|
||||||
|
|
||||||
|
if command -v npm >/dev/null
|
||||||
|
echo "✅ 'npm' found. Updating."
|
||||||
|
sudo npm install -g npm-check-updates
|
||||||
|
end
|
||||||
|
|
||||||
|
if command -v omz >/dev/null
|
||||||
|
omz update
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# This directory is a Syncthing folder marker.
|
||||||
|
# Do not delete.
|
||||||
|
|
||||||
|
folderID: wguai-uzdes
|
||||||
|
created: 2026-07-12T15:54:28+10:00
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# You can put extra environment variables here
|
|
||||||
# https://wiki.hyprland.org/Configuring/Environment-variables/
|
|
||||||
|
|
||||||
# ######### Input method ##########
|
|
||||||
# See https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland
|
|
||||||
#env = QT_IM_MODULE, fcitx
|
|
||||||
#env = XMODIFIERS, @im=fcitx
|
|
||||||
#env = SDL_IM_MODULE, fcitx
|
|
||||||
#env = GLFW_IM_MODULE, ibus
|
|
||||||
#env = INPUT_METHOD, fcitx
|
|
||||||
|
|
||||||
# ######## Wayland #########
|
|
||||||
# Tearing
|
|
||||||
# env = WLR_DRM_NO_ATOMIC, 1
|
|
||||||
# ?
|
|
||||||
# env = WLR_NO_HARDWARE_CURSORS, 1
|
|
||||||
|
|
||||||
# ######## EDITOR #########
|
|
||||||
#https://wiki.archlinux.org/title/Category:Text_editors
|
|
||||||
# for example: vi nano nvim ...
|
|
||||||
|
|
||||||
#env = EDITOR, vim
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
-- This file will not be overwritten across dots-hyprland updates.
|
||||||
|
-- The file name is for the sake of organization and does not matter
|
||||||
|
-- See the corresponding files in ~/.config/hypr/hyprland for examples
|
||||||
|
--
|
||||||
|
|
||||||
|
hl.env("XCURSOR_THEME", "Catppuccin Macchiato Dark")
|
||||||
|
hl.env("XCURSOR_SIZE", "24")
|
||||||
|
hl.env("HYPRCURSOR_THEME", "Catppuccin Macchiato Dark")
|
||||||
|
hl.env("HYPRCURSOR_SIZE", "24")
|
||||||
|
hl.env("WEBKIT_DISABLE_DMABUF_RENDERER", "1")
|
||||||
|
|
||||||
|
ecosystem = {
|
||||||
|
no_donation_nag = true,
|
||||||
|
no_update_news = false,
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# You can make apps auto-start here
|
|
||||||
# Relevant Hyprland wiki section: https://wiki.hyprland.org/Configuring/Keywords/#executing
|
|
||||||
|
|
||||||
# Input method
|
|
||||||
# exec-once = fcitx5
|
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
-- This file will not be overwritten across dots-hyprland updates.
|
||||||
|
-- The file name is for the sake of organization and does not matter
|
||||||
|
-- See the corresponding files in ~/.config/hypr/hyprland for examples
|
||||||
|
|
||||||
|
hl.on("hyprland.start", function()
|
||||||
|
hl.exec_cmd("hyprctl setcursor 'Catppuccin Macchiato Dark' 24")
|
||||||
|
hl.exec_cmd("kdeconnectd &")
|
||||||
|
hl.exec_cmd("zen-browser &")
|
||||||
|
hl.exec_cmd("sleep 5 && syncthingtray-qt6 --wait &")
|
||||||
|
hl.exec_cmd("mages &")
|
||||||
|
hl.exec_cmd("sleep 30 && trayscale --hide-window &")
|
||||||
|
hl.exec_cmd("rclone mount SchoolGdrive: /mnt/SchoolGdrive --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only")
|
||||||
|
hl.exec_cmd("rclone mount PersonalGdrive: /mnt/PersonalGdrive --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only")
|
||||||
|
hl.exec_cmd("rclone mount gcrypt: /mnt/gcrypt --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only")
|
||||||
|
hl.exec_cmd("trayscale --hide-window")
|
||||||
|
end)
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
# Put general config stuff here
|
|
||||||
# Here's a list of every variable: https://wiki.hyprland.org/Configuring/Variables/
|
|
||||||
|
|
||||||
# monitor=,addreserved, 0, 0, 0, 0 # Custom reserved area
|
|
||||||
|
|
||||||
# HDMI port: mirror display. To see device name, use `hyprctl monitors`
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- This file will not be overwritten across dots-hyprland updates.
|
||||||
|
-- The file name is for the sake of organization and does not matter
|
||||||
|
-- See the corresponding files in ~/.config/hypr/hyprland for examples
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
input = {
|
||||||
|
kb_options = "caps:escape",
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# See https://wiki.hyprland.org/Configuring/Binds/
|
|
||||||
#!
|
|
||||||
##! User
|
|
||||||
bind = Ctrl+Super, Slash, exec, xdg-open ~/.config/illogical-impulse/config.json # Edit shell config
|
|
||||||
bind = Ctrl+Super+Alt, Slash, exec, xdg-open ~/.config/hypr/custom/keybinds.conf # Edit extra keybinds
|
|
||||||
|
|
||||||
##! Apps
|
|
||||||
# bind = Super, Return, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "${TERMINAL}" "kitty -1" "foot" "alacritty" "wezterm" "konsole" "kgx" "uxterm" "xterm" # Terminal
|
|
||||||
# bind = Super, T, exec, alacritty
|
|
||||||
# bind = Ctrl+Alt, T, exec, alacritty
|
|
||||||
# bind = Super, E, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "dolphin" "nautilus" "nemo" "thunar" "${TERMINAL}" "kitty -1 fish -c yazi" # File manager
|
|
||||||
# bind = Super, W, exec, zen-browser # Browser
|
|
||||||
# bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "code" "codium" "cursor" "zed" "zedit" "zeditor" "kate" "gnome-text-editor" "emacs" "command -v nvim && kitty -1 nvim" "command -v micro && kitty -1 micro" # Code editor
|
|
||||||
# bind = Ctrl+Super+Shift+Alt, W, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "wps" "onlyoffice-desktopeditors" "libreoffice" # Office software
|
|
||||||
# bind = Super, X, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "kate" "gnome-text-editor" "emacs" # Text editor
|
|
||||||
# bind = Ctrl+Super, V, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "pavucontrol-qt" "pavucontrol" # Volume mixer
|
|
||||||
# bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "qs -p ~/.config/quickshell/$qsConfig/settings.qml" "systemsettings" "gnome-control-center" "better-control" # Settings app
|
|
||||||
# bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "plasma-systemmonitor --page-name Processes" "command -v btop && kitty -1 fish -c btop" # Task manager
|
|
||||||
|
|
||||||
# Add stuff here
|
|
||||||
# Use #! to add an extra column on the cheatsheet
|
|
||||||
# Use ##! to add a section in that column
|
|
||||||
# Add a comment after a bind to add a description, like above
|
|
||||||
|
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
-- This file will not be overwritten across dots-hyprland updates.
|
||||||
|
-- The file name is for the sake of organization and does not matter
|
||||||
|
-- See the corresponding files in ~/.config/hypr/hyprland for examples
|
||||||
|
|
||||||
|
--##! Overrides
|
||||||
|
--# Unbind upstream binds we want to replace
|
||||||
|
hl.unbind("SUPER + B") -- sidebar toggle -> we use this for browser
|
||||||
|
hl.unbind("SUPER + T") -- terminal (we don't want this combo)
|
||||||
|
hl.unbind("CTRL + ALT + T") -- terminal (we don't want this combo)
|
||||||
|
hl.unbind("SUPER + W") -- browser (we use B instead)
|
||||||
|
hl.unbind("SUPER + ALT + Page_Up")
|
||||||
|
hl.unbind("SUPER + ALT + Page_Down")
|
||||||
|
hl.unbind("SUPER + SHIFT + Page_Up")
|
||||||
|
hl.unbind("SUPER + SHIFT + Page_Down")
|
||||||
|
hl.unbind("SUPER + O")
|
||||||
|
|
||||||
|
--# Unbind workspace focus with named keys (we use code: keys)
|
||||||
|
for i = 0, 9 do
|
||||||
|
hl.unbind("SUPER + " .. i)
|
||||||
|
end
|
||||||
|
|
||||||
|
--# Rebind browser on B (previously sidebar toggle)
|
||||||
|
hl.bind("SUPER + B", hl.dsp.exec_cmd(browser), { description = "App: Browser" })
|
||||||
|
|
||||||
|
--##! Workspace
|
||||||
|
--# Switching with raw keycodes (layout-independent)
|
||||||
|
for i = 1, 10 do
|
||||||
|
local numberkey = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }
|
||||||
|
hl.bind("SUPER + code:" .. numberkey[i], function()
|
||||||
|
hl.dispatch(hl.dsp.focus({ workspace = workspace_in_group(i) }))
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
--# keypad numbers
|
||||||
|
for i = 1, 10 do
|
||||||
|
local numpadkey = { 87, 88, 89, 83, 84, 85, 79, 80, 81, 90 }
|
||||||
|
hl.bind("SUPER + code:" .. numpadkey[i], function()
|
||||||
|
hl.dispatch(hl.dsp.focus({ workspace = workspace_in_group(i) }))
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
--#/# bind = SUPER+CTRL, code:,, -- Send to workspace & switch
|
||||||
|
for i = 1, 10 do
|
||||||
|
local numberkey = { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }
|
||||||
|
hl.bind("SUPER + CTRL + code:" .. numberkey[i], function()
|
||||||
|
hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = true }))
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
--# keypad numbers
|
||||||
|
for i = 1, 10 do
|
||||||
|
local numpadkey = { 87, 88, 89, 83, 84, 85, 79, 80, 81, 90 }
|
||||||
|
hl.bind("SUPER + CTRL + code:" .. numpadkey[i], function()
|
||||||
|
hl.dispatch(hl.dsp.window.move({ workspace = workspace_in_group(i), follow = true }))
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
--#/# bind = SUPER+ALT+SHIFT, Page_↑/↓,, -- Send to workspace left/right
|
||||||
|
for i = 1, 6 do
|
||||||
|
local key = { "SUPER + ALT + Page_", "SUPER + SHIFT + Page_", "CTRL + SUPER + SHIFT + " }
|
||||||
|
local keycombos =
|
||||||
|
{ key[1] .. "down", key[1] .. "up", key[2] .. "down", key[2] .. "up", key[3] .. "Right", key[3] .. "Left" }
|
||||||
|
local prefix = { "+", "-", "r+", "r-", "r+", "r-" }
|
||||||
|
hl.bind(keycombos[i], hl.dsp.window.move({ workspace = prefix[i] .. "1" })) -- # [hidden]
|
||||||
|
end
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# You can put custom rules here
|
|
||||||
# Window/layer rules: https://wiki.hyprland.org/Configuring/Window-Rules/
|
|
||||||
# Workspace rules: https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
|
||||||
|
|
||||||
# ######## Window rules ########
|
|
||||||
|
|
||||||
# Uncomment to apply global transparency to all windows:
|
|
||||||
# windowrule = opacity 0.89 override 0.89 override, match:class .*
|
|
||||||
|
|
||||||
# Disable blur for all xwayland apps
|
|
||||||
# windowrule = no_blur on, match:xwayland 1
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- This file will not be overwritten across dots-hyprland updates.
|
||||||
|
-- The file name is for the sake of organization and does not matter
|
||||||
|
-- See the corresponding files in ~/.config/hypr/hyprland for examples
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
-- This file will not be overwritten across dots-hyprland updates.
|
||||||
|
-- The file name is for the sake of organization and does not matter
|
||||||
|
-- See the corresponding files in ~/.config/hypr/hyprland for examples
|
||||||
|
|
||||||
|
terminal = "kitty"
|
||||||
|
browser = "zen-browser"
|
||||||
|
codeEditor = "nvim"
|
||||||
|
textEditor = "obsidian"
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
$lock_cmd = hyprctl dispatch global quickshell:lock & pidof qs quickshell hyprlock || hyprlock
|
|
||||||
# $lock_cmd = pidof hyprlock || hyprlock
|
|
||||||
$suspend_cmd = systemctl suspend || loginctl suspend
|
|
||||||
|
|
||||||
general {
|
|
||||||
lock_cmd = $lock_cmd
|
|
||||||
before_sleep_cmd = loginctl lock-session
|
|
||||||
after_sleep_cmd = hyprctl dispatch global quickshell:lockFocus
|
|
||||||
inhibit_sleep = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 300 # 5mins
|
|
||||||
on-timeout = loginctl lock-session
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 600 # 10mins
|
|
||||||
on-timeout = hyprctl dispatch dpms off
|
|
||||||
on-resume = hyprctl dispatch dpms on
|
|
||||||
}
|
|
||||||
|
|
||||||
listener {
|
|
||||||
timeout = 900 # 15mins
|
|
||||||
on-timeout = $suspend_cmd
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# This file sources other files in `hyprland` and `custom` folders
|
|
||||||
# You wanna add your stuff in files in `custom`
|
|
||||||
|
|
||||||
$qsConfig = ii
|
|
||||||
exec = hyprctl dispatch submap global # DO NOT REMOVE THIS OR YOU WON'T BE ABLE TO USE ANY KEYBIND
|
|
||||||
submap = global # This is required for catchall to work
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
source=hyprland/env.conf
|
|
||||||
source=hyprland/execs.conf
|
|
||||||
source=hyprland/general.conf
|
|
||||||
source=hyprland/rules.conf
|
|
||||||
source=hyprland/colors.conf
|
|
||||||
source=hyprland/keybinds.conf
|
|
||||||
#source=hyprland/windowrules.conf
|
|
||||||
|
|
||||||
# Custom
|
|
||||||
source=custom/env.conf
|
|
||||||
source=custom/execs.conf
|
|
||||||
source=custom/general.conf
|
|
||||||
source=custom/rules.conf
|
|
||||||
source=custom/keybinds.conf
|
|
||||||
source=workspace.conf
|
|
||||||
|
|
||||||
# nwg-displays support
|
|
||||||
#source=workspaces.conf
|
|
||||||
source=monitors.conf
|
|
||||||
|
|
||||||
# Add this to your ~/.config/hypr/hyprland.conf
|
|
||||||
device {
|
|
||||||
name = cougar-gaming-keyboard-cougar-gaming-keyboard-consumer-control-1
|
|
||||||
scroll_factor = 0.0
|
|
||||||
}
|
|
||||||
|
|
||||||
device {
|
|
||||||
name = ydotoold-virtual-device-1
|
|
||||||
scroll_factor = 0.0
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
general {
|
|
||||||
col.active_border = rgba(8e909977)
|
|
||||||
col.inactive_border = rgba(43474e55)
|
|
||||||
}
|
|
||||||
|
|
||||||
misc {
|
|
||||||
background_color = rgba(111318FF)
|
|
||||||
}
|
|
||||||
|
|
||||||
plugin {
|
|
||||||
hyprbars {
|
|
||||||
# Honestly idk if it works like css, but well, why not
|
|
||||||
bar_text_font = Google Sans Flex Medium, Rubik, Geist, AR One Sans, Reddit Sans, Inter, Roboto, Ubuntu, Noto Sans, sans-serif
|
|
||||||
bar_height = 30
|
|
||||||
bar_padding = 10
|
|
||||||
bar_button_padding = 5
|
|
||||||
bar_precedence_over_border = true
|
|
||||||
bar_part_of_window = true
|
|
||||||
|
|
||||||
bar_color = rgba(111318FF)
|
|
||||||
col.text = rgba(e2e2e9FF)
|
|
||||||
|
|
||||||
|
|
||||||
# example buttons (R -> L)
|
|
||||||
# hyprbars-button = color, size, on-click
|
|
||||||
hyprbars-button = rgb(e2e2e9), 13, , hyprctl dispatch killactive
|
|
||||||
hyprbars-button = rgb(e2e2e9), 13, , hyprctl dispatch fullscreen 1
|
|
||||||
hyprbars-button = rgb(e2e2e9), 13, , hyprctl dispatch movetoworkspacesilent special
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
windowrule = border_color rgba(a9c7ffAA) rgba(a9c7ff77), match:pin 1
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# ############ Wayland #############
|
|
||||||
env = ELECTRON_OZONE_PLATFORM_HINT,auto
|
|
||||||
|
|
||||||
######### Applications #########
|
|
||||||
env = XDG_DATA_DIRS,$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
|
|
||||||
|
|
||||||
# ############ Themes #############
|
|
||||||
env = QT_QPA_PLATFORM, wayland;xcb
|
|
||||||
env = QT_QPA_PLATFORMTHEME, kde
|
|
||||||
env = XDG_MENU_PREFIX, plasma-
|
|
||||||
|
|
||||||
# ######## Virtual envrionment #########
|
|
||||||
env = ILLOGICAL_IMPULSE_VIRTUAL_ENV, ~/.local/state/quickshell/.venv
|
|
||||||
|
|
||||||
# ######## Terminal application #########
|
|
||||||
env = TERMINAL,kitty -1
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
# Bar, wallpaper
|
|
||||||
exec-once = ~/.config/hypr/hyprland/scripts/start_geoclue_agent.sh
|
|
||||||
exec-once = qs -c $qsConfig &
|
|
||||||
exec-once = ~/.config/hypr/custom/scripts/__restore_video_wallpaper.sh
|
|
||||||
|
|
||||||
# Core components (authentication, lock screen, notification daemon)
|
|
||||||
exec-once = gnome-keyring-daemon --start --components=secrets
|
|
||||||
exec-once = hypridle
|
|
||||||
exec-once = dbus-update-activation-environment --all
|
|
||||||
exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk
|
|
||||||
#exec-once = hyprpm reload
|
|
||||||
|
|
||||||
# Audio
|
|
||||||
exec-once = easyeffects --hide-window --service-mode
|
|
||||||
|
|
||||||
# Clipboard: history
|
|
||||||
# exec-once = wl-paste --watch cliphist store &
|
|
||||||
exec-once = wl-paste --type text --watch bash -c 'cliphist store && qs -c $qsConfig ipc call cliphistService update'
|
|
||||||
exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsConfig ipc call cliphistService update'
|
|
||||||
|
|
||||||
# Cursor
|
|
||||||
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
|
||||||
|
|
||||||
# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200)
|
|
||||||
# This causes https://github.com/end-4/dots-hyprland/issues/2427
|
|
||||||
# exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml
|
|
||||||
|
|
||||||
# User
|
|
||||||
#exec-once = voxtype &
|
|
||||||
exec-once = kdeconnectd
|
|
||||||
exec-once = zen-browser
|
|
||||||
exec-once = syncthing &
|
|
||||||
exec-once = rclone mount SchoolGdrive: /mnt/SchoolGdrive --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only
|
|
||||||
exec-once = rclone mount PersonalGdrive: /mnt/PersonalGdrive --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only
|
|
||||||
#exec-once = rclone mount AltGdrive: /mnt/AltGdrive --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only
|
|
||||||
exec-once = rclone mount gcrypt: /mnt/gcrypt --dir-cache-time 10s --poll-interval 10s --attr-timeout 10s --size-only
|
|
||||||
exec-once = steam %U -silent
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
# MONITOR CONFIG
|
|
||||||
monitor=,preferred,auto,1
|
|
||||||
|
|
||||||
gesture = 3, swipe, move,
|
|
||||||
gesture = 3, pinch, float
|
|
||||||
gesture = 4, horizontal, workspace
|
|
||||||
gesture = 4, up, dispatcher, global, quickshell:overviewWorkspacesToggle
|
|
||||||
gesture = 4, down, dispatcher, global, quickshell:overviewWorkspacesClose
|
|
||||||
gestures {
|
|
||||||
workspace_swipe_distance = 700
|
|
||||||
workspace_swipe_cancel_ratio = 0.2
|
|
||||||
workspace_swipe_min_speed_to_force = 5
|
|
||||||
workspace_swipe_direction_lock = true
|
|
||||||
workspace_swipe_direction_lock_threshold = 10
|
|
||||||
workspace_swipe_create_new = true
|
|
||||||
}
|
|
||||||
|
|
||||||
general {
|
|
||||||
# Gaps and border
|
|
||||||
gaps_in = 4
|
|
||||||
gaps_out = 5
|
|
||||||
gaps_workspaces = 50
|
|
||||||
|
|
||||||
border_size = 1
|
|
||||||
col.active_border = rgba(0DB7D455)
|
|
||||||
col.inactive_border = rgba(31313600)
|
|
||||||
resize_on_border = true
|
|
||||||
|
|
||||||
no_focus_fallback = true
|
|
||||||
|
|
||||||
allow_tearing = true # This just allows the `immediate` window rule to work
|
|
||||||
|
|
||||||
snap {
|
|
||||||
enabled = true
|
|
||||||
window_gap = 4
|
|
||||||
monitor_gap = 5
|
|
||||||
respect_gaps = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dwindle {
|
|
||||||
preserve_split = true
|
|
||||||
smart_split = false
|
|
||||||
smart_resizing = false
|
|
||||||
# precise_mouse_move = true
|
|
||||||
}
|
|
||||||
|
|
||||||
decoration {
|
|
||||||
# 2 = circle, higher = squircle, 4 = very obvious squircle
|
|
||||||
# Clear squircles look really off; we use only extra .4 here to make the rounding feel more continuous
|
|
||||||
rounding_power = 2
|
|
||||||
rounding = 18
|
|
||||||
|
|
||||||
blur {
|
|
||||||
enabled = true
|
|
||||||
xray = true
|
|
||||||
special = false
|
|
||||||
new_optimizations = true
|
|
||||||
size = 10
|
|
||||||
passes = 3
|
|
||||||
brightness = 1
|
|
||||||
noise = 0.05
|
|
||||||
contrast = 0.89
|
|
||||||
vibrancy = 0.5
|
|
||||||
vibrancy_darkness = 0.5
|
|
||||||
popups = false
|
|
||||||
popups_ignorealpha = 0.6
|
|
||||||
input_methods = true
|
|
||||||
input_methods_ignorealpha = 0.8
|
|
||||||
}
|
|
||||||
|
|
||||||
shadow {
|
|
||||||
enabled = true
|
|
||||||
ignore_window = true
|
|
||||||
range = 50
|
|
||||||
offset = 0 4
|
|
||||||
render_power = 10
|
|
||||||
color = rgba(00000027)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Dim
|
|
||||||
dim_inactive = true
|
|
||||||
dim_strength = 0.05
|
|
||||||
dim_special = 0.2
|
|
||||||
}
|
|
||||||
|
|
||||||
animations {
|
|
||||||
enabled = true
|
|
||||||
# Curves
|
|
||||||
bezier = expressiveFastSpatial, 0.42, 1.67, 0.21, 0.90
|
|
||||||
bezier = expressiveSlowSpatial, 0.39, 1.29, 0.35, 0.98
|
|
||||||
bezier = expressiveDefaultSpatial, 0.38, 1.21, 0.22, 1.00
|
|
||||||
bezier = emphasizedDecel, 0.05, 0.7, 0.1, 1
|
|
||||||
bezier = emphasizedAccel, 0.3, 0, 0.8, 0.15
|
|
||||||
bezier = standardDecel, 0, 0, 0, 1
|
|
||||||
bezier = menu_decel, 0.1, 1, 0, 1
|
|
||||||
bezier = menu_accel, 0.52, 0.03, 0.72, 0.08
|
|
||||||
bezier = stall, 1, -0.1, 0.7, 0.85
|
|
||||||
# Configs
|
|
||||||
# windows
|
|
||||||
animation = windowsIn, 1, 3, emphasizedDecel, popin 80%
|
|
||||||
animation = fadeIn, 1, 3, emphasizedDecel
|
|
||||||
animation = windowsOut, 1, 2, emphasizedDecel, popin 90%
|
|
||||||
animation = fadeOut, 1, 2, emphasizedDecel
|
|
||||||
animation = windowsMove, 1, 3, emphasizedDecel, slide
|
|
||||||
animation = border, 1, 10, emphasizedDecel
|
|
||||||
# layers
|
|
||||||
animation = layersIn, 1, 2.7, emphasizedDecel, popin 93%
|
|
||||||
animation = layersOut, 1, 2.4, menu_accel, popin 94%
|
|
||||||
# fade
|
|
||||||
animation = fadeLayersIn, 1, 0.5, menu_decel
|
|
||||||
animation = fadeLayersOut, 1, 2.7, stall
|
|
||||||
# workspaces
|
|
||||||
animation = workspaces, 1, 7, menu_decel, slide
|
|
||||||
## specialWorkspace
|
|
||||||
animation = specialWorkspaceIn, 1, 2.8, emphasizedDecel, slidevert
|
|
||||||
animation = specialWorkspaceOut, 1, 1.2, emphasizedAccel, slidevert
|
|
||||||
# zoom
|
|
||||||
animation = zoomFactor, 1, 3, standardDecel
|
|
||||||
}
|
|
||||||
|
|
||||||
input {
|
|
||||||
kb_layout = us
|
|
||||||
numlock_by_default = true
|
|
||||||
repeat_delay = 250
|
|
||||||
repeat_rate = 35
|
|
||||||
|
|
||||||
follow_mouse = 1
|
|
||||||
off_window_axis_events = 2
|
|
||||||
|
|
||||||
touchpad {
|
|
||||||
natural_scroll = yes
|
|
||||||
disable_while_typing = true
|
|
||||||
clickfinger_behavior = true
|
|
||||||
scroll_factor = 0.7
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
misc {
|
|
||||||
disable_hyprland_logo = true
|
|
||||||
disable_splash_rendering = true
|
|
||||||
vfr = 1
|
|
||||||
vrr = 1
|
|
||||||
mouse_move_enables_dpms = true
|
|
||||||
key_press_enables_dpms = true
|
|
||||||
animate_manual_resizes = false
|
|
||||||
animate_mouse_windowdragging = false
|
|
||||||
enable_swallow = false
|
|
||||||
swallow_regex = (foot|kitty|allacritty|Alacritty)
|
|
||||||
on_focus_under_fullscreen = 2
|
|
||||||
allow_session_lock_restore = true
|
|
||||||
session_lock_xray = true
|
|
||||||
initial_workspace_tracking = false
|
|
||||||
focus_on_activate = true
|
|
||||||
}
|
|
||||||
|
|
||||||
binds {
|
|
||||||
scroll_event_delay = 0
|
|
||||||
hide_special_on_workspace_change = true
|
|
||||||
}
|
|
||||||
|
|
||||||
cursor {
|
|
||||||
zoom_factor = 1
|
|
||||||
zoom_rigid = false
|
|
||||||
zoom_disable_aa = true
|
|
||||||
hotspot_padding = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,253 +0,0 @@
|
|||||||
# Lines ending with `# [hidden]` won't be shown on cheatsheet
|
|
||||||
# Lines starting with #! are section headings
|
|
||||||
|
|
||||||
#!
|
|
||||||
##! Shell
|
|
||||||
# These absolutely need to be on top, or they won't work consistently
|
|
||||||
bindid = Super, Super_L, Toggle search, global, quickshell:searchToggleRelease # Toggle search
|
|
||||||
bindid = Super, Super_R, Toggle search, global, quickshell:searchToggleRelease # [hidden] Toggle search
|
|
||||||
bind = Super, Super_L, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || fuzzel # [hidden] Launcher (fallback)
|
|
||||||
bind = Super, Super_R, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || fuzzel # [hidden] Launcher (fallback)
|
|
||||||
binditn = Super, catchall, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Ctrl, Super_L, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Ctrl, Super_R, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse:272, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse:273, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse:274, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse:275, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse:276, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse:277, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse_up, global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
bind = Super, mouse_down,global, quickshell:searchToggleReleaseInterrupt # [hidden]
|
|
||||||
|
|
||||||
bindit = ,Super_L, global, quickshell:workspaceNumber # [hidden]
|
|
||||||
bindit = ,Super_R, global, quickshell:workspaceNumber # [hidden]
|
|
||||||
bind = Super, Tab, global, quickshell:overviewWorkspacesToggle # Toggle overview
|
|
||||||
bindd = Super, V, Clipboard history >> clipboard, global, quickshell:overviewClipboardToggle # Clipboard history >> clipboard
|
|
||||||
bindd = Super, Period, Emoji >> clipboard, global, quickshell:overviewEmojiToggle # Emoji >> clipboard
|
|
||||||
bind = Super, A, global, quickshell:sidebarLeftToggle # Toggle left sidebar
|
|
||||||
bind = Super+Alt, A, global, quickshell:sidebarLeftToggleDetach # [hidden]
|
|
||||||
bind = Super, O, global, quickshell:sidebarLeftToggle # [hidden]
|
|
||||||
bindd = Super, N, Toggle right sidebar, global, quickshell:sidebarRightToggle # Toggle right sidebar
|
|
||||||
bindd = Super, Slash, Toggle cheatsheet, global, quickshell:cheatsheetToggle # Toggle cheatsheet
|
|
||||||
bindd = Super, K, Toggle on-screen keyboard, global, quickshell:oskToggle # Toggle on-screen keyboard
|
|
||||||
bindd = Super, M, Toggle media controls, global, quickshell:mediaControlsToggle # Toggle media controls
|
|
||||||
bind = Super, G, global, quickshell:overlayToggle # Toggle overlay
|
|
||||||
bindd = Ctrl+Alt, Delete, Toggle session menu, global, quickshell:sessionToggle # Toggle session menu
|
|
||||||
bindd = Super, J, Toggle bar, global, quickshell:barToggle # Toggle bar
|
|
||||||
bind = Ctrl+Alt, Delete, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill wlogout || wlogout -p layer-shell # [hidden] Session menu (fallback)
|
|
||||||
bind = Shift+Super+Alt, Slash, exec, qs -p ~/.config/quickshell/$qsConfig/welcome.qml # [hidden] Launch welcome app
|
|
||||||
|
|
||||||
bindle=, XF86MonBrightnessUp, exec, qs -c $qsConfig ipc call brightness increment || brightnessctl s 5%+ # [hidden]
|
|
||||||
bindle=, XF86MonBrightnessDown, exec, qs -c $qsConfig ipc call brightness decrement || brightnessctl s 5%- # [hidden]
|
|
||||||
bindle=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ -l 1.5# [hidden]
|
|
||||||
bindle=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- # [hidden]
|
|
||||||
|
|
||||||
bindl = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle # [hidden]
|
|
||||||
bindld = Super+Shift,M, Toggle mute, exec, wpctl set-mute @DEFAULT_SINK@ toggle # [hidden]
|
|
||||||
bindl = Alt ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden]
|
|
||||||
bindl = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden]
|
|
||||||
bindld = Super+Alt,M, Toggle mic, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle # [hidden]
|
|
||||||
bindd = Ctrl+Super, T, Toggle wallpaper selector, global, quickshell:wallpaperSelectorToggle # Wallpaper selector
|
|
||||||
bindd = Ctrl+Super+Alt, T, Select random wallpaper, global, quickshell:wallpaperSelectorRandom # Random wallpaper
|
|
||||||
bindd = Ctrl+Super, T, Change wallpaper, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/colors/switchwall.sh # [hidden] Change wallpaper (fallback)
|
|
||||||
bind = Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool qs quickshell; qs -c $qsConfig & # Restart widgets
|
|
||||||
bind = Ctrl+Super, P, global, quickshell:panelFamilyCycle # Cycle panel family
|
|
||||||
|
|
||||||
##! Utilities
|
|
||||||
# Screenshot, Record, OCR, Color picker, Clipboard history
|
|
||||||
bindd = Super, V, Copy clipboard history entry, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || cliphist list | fuzzel --match-mode fzf --dmenu | cliphist decode | wl-copy # [hidden] Clipboard history >> clipboard (fallback)
|
|
||||||
bindd = Super, Period, Copy an emoji, exec, qs -c $qsConfig ipc call TEST_ALIVE || pkill fuzzel || ~/.config/hypr/hyprland/scripts/fuzzel-emoji.sh copy # [hidden] Emoji >> clipboard (fallback)
|
|
||||||
bind = Super+Shift, S, global, quickshell:regionScreenshot # Screen snip
|
|
||||||
bind = Super+Shift, S, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || hyprshot --freeze --clipboard-only --mode region --silent # [hidden] Screen snip (fallback)
|
|
||||||
bind = Super+Shift, A, global, quickshell:regionSearch # Google Lens
|
|
||||||
bind = Super+Shift, A, exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || ~/.config/hypr/hyprland/scripts/snip_to_search.sh # [hidden] Google Lens (fallback)
|
|
||||||
# OCR
|
|
||||||
bind = Super+Shift, X, global, quickshell:regionOcr # Character recognition >> clipboard
|
|
||||||
bind = Super+Shift, T, global, quickshell:regionOcr # [hidden]
|
|
||||||
bind = Super+Shift, X,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\n' '+' | sed 's/\+$/\n/') | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
|
||||||
bind = Super+Shift, T,exec, qs -c $qsConfig ipc call TEST_ALIVE || pidof slurp || grim -g "$(slurp $SLURP_ARGS)" "/tmp/ocr_image.png" && tesseract "/tmp/ocr_image.png" stdout -l $(tesseract --list-langs | awk 'NR>1{print $1}' | tr '\n' '+' | sed 's/\+$/\n/') | wl-copy && rm "/tmp/ocr_image.png" # [hidden]
|
|
||||||
# Color picker
|
|
||||||
bindd = Super+Shift, C, Color picker, exec, hyprpicker -a # Pick color (Hex) >> clipboard
|
|
||||||
# Fullscreen screenshot
|
|
||||||
bindl = ,Print,exec,grim - | wl-copy # Screenshot >> clipboard
|
|
||||||
bindln = Ctrl,Print, exec, mkdir -p $(xdg-user-dir PICTURES)/Screenshots && grim $(xdg-user-dir PICTURES)/Screenshots/Screenshot_"$(date '+%Y-%m-%d_%H.%M.%S')".png # Screenshot >> clipboard & file (file)
|
|
||||||
bindln = Ctrl,Print,exec,grim - | wl-copy # [hidden] Screenshot >> clipboard & file (clipboard)
|
|
||||||
# Recording stuff
|
|
||||||
bindl = Super+Shift, R, global, quickshell:regionRecord # Record region (no sound)
|
|
||||||
bindl = Super+Shift, R, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/videos/record.sh # [hidden] Record region (no sound) (fallback)
|
|
||||||
bindl = Super+Alt, R, global, quickshell:regionRecord # [hidden] Record region (no sound)
|
|
||||||
bindl = Super+Alt, R, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/quickshell/$qsConfig/scripts/videos/record.sh # [hidden] Record region (no sound) (fallback)
|
|
||||||
bindl = Ctrl+Alt, R, exec, ~/.config/quickshell/$qsConfig/scripts/videos/record.sh --fullscreen # [hidden] Record screen (no sound)
|
|
||||||
bindl = Super+Shift+Alt, R, exec, ~/.config/quickshell/$qsConfig/scripts/videos/record.sh --fullscreen --sound # Record screen (with sound)
|
|
||||||
# AI
|
|
||||||
bindd = Super+Shift+Alt, mouse:273, Generate AI summary for selected text, exec, ~/.config/hypr/hyprland/scripts/ai/primary-buffer-query.sh # AI summary for selected text
|
|
||||||
|
|
||||||
#!
|
|
||||||
##! Window
|
|
||||||
# Focusing
|
|
||||||
bindm = Super, mouse:272, movewindow # Move
|
|
||||||
bindm = Super, mouse:274, movewindow # [hidden]
|
|
||||||
bindm = Super, mouse:273, resizewindow # Resize
|
|
||||||
#/# bind = Super, ←/↑/→/↓,, # Focus in direction
|
|
||||||
bind = Super, Left, movefocus, l # [hidden]
|
|
||||||
bind = Super, Right, movefocus, r # [hidden]
|
|
||||||
bind = Super, Up, movefocus, u # [hidden]
|
|
||||||
bind = Super, Down, movefocus, d # [hidden]
|
|
||||||
bind = Super, BracketLeft, movefocus, l # [hidden]
|
|
||||||
bind = Super, BracketRight, movefocus, r # [hidden]
|
|
||||||
|
|
||||||
#/# bind = Ctrl+Super, ←/↑/↓/→, # Move Focused window
|
|
||||||
bind = Ctrl+Super, Left, movewindow, l # [hidden]
|
|
||||||
bind = Ctrl+Super, Right, movewindow, r # [hidden]
|
|
||||||
bind = Ctrl+Super, Up, movewindow, u # [hidden]
|
|
||||||
bind = Ctrl+Super, Down, movewindow, d # [hidden]
|
|
||||||
|
|
||||||
# Window Resize
|
|
||||||
binde = Super+Shift, Right, resizeactive, 20 0 # [hidden]
|
|
||||||
binde = Super+Shift, Left, resizeactive, -20 0 # [hidden]
|
|
||||||
binde = Super+Shift, Up, resizeactive, 0 -20 # [hidden]
|
|
||||||
binde = Super+Shift, Down, resizeactive, 0 20 # [hidden]
|
|
||||||
|
|
||||||
#/# bind = Super+Shift, ←/↑/→/↓,, # Resize
|
|
||||||
# bind = Super+Shift, Left, movewindow, l # [hidden] (Disabled for resizing)
|
|
||||||
# bind = Super+Shift, Right, movewindow, r # [hidden] (Disabled for resizing)
|
|
||||||
# bind = Super+Shift, Up, movewindow, u # [hidden] (Disabled for resizing)
|
|
||||||
# bind = Super+Shift, Down, movewindow, d # [hidden] (Disabled for resizing)
|
|
||||||
|
|
||||||
bind = Alt, F4, killactive, # [hidden] Close (Windows)
|
|
||||||
bind = Super, Q, killactive, # Close
|
|
||||||
bind = Super+Ctrl+Shift, Q, exec, hyprctl kill # Forcefully kill a window
|
|
||||||
|
|
||||||
# Window split ratio
|
|
||||||
#/# binde = Super, ;/',, # Adjust split ratio
|
|
||||||
binde = Super, Semicolon, splitratio, -0.1 # [hidden]
|
|
||||||
binde = Super, Apostrophe, splitratio, +0.1 # [hidden]
|
|
||||||
# Positioning mode
|
|
||||||
bind = Super+Alt, Space, togglefloating, # Float/Tile
|
|
||||||
bind = Super, W, fullscreen, 1 # Maximize
|
|
||||||
bind = Super, F, fullscreen, 0 # Fullscreen
|
|
||||||
bind = Super+Alt, F, fullscreenstate, 0 3 # Fullscreen spoof
|
|
||||||
bind = Super, P, pin # Pin
|
|
||||||
|
|
||||||
#/# bind = Super+Alt, Hash,, # Send to workspace # (1, 2, 3,...)
|
|
||||||
bind = Super+Alt, code:10, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 1 # [hidden]
|
|
||||||
bind = Super+Alt, code:11, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 2 # [hidden]
|
|
||||||
bind = Super+Alt, code:12, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 3 # [hidden]
|
|
||||||
bind = Super+Alt, code:13, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 4 # [hidden]
|
|
||||||
bind = Super+Alt, code:14, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 5 # [hidden]
|
|
||||||
bind = Super+Alt, code:15, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 6 # [hidden]
|
|
||||||
bind = Super+Alt, code:16, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 7 # [hidden]
|
|
||||||
bind = Super+Alt, code:17, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 8 # [hidden]
|
|
||||||
bind = Super+Alt, code:18, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 9 # [hidden]
|
|
||||||
bind = Super+Alt, code:19, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh movetoworkspacesilent 10 # [hidden]
|
|
||||||
|
|
||||||
#/# bind = Super+Ctrl, Hash,, # Send to workspace and focus # (1, 2, 3,...)
|
|
||||||
bind = Super+Ctrl, code:10, movetoworkspace, 1 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:11, movetoworkspace, 2 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:12, movetoworkspace, 3 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:13, movetoworkspace, 4 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:14, movetoworkspace, 5 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:15, movetoworkspace, 6 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:16, movetoworkspace, 7 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:17, movetoworkspace, 8 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:18, movetoworkspace, 9 # [hidden]
|
|
||||||
bind = Super+Ctrl, code:19, movetoworkspace, 10 # [hidden]
|
|
||||||
|
|
||||||
# #/# bind = Super+Shift, Scroll ↑/↓,, # Send to workspace left/right
|
|
||||||
bind = Super+Shift, mouse_down, movetoworkspace, r-1 # [hidden]
|
|
||||||
bind = Super+Shift, mouse_up, movetoworkspace, r+1 # [hidden]
|
|
||||||
bind = Super+Alt, mouse_down, movetoworkspace, -1 # [hidden]
|
|
||||||
bind = Super+Alt, mouse_up, movetoworkspace, +1 # [hidden]
|
|
||||||
|
|
||||||
#/# bind = Super+Shift, Page_↑/↓,, # Send to workspace left/right
|
|
||||||
bind = Super+Alt, Page_Down, movetoworkspace, +1 # [hidden]
|
|
||||||
bind = Super+Alt, Page_Up, movetoworkspace, -1 # [hidden]
|
|
||||||
bind = Super+Shift, Page_Down, movetoworkspace, r+1 # [hidden]
|
|
||||||
bind = Super+Shift, Page_Up, movetoworkspace, r-1 # [hidden]
|
|
||||||
bind = Ctrl+Super+Shift, Right, movetoworkspace, r+1 # [hidden]
|
|
||||||
bind = Ctrl+Super+Shift, Left, movetoworkspace, r-1 # [hidden]
|
|
||||||
|
|
||||||
bind = Super+Alt, S, movetoworkspacesilent, special # Send to scratchpad
|
|
||||||
bind = Ctrl+Super, S, togglespecialworkspace, # [hidden]
|
|
||||||
|
|
||||||
##! Workspace
|
|
||||||
# Switching
|
|
||||||
bind = Super, code:10, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 1 # [hidden]
|
|
||||||
bind = Super, code:11, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 2 # [hidden]
|
|
||||||
bind = Super, code:12, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 3 # [hidden]
|
|
||||||
bind = Super, code:13, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 4 # [hidden]
|
|
||||||
bind = Super, code:14, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 5 # [hidden]
|
|
||||||
bind = Super, code:15, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 6 # [hidden]
|
|
||||||
bind = Super, code:16, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 7 # [hidden]
|
|
||||||
bind = Super, code:17, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 8 # [hidden]
|
|
||||||
bind = Super, code:18, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 9 # [hidden]
|
|
||||||
bind = Super, code:19, exec, ~/.config/hypr/hyprland/scripts/workspace_action.sh workspace 10 # [hidden]
|
|
||||||
|
|
||||||
#bind = Ctrl+Super, Right, workspace, r+1 # [hidden]
|
|
||||||
#bind = Ctrl+Super, Left, workspace, r-1 # [hidden]
|
|
||||||
#/# bind = Ctrl+Super+Alt, ←/→,, # [hidden] Focus busy left/right
|
|
||||||
bind = Ctrl+Super+Alt, Right, workspace, m+1 # [hidden]
|
|
||||||
bind = Ctrl+Super+Alt, Left, workspace, m-1 # [hidden]
|
|
||||||
#/# bind = Super, Page_↑/↓,, # Focus left/right
|
|
||||||
bind = Super, Page_Down, workspace, +1 # [hidden]
|
|
||||||
bind = Super, Page_Up, workspace, -1 # [hidden]
|
|
||||||
bind = Ctrl+Super, Page_Down, workspace, r+1 # [hidden]
|
|
||||||
bind = Ctrl+Super, Page_Up, workspace, r-1 # [hidden]
|
|
||||||
#/# bind = Super, Scroll ↑/↓,, # Focus left/right
|
|
||||||
bind = Super, mouse_up, workspace, +1 # [hidden]
|
|
||||||
bind = Super, mouse_down, workspace, -1 # [hidden]
|
|
||||||
bind = Ctrl+Super, mouse_up, workspace, r+1 # [hidden]
|
|
||||||
bind = Ctrl+Super, mouse_down, workspace, r-1 # [hidden]
|
|
||||||
## Special
|
|
||||||
bind = Super, S, togglespecialworkspace, # Toggle scratchpad
|
|
||||||
bind = Super, mouse:275, togglespecialworkspace, # [hidden]
|
|
||||||
bind = Ctrl+Super, BracketLeft, workspace, -1 # [hidden]
|
|
||||||
bind = Ctrl+Super, BracketRight, workspace, +1 # [hidden]
|
|
||||||
bind = Ctrl+Super, Up, workspace, r-5 # [hidden]
|
|
||||||
bind = Ctrl+Super, Down, workspace, r+5 # [hidden]
|
|
||||||
|
|
||||||
##! Virtual machines
|
|
||||||
bind = Super+Alt, F1, exec, notify-send 'Entered Virtual Machine submap' 'Keybinds disabled. Hit Super+Alt+F1 to escape' -a 'Hyprland' && hyprctl dispatch submap virtual-machine # Disable keybinds
|
|
||||||
submap = virtual-machine
|
|
||||||
bind = Super+Alt, F1, exec, notify-send 'Exited Virtual Machine submap' 'Keybinds re-enabled' -a 'Hyprland' && hyprctl dispatch submap global # [hidden]
|
|
||||||
submap = global
|
|
||||||
|
|
||||||
#!
|
|
||||||
# Testing
|
|
||||||
bind = Super+Alt, f11, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i "nipple" | grep -v -i "pussy" | shuf -n 1); ACTION=$(notify-send "Test notification with body image" "This notification should contain your user account <b>image</b> and <a href=\"https://discord.com/app\">Discord</a> <b>icon</b>. Oh and here is a random image in your Pictures folder: <img src=\"$RANDOM_IMAGE\" alt=\"Testing image\"/>" -a "Hyprland keybind" -p -h "string:image-path:/var/lib/AccountsService/icons/$USER" -t 6000 -i "discord" -A "openImage=Profile image" -A "action2=Open the random image" -A "action3=Useless button"); [[ $ACTION == *openImage ]] && xdg-open "/var/lib/AccountsService/icons/$USER"; [[ $ACTION == *action2 ]] && xdg-open \"$RANDOM_IMAGE\"' # [hidden]
|
|
||||||
bind = Super+Alt, f12, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i "nipple" | grep -v -i "pussy" | shuf -n 1); ACTION=$(notify-send "Test notification" "This notification should contain a random image in your <b>Pictures</b> folder and <a href=\"https://discord.com/app\">Discord</a> <b>icon</b>.\n<i>Flick right to dismiss!</i>" -a "Discord (fake)" -p -h "string:image-path:$RANDOM_IMAGE" -t 6000 -i "discord" -A "openImage=Profile image" -A "action2=Useless button"); [[ $ACTION == *openImage ]] && xdg-open "/var/lib/AccountsService/icons/$USER"' # [hidden]
|
|
||||||
bind = Super+Alt, Equal, exec, notify-send "Urgent notification" "Ah hell no" -u critical -a 'Hyprland keybind' # [hidden]
|
|
||||||
|
|
||||||
#!
|
|
||||||
##! Session
|
|
||||||
bindd = Super, L, Lock, exec, loginctl lock-session # Lock
|
|
||||||
bindld = Super+Shift, L, Suspend system, exec, systemctl suspend || loginctl suspend # Sleep
|
|
||||||
bindd = Ctrl+Shift+Alt+Super, Delete, Shutdown, exec, systemctl poweroff || loginctl poweroff # [hidden] Power off
|
|
||||||
|
|
||||||
##! Screen
|
|
||||||
binde = Super, Minus, exec, ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.3 # Zoom out
|
|
||||||
binde = Super, Equal, exec, ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.3 # Zoom in
|
|
||||||
# Zoom with keypad
|
|
||||||
binde = Super, code:82, exec, qs -c $qsConfig ipc call zoom zoomOut # [hidden] Zoom out
|
|
||||||
binde = Super, code:86, exec, qs -c $qsConfig ipc call zoom zoomIn # [hidden] Zoom in
|
|
||||||
binde = Super, code:82, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh decrease 0.1 # [hidden] Zoom out
|
|
||||||
binde = Super, code:86, exec, qs -c $qsConfig ipc call TEST_ALIVE || ~/.config/hypr/hyprland/scripts/zoom.sh increase 0.1 # [hidden] Zoom in
|
|
||||||
|
|
||||||
##! Media
|
|
||||||
bindl= Super+Shift, N, exec, playerctl next || playerctl position `bc <<< "100 * $(playerctl metadata mpris:length) / 1000000 / 100"` # Next track
|
|
||||||
bindl= Super+Shift, B, exec, playerctl previous # Previous track
|
|
||||||
bindl= Super+Shift, P, exec, playerctl play-pause # Play/pause media
|
|
||||||
|
|
||||||
##! Apps
|
|
||||||
bind = Super, Return, exec, alacritty # Terminal
|
|
||||||
bind = Super, E, exec, dolphin # File manager
|
|
||||||
bind = Super, B, exec, zen-browser # Browser
|
|
||||||
bind = Super, C, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "code" "codium" "cursor" "zed" # Code editor
|
|
||||||
bind = Super, I, exec, XDG_CURRENT_DESKTOP=gnome ~/.config/hypr/hyprland/scripts/launch_first_available.sh "systemsettings" "gnome-control-center" # Settings app
|
|
||||||
bind = Ctrl+Shift, Escape, exec, ~/.config/hypr/hyprland/scripts/launch_first_available.sh "gnome-system-monitor" "btop" # Task manager
|
|
||||||
bind = SUPER, F2, exec, ~/.config/hypr/hyprland/scripts/toggle_scroll.sh # Lock/Unlock mouse scroll
|
|
||||||
|
|
||||||
# Cursed stuff
|
|
||||||
bind = Ctrl+Super, Backslash, resizeactive, exact 640 480 # [hidden]
|
|
||||||
|
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
# ######## Window rules ########
|
|
||||||
|
|
||||||
# Disable blur for xwayland context menus
|
|
||||||
windowrule = match:class ^()$, match:title ^()$, no_blur on
|
|
||||||
|
|
||||||
# Disable blur for every window
|
|
||||||
windowrule = match:class .*, no_blur on
|
|
||||||
|
|
||||||
# Floating
|
|
||||||
windowrule = match:title ^(Open File)(.*)$, center on
|
|
||||||
windowrule = match:title ^(Open File)(.*)$, float on
|
|
||||||
windowrule = match:title ^(Select a File)(.*)$, center on
|
|
||||||
windowrule = match:title ^(Select a File)(.*)$, float on
|
|
||||||
windowrule = match:title ^(Choose wallpaper)(.*)$, center on
|
|
||||||
windowrule = match:title ^(Choose wallpaper)(.*)$, float on
|
|
||||||
windowrule = match:title ^(Choose wallpaper)(.*)$, size (monitor_w*.60) (monitor_h*.65)
|
|
||||||
windowrule = match:title ^(Open Folder)(.*)$, center on
|
|
||||||
windowrule = match:title ^(Open Folder)(.*)$, float on
|
|
||||||
windowrule = match:title ^(Save As)(.*)$, center on
|
|
||||||
windowrule = match:title ^(Save As)(.*)$, float on
|
|
||||||
windowrule = match:title ^(Library)(.*)$, center on
|
|
||||||
windowrule = match:title ^(Library)(.*)$, float on
|
|
||||||
windowrule = match:title ^(File Upload)(.*)$, center on
|
|
||||||
windowrule = match:title ^(File Upload)(.*)$, float on
|
|
||||||
windowrule = match:title ^(.*)(wants to save)$, center on
|
|
||||||
windowrule = match:title ^(.*)(wants to save)$, float on
|
|
||||||
windowrule = match:title ^(.*)(wants to open)$, center on
|
|
||||||
windowrule = match:title ^(.*)(wants to open)$, float on
|
|
||||||
windowrule = match:class ^(blueberry\.py)$, float on
|
|
||||||
windowrule = match:class ^(guifetch)$ , float on # FlafyDev/guifetch
|
|
||||||
windowrule = match:class ^(pavucontrol)$, float on
|
|
||||||
windowrule = match:class ^(pavucontrol)$, size (monitor_w*.45) (monitor_h*.45)
|
|
||||||
windowrule = match:class ^(pavucontrol)$, center on
|
|
||||||
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, float on
|
|
||||||
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, size (monitor_w*.45) (monitor_h*.45)
|
|
||||||
windowrule = match:class ^(org.pulseaudio.pavucontrol)$, center on
|
|
||||||
windowrule = match:class ^(nm-connection-editor)$, float on
|
|
||||||
windowrule = match:class ^(nm-connection-editor)$, size (monitor_w*.45) (monitor_h*.45)
|
|
||||||
windowrule = match:class ^(nm-connection-editor)$, center on
|
|
||||||
windowrule = match:class .*plasmawindowed.*, float on
|
|
||||||
windowrule = match:class kcm_.*, float on
|
|
||||||
windowrule = match:class .*bluedevilwizard, float on
|
|
||||||
windowrule = match:title .*Welcome, float on
|
|
||||||
windowrule = match:title ^(illogical-impulse Settings)$, float on
|
|
||||||
windowrule = match:title .*Shell conflicts.*, float on
|
|
||||||
windowrule = match:class org.freedesktop.impl.portal.desktop.kde, float on
|
|
||||||
windowrule = match:class org.freedesktop.impl.portal.desktop.kde, size (monitor_w*.60) (monitor_h*.65)
|
|
||||||
windowrule = match:class ^(Zotero)$, float on
|
|
||||||
windowrule = match:class ^(Zotero)$, size (monitor_w*.45) (monitor_h*.45)
|
|
||||||
|
|
||||||
# Move
|
|
||||||
# kde-material-you-colors spawns a window when changing dark/light theme. This is to make sure it doesn't interfere at all.
|
|
||||||
windowrule = match:class ^(plasma-changeicons)$, float on
|
|
||||||
windowrule = match:class ^(plasma-changeicons)$, no_initial_focus on
|
|
||||||
windowrule = match:class ^(plasma-changeicons)$, move 999999 999999
|
|
||||||
# stupid dolphin copy
|
|
||||||
windowrule = match:title ^(Copying — Dolphin)$, move 40 80
|
|
||||||
|
|
||||||
# Tiling
|
|
||||||
windowrule = match:class ^dev\.warp\.Warp$, tile on
|
|
||||||
|
|
||||||
# Picture-in-Picture
|
|
||||||
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, float on
|
|
||||||
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, keep_aspect_ratio on
|
|
||||||
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, move (monitor_w*.73) (monitor_h*.72)
|
|
||||||
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, size (monitor_w*.25) (monitor_h*.25)
|
|
||||||
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, float on
|
|
||||||
windowrule = match:title ^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$, pin on
|
|
||||||
|
|
||||||
# --- Tearing ---
|
|
||||||
windowrule = match:title .*\.exe, immediate on
|
|
||||||
windowrule = match:title .*minecraft.*, immediate on
|
|
||||||
windowrule = match:class ^(steam_app).*, immediate on
|
|
||||||
|
|
||||||
# Fix Jetbrain IDEs focus/rerendering problem
|
|
||||||
windowrule = match:class ^jetbrains-.*$, match:float 1, match:title ^$|^\s$|^win\d+$, no_initial_focus on
|
|
||||||
|
|
||||||
# No shadow for tiled windows (matches windows that are not floating).
|
|
||||||
windowrule = match:float 0, no_shadow on
|
|
||||||
|
|
||||||
# ######## Workspace rules ########
|
|
||||||
workspace = special:special, gapsout:30
|
|
||||||
|
|
||||||
# ######## Layer rules ########
|
|
||||||
layerrule = match:namespace .*, xray on
|
|
||||||
# layerrule = match:namespace .*, no_anim on
|
|
||||||
layerrule = match:namespace walker, no_anim on
|
|
||||||
layerrule = match:namespace selection, no_anim on
|
|
||||||
layerrule = match:namespace overview, no_anim on
|
|
||||||
layerrule = match:namespace anyrun, no_anim on
|
|
||||||
layerrule = match:namespace indicator.*, no_anim on
|
|
||||||
layerrule = match:namespace osk, no_anim on
|
|
||||||
layerrule = match:namespace hyprpicker, no_anim on
|
|
||||||
|
|
||||||
layerrule = match:namespace noanim, no_anim on
|
|
||||||
layerrule = match:namespace gtk-layer-shell, blur on
|
|
||||||
layerrule = match:namespace gtk-layer-shell, ignore_alpha 0
|
|
||||||
layerrule = match:namespace launcher, blur on
|
|
||||||
layerrule = match:namespace launcher, ignore_alpha 0.5
|
|
||||||
layerrule = match:namespace notifications, blur on
|
|
||||||
layerrule = match:namespace notifications, ignore_alpha 0.69
|
|
||||||
layerrule = match:namespace logout_dialog # wlogout, blur on
|
|
||||||
|
|
||||||
# ags
|
|
||||||
layerrule = match:namespace sideleft.*, animation slide left
|
|
||||||
layerrule = match:namespace sideright.*, animation slide right
|
|
||||||
layerrule = match:namespace session[0-9]*, blur on
|
|
||||||
layerrule = match:namespace bar[0-9]*, blur on
|
|
||||||
layerrule = match:namespace bar[0-9]*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace barcorner.*, blur on
|
|
||||||
layerrule = match:namespace barcorner.*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace dock[0-9]*, blur on
|
|
||||||
layerrule = match:namespace dock[0-9]*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace indicator.*, blur on
|
|
||||||
layerrule = match:namespace indicator.*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace overview[0-9]*, blur on
|
|
||||||
layerrule = match:namespace overview[0-9]*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace cheatsheet[0-9]*, blur on
|
|
||||||
layerrule = match:namespace cheatsheet[0-9]*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace sideright[0-9]*, blur on
|
|
||||||
layerrule = match:namespace sideright[0-9]*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace sideleft[0-9]*, blur on
|
|
||||||
layerrule = match:namespace sideleft[0-9]*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace indicator.*, blur on
|
|
||||||
layerrule = match:namespace indicator.*, ignore_alpha 0.6
|
|
||||||
layerrule = match:namespace osk[0-9]*, blur on
|
|
||||||
layerrule = match:namespace osk[0-9]*, ignore_alpha 0.6
|
|
||||||
|
|
||||||
# Quickshell
|
|
||||||
# Quickshell: illogical-impulse
|
|
||||||
layerrule = match:namespace quickshell:.*, blur_popups on
|
|
||||||
layerrule = match:namespace quickshell:.*, blur on
|
|
||||||
layerrule = match:namespace quickshell:.*, ignore_alpha 0.79
|
|
||||||
layerrule = match:namespace quickshell:bar, animation slide
|
|
||||||
layerrule = match:namespace quickshell:actionCenter, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:cheatsheet, animation slide bottom
|
|
||||||
layerrule = match:namespace quickshell:dock, animation slide bottom
|
|
||||||
layerrule = match:namespace quickshell:screenCorners, animation popin 120%
|
|
||||||
layerrule = match:namespace quickshell:lockWindowPusher, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:notificationPopup, animation fade
|
|
||||||
layerrule = match:namespace quickshell:overlay, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:overlay, ignore_alpha 1
|
|
||||||
layerrule = match:namespace quickshell:overview, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:osk, animation slide bottom
|
|
||||||
layerrule = match:namespace quickshell:polkit, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:popup, xray off # No weird color for bar tooltips (this in theory should suffice)
|
|
||||||
layerrule = match:namespace quickshell:popup, ignore_alpha 1 # No weird color for bar tooltips (but somehow this is necessary)
|
|
||||||
layerrule = match:namespace quickshell:mediaControls, ignore_alpha 1 # Same as above
|
|
||||||
layerrule = match:namespace quickshell:reloadPopup, animation slide
|
|
||||||
layerrule = match:namespace quickshell:regionSelector, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:screenshot, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:session, blur on
|
|
||||||
layerrule = match:namespace quickshell:session, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:session, ignore_alpha 0
|
|
||||||
layerrule = match:namespace quickshell:sidebarRight, animation slide right
|
|
||||||
layerrule = match:namespace quickshell:sidebarLeft, animation slide left
|
|
||||||
layerrule = match:namespace quickshell:verticalBar, animation slide
|
|
||||||
layerrule = match:namespace quickshell:osk, order -1
|
|
||||||
# Quickshell: waffles
|
|
||||||
layerrule = match:namespace quickshell:wallpaperSelector, animation slide top
|
|
||||||
layerrule = match:namespace quickshell:wNotificationCenter, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:wOnScreenDisplay, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:wStartMenu, no_anim on
|
|
||||||
layerrule = match:namespace quickshell:wTaskView, ignore_alpha 0
|
|
||||||
layerrule = match:namespace quickshell:wTaskView, no_anim on
|
|
||||||
|
|
||||||
# Launchers need to be FAST
|
|
||||||
layerrule = match:namespace gtk4-layer-shell, no_anim on
|
|
||||||
@@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
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.
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Default system prompt
|
|
||||||
SYSTEM_PROMPT="You are a helpful, quick assistant that provides brief and concise explanation \
|
|
||||||
to given content in at most 100 characters. If the given content is not in English, translate \
|
|
||||||
it to English. If the content is an English word, provide its meaning. If the content is a name, \
|
|
||||||
provide some info about it. For a math expression, provide a simplification, \
|
|
||||||
each step on a line following this style: \`2x=11 (subtract 7 from both sides)\`. \
|
|
||||||
If you do not know the answer, simply say 'No info available'. \
|
|
||||||
Only respond for the appropriate case and use as little text as possible.\
|
|
||||||
The content:"
|
|
||||||
|
|
||||||
first_loaded_model=$("$(dirname "$0")/show-loaded-ollama-models.sh" -j | jq -r '.[0].model' 2>/dev/null) || first_loaded_model=""
|
|
||||||
model=${first_loaded_model:-"llama3.2"}
|
|
||||||
|
|
||||||
# Parse command-line arguments
|
|
||||||
while [[ "$#" -gt 0 ]]; do
|
|
||||||
case $1 in
|
|
||||||
--model) model="$2"; shift ;; # Set the model from the flag
|
|
||||||
*) echo "Unknown parameter: $1"; exit 1 ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
# Combine the system prompt with the clipboard content
|
|
||||||
content=$(wl-paste -p | tr '\n' ' ' | head -c 2000) # 2000 char limit to prevent overflow
|
|
||||||
|
|
||||||
# Properly escape content for JSON using jq
|
|
||||||
prompt_json=$(jq -n --arg system_prompt "$SYSTEM_PROMPT" --arg content "$content" '$system_prompt + " " + $content')
|
|
||||||
|
|
||||||
# Make the API call with the specified or default model
|
|
||||||
api_payload=$(jq -n --arg model "$model" --argjson prompt "$prompt_json" --argjson stream false \
|
|
||||||
'{model: $model, prompt: $prompt, stream: $stream}')
|
|
||||||
response=$(curl -s http://localhost:11434/api/generate -d "$api_payload" | jq -r '.response' 2>/dev/null)
|
|
||||||
|
|
||||||
# Check if content is a single line and no longer than 30 characters
|
|
||||||
if [[ ${#content} -le 30 && "$content" != *$'\n'* ]]; then
|
|
||||||
notify-send --app-name="Text selection query" --expire-time=10000 \
|
|
||||||
"$content" "$response"
|
|
||||||
else
|
|
||||||
notify-send --app-name="Text selection query" --expire-time=10000 \
|
|
||||||
"AI Response" "$response"
|
|
||||||
fi
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# From strikeoncmputrz/LLM_Scripts
|
|
||||||
# License: Apache-2.0, can be found in the same folder as this script
|
|
||||||
|
|
||||||
# Global Vars
|
|
||||||
ollama_url=http://localhost
|
|
||||||
port="11434"
|
|
||||||
blobs=()
|
|
||||||
model_name_paths=()
|
|
||||||
|
|
||||||
|
|
||||||
#Parse arguments
|
|
||||||
while [ "$#" -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
-h|--help)
|
|
||||||
echo
|
|
||||||
echo " Identifies Ollama models running on this operating system by parsing running processes."
|
|
||||||
echo
|
|
||||||
echo " Usage: $0 [options]"
|
|
||||||
echo
|
|
||||||
echo " Options:"
|
|
||||||
echo " -j, --json_output Prints result as a json object. Other output disabled. (Default: false)"
|
|
||||||
echo " -p, --port [port number] Specify Ollama Server port (Default: 11434)"
|
|
||||||
echo " -u, --ollama_url [url] Specify Ollama Server URL (Default: http://localhost)"
|
|
||||||
echo
|
|
||||||
echo " Dependencies: jq"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-j|--json_output)
|
|
||||||
json_out=1
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
-u|--ollama_url)
|
|
||||||
ollama_url=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
-p|--port)
|
|
||||||
port=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option: $1"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
compare_running_models_and_modelfiles() {
|
|
||||||
json_match=()
|
|
||||||
json_output=()
|
|
||||||
local matching_models=()
|
|
||||||
OLDIFS=$IFS
|
|
||||||
for ((i=0; i<${#model_name_paths[@]}; i++)); do # Iterate over the array of modelname,blob-path
|
|
||||||
for blob in "${blobs[@]}"; do
|
|
||||||
IFS=',', read -ra fields <<< "${model_name_paths[i]}" # Split the string into parts
|
|
||||||
if [ "${fields[1]}" == "$blob" ]; then # Check if current 'field' matches a blob
|
|
||||||
matching_models+=( '{ "model": "'"${fields[0]}"'", "path": "'"${fields[1]}"'"}') # Add to list of matching models
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$json_out" ]; then
|
|
||||||
echo -e "\nModel Found: \n $(echo ${matching_models[*]} | jq '.' | sed s/[{}]//g) \n"
|
|
||||||
else
|
|
||||||
local json_match="${matching_models[*]}"
|
|
||||||
json_output=$(echo $json_match | jq -c -s .)
|
|
||||||
echo "$json_output"
|
|
||||||
fi
|
|
||||||
IFS=$OLDIFS
|
|
||||||
}
|
|
||||||
|
|
||||||
get_running_model_paths() {
|
|
||||||
blobs=$(ps aux | grep -- '--model' | grep -v grep | grep -Po '(?<=--model\s).*' | cut -d ' ' -f1)
|
|
||||||
if [ -z "$blobs" ]; then
|
|
||||||
echo -e "\n\n Warning: No running Ollama models detected!\n"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
parse_modelfiles() {
|
|
||||||
if [ -z "$json_out" ]; then
|
|
||||||
echo -e "\nConnecting to $ollama_url:$port\n"
|
|
||||||
if [ -z "$(curl -s $ollama_url:$port)" ]; then
|
|
||||||
echo -e "Could not connect to Ollama. Check the ollama_url parameter and that the server is running\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
curl -s "$ollama_url:$port"
|
|
||||||
fi
|
|
||||||
local models=( $(curl -s "$ollama_url:$port/api/tags" | jq -r '.models[].name') )
|
|
||||||
for model in "${models[@]}"; do
|
|
||||||
local modelfile=$(curl -s "$ollama_url:$port/api/show" -d '{ "name": "'"$model"'", "modelfile": true }' | jq -r '.modelfile')
|
|
||||||
model_name_paths+=($model,$(echo "$modelfile" | awk '/^FROM/{print $2}'))
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
parse_modelfiles
|
|
||||||
get_running_model_paths
|
|
||||||
compare_running_models_and_modelfiles
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
for cmd in "$@"; do
|
|
||||||
[[ -z "$cmd" ]] && continue
|
|
||||||
eval "command -v ${cmd%% *}" >/dev/null 2>&1 || continue
|
|
||||||
eval "$cmd" &
|
|
||||||
exit
|
|
||||||
done
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
grim -g "$(slurp)" /tmp/image.png
|
|
||||||
imageLink=$(curl -sF files[]=@/tmp/image.png 'https://uguu.se/upload' | jq -r '.files[0].url')
|
|
||||||
xdg-open "https://lens.google.com/uploadbyurl?url=${imageLink}"
|
|
||||||
rm /tmp/image.png
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Check if GeoClue agent is already running
|
|
||||||
if pgrep -f 'geoclue-2.0/demos/agent' > /dev/null; then
|
|
||||||
echo "GeoClue agent is already running."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# List of known possible GeoClue agent paths
|
|
||||||
AGENT_PATHS=(
|
|
||||||
/usr/libexec/geoclue-2.0/demos/agent
|
|
||||||
/usr/lib/geoclue-2.0/demos/agent
|
|
||||||
"$HOME/.nix-profile/libexec/geoclue-2.0/demos/agent"
|
|
||||||
"$HOME/.nix-profile/lib/geoclue-2.0/demos/agent"
|
|
||||||
/run/current-system/sw/libexec/geoclue-2.0/demos/agent
|
|
||||||
)
|
|
||||||
|
|
||||||
# Find the first valid agent path
|
|
||||||
for path in "${AGENT_PATHS[@]}"; do
|
|
||||||
if [ -x "$path" ]; then
|
|
||||||
echo "Starting GeoClue agent from: $path"
|
|
||||||
"$path" & # starts in the background
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# If we got here, none of the paths worked
|
|
||||||
echo "GeoClue agent not found in known paths."
|
|
||||||
echo "Please install GeoClue or update the script with the correct path."
|
|
||||||
exit 1
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
curr_workspace="$(hyprctl activeworkspace -j | jq -r ".id")"
|
|
||||||
dispatcher="$1"
|
|
||||||
shift ## The target is now in $1, not $2
|
|
||||||
|
|
||||||
if [[ -z "${dispatcher}" || "${dispatcher}" == "--help" || "${dispatcher}" == "-h" || -z "$1" ]]; then
|
|
||||||
echo "Usage: $0 <dispatcher> <target>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ "$1" == *"+"* || "$1" == *"-"* ]]; then ## Is this something like r+1 or -1?
|
|
||||||
hyprctl dispatch "${dispatcher}" "$1" ## $1 = workspace id since we shifted earlier.
|
|
||||||
elif [[ "$1" =~ ^[0-9]+$ ]]; then ## Is this just a number?
|
|
||||||
target_workspace=$((((curr_workspace - 1) / 10 ) * 10 + $1))
|
|
||||||
hyprctl dispatch "${dispatcher}" "${target_workspace}"
|
|
||||||
else
|
|
||||||
hyprctl dispatch "${dispatcher}" "$1" ## In case the target in a string, required for special workspaces.
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Controls Hyprland's cursor zoom_factor, clamped between 1.0 and 3.0
|
|
||||||
|
|
||||||
# Get current zoom level
|
|
||||||
get_zoom() {
|
|
||||||
hyprctl getoption -j cursor:zoom_factor | jq '.float'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Clamp a value between 1.0 and 3.0
|
|
||||||
clamp() {
|
|
||||||
local val="$1"
|
|
||||||
awk "BEGIN {
|
|
||||||
v = $val;
|
|
||||||
if (v < 1.0) v = 1.0;
|
|
||||||
if (v > 3.0) v = 3.0;
|
|
||||||
print v;
|
|
||||||
}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set zoom level
|
|
||||||
set_zoom() {
|
|
||||||
local value="$1"
|
|
||||||
clamped=$(clamp "$value")
|
|
||||||
hyprctl keyword cursor:zoom_factor "$clamped"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
reset)
|
|
||||||
set_zoom 1.0
|
|
||||||
;;
|
|
||||||
increase)
|
|
||||||
if [[ -z "$2" ]]; then
|
|
||||||
echo "Usage: $0 increase STEP"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
current=$(get_zoom)
|
|
||||||
new=$(awk "BEGIN { print $current + $2 }")
|
|
||||||
set_zoom "$new"
|
|
||||||
;;
|
|
||||||
decrease)
|
|
||||||
if [[ -z "$2" ]]; then
|
|
||||||
echo "Usage: $0 decrease STEP"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
current=$(get_zoom)
|
|
||||||
new=$(awk "BEGIN { print $current - $2 }")
|
|
||||||
set_zoom "$new"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {reset|increase STEP|decrease STEP}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
source=~/.config/hypr/hyprlock/colors.conf
|
|
||||||
|
|
||||||
background {
|
|
||||||
color = rgba(181818FF)
|
|
||||||
}
|
|
||||||
input-field {
|
|
||||||
monitor =
|
|
||||||
size = 250, 50
|
|
||||||
outline_thickness = 2
|
|
||||||
dots_size = 0.1
|
|
||||||
dots_spacing = 0.3
|
|
||||||
outer_color = $entry_border_color
|
|
||||||
inner_color = $entry_background_color
|
|
||||||
font_color = $entry_color
|
|
||||||
fade_on_empty = true
|
|
||||||
|
|
||||||
position = 0, 20
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
monitor =
|
|
||||||
text = $LAYOUT
|
|
||||||
color = $text_color
|
|
||||||
font_size = 14
|
|
||||||
font_family = $font_family
|
|
||||||
position = -30, 30
|
|
||||||
halign = right
|
|
||||||
valign = bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
label { # Caps Lock Warning
|
|
||||||
monitor =
|
|
||||||
text = cmd[update:250] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/check-capslock.sh
|
|
||||||
color = $text_color
|
|
||||||
font_size = 13
|
|
||||||
font_family = $font_family
|
|
||||||
position = 0, -25
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
label { # Clock
|
|
||||||
monitor =
|
|
||||||
text = $TIME
|
|
||||||
color = $text_color
|
|
||||||
font_size = 65
|
|
||||||
font_family = $font_family_clock
|
|
||||||
|
|
||||||
position = 0, 300
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
label { # Date
|
|
||||||
monitor =
|
|
||||||
text = cmd[update:5000] date +"%A, %B %d"
|
|
||||||
color = $text_color
|
|
||||||
font_size = 17
|
|
||||||
font_family = $font_family_clock
|
|
||||||
|
|
||||||
position = 0, 240
|
|
||||||
halign = center
|
|
||||||
valign = center
|
|
||||||
}
|
|
||||||
|
|
||||||
label { # User
|
|
||||||
monitor =
|
|
||||||
text = $USER
|
|
||||||
color = $text_color
|
|
||||||
outline_thickness = 2
|
|
||||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
|
||||||
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
|
|
||||||
dots_center = true
|
|
||||||
font_size = 20
|
|
||||||
font_family = $font_family
|
|
||||||
position = 0, 50
|
|
||||||
halign = center
|
|
||||||
valign = bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
label { # Status
|
|
||||||
monitor =
|
|
||||||
text = cmd[update:5000] ${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprlock/status.sh
|
|
||||||
color = $text_color
|
|
||||||
font_size = 14
|
|
||||||
font_family = $font_family
|
|
||||||
|
|
||||||
position = 30, -30
|
|
||||||
halign = left
|
|
||||||
valign = top
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# This configuration is generated by matugen
|
|
||||||
# Changing these variables with matugen still enabled will overwrite them.
|
|
||||||
|
|
||||||
$text_color = rgba(d6e3ffFF)
|
|
||||||
$entry_background_color = rgba(001b3d11)
|
|
||||||
$entry_border_color = rgba(8e909955)
|
|
||||||
$entry_color = rgba(d6e3ffFF)
|
|
||||||
$font_family = Google Sans Flex Medium
|
|
||||||
$font_family_clock = Google Sans Flex Medium
|
|
||||||
$font_material_symbols = Material Symbols Rounded
|
|
||||||
|
|
||||||
$background_image = /home/alvin/Pictures/Wallpapers/Dynamic-Wallpapers/Dark/japan-street-Dark.png
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# Generated by nwg-displays on 2026-02-19 at 19:29:54. Do not edit manually.
|
|
||||||
|
|
||||||
monitor=DVI-I-1,1920x1080@60.0,1920x0,1.0
|
|
||||||
monitor=DP-1,1920x1080@60.0,0x0,1.0
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
workspace=1, monitor:true
|
|
||||||
workspace=2, monitor:true
|
|
||||||
workspace=3, monitor:true
|
|
||||||
workspace=4, monitor:true
|
|
||||||
workspace=5, monitor:true
|
|
||||||
workspace=6, monitor:true
|
|
||||||
workspace=7, monitor:true
|
|
||||||
workspace=8, monitor:true
|
|
||||||
workspace=9, monitor:true
|
|
||||||
workspace=10, monitor:true
|
|
||||||
workspace=11, monitor:false
|
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
skip_watermark=false
|
||||||
|
if [ "$1" = "--skip-watermark" ]; then
|
||||||
|
skip_watermark=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$skip_watermark" = false ]; then
|
||||||
|
echo '
|
||||||
|
____ _ _ _ _ _
|
||||||
|
| __ ) _ _ __ _| |_ _(_)_ __ | | ___ | | | ___
|
||||||
|
| _ \| | | | / _ | \ \ / / | _ \| |/ _ \| | |/ _ \
|
||||||
|
| |_) | |_| | | (_| | |\ V /| | | | | | (_) | | | (_) |
|
||||||
|
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||||
|
|___/
|
||||||
|
|
||||||
|
--------------- FISH Install Script ---------------
|
||||||
|
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. See the LICENCE for more detail
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show disclaimer
|
||||||
|
echo "This script will add fish functions and install fish"
|
||||||
|
|
||||||
|
# Enable exit on error
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Install prerequisites if installed skips
|
||||||
|
|
||||||
|
if ! command -v zsh >/dev/null && command -v git >/dev/null && command -v curl >/dev/null && command -v fzf >/dev/null; then
|
||||||
|
if command -v pacman >/dev/null; then
|
||||||
|
echo "pacman detected. Installing prerequisites"
|
||||||
|
sudo pacman -S fish git curl fzf --noconfirm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v apt >/dev/null; then
|
||||||
|
echo "apt detected. Installing prerequisites"
|
||||||
|
sudo apt install git curl fish fzf -y
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clone or pull end-4 dotfiles repository
|
||||||
|
if [ -d dots-hyprland ]; then
|
||||||
|
cd dots-hyprland && git pull && cd ..
|
||||||
|
else
|
||||||
|
git clone https://github.com/end-4/dots-hyprland.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy fish config files from end-4 to git repo if they don't exist
|
||||||
|
if [ ! -f configs/fish/config.fish ]; then
|
||||||
|
cp dots-hyprland/dots/.config/fish/config.fish configs/fish/config.fish
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f configs/fish/auto-Hypr.fish ]; then
|
||||||
|
cp dots-hyprland/dots/.config/fish/auto-Hypr.fish configs/fish/auto-Hypr.fish
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f configs/fish/fish_variables ]; then
|
||||||
|
cp dots-hyprland/dots/.config/fish/fish_variables configs/fish/fish_variables
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy color configs from end-4 to git repo if they don't exist
|
||||||
|
if [ ! -f configs/hypr/hyprland/colors.conf ]; then
|
||||||
|
cp dots-hyprland/dots/.config/hypr/hyprland/colors.conf configs/hypr/hyprland/colors.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f configs/hypr/hyprlock/colors.conf ]; then
|
||||||
|
cp dots-hyprland/dots/.config/hypr/hyprlock/colors.conf configs/hypr/hyprlock/colors.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run end-4 setup script with flags to skip unnecessary components
|
||||||
|
dots-hyprland/setup install --force --skip-plasmaintg --skip-backup --skip-quickshell --skip-hyprland --skip-hyprland-entry
|
||||||
|
|
||||||
|
# Create fish config directory
|
||||||
|
mkdir -p "$HOME/.config/fish"
|
||||||
|
|
||||||
|
# Copy fish config files to user config if they don't exist
|
||||||
|
if [ ! -f "$HOME/.config/fish/config.fish" ]; then
|
||||||
|
cp configs/fish/config.fish "$HOME/.config/fish/config.fish"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d configs/fish/functions ] && [ ! -d "$HOME/.config/fish/functions" ]; then
|
||||||
|
cp -r configs/fish/functions "$HOME/.config/fish/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d configs/fish/conf.d ] && [ ! -d "$HOME/.config/fish/conf.d" ]; then
|
||||||
|
cp -r configs/fish/conf.d "$HOME/.config/fish/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$HOME/.config/fish/auto-Hypr.fish" ]; then
|
||||||
|
cp configs/fish/auto-Hypr.fish "$HOME/.config/fish/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy color configs to user config if they don't exist
|
||||||
|
if [ ! -f "$HOME/.config/hypr/hyprland/colors.conf" ]; then
|
||||||
|
cp configs/hypr/hyprland/colors.conf "$HOME/.config/hypr/hyprland/colors.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "$HOME/.config/hypr/hyprlock/colors.conf" ]; then
|
||||||
|
cp configs/hypr/hyprlock/colors.conf "$HOME/.config/hypr/hyprlock/colors.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install Fisher plugin manager for fish shell
|
||||||
|
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
||||||
|
|
||||||
|
# Install plugins using Fisher
|
||||||
|
fisher install jorgebucaran/nvm.fish
|
||||||
Executable
+131
@@ -0,0 +1,131 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Fixes nwg-displays not auto-updating monitor/workspace configs on hyprctl reload
|
||||||
|
# in Hyprland 0.55+ Lua-based configs.
|
||||||
|
#
|
||||||
|
# Problem: require() caches modules in package.loaded, so updated monitors.lua
|
||||||
|
# is ignored on config reload. Solution: clear the cache before require().
|
||||||
|
# Also auto-generates workspaces.lua from nwg-displays' workspace.conf if missing.
|
||||||
|
# See https://lua.org/manual/5.1/manual.html#pdf-require
|
||||||
|
|
||||||
|
HYPR_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr"
|
||||||
|
MAIN_LUA="$HYPR_DIR/hyprland.lua"
|
||||||
|
|
||||||
|
if [ ! -f "$MAIN_LUA" ]; then
|
||||||
|
echo "Error: $MAIN_LUA not found. Is Hyprland 0.55+ configured with Lua?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create a backup (only if none exists)
|
||||||
|
if [ ! -f "$MAIN_LUA.bak" ]; then
|
||||||
|
cp "$MAIN_LUA" "$MAIN_LUA.bak"
|
||||||
|
echo "Backup saved: $MAIN_LUA.bak"
|
||||||
|
fi
|
||||||
|
|
||||||
|
patched=0
|
||||||
|
|
||||||
|
# Fix monitors
|
||||||
|
if grep -q 'require("monitors")' "$MAIN_LUA" && \
|
||||||
|
! grep -q 'package.loaded\["monitors"\]' "$MAIN_LUA"; then
|
||||||
|
sed -i 's/^\s*--\s*require("monitors")/package.loaded["monitors"] = nil\nrequire("monitors")/' "$MAIN_LUA"
|
||||||
|
echo "Patched: monitors.lua require() cache cleared"
|
||||||
|
patched=1
|
||||||
|
else
|
||||||
|
echo "Skipped monitors: already patched or not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fix workspaces
|
||||||
|
if grep -q 'require("workspaces")' "$MAIN_LUA" && \
|
||||||
|
! grep -q 'package.loaded\["workspaces"\]' "$MAIN_LUA"; then
|
||||||
|
sed -i 's/^\s*--\s*require("workspaces")/package.loaded["workspaces"] = nil\nrequire("workspaces")/' "$MAIN_LUA"
|
||||||
|
echo "Patched: workspaces.lua require() cache cleared"
|
||||||
|
patched=1
|
||||||
|
else
|
||||||
|
echo "Skipped workspaces: already patched or not found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
# Generate workspaces.lua from nwg-displays' workspace.conf if it's missing
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
WORKSPACES_LUA="$HYPR_DIR/workspaces.lua"
|
||||||
|
WORKSPACE_CONF="$HYPR_DIR/workspace.conf"
|
||||||
|
|
||||||
|
if [ ! -f "$WORKSPACES_LUA" ]; then
|
||||||
|
if [ -f "$WORKSPACE_CONF" ]; then
|
||||||
|
echo "Generating $WORKSPACES_LUA from $WORKSPACE_CONF ..."
|
||||||
|
|
||||||
|
# Read header comment (first line if it starts with #)
|
||||||
|
HEADER_LINE=$(head -1 "$WORKSPACE_CONF")
|
||||||
|
if [[ "$HEADER_LINE" =~ ^#(.*)$ ]]; then
|
||||||
|
COMMENT_LINE="--${BASH_REMATCH[1]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
{
|
||||||
|
[ -n "${COMMENT_LINE:-}" ] && echo "$COMMENT_LINE"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
while IFS=',' read -ra fields; do
|
||||||
|
line="${fields[*]}"
|
||||||
|
[[ "$line" =~ ^#.*$ ]] && continue
|
||||||
|
[[ -z "$line" ]] && continue
|
||||||
|
|
||||||
|
ws_id=""
|
||||||
|
monitor_val=""
|
||||||
|
|
||||||
|
# Parse workspace=N
|
||||||
|
for field in "${fields[@]}"; do
|
||||||
|
field="$(echo "$field" | xargs)"
|
||||||
|
if [[ "$field" =~ ^workspace=([0-9]+)$ ]]; then
|
||||||
|
ws_id="${BASH_REMATCH[1]}"
|
||||||
|
elif [[ "$field" =~ ^monitor:(.+)$ ]]; then
|
||||||
|
monitor_val="${BASH_REMATCH[1]}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -z "$ws_id" ] && continue
|
||||||
|
|
||||||
|
# Skip disabled workspaces (monitor:false)
|
||||||
|
[ "$monitor_val" = "false" ] && continue
|
||||||
|
|
||||||
|
if [ "$monitor_val" = "true" ] || [ -z "$monitor_val" ]; then
|
||||||
|
echo "hl.workspace_rule({ workspace = \"$ws_id\" })"
|
||||||
|
else
|
||||||
|
echo "hl.workspace_rule({ workspace = \"$ws_id\", monitor = \"$monitor_val\" })"
|
||||||
|
fi
|
||||||
|
done < <(sed 's/,\s*/,/g' "$WORKSPACE_CONF")
|
||||||
|
} > "$WORKSPACES_LUA"
|
||||||
|
echo "Generated $WORKSPACES_LUA"
|
||||||
|
patched=1
|
||||||
|
else
|
||||||
|
echo "Warning: $WORKSPACE_CONF not found. Creating default $WORKSPACES_LUA ..."
|
||||||
|
cat > "$WORKSPACES_LUA" <<- 'LUA'
|
||||||
|
-- Default workspaces generated by fix-nwg-hyprland-lua.sh
|
||||||
|
-- Workspaces 1-10 are available on all monitors
|
||||||
|
for i = 1, 10 do
|
||||||
|
hl.workspace_rule({ workspace = tostring(i) })
|
||||||
|
end
|
||||||
|
LUA
|
||||||
|
echo "Created default $WORKSPACES_LUA"
|
||||||
|
patched=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Skipped workspaces.lua: already exists"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# When monitors.lua is missing, only warn (conversion from monitors.conf is
|
||||||
|
# non-trivial; run nwg-displays to generate it, or `cp monitors.conf monitors.lua`
|
||||||
|
# is not valid because the formats differ).
|
||||||
|
if [ ! -f "$HYPR_DIR/monitors.lua" ]; then
|
||||||
|
echo "Warning: $HYPR_DIR/monitors.lua not found."
|
||||||
|
echo " Run nwg-displays to generate it, or create it manually with hl.monitor() calls."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$patched" -eq 1 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "Done! Run 'hyprctl reload' or restart Hyprland for the fix to take effect."
|
||||||
|
echo "nwg-displays changes should now apply immediately."
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "No changes needed."
|
||||||
|
fi
|
||||||
+42
-16
@@ -16,7 +16,7 @@ echo '
|
|||||||
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
|____/ \__ | \__ _|_| \_/ |_|_| |_|_|\___/|_|_|\___/
|
||||||
|___/
|
|___/
|
||||||
|
|
||||||
--------------- Single Download script ---------------
|
--------------- Single Download script (Stable) ---------------
|
||||||
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE,
|
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE UNDER THE GPL-2.0 LICENCE,
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
See the LICENCE for more detail
|
See the LICENCE for more detail
|
||||||
@@ -33,7 +33,7 @@ function error_handler() {
|
|||||||
trap error_handler ERR
|
trap error_handler ERR
|
||||||
|
|
||||||
#Install prerequisites
|
#Install prerequisites
|
||||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
sudo pacman -Syu git zsh curl wget libnewt --noconfirm --needed
|
||||||
|
|
||||||
if command -v pacman >/dev/null; then
|
if command -v pacman >/dev/null; then
|
||||||
echo "pacman detected. Installing prerequisites"
|
echo "pacman detected. Installing prerequisites"
|
||||||
@@ -53,7 +53,10 @@ if ! command -v whiptail >/dev/null; then
|
|||||||
|
|
||||||
if command -v pacman >/dev/null; then
|
if command -v pacman >/dev/null; then
|
||||||
echo "pacman detected. Installing prerequisites"
|
echo "pacman detected. Installing prerequisites"
|
||||||
sudo pacman -S whiptail --noconfirm || { echo "Failed to install whiptail. Exiting."; exit 1; }
|
sudo pacman -S whiptail --noconfirm || {
|
||||||
|
echo "Failed to install whiptail. Exiting."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
# Reload zsh if it exists
|
# Reload zsh if it exists
|
||||||
if command -v zsh -h >/dev/null; then
|
if command -v zsh -h >/dev/null; then
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
@@ -64,7 +67,10 @@ if ! command -v whiptail >/dev/null; then
|
|||||||
|
|
||||||
if command -v apt >/dev/null; then
|
if command -v apt >/dev/null; then
|
||||||
echo "apt detected. Installing prerequisites"
|
echo "apt detected. Installing prerequisites"
|
||||||
sudo apt install whiptail -y || { echo "Failed to install whiptail. Exiting."; exit 1; }
|
sudo apt install whiptail -y || {
|
||||||
|
echo "Failed to install whiptail. Exiting."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
# Reload zsh if it exists
|
# Reload zsh if it exists
|
||||||
if command -v zsh -h >/dev/null; then
|
if command -v zsh -h >/dev/null; then
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
@@ -82,6 +88,7 @@ OPTIONS=(
|
|||||||
3 "Install Docker" OFF
|
3 "Install Docker" OFF
|
||||||
4 "Install Pacman Packages" ON
|
4 "Install Pacman Packages" ON
|
||||||
5 "Install Yay and AUR Packages" ON
|
5 "Install Yay and AUR Packages" ON
|
||||||
|
6 "Install affinity with GUI" OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
||||||
@@ -101,7 +108,7 @@ set -eu pipefail
|
|||||||
|
|
||||||
# Process selected options
|
# Process selected options
|
||||||
for selection in $CHOICE; do
|
for selection in $CHOICE; do
|
||||||
clean_selection=$(echo $selection | tr -d '"')
|
clean_selection=$(echo "$selection " | tr -d '"')
|
||||||
case $clean_selection in
|
case $clean_selection in
|
||||||
"1")
|
"1")
|
||||||
echo "Running zsh setup script..."
|
echo "Running zsh setup script..."
|
||||||
@@ -110,7 +117,7 @@ for selection in $CHOICE; do
|
|||||||
echo "Found local script, running..."
|
echo "Found local script, running..."
|
||||||
bash zsh.sh --skip-watermark
|
bash zsh.sh --skip-watermark
|
||||||
else
|
else
|
||||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
|
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/zsh.sh)" --skip-watermark
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"2")
|
"2")
|
||||||
@@ -128,9 +135,9 @@ for selection in $CHOICE; do
|
|||||||
if ! command -v docker >/dev/null; then
|
if ! command -v docker >/dev/null; then
|
||||||
echo "docker is NOT installed. Installing..."
|
echo "docker is NOT installed. Installing..."
|
||||||
curl -fsSL https://get.docker.com | sh
|
curl -fsSL https://get.docker.com | sh
|
||||||
sudo usermod -aG docker $USER
|
sudo usermod -aG docker "$USER"
|
||||||
else
|
else
|
||||||
sudo usermod -aG docker $USER
|
sudo usermod -aG docker "$USER"
|
||||||
echo "Docker is already installed."
|
echo "Docker is already installed."
|
||||||
echo "+ sleep 10" && sleep 10
|
echo "+ sleep 10" && sleep 10
|
||||||
fi
|
fi
|
||||||
@@ -138,10 +145,10 @@ for selection in $CHOICE; do
|
|||||||
"4")
|
"4")
|
||||||
echo "Installing Pacman Packages..."
|
echo "Installing Pacman Packages..."
|
||||||
# Check if pacman binary is installed
|
# Check if pacman binary is installed
|
||||||
if ! command -v pacman >/dev/null; then
|
if command -v pacman </dev/null; then
|
||||||
echo "Cannot proceed: pacman binary not found"
|
echo "Cannot proceed: pacman binary not found"
|
||||||
exit 1 # exit with an error
|
exit 1 # exit with an error
|
||||||
else
|
fi
|
||||||
# Install pacman packages
|
# Install pacman packages
|
||||||
# Runs local script unless it does not exit or fails
|
# Runs local script unless it does not exit or fails
|
||||||
if [[ -f "./configs/PackagesPacman.txt" ]]; then
|
if [[ -f "./configs/PackagesPacman.txt" ]]; then
|
||||||
@@ -154,20 +161,19 @@ for selection in $CHOICE; do
|
|||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
echo "+ sleep 10" && sleep 10
|
echo "+ sleep 10" && sleep 10
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
"5")
|
"5")
|
||||||
echo "Installing Yay and Yay Packages..."
|
echo "Installing Yay and Yay Packages..."
|
||||||
# Check for pacman before installing yay
|
# Check for pacman before installing yay
|
||||||
if ! command -v pacman >/dev/null; then
|
if command -v pacman </dev/null; then
|
||||||
echo "Cannot proceed: Not a arch based system"
|
echo "Cannot proceed: Not a arch based system"
|
||||||
exit 1 # Exit with an error
|
exit 1 # Exit with an error
|
||||||
else
|
fi
|
||||||
# Install yay prerequisites
|
# Install yay prerequisites
|
||||||
if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl go fakeroot debugedit make gcc; then
|
if ! sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl golang fakeroot debugedit make gcc; then
|
||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
echo "Failed to install prerequisite packages for Yay. You can try running it manually:"
|
echo "Failed to install prerequisite packages for Yay. You can try running it manually:"
|
||||||
echo "sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl go fakeroot debugedit make gcc"
|
echo "sudo pacman -S --needed --noconfirm efibootmgr sbsigntools mokutil sbctl golang fakeroot debugedit make gcc"
|
||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
exit 1 # exit with an error
|
exit 1 # exit with an error
|
||||||
fi
|
fi
|
||||||
@@ -187,7 +193,7 @@ for selection in $CHOICE; do
|
|||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
exit 1 # exit with an error
|
exit 1 # exit with an error
|
||||||
fi
|
fi
|
||||||
cd $PreviousWD
|
cd "$PreviousWD"
|
||||||
rm -rf /tmp/yay_install
|
rm -rf /tmp/yay_install
|
||||||
else
|
else
|
||||||
echo "Yay is already installed."
|
echo "Yay is already installed."
|
||||||
@@ -204,7 +210,27 @@ for selection in $CHOICE; do
|
|||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
echo "+ sleep 10" && sleep 10
|
echo "+ sleep 10" && sleep 10
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
"6")
|
||||||
|
echo "Installing GUI dependencies"
|
||||||
|
if command -v pacman </dev/null; then
|
||||||
|
echo "Pacman found"
|
||||||
|
sudo pacman -S python-pyqt6 --noconfirm --needed
|
||||||
fi
|
fi
|
||||||
|
if command -v dnf </dev/null; then
|
||||||
|
echo "dnf found"
|
||||||
|
sudo dnf install python3-pyqt6
|
||||||
|
fi
|
||||||
|
if command -v apt </dev/null; then
|
||||||
|
echo "apt found"
|
||||||
|
sudo apt install python3-pyqt6 -y
|
||||||
|
fi
|
||||||
|
echo "Install affinity with ryzendew's gui installer"
|
||||||
|
echo "You must manually select to install in the GUI"
|
||||||
|
echo "Github repo: https://github.com/ryzendew/Linux-Affinity-Installer"
|
||||||
|
echo "+ 10 sleep"
|
||||||
|
sleep 10
|
||||||
|
curl -sSL https://raw.githubusercontent.com/ryzendew/AffinityOnLinux/refs/heads/main/AffinityScripts/AffinityLinuxInstaller.py | python3
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid option selected: $selection"
|
echo "Invalid option selected: $selection"
|
||||||
|
|||||||
+23
-13
@@ -33,18 +33,17 @@ function error_handler() {
|
|||||||
trap error_handler ERR
|
trap error_handler ERR
|
||||||
|
|
||||||
# Install prerequisites
|
# Install prerequisites
|
||||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
|
||||||
|
|
||||||
if command -v pacman >/dev/null; then
|
if command -v pacman >/dev/null; then
|
||||||
echo "pacman detected. Installing prerequisites"
|
echo "pacman detected. Installing prerequisites"
|
||||||
sudo pacman -Syu git zsh curl wget whiptail --noconfirm --needed
|
sudo pacman -Syu git zsh curl wget libnewt rsync --noconfirm --needed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v apt >/dev/null; then
|
if command -v apt >/dev/null; then
|
||||||
echo "apt detected. Installing prerequisites"
|
echo "apt detected. Installing prerequisites"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt full-upgrade -y
|
sudo apt full-upgrade -y
|
||||||
sudo apt install git zsh curl wget whiptail -y
|
sudo apt install git zsh curl wget whiptail rsync -y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure whiptail is installed
|
# Ensure whiptail is installed
|
||||||
@@ -77,12 +76,13 @@ fi
|
|||||||
|
|
||||||
# Options for the whiptail menu
|
# Options for the whiptail menu
|
||||||
OPTIONS=(
|
OPTIONS=(
|
||||||
1 "Run zsh setup script" ON
|
1 "Run zsh setup script" OFF
|
||||||
2 "Run LazyVim setup script" OFF
|
2 "Run fish setup script (NOT CREATED)" ON
|
||||||
3 "Install Docker" OFF
|
3 "Run LazyVim setup script" OFF
|
||||||
4 "Install Pacman Packages" ON
|
4 "Install Docker" OFF
|
||||||
5 "Install Yay and AUR Packages" ON
|
5 "Install Pacman Packages" ON
|
||||||
6 "Install affinity with GUI" OFF
|
6 "Install Yay and AUR Packages" ON
|
||||||
|
7 "Install affinity with GUI" OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
CHOICE=$(whiptail --title "Installation Options" --checklist \
|
||||||
@@ -115,6 +115,16 @@ for selection in $CHOICE; do
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"2")
|
"2")
|
||||||
|
echo "Running fish setup script..."
|
||||||
|
# Runs local script unless it does not exist or fails
|
||||||
|
if [[ -f "fish.sh" ]]; then
|
||||||
|
echo "Found local script, running..."
|
||||||
|
bash fish.sh --skip-watermark
|
||||||
|
else
|
||||||
|
bash "$(curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/fish.sh)" --skip-watermark
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"3")
|
||||||
echo "Running LazyVim setup script..."
|
echo "Running LazyVim setup script..."
|
||||||
# Runs local script unless it does not exist or fails
|
# Runs local script unless it does not exist or fails
|
||||||
if [[ -f "LazyVim.sh" ]];then
|
if [[ -f "LazyVim.sh" ]];then
|
||||||
@@ -124,7 +134,7 @@ for selection in $CHOICE; do
|
|||||||
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
|
curl -fsSL https://raw.githubusercontent.com/alvinlollo/Single-install-script/refs/heads/main/LazyVim.sh | bash
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"3")
|
"4")
|
||||||
echo "Installing Docker..."
|
echo "Installing Docker..."
|
||||||
if ! command -v docker >/dev/null; then
|
if ! command -v docker >/dev/null; then
|
||||||
echo "docker is NOT installed. Installing..."
|
echo "docker is NOT installed. Installing..."
|
||||||
@@ -136,7 +146,7 @@ for selection in $CHOICE; do
|
|||||||
echo "+ sleep 10" && sleep 10
|
echo "+ sleep 10" && sleep 10
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"4")
|
"5")
|
||||||
echo "Installing Pacman Packages..."
|
echo "Installing Pacman Packages..."
|
||||||
# Check if pacman binary is installed
|
# Check if pacman binary is installed
|
||||||
if command -v pacman </dev/null; then
|
if command -v pacman </dev/null; then
|
||||||
@@ -156,7 +166,7 @@ for selection in $CHOICE; do
|
|||||||
echo "+ sleep 10" && sleep 10
|
echo "+ sleep 10" && sleep 10
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"5")
|
"6")
|
||||||
echo "Installing Yay and Yay Packages..."
|
echo "Installing Yay and Yay Packages..."
|
||||||
# Check for pacman before installing yay
|
# Check for pacman before installing yay
|
||||||
if command -v pacman </dev/null; then
|
if command -v pacman </dev/null; then
|
||||||
@@ -205,7 +215,7 @@ for selection in $CHOICE; do
|
|||||||
echo "+ sleep 10" && sleep 10
|
echo "+ sleep 10" && sleep 10
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"6")
|
"7")
|
||||||
echo "Installing GUI dependencies"
|
echo "Installing GUI dependencies"
|
||||||
if command -v pacman </dev/null; then
|
if command -v pacman </dev/null; then
|
||||||
echo "Pacman found"
|
echo "Pacman found"
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
autopep8==1.6.0
|
|
||||||
cachetools==5.0.0
|
|
||||||
certifi==2024.2.2
|
|
||||||
charset-normalizer==2.0.12
|
|
||||||
google-api-core==2.5.0
|
|
||||||
google-api-python-client==2.113.0
|
|
||||||
google-auth==2.26.1
|
|
||||||
google-auth-httplib2==0.1.0
|
|
||||||
google-auth-oauthlib==1.2.0
|
|
||||||
googleapis-common-protos==1.54.0
|
|
||||||
httplib2==0.20.4
|
|
||||||
idna==3.3
|
|
||||||
oauth2client==4.1.3
|
|
||||||
oauthlib==3.2.0
|
|
||||||
protobuf==3.19.4
|
|
||||||
pyasn1==0.4.8
|
|
||||||
pyasn1-modules==0.2.8
|
|
||||||
pycodestyle==2.8.0
|
|
||||||
pyparsing==3.0.7
|
|
||||||
requests==2.27.1
|
|
||||||
requests-oauthlib==1.3.1
|
|
||||||
rsa==4.8
|
|
||||||
six==1.16.0
|
|
||||||
toml==0.10.2
|
|
||||||
uritemplate==4.1.1
|
|
||||||
urllib3==1.26.11
|
|
||||||
sounddevice>=0.4.6
|
|
||||||
numpy>=1.21.0
|
|
||||||
scipy>=1.10.0
|
|
||||||
evdev>=1.6.0
|
|
||||||
pyperclip>=1.8.2
|
|
||||||
pywhispercpp==1.3.3
|
|
||||||
requests>=2.25.0
|
|
||||||
psutil>=5.8.0
|
|
||||||
rich>=13.0.0
|
|
||||||
@@ -27,7 +27,6 @@ echo "This script will backup your current zsh config if it exists "
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Install prerequisites if installed skips
|
# Install prerequisites if installed skips
|
||||||
|
|
||||||
if ! command -v zsh >/dev/null && command -v git >/dev/null && command -v curl >/dev/null && command -v fzf >/dev/null; then
|
if ! command -v zsh >/dev/null && command -v git >/dev/null && command -v curl >/dev/null && command -v fzf >/dev/null; then
|
||||||
if command -v pacman >/dev/null; then
|
if command -v pacman >/dev/null; then
|
||||||
echo "pacman detected. Installing prerequisites"
|
echo "pacman detected. Installing prerequisites"
|
||||||
|
|||||||
Reference in New Issue
Block a user