Compare commits
20 Commits
6b71d20641
...
senpai
| Author | SHA1 | Date | |
|---|---|---|---|
| c0ae98646a | |||
| 3d2430c2a3 | |||
| cfab02a17e | |||
| 3992c78c33 | |||
| f76d84ce7e | |||
| 023f608bec | |||
| 13eefb792f | |||
| 2dcaf81a3a | |||
| 8c7b679cf9 | |||
| f287469d66 | |||
| ee75e21baf | |||
| 1fa629168a | |||
| c124fcf58e | |||
| f2353559ab | |||
| 1d6e38d455 | |||
| 22a6ef026d | |||
| 429d02c3d0 | |||
| 5c75f15eab | |||
| f326cab59f | |||
| 5b30b9e600 |
@@ -1,8 +1,8 @@
|
|||||||
#? Config file for btop v. 1.3.2
|
#? Config file for btop v. 1.4.4
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
color_theme = "/usr/share/btop/themes/whiteout.theme"
|
color_theme = "Default"
|
||||||
|
|
||||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||||
theme_background = True
|
theme_background = True
|
||||||
@@ -57,7 +57,7 @@ update_ms = 2000
|
|||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "cpu lazy"
|
proc_sorting = "memory"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = False
|
||||||
@@ -150,7 +150,7 @@ background_update = True
|
|||||||
custom_cpu_name = ""
|
custom_cpu_name = ""
|
||||||
|
|
||||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||||
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
|
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
|
||||||
disks_filter = ""
|
disks_filter = ""
|
||||||
|
|
||||||
#* Show graphs instead of meters for memory values.
|
#* Show graphs instead of meters for memory values.
|
||||||
@@ -210,6 +210,9 @@ net_sync = True
|
|||||||
#* Starts with the Network Interface specified here.
|
#* Starts with the Network Interface specified here.
|
||||||
net_iface = ""
|
net_iface = ""
|
||||||
|
|
||||||
|
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
|
||||||
|
base_10_bitrate = "Auto"
|
||||||
|
|
||||||
#* Show battery stats in top right if battery is present.
|
#* Show battery stats in top right if battery is present.
|
||||||
show_battery = True
|
show_battery = True
|
||||||
|
|
||||||
@@ -226,6 +229,9 @@ log_level = "WARNING"
|
|||||||
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||||
nvml_measure_pcie_speeds = True
|
nvml_measure_pcie_speeds = True
|
||||||
|
|
||||||
|
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||||
|
rsmi_measure_pcie_speeds = True
|
||||||
|
|
||||||
#* Horizontally mirror the GPU graph.
|
#* Horizontally mirror the GPU graph.
|
||||||
gpu_mirror_graph = True
|
gpu_mirror_graph = True
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
{
|
{
|
||||||
"chromiumSwitches": {},
|
"SKIP_HOST_UPDATE": true,
|
||||||
"IS_MAXIMIZED": true,
|
"IS_MAXIMIZED": false,
|
||||||
"IS_MINIMIZED": false,
|
"IS_MINIMIZED": false,
|
||||||
"WINDOW_BOUNDS": {
|
"WINDOW_BOUNDS": {
|
||||||
"x": 1941,
|
"x": 2590,
|
||||||
"y": 21,
|
"y": 52,
|
||||||
"width": 2518,
|
"width": 2500,
|
||||||
"height": 1398
|
"height": 1378
|
||||||
},
|
},
|
||||||
"SKIP_HOST_UPDATE": true
|
"BACKGROUND_COLOR": "#121214",
|
||||||
|
"offloadAdmControls": false,
|
||||||
|
"chromiumSwitches": {}
|
||||||
}
|
}
|
||||||
7
.config/fish/completions/fisher.fish
Normal file
@@ -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)"
|
||||||
40
.config/fish/conf.d/_pure_init.fish
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Deactivate the default virtualenv prompt so that we can add our own
|
||||||
|
set --global --export VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||||
|
|
||||||
|
# Whether or not is a fresh session
|
||||||
|
set --global _pure_fresh_session true
|
||||||
|
|
||||||
|
# Register `_pure_prompt_new_line` as an event handler fot `fish_prompt`
|
||||||
|
functions --query _pure_prompt_new_line
|
||||||
|
|
||||||
|
function _pure_uninstall --on-event pure_uninstall
|
||||||
|
rm -f $__fish_config_dir/conf.d/pure.fish
|
||||||
|
|
||||||
|
# backup fish_prompt and fish_title to default
|
||||||
|
cp $__fish_config_dir/functions/fish_prompt{,.pure-backup}.fish
|
||||||
|
cp $__fish_config_dir/functions/fish_title{,.pure-backup}.fish
|
||||||
|
|
||||||
|
# erase existing fish_prompt and fish_title to default
|
||||||
|
functions --erase fish_prompt
|
||||||
|
functions --erase fish_title
|
||||||
|
# restore fish_prompt and fish_title to default
|
||||||
|
cp {$__fish_data_dir,$__fish_config_dir}/functions/fish_prompt.fish
|
||||||
|
cp {$__fish_data_dir,$__fish_config_dir}/functions/fish_title.fish
|
||||||
|
|
||||||
|
# refresh fish_prompt and fish_title definitions
|
||||||
|
source $__fish_data_dir/functions/fish_prompt.fish
|
||||||
|
source $__fish_data_dir/functions/fish_title.fish
|
||||||
|
|
||||||
|
# erase _pure* variables
|
||||||
|
set --names \
|
||||||
|
| string replace --filter --regex '(^_?pure)' 'set --erase $1' \
|
||||||
|
| source
|
||||||
|
# erase _pure* functions
|
||||||
|
functions --names --all \
|
||||||
|
| string replace --filter --regex '(^_?pure)' 'functions --erase $1' \
|
||||||
|
| source
|
||||||
|
# delete _pure* files
|
||||||
|
for file in $__fish_config_dir/{functions,conf.d}/_pure_*
|
||||||
|
rm -f $file
|
||||||
|
end
|
||||||
|
end
|
||||||
115
.config/fish/conf.d/pure.fish
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
set --global pure_version 4.11.0 # For bug report and tag-after-merge workflow
|
||||||
|
|
||||||
|
# Base colors
|
||||||
|
_pure_set_default pure_color_primary blue
|
||||||
|
_pure_set_default pure_color_info cyan
|
||||||
|
_pure_set_default pure_color_mute brblack
|
||||||
|
_pure_set_default pure_color_success magenta
|
||||||
|
_pure_set_default pure_color_normal normal
|
||||||
|
_pure_set_default pure_color_danger red
|
||||||
|
_pure_set_default pure_color_light white
|
||||||
|
_pure_set_default pure_color_warning yellow
|
||||||
|
_pure_set_default pure_color_dark black
|
||||||
|
|
||||||
|
# Prompt
|
||||||
|
_pure_set_default pure_symbol_prompt "❯"
|
||||||
|
_pure_set_default pure_symbol_reverse_prompt "❮" # used for VI mode
|
||||||
|
_pure_set_default pure_color_prompt_on_error pure_color_danger
|
||||||
|
_pure_set_default pure_color_prompt_on_success pure_color_success
|
||||||
|
|
||||||
|
# Current Working Directory
|
||||||
|
_pure_set_default pure_color_current_directory pure_color_primary
|
||||||
|
_pure_set_default pure_shorten_prompt_current_directory_length 0
|
||||||
|
_pure_set_default pure_truncate_prompt_current_directory_keeps -1
|
||||||
|
|
||||||
|
# Git
|
||||||
|
_pure_set_default pure_enable_git true
|
||||||
|
_pure_set_default pure_symbol_git_unpulled_commits "⇣"
|
||||||
|
_pure_set_default pure_symbol_git_unpushed_commits "⇡"
|
||||||
|
_pure_set_default pure_symbol_git_dirty "*"
|
||||||
|
_pure_set_default pure_symbol_git_stash "≡"
|
||||||
|
_pure_set_default pure_color_git_unpulled_commits pure_color_info
|
||||||
|
_pure_set_default pure_color_git_unpushed_commits pure_color_info
|
||||||
|
_pure_set_default pure_color_git_branch pure_color_mute
|
||||||
|
_pure_set_default pure_color_git_dirty pure_color_mute
|
||||||
|
_pure_set_default pure_color_git_stash pure_color_info
|
||||||
|
|
||||||
|
# Remote info (user@hostname) for SSH and containers (Docker/LXC)
|
||||||
|
_pure_set_default pure_color_hostname pure_color_mute
|
||||||
|
_pure_set_default pure_color_at_sign pure_color_mute
|
||||||
|
_pure_set_default pure_color_username_normal pure_color_mute
|
||||||
|
_pure_set_default pure_color_username_root pure_color_light
|
||||||
|
|
||||||
|
# Number of running jobs
|
||||||
|
_pure_set_default pure_show_jobs false
|
||||||
|
_pure_set_default pure_color_jobs pure_color_normal
|
||||||
|
|
||||||
|
# Show system time
|
||||||
|
_pure_set_default pure_show_system_time false
|
||||||
|
_pure_set_default pure_color_system_time pure_color_mute
|
||||||
|
|
||||||
|
# Nix build environment
|
||||||
|
_pure_set_default pure_enable_nixdevshell false
|
||||||
|
_pure_set_default pure_symbol_nixdevshell_prefix "❄️" # otherwise nerdfonts: '' or ''
|
||||||
|
_pure_set_default pure_color_nixdevshell_prefix pure_color_info
|
||||||
|
_pure_set_default pure_color_nixdevshell_symbol pure_color_mute
|
||||||
|
|
||||||
|
# env for Python
|
||||||
|
_pure_set_default pure_enable_virtualenv true
|
||||||
|
_pure_set_default pure_symbol_virtualenv_prefix "" # 🐍
|
||||||
|
_pure_set_default pure_color_virtualenv pure_color_mute
|
||||||
|
|
||||||
|
# AWS profile name
|
||||||
|
_pure_set_default pure_enable_aws_profile true
|
||||||
|
_pure_set_default pure_symbol_aws_profile_prefix "" # ☁️
|
||||||
|
_pure_set_default pure_color_aws_profile pure_color_warning
|
||||||
|
|
||||||
|
# Print current working directory at the beginning of prompt
|
||||||
|
# true (default): current directory, git, user@hostname (ssh-only), command duration
|
||||||
|
# false: user@hostname (ssh-only), current directory, git, command duration
|
||||||
|
_pure_set_default pure_begin_prompt_with_current_directory true
|
||||||
|
|
||||||
|
# Show exit code of last command as a separate prompt character (cf. https://github.com/sindresorhus/pure/wiki#show-exit-code-of-last-command-as-a-separate-prompt-character)
|
||||||
|
# false - single prompt character, default
|
||||||
|
# true - separate prompt character
|
||||||
|
_pure_set_default pure_separate_prompt_on_error false
|
||||||
|
|
||||||
|
# Max execution time of a process before its run time is shown when it exits
|
||||||
|
_pure_set_default pure_threshold_command_duration 5
|
||||||
|
_pure_set_default pure_show_subsecond_command_duration false
|
||||||
|
_pure_set_default pure_color_command_duration pure_color_warning
|
||||||
|
|
||||||
|
# VI mode indicator
|
||||||
|
# true (default): indicate a non-insert mode by reversing the prompt symbol (❮)
|
||||||
|
# false: indicate vi mode with [I], [N], [V]
|
||||||
|
_pure_set_default pure_reverse_prompt_symbol_in_vimode true
|
||||||
|
|
||||||
|
# Title
|
||||||
|
_pure_set_default pure_symbol_title_bar_separator -
|
||||||
|
_pure_set_default pure_shorten_window_title_current_directory_length 0
|
||||||
|
_pure_set_default pure_truncate_window_title_current_directory_keeps -1
|
||||||
|
|
||||||
|
# Check for new release on startup
|
||||||
|
_pure_set_default pure_check_for_new_release false
|
||||||
|
|
||||||
|
# Prefix prompt when logged in as root
|
||||||
|
_pure_set_default pure_show_prefix_root_prompt false
|
||||||
|
_pure_set_default pure_symbol_prefix_root_prompt "#"
|
||||||
|
_pure_set_default pure_color_prefix_root_prompt pure_color_danger
|
||||||
|
|
||||||
|
# Compact mode
|
||||||
|
_pure_set_default pure_enable_single_line_prompt false
|
||||||
|
|
||||||
|
# Detect when running in container (e.g. docker, podman, LXC/LXD)
|
||||||
|
_pure_set_default pure_enable_container_detection true
|
||||||
|
_pure_set_default pure_symbol_container_prefix "" # suggestion: '🐋' or '📦'
|
||||||
|
|
||||||
|
# Detect when running in SSH
|
||||||
|
_pure_set_default pure_symbol_ssh_prefix "" # suggestion: 'ssh:/' or '🔗🔐🔒🌐'
|
||||||
|
|
||||||
|
# Display Kubernetes/k8s context and namespace
|
||||||
|
_pure_set_default pure_enable_k8s false
|
||||||
|
_pure_set_default pure_symbol_k8s_prefix "☸" # ☸️
|
||||||
|
_pure_set_default pure_color_k8s_prefix pure_color_info
|
||||||
|
_pure_set_default pure_color_k8s_context pure_color_success
|
||||||
|
_pure_set_default pure_color_k8s_namespace pure_color_primary
|
||||||
63
.config/fish/conf.d/z.fish
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
if test -z "$Z_DATA"
|
||||||
|
if test -z "$XDG_DATA_HOME"
|
||||||
|
set -U Z_DATA_DIR "$HOME/.local/share/z"
|
||||||
|
else
|
||||||
|
set -U Z_DATA_DIR "$XDG_DATA_HOME/z"
|
||||||
|
end
|
||||||
|
set -U Z_DATA "$Z_DATA_DIR/data"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test ! -e "$Z_DATA"
|
||||||
|
if test ! -e "$Z_DATA_DIR"
|
||||||
|
mkdir -p -m 700 "$Z_DATA_DIR"
|
||||||
|
end
|
||||||
|
touch "$Z_DATA"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -z "$Z_CMD"
|
||||||
|
set -U Z_CMD z
|
||||||
|
end
|
||||||
|
|
||||||
|
set -U ZO_CMD "$Z_CMD"o
|
||||||
|
|
||||||
|
if test ! -z $Z_CMD
|
||||||
|
function $Z_CMD -d "jump around"
|
||||||
|
__z $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test ! -z $ZO_CMD
|
||||||
|
function $ZO_CMD -d "open target dir"
|
||||||
|
__z -d $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not set -q Z_EXCLUDE
|
||||||
|
set -U Z_EXCLUDE "^$HOME\$"
|
||||||
|
else if contains $HOME $Z_EXCLUDE
|
||||||
|
# Workaround: migrate old default values to a regex (see #90).
|
||||||
|
set Z_EXCLUDE (string replace -r -- "^$HOME\$" '^'$HOME'$$' $Z_EXCLUDE)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Setup completions once first
|
||||||
|
__z_complete
|
||||||
|
|
||||||
|
function __z_on_variable_pwd --on-variable PWD
|
||||||
|
__z_add
|
||||||
|
end
|
||||||
|
|
||||||
|
function __z_uninstall --on-event z_uninstall
|
||||||
|
functions -e __z_on_variable_pwd
|
||||||
|
functions -e $Z_CMD
|
||||||
|
functions -e $ZO_CMD
|
||||||
|
|
||||||
|
if test ! -z "$Z_DATA"
|
||||||
|
printf "To completely erase z's data, remove:\n" >/dev/stderr
|
||||||
|
printf "%s\n" "$Z_DATA" >/dev/stderr
|
||||||
|
end
|
||||||
|
|
||||||
|
set -e Z_CMD
|
||||||
|
set -e ZO_CMD
|
||||||
|
set -e Z_DATA
|
||||||
|
set -e Z_EXCLUDE
|
||||||
|
end
|
||||||
78
.config/fish/config.fish
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
if status is-interactive
|
||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
if test (tty) = /dev/tty1
|
||||||
|
exec startx
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set PATH $PATH ~/.cargo/bin
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
alias .. "cd .."
|
||||||
|
alias cd.. "cd .."
|
||||||
|
|
||||||
|
# # Enhanced listing commands using eza
|
||||||
|
# alias ls "command eza"
|
||||||
|
# alias l "eza -G --icons"
|
||||||
|
# alias ll "eza -l --icons"
|
||||||
|
# alias lg "eza -lG"
|
||||||
|
# alias lall "eza -lahF --icons --git"
|
||||||
|
# alias lalg "eza -laGhF --icons --git"
|
||||||
|
# alias latree "eza -laGghHT --git --icons"
|
||||||
|
# alias la "eza --git --icons -la"
|
||||||
|
# alias lsd "eza -laD"
|
||||||
|
# alias lr "eza -R"
|
||||||
|
# alias tree "eza -T"
|
||||||
|
|
||||||
|
# System commands
|
||||||
|
alias cls "clear"
|
||||||
|
alias userlist "cut -d: -f1 /etc/passwd"
|
||||||
|
alias free "free -mt"
|
||||||
|
alias du "du -ach | sort -h"
|
||||||
|
alias ps "ps auxf"
|
||||||
|
alias sudo "sudo "
|
||||||
|
alias reload "exec $SHELL -l"
|
||||||
|
alias hibernate "systemctl hibernate"
|
||||||
|
alias mkdir "mkdir -pv"
|
||||||
|
alias startupctl "systemctl list-unit-files --type=service | grep enabled"
|
||||||
|
|
||||||
|
# Process monitoring
|
||||||
|
alias psmem "ps -e -orss=,args= | sort -b -k1 -nr"
|
||||||
|
alias psmem10 "ps -e -orss=,args= | sort -b -k1 -nr | head -10"
|
||||||
|
alias pscpu "ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr"
|
||||||
|
alias pscpu10 "ps -e -o pcpu,cpu,nice,state,cputime,args|sort -k1,1n -nr | head -10"
|
||||||
|
|
||||||
|
# Search & Clipboard
|
||||||
|
alias grep "grep --color=auto"
|
||||||
|
alias fgrep "fgrep --color=auto"
|
||||||
|
alias egrep "egrep --color=auto"
|
||||||
|
alias xclip "xclip -selection c"
|
||||||
|
|
||||||
|
# Git shortcuts
|
||||||
|
alias gua "git remote | xargs -L1 git push --all"
|
||||||
|
alias ga "git add ."
|
||||||
|
alias gap "git add -p"
|
||||||
|
alias gc "git commit -m"
|
||||||
|
alias gu "git push"
|
||||||
|
alias gp "git pull"
|
||||||
|
alias gs "git status"
|
||||||
|
alias gd "git diff"
|
||||||
|
|
||||||
|
# Editor shortcuts
|
||||||
|
alias hxd "hx ~/.files/"
|
||||||
|
alias hxc "hx ~/code/"
|
||||||
|
alias vim "nvim"
|
||||||
|
alias vi "nvim"
|
||||||
|
|
||||||
|
# pnpm
|
||||||
|
set -gx PNPM_HOME "/home/mike/.local/share/pnpm"
|
||||||
|
if not string match -q -- $PNPM_HOME $PATH
|
||||||
|
set -gx PATH "$PNPM_HOME" $PATH
|
||||||
|
end
|
||||||
|
# pnpm end
|
||||||
|
|
||||||
|
# Created by `pipx` on 2025-06-04 15:36:28
|
||||||
|
set PATH $PATH /home/mike/.local/bin
|
||||||
|
[ -f "$HOME/.theme_env" ] && source "$HOME/.theme_env"
|
||||||
|
|
||||||
|
fish_add_path /home/mike/.spicetify
|
||||||
3
.config/fish/fish_plugins
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
jethrokuan/z
|
||||||
|
pure-fish/pure
|
||||||
|
jorgebucaran/fisher
|
||||||
108
.config/fish/fish_variables
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR ZO_CMD:zo
|
||||||
|
SETUVAR Z_CMD:z
|
||||||
|
SETUVAR Z_DATA:/home/mike/\x2elocal/share/z/data
|
||||||
|
SETUVAR Z_DATA_DIR:/home/mike/\x2elocal/share/z
|
||||||
|
SETUVAR Z_EXCLUDE:\x5e/home/mike\x24
|
||||||
|
SETUVAR __fish_initialized:3800
|
||||||
|
SETUVAR _fisher_jethrokuan_2F_z_files:\x7e/\x2econfig/fish/functions/__z\x2efish\x1e\x7e/\x2econfig/fish/functions/__z_add\x2efish\x1e\x7e/\x2econfig/fish/functions/__z_clean\x2efish\x1e\x7e/\x2econfig/fish/functions/__z_complete\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/z\x2efish
|
||||||
|
SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish
|
||||||
|
SETUVAR _fisher_plugins:jethrokuan/z\x1epure\x2dfish/pure\x1ejorgebucaran/fisher
|
||||||
|
SETUVAR _fisher_pure_2D_fish_2F_pure_files:\x7e/\x2econfig/fish/functions/_pure_check_availability\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_check_for_new_release\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_cgroup_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_detect_container_by_pid_method\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_format_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_get_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_inside_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_is_single_line_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_k8s_context\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_k8s_namespace\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_parse_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_place_iterm2_prompt_mark\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prefix_root_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_print_prompt_rows\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_aws_profile\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_beginning\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_command_duration\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_container\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_current_folder\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ending\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_first_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_branch\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_dirty\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_pending_commits\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_git_stash\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_jobs\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_k8s\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_new_line\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_nixdevshell\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_ssh\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_symbol\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_system_time\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_vimode\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_prompt_virtualenv\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_color\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_set_default\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_string_width\x2efish\x1e\x7e/\x2econfig/fish/functions/_pure_user_at_host\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_greeting\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_mode_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_title\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/_pure_init\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/pure\x2efish
|
||||||
|
SETUVAR _fisher_upgraded_to_4_4:\x1d
|
||||||
|
SETUVAR fish_color_autosuggestion:brblack
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:normal
|
||||||
|
SETUVAR fish_color_comment:red
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:green
|
||||||
|
SETUVAR fish_color_error:brred
|
||||||
|
SETUVAR fish_color_escape:brcyan
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:yellow
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:brcyan
|
||||||
|
SETUVAR fish_color_param:cyan
|
||||||
|
SETUVAR fish_color_quote:yellow
|
||||||
|
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:yellow\x1e\x2di
|
||||||
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR fish_pager_color_selected_background:\x2dr
|
||||||
|
SETUVAR fish_user_paths:/home/mike/\x2espicetify
|
||||||
|
SETUVAR pure_begin_prompt_with_current_directory:true
|
||||||
|
SETUVAR pure_check_for_new_release:false
|
||||||
|
SETUVAR pure_color_at_sign:pure_color_mute
|
||||||
|
SETUVAR pure_color_aws_profile:pure_color_warning
|
||||||
|
SETUVAR pure_color_command_duration:pure_color_warning
|
||||||
|
SETUVAR pure_color_current_directory:pure_color_primary
|
||||||
|
SETUVAR pure_color_danger:red
|
||||||
|
SETUVAR pure_color_dark:black
|
||||||
|
SETUVAR pure_color_git_branch:pure_color_mute
|
||||||
|
SETUVAR pure_color_git_dirty:pure_color_mute
|
||||||
|
SETUVAR pure_color_git_stash:pure_color_info
|
||||||
|
SETUVAR pure_color_git_unpulled_commits:pure_color_info
|
||||||
|
SETUVAR pure_color_git_unpushed_commits:pure_color_info
|
||||||
|
SETUVAR pure_color_hostname:pure_color_mute
|
||||||
|
SETUVAR pure_color_info:cyan
|
||||||
|
SETUVAR pure_color_jobs:pure_color_normal
|
||||||
|
SETUVAR pure_color_k8s_context:pure_color_success
|
||||||
|
SETUVAR pure_color_k8s_namespace:pure_color_primary
|
||||||
|
SETUVAR pure_color_k8s_prefix:pure_color_info
|
||||||
|
SETUVAR pure_color_light:white
|
||||||
|
SETUVAR pure_color_mute:brblack
|
||||||
|
SETUVAR pure_color_nixdevshell_prefix:pure_color_info
|
||||||
|
SETUVAR pure_color_nixdevshell_symbol:pure_color_mute
|
||||||
|
SETUVAR pure_color_normal:normal
|
||||||
|
SETUVAR pure_color_prefix_root_prompt:pure_color_danger
|
||||||
|
SETUVAR pure_color_primary:blue
|
||||||
|
SETUVAR pure_color_prompt_on_error:pure_color_danger
|
||||||
|
SETUVAR pure_color_prompt_on_success:pure_color_success
|
||||||
|
SETUVAR pure_color_success:magenta
|
||||||
|
SETUVAR pure_color_system_time:pure_color_mute
|
||||||
|
SETUVAR pure_color_username_normal:pure_color_mute
|
||||||
|
SETUVAR pure_color_username_root:pure_color_light
|
||||||
|
SETUVAR pure_color_virtualenv:pure_color_mute
|
||||||
|
SETUVAR pure_color_warning:yellow
|
||||||
|
SETUVAR pure_enable_aws_profile:true
|
||||||
|
SETUVAR pure_enable_container_detection:true
|
||||||
|
SETUVAR pure_enable_git:true
|
||||||
|
SETUVAR pure_enable_k8s:false
|
||||||
|
SETUVAR pure_enable_nixdevshell:false
|
||||||
|
SETUVAR pure_enable_single_line_prompt:false
|
||||||
|
SETUVAR pure_enable_virtualenv:true
|
||||||
|
SETUVAR pure_reverse_prompt_symbol_in_vimode:true
|
||||||
|
SETUVAR pure_separate_prompt_on_error:false
|
||||||
|
SETUVAR pure_shorten_prompt_current_directory_length:0
|
||||||
|
SETUVAR pure_shorten_window_title_current_directory_length:0
|
||||||
|
SETUVAR pure_show_jobs:false
|
||||||
|
SETUVAR pure_show_prefix_root_prompt:false
|
||||||
|
SETUVAR pure_show_subsecond_command_duration:false
|
||||||
|
SETUVAR pure_show_system_time:false
|
||||||
|
SETUVAR pure_symbol_aws_profile_prefix:
|
||||||
|
SETUVAR pure_symbol_container_prefix:
|
||||||
|
SETUVAR pure_symbol_git_dirty:\x2a
|
||||||
|
SETUVAR pure_symbol_git_stash:\u2261
|
||||||
|
SETUVAR pure_symbol_git_unpulled_commits:\u21e3
|
||||||
|
SETUVAR pure_symbol_git_unpushed_commits:\u21e1
|
||||||
|
SETUVAR pure_symbol_k8s_prefix:\u2638
|
||||||
|
SETUVAR pure_symbol_nixdevshell_prefix:\u2744\ufe0f
|
||||||
|
SETUVAR pure_symbol_prefix_root_prompt:\x23
|
||||||
|
SETUVAR pure_symbol_prompt:\u276f
|
||||||
|
SETUVAR pure_symbol_reverse_prompt:\u276e
|
||||||
|
SETUVAR pure_symbol_ssh_prefix:
|
||||||
|
SETUVAR pure_symbol_title_bar_separator:\x2d
|
||||||
|
SETUVAR pure_symbol_virtualenv_prefix:
|
||||||
|
SETUVAR pure_threshold_command_duration:5
|
||||||
|
SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1
|
||||||
|
SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1
|
||||||
174
.config/fish/functions/__z.fish
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
function __z -d "Jump to a recent directory."
|
||||||
|
function __print_help -d "Print z help."
|
||||||
|
printf "Usage: $Z_CMD [-celrth] string1 string2...\n\n"
|
||||||
|
printf " -c --clean Removes directories that no longer exist from $Z_DATA\n"
|
||||||
|
printf " -d --dir Opens matching directory using system file manager.\n"
|
||||||
|
printf " -e --echo Prints best match, no cd\n"
|
||||||
|
printf " -l --list List matches and scores, no cd\n"
|
||||||
|
printf " -p --purge Delete all entries from $Z_DATA\n"
|
||||||
|
printf " -r --rank Search by rank\n"
|
||||||
|
printf " -t --recent Search by recency\n"
|
||||||
|
printf " -x --delete Removes the current directory from $Z_DATA\n"
|
||||||
|
printf " -h --help Print this help\n\n"
|
||||||
|
end
|
||||||
|
function __z_legacy_escape_regex
|
||||||
|
# taken from escape_string_pcre2 in fish
|
||||||
|
# used to provide compatibility with fish 2
|
||||||
|
for c in (string split -- '' $argv)
|
||||||
|
if contains $c (string split '' '.^$*+()?[{}\\|-]')
|
||||||
|
printf \\
|
||||||
|
end
|
||||||
|
printf '%s' $c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l options h/help c/clean e/echo l/list p/purge r/rank t/recent d/directory x/delete
|
||||||
|
|
||||||
|
argparse $options -- $argv
|
||||||
|
|
||||||
|
if set -q _flag_help
|
||||||
|
__print_help
|
||||||
|
return 0
|
||||||
|
else if set -q _flag_clean
|
||||||
|
__z_clean
|
||||||
|
printf "%s cleaned!\n" $Z_DATA
|
||||||
|
return 0
|
||||||
|
else if set -q _flag_purge
|
||||||
|
echo >$Z_DATA
|
||||||
|
printf "%s purged!\n" $Z_DATA
|
||||||
|
return 0
|
||||||
|
else if set -q _flag_delete
|
||||||
|
sed -i -e "\:^$PWD|.*:d" $Z_DATA
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l typ
|
||||||
|
|
||||||
|
if set -q _flag_rank
|
||||||
|
set typ rank
|
||||||
|
else if set -q _flag_recent
|
||||||
|
set typ recent
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l z_script '
|
||||||
|
function frecent(rank, time) {
|
||||||
|
dx = t-time
|
||||||
|
if( dx < 3600 ) return rank*4
|
||||||
|
if( dx < 86400 ) return rank*2
|
||||||
|
if( dx < 604800 ) return rank/2
|
||||||
|
return rank/4
|
||||||
|
}
|
||||||
|
|
||||||
|
function output(matches, best_match, common) {
|
||||||
|
# list or return the desired directory
|
||||||
|
if( list ) {
|
||||||
|
cmd = "sort -nr"
|
||||||
|
for( x in matches ) {
|
||||||
|
if( matches[x] ) {
|
||||||
|
printf "%-10s %s\n", matches[x], x | cmd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if( common ) best_match = common
|
||||||
|
print best_match
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function common(matches) {
|
||||||
|
# find the common root of a list of matches, if it exists
|
||||||
|
for( x in matches ) {
|
||||||
|
if( matches[x] && (!short || length(x) < length(short)) ) {
|
||||||
|
short = x
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if( short == "/" ) return
|
||||||
|
for( x in matches ) if( matches[x] && index(x, short) != 1 ) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return short
|
||||||
|
}
|
||||||
|
|
||||||
|
BEGIN {
|
||||||
|
hi_rank = ihi_rank = -9999999999
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if( typ == "rank" ) {
|
||||||
|
rank = $2
|
||||||
|
} else if( typ == "recent" ) {
|
||||||
|
rank = $3 - t
|
||||||
|
} else rank = frecent($2, $3)
|
||||||
|
if( $1 ~ q ) {
|
||||||
|
matches[$1] = rank
|
||||||
|
} else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank
|
||||||
|
if( matches[$1] && matches[$1] > hi_rank ) {
|
||||||
|
best_match = $1
|
||||||
|
hi_rank = matches[$1]
|
||||||
|
} else if( imatches[$1] && imatches[$1] > ihi_rank ) {
|
||||||
|
ibest_match = $1
|
||||||
|
ihi_rank = imatches[$1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
END {
|
||||||
|
# prefer case sensitive
|
||||||
|
if( best_match ) {
|
||||||
|
output(matches, best_match, common(matches))
|
||||||
|
} else if( ibest_match ) {
|
||||||
|
output(imatches, ibest_match, common(imatches))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'
|
||||||
|
|
||||||
|
set -l qs
|
||||||
|
for arg in $argv
|
||||||
|
set -l escaped $arg
|
||||||
|
if string escape --style=regex '' >/dev/null 2>&1 # use builtin escape if available
|
||||||
|
set escaped (string escape --style=regex -- $escaped)
|
||||||
|
else
|
||||||
|
set escaped (__z_legacy_escape_regex $escaped)
|
||||||
|
end
|
||||||
|
# Need to escape twice, see https://www.math.utah.edu/docs/info/gawk_5.html#SEC32
|
||||||
|
set escaped (string replace --all -- \\ \\\\ $escaped)
|
||||||
|
set qs $qs $escaped
|
||||||
|
end
|
||||||
|
set -l q (string join -- '.*' $qs)
|
||||||
|
|
||||||
|
if set -q _flag_list
|
||||||
|
# Handle list separately as it can print common path information to stderr
|
||||||
|
# which cannot be captured from a subcommand.
|
||||||
|
command awk -v t=(date +%s) -v list="list" -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA")
|
||||||
|
|
||||||
|
if test "$status" -gt 0
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -z "$target"
|
||||||
|
printf "'%s' did not match any results\n" "$argv"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
if set -q _flag_echo
|
||||||
|
printf "%s\n" "$target"
|
||||||
|
else if set -q _flag_directory
|
||||||
|
if test -n "$ZO_METHOD"
|
||||||
|
type -q "$ZO_METHOD"; and "$ZO_METHOD" "$target"; and return $status
|
||||||
|
echo "Cannot open with ZO_METHOD set to $ZO_METHOD"; and return 1
|
||||||
|
else if test "$OS" = Windows_NT
|
||||||
|
# Be careful, in msys2, explorer always return 1
|
||||||
|
type -q explorer; and explorer "$target"
|
||||||
|
return 0
|
||||||
|
echo "Cannot open file explorer"
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
type -q xdg-open; and xdg-open "$target"; and return $status
|
||||||
|
type -q open; and open "$target"; and return $status
|
||||||
|
echo "Not sure how to open file manager"; and return 1
|
||||||
|
end
|
||||||
|
else
|
||||||
|
pushd "$target"
|
||||||
|
end
|
||||||
|
end
|
||||||
49
.config/fish/functions/__z_add.fish
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
function __z_add -d "Add PATH to .z file"
|
||||||
|
test -n "$fish_private_mode"; and return 0
|
||||||
|
|
||||||
|
for i in $Z_EXCLUDE
|
||||||
|
if string match -r $i $PWD >/dev/null
|
||||||
|
return 0 #Path excluded
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l tmpfile (mktemp $Z_DATA.XXXXXX)
|
||||||
|
|
||||||
|
if test -f $tmpfile
|
||||||
|
set -l path (string replace --all \\ \\\\ $PWD)
|
||||||
|
command awk -v path=$path -v now=(date +%s) -F "|" '
|
||||||
|
BEGIN {
|
||||||
|
rank[path] = 1
|
||||||
|
time[path] = now
|
||||||
|
}
|
||||||
|
$2 >= 1 {
|
||||||
|
if( $1 == path ) {
|
||||||
|
rank[$1] = $2 + 1
|
||||||
|
time[$1] = now
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rank[$1] = $2
|
||||||
|
time[$1] = $3
|
||||||
|
}
|
||||||
|
count += $2
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
if( count > 1000 ) {
|
||||||
|
for( i in rank ) print i "|" 0.9*rank[i] "|" time[i] # aging
|
||||||
|
}
|
||||||
|
else for( i in rank ) print i "|" rank[i] "|" time[i]
|
||||||
|
}
|
||||||
|
' $Z_DATA 2>/dev/null >$tmpfile
|
||||||
|
|
||||||
|
if test ! -z "$Z_OWNER"
|
||||||
|
chown $Z_OWNER:(id -ng $Z_OWNER) $tmpfile
|
||||||
|
end
|
||||||
|
#
|
||||||
|
# Don't use redirection here as it can lead to a race condition where $Z_DATA is clobbered.
|
||||||
|
# Note: There is a still a possible race condition where an old version of $Z_DATA is
|
||||||
|
# read by one instance of Fish before another instance of Fish writes its copy.
|
||||||
|
#
|
||||||
|
command mv $tmpfile $Z_DATA
|
||||||
|
or command rm $tmpfile
|
||||||
|
end
|
||||||
|
end
|
||||||
11
.config/fish/functions/__z_clean.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function __z_clean -d "Clean up .z file to remove paths no longer valid"
|
||||||
|
set -l tmpfile (mktemp $Z_DATA.XXXXXX)
|
||||||
|
|
||||||
|
if test -f $tmpfile
|
||||||
|
while read line
|
||||||
|
set -l path (string split '|' $line)[1]
|
||||||
|
test -d $path; and echo $line
|
||||||
|
end <$Z_DATA >$tmpfile
|
||||||
|
command mv -f $tmpfile $Z_DATA
|
||||||
|
end
|
||||||
|
end
|
||||||
13
.config/fish/functions/__z_complete.fish
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
function __z_complete -d "add completions"
|
||||||
|
complete -c $Z_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k
|
||||||
|
complete -c $ZO_CMD -a "(__z -l | string replace -r '^\\S*\\s*' '')" -f -k
|
||||||
|
|
||||||
|
complete -c $Z_CMD -s c -l clean -d "Cleans out $Z_DATA"
|
||||||
|
complete -c $Z_CMD -s e -l echo -d "Prints best match, no cd"
|
||||||
|
complete -c $Z_CMD -s l -l list -d "List matches, no cd"
|
||||||
|
complete -c $Z_CMD -s p -l purge -d "Purges $Z_DATA"
|
||||||
|
complete -c $Z_CMD -s r -l rank -d "Searches by rank, cd"
|
||||||
|
complete -c $Z_CMD -s t -l recent -d "Searches by recency, cd"
|
||||||
|
complete -c $Z_CMD -s h -l help -d "Print help"
|
||||||
|
complete -c $Z_CMD -s x -l delete -d "Removes the current directory from $Z_DATA"
|
||||||
|
end
|
||||||
15
.config/fish/functions/_pure_check_availability.fish
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
function _pure_check_availability \
|
||||||
|
--description "Ensure command is available on system" \
|
||||||
|
--argument-names \
|
||||||
|
feature_flag \
|
||||||
|
required_command
|
||||||
|
|
||||||
|
set FAILURE 1
|
||||||
|
|
||||||
|
if not type -q $required_command # command, function or alias are OK
|
||||||
|
echo (set_color $pure_color_warning) \
|
||||||
|
"$feature_flag feature requires: `$required_command`" \
|
||||||
|
(set_color $pure_color_normal)
|
||||||
|
return $FAILURE
|
||||||
|
end
|
||||||
|
end
|
||||||
24
.config/fish/functions/_pure_check_for_new_release.fish
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
function _pure_check_for_new_release \
|
||||||
|
--description "Check for new release and show command to install"
|
||||||
|
|
||||||
|
if test "$pure_check_for_new_release" = true
|
||||||
|
echo "🛈 Checking for new release…"
|
||||||
|
set latest (pure_get_latest_release_version "pure-fish/pure")
|
||||||
|
|
||||||
|
if test "v"$pure_version != $latest
|
||||||
|
set --local latest_version (_pure_set_color $pure_color_info)$latest(_pure_set_color $pure_color_normal)
|
||||||
|
echo -e "🔔 New version available!\n"
|
||||||
|
echo -e (_pure_set_color $pure_color_success)"fisher install pure-fish/pure@$latest_version\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function pure_get_latest_release_version \
|
||||||
|
--argument-names user_repo
|
||||||
|
|
||||||
|
curl \
|
||||||
|
--silent \
|
||||||
|
"https://api.github.com/repos/$user_repo/releases/latest" \
|
||||||
|
| string match --regex '"tag_name": "\K.*?(?=")'
|
||||||
|
end
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
function _pure_detect_container_by_cgroup_method \
|
||||||
|
--description "Linux method to detect container using cgroup. see https://stackoverflow.com/a/37015387/802365" \
|
||||||
|
--argument-names cgroup_namespace
|
||||||
|
set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup
|
||||||
|
|
||||||
|
string match \
|
||||||
|
--quiet \
|
||||||
|
--entire \
|
||||||
|
--regex '(lxc|docker)' <$cgroup_namespace
|
||||||
|
end
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
function _pure_detect_container_by_pid_method \
|
||||||
|
--description "Linux method to detect container using /proc. see https://stackoverflow.com/a/37015387/802365" \
|
||||||
|
--argument-names proc_sched
|
||||||
|
|
||||||
|
set --query proc_sched[1]; or set proc_sched /proc/1/sched
|
||||||
|
|
||||||
|
if test -e $proc_sched
|
||||||
|
head -n 1 $proc_sched \
|
||||||
|
| string match \
|
||||||
|
--quiet \
|
||||||
|
--invert \
|
||||||
|
--regex 'init|systemd'
|
||||||
|
end
|
||||||
|
end
|
||||||
49
.config/fish/functions/_pure_format_time.fish
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
set SUCCESS 0
|
||||||
|
set FAILURE 1
|
||||||
|
|
||||||
|
function _pure_format_time \
|
||||||
|
--description="Format milliseconds to a human readable format" \
|
||||||
|
--argument-names \
|
||||||
|
milliseconds \
|
||||||
|
threshold \
|
||||||
|
show_subsecond
|
||||||
|
|
||||||
|
set --query show_subsecond[1]; or set show_subsecond false
|
||||||
|
test "$milliseconds" -lt 0; and return $FAILURE
|
||||||
|
test "$milliseconds" -lt (math --scale=0 "$threshold * 1000"); and echo; and return $SUCCESS
|
||||||
|
|
||||||
|
set --local time
|
||||||
|
set --local days (math --scale=0 "$milliseconds / 86400000")
|
||||||
|
test "$days" -gt 0; and set --append time (printf "%sd" $days)
|
||||||
|
set --local hours (math --scale=0 "$milliseconds / 3600000 % 24")
|
||||||
|
test "$hours" -gt 0; and set --append time (printf "%sh" $hours)
|
||||||
|
set --local minutes (math --scale=0 "$milliseconds / 60000 % 60")
|
||||||
|
test "$minutes" -gt 0; and set --append time (printf "%sm" $minutes)
|
||||||
|
set --local seconds (math --scale=0 "$milliseconds / 1000 % 60")
|
||||||
|
|
||||||
|
if test "$show_subsecond" = true
|
||||||
|
set --local threshold_as_ms (math --scale=0 "$threshold*1000")
|
||||||
|
set --local subseconds (_pure_format_time_subseconds $milliseconds $threshold_as_ms)
|
||||||
|
set --append time $seconds$subseconds's'
|
||||||
|
else
|
||||||
|
test "$seconds" -gt $threshold; and set --append time (printf "%ss" $seconds)
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -e (string join ' ' $time)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function _pure_format_time_subseconds \
|
||||||
|
--description="Format duration milliseconds to a human readable format" \
|
||||||
|
--argument-names \
|
||||||
|
duration \
|
||||||
|
threshold
|
||||||
|
|
||||||
|
set --local subseconds
|
||||||
|
if test "$duration" -gt $threshold
|
||||||
|
set --local precision 2
|
||||||
|
set --local milliseconds (string sub --start -3 --length $precision $duration)
|
||||||
|
set --append subseconds '.'$milliseconds
|
||||||
|
end
|
||||||
|
echo $subseconds
|
||||||
|
end
|
||||||
12
.config/fish/functions/_pure_get_prompt_symbol.fish
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function _pure_get_prompt_symbol \
|
||||||
|
--description 'Print prompt symbol' \
|
||||||
|
--argument-names exit_code
|
||||||
|
|
||||||
|
set --local prompt_symbol $pure_symbol_prompt
|
||||||
|
test "$pure_reverse_prompt_symbol_in_vimode" = true
|
||||||
|
and string match -rq "fish_(vi|hybrid)_key_bindings" $fish_key_bindings
|
||||||
|
and not contains "$fish_bind_mode" insert replace
|
||||||
|
and set prompt_symbol $pure_symbol_reverse_prompt
|
||||||
|
|
||||||
|
echo "$prompt_symbol"
|
||||||
|
end
|
||||||
25
.config/fish/functions/_pure_is_inside_container.fish
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
function _pure_is_inside_container \
|
||||||
|
--argument-names cgroup_namespace
|
||||||
|
set --query cgroup_namespace[1]; or set cgroup_namespace /proc/1/cgroup
|
||||||
|
|
||||||
|
set --local failure 1
|
||||||
|
if set --query pure_enable_container_detection; and test "$pure_enable_container_detection" = true
|
||||||
|
set --local success 0
|
||||||
|
if test -n "$container"
|
||||||
|
return $success
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local os_name (uname -s)
|
||||||
|
# echo $os_name
|
||||||
|
if test "$os_name" = Linux
|
||||||
|
if _pure_detect_container_by_cgroup_method $cgroup_namespace
|
||||||
|
return $success
|
||||||
|
end
|
||||||
|
|
||||||
|
if _pure_detect_container_by_pid_method
|
||||||
|
return $success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return $failure
|
||||||
|
end
|
||||||
5
.config/fish/functions/_pure_is_single_line_prompt.fish
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
function _pure_is_single_line_prompt \
|
||||||
|
--description 'Test if single line prompt feature is enabled'
|
||||||
|
set --query pure_enable_single_line_prompt
|
||||||
|
and test "$pure_enable_single_line_prompt" = true
|
||||||
|
end
|
||||||
3
.config/fish/functions/_pure_k8s_context.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function _pure_k8s_context
|
||||||
|
kubectl config current-context 2>/dev/null
|
||||||
|
end
|
||||||
9
.config/fish/functions/_pure_k8s_namespace.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function _pure_k8s_namespace
|
||||||
|
set namespace (kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null)
|
||||||
|
|
||||||
|
if test -z "$namespace"
|
||||||
|
set namespace default
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $namespace
|
||||||
|
end
|
||||||
23
.config/fish/functions/_pure_parse_directory.fish
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
function _pure_parse_directory \
|
||||||
|
--description "Replace '$HOME' with '~'" \
|
||||||
|
--argument-names max_path_length
|
||||||
|
|
||||||
|
set --local folder (fish_prompt_pwd_dir_length=$pure_shorten_prompt_current_directory_length prompt_pwd)
|
||||||
|
|
||||||
|
if test -n "$max_path_length"
|
||||||
|
if test (string length $folder) -gt $max_path_length
|
||||||
|
# If path exceeds maximum symbol limit, force fish path formating function to use 1 character
|
||||||
|
set folder (fish_prompt_pwd_dir_length=1 prompt_pwd)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test "$pure_truncate_prompt_current_directory_keeps" -ge 1
|
||||||
|
set folder (
|
||||||
|
string split '/' $folder \
|
||||||
|
| tail -n $pure_truncate_prompt_current_directory_keeps \
|
||||||
|
| string join '/'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $folder
|
||||||
|
end
|
||||||
4
.config/fish/functions/_pure_parse_git_branch.fish
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
function _pure_parse_git_branch --description "Parse current Git branch name"
|
||||||
|
command git symbolic-ref --short HEAD 2>/dev/null;
|
||||||
|
or command git name-rev --name-only HEAD 2>/dev/null
|
||||||
|
end
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
function _pure_place_iterm2_prompt_mark
|
||||||
|
if functions -q iterm2_prompt_mark
|
||||||
|
iterm2_prompt_mark
|
||||||
|
end
|
||||||
|
end
|
||||||
11
.config/fish/functions/_pure_prefix_root_prompt.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function _pure_prefix_root_prompt
|
||||||
|
set --local username (id -u -n) # current user name
|
||||||
|
set --local prefix_root_prompt
|
||||||
|
|
||||||
|
if set --query pure_show_prefix_root_prompt; and test "$pure_show_prefix_root_prompt" = true -a "$username" = "root"
|
||||||
|
set --local prefix_color (_pure_set_color $pure_color_prefix_root_prompt)
|
||||||
|
set prefix_root_prompt "$prefix_color$pure_symbol_prefix_root_prompt"
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$prefix_root_prompt"
|
||||||
|
end
|
||||||
12
.config/fish/functions/_pure_print_prompt.fish
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function _pure_print_prompt \
|
||||||
|
--description 'Concatenate parts single prompt string'
|
||||||
|
set --local prompt
|
||||||
|
|
||||||
|
for prompt_part in $argv
|
||||||
|
if test (_pure_string_width $prompt_part) -gt 0
|
||||||
|
set --append prompt "$prompt_part"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
echo (string trim -l $prompt)
|
||||||
|
end
|
||||||
10
.config/fish/functions/_pure_print_prompt_rows.fish
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
function _pure_print_prompt_rows \
|
||||||
|
--description "Manage default vs. compact prompt"
|
||||||
|
|
||||||
|
# print current path, git branch/status, command duration
|
||||||
|
if _pure_is_single_line_prompt
|
||||||
|
echo -e -n (_pure_prompt_first_line)
|
||||||
|
else
|
||||||
|
echo -e (_pure_prompt_first_line)
|
||||||
|
end
|
||||||
|
end
|
||||||
31
.config/fish/functions/_pure_prompt.fish
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
function _pure_prompt \
|
||||||
|
--description 'Print prompt symbol' \
|
||||||
|
--argument-names exit_code
|
||||||
|
|
||||||
|
set --local jobs (_pure_prompt_jobs)
|
||||||
|
set --local nixdevshell (_pure_prompt_nixdevshell) # Nix build environment indicator
|
||||||
|
set --local virtualenv (_pure_prompt_virtualenv) # Python virtualenv name
|
||||||
|
set --local aws_profile (_pure_prompt_aws_profile) # AWS profile name
|
||||||
|
set --local vimode_indicator (_pure_prompt_vimode) # vi-mode indicator
|
||||||
|
set --local pure_symbol (_pure_prompt_symbol $exit_code)
|
||||||
|
set --local system_time (_pure_prompt_system_time)
|
||||||
|
set --local root_prefix (_pure_prefix_root_prompt)
|
||||||
|
set --local space
|
||||||
|
|
||||||
|
if _pure_is_single_line_prompt
|
||||||
|
set space ' '
|
||||||
|
end
|
||||||
|
|
||||||
|
echo (\
|
||||||
|
_pure_print_prompt \
|
||||||
|
$space \
|
||||||
|
$system_time \
|
||||||
|
$root_prefix \
|
||||||
|
$jobs \
|
||||||
|
$nixdevshell \
|
||||||
|
$virtualenv \
|
||||||
|
$aws_profile \
|
||||||
|
$vimode_indicator \
|
||||||
|
$pure_symbol \
|
||||||
|
)
|
||||||
|
end
|
||||||
19
.config/fish/functions/_pure_prompt_aws_profile.fish
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
function _pure_prompt_aws_profile --description "Display AWS profile name"
|
||||||
|
|
||||||
|
if set --query pure_enable_aws_profile;
|
||||||
|
and test "$pure_enable_aws_profile" = true
|
||||||
|
|
||||||
|
set --local aws_profile ''
|
||||||
|
set --local aws_profile_color (_pure_set_color $pure_color_aws_profile)
|
||||||
|
|
||||||
|
if test -n "$AWS_VAULT"
|
||||||
|
set aws_profile "$AWS_VAULT"
|
||||||
|
else if test -n "$AWS_PROFILE" -o "$AWS_PROFILE" != default
|
||||||
|
set aws_profile "$AWS_PROFILE"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -n $aws_profile
|
||||||
|
echo "$pure_symbol_aws_profile_prefix$aws_profile_color$aws_profile"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
7
.config/fish/functions/_pure_prompt_beginning.fish
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
function _pure_prompt_beginning \
|
||||||
|
--description 'Clear existing line content'
|
||||||
|
|
||||||
|
set --local clear_line "\r\033[K"
|
||||||
|
|
||||||
|
echo $clear_line
|
||||||
|
end
|
||||||
11
.config/fish/functions/_pure_prompt_command_duration.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function _pure_prompt_command_duration
|
||||||
|
set --local command_duration
|
||||||
|
|
||||||
|
# Get command execution duration
|
||||||
|
if test -n "$CMD_DURATION"
|
||||||
|
set command_duration (_pure_format_time $CMD_DURATION $pure_threshold_command_duration $pure_show_subsecond_command_duration)
|
||||||
|
end
|
||||||
|
set --local command_duration_color (_pure_set_color $pure_color_command_duration)
|
||||||
|
|
||||||
|
echo "$command_duration_color$command_duration"
|
||||||
|
end
|
||||||
5
.config/fish/functions/_pure_prompt_container.fish
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
function _pure_prompt_container
|
||||||
|
if _pure_is_inside_container
|
||||||
|
echo "$pure_symbol_container_prefix"(_pure_user_at_host)
|
||||||
|
end
|
||||||
|
end
|
||||||
11
.config/fish/functions/_pure_prompt_current_folder.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
set FAILURE 1
|
||||||
|
|
||||||
|
function _pure_prompt_current_folder --argument-names current_prompt_width
|
||||||
|
|
||||||
|
if test -z "$current_prompt_width"; return $FAILURE; end
|
||||||
|
|
||||||
|
set --local current_folder (_pure_parse_directory (math $COLUMNS - $current_prompt_width - 1))
|
||||||
|
set --local current_folder_color (_pure_set_color $pure_color_current_directory)
|
||||||
|
|
||||||
|
echo "$current_folder_color$current_folder"
|
||||||
|
end
|
||||||
3
.config/fish/functions/_pure_prompt_ending.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function _pure_prompt_ending
|
||||||
|
echo (set_color normal)" "
|
||||||
|
end
|
||||||
41
.config/fish/functions/_pure_prompt_first_line.fish
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
set --global FAILURE 1
|
||||||
|
|
||||||
|
function _pure_prompt_first_line \
|
||||||
|
--description 'Print contextual information before prompt.'
|
||||||
|
|
||||||
|
set --local prompt_ssh (_pure_prompt_ssh)
|
||||||
|
set --local prompt_container (_pure_prompt_container)
|
||||||
|
set --local prompt_k8s (_pure_prompt_k8s)
|
||||||
|
set --local prompt_git (_pure_prompt_git)
|
||||||
|
set --local prompt_command_duration (_pure_prompt_command_duration)
|
||||||
|
set --local prompt (_pure_print_prompt \
|
||||||
|
$prompt_ssh \
|
||||||
|
$prompt_container \
|
||||||
|
$prompt_k8s \
|
||||||
|
$prompt_git \
|
||||||
|
$prompt_command_duration
|
||||||
|
)
|
||||||
|
set --local prompt_width (_pure_string_width $prompt)
|
||||||
|
set --local current_folder (_pure_prompt_current_folder $prompt_width)
|
||||||
|
|
||||||
|
set --local prompt_components
|
||||||
|
if set --query pure_begin_prompt_with_current_directory; and test "$pure_begin_prompt_with_current_directory" = true
|
||||||
|
set prompt_components \
|
||||||
|
$current_folder \
|
||||||
|
$prompt_git \
|
||||||
|
$prompt_ssh \
|
||||||
|
$prompt_container \
|
||||||
|
$prompt_k8s \
|
||||||
|
$prompt_command_duration
|
||||||
|
else
|
||||||
|
set prompt_components \
|
||||||
|
$prompt_ssh \
|
||||||
|
$prompt_container \
|
||||||
|
$prompt_k8s \
|
||||||
|
$current_folder \
|
||||||
|
$prompt_git \
|
||||||
|
$prompt_command_duration
|
||||||
|
end
|
||||||
|
|
||||||
|
echo (_pure_print_prompt $prompt_components)
|
||||||
|
end
|
||||||
26
.config/fish/functions/_pure_prompt_git.fish
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
function _pure_prompt_git \
|
||||||
|
--description 'Print git repository informations: branch name, dirty, upstream ahead/behind'
|
||||||
|
|
||||||
|
set ABORT_FEATURE 2
|
||||||
|
|
||||||
|
if set --query pure_enable_git; and test "$pure_enable_git" != true
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not type -q --no-functions git # skip git-related features when `git` is not available
|
||||||
|
return $ABORT_FEATURE
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local is_git_repository (command git rev-parse --is-inside-work-tree 2>/dev/null)
|
||||||
|
|
||||||
|
if test -n "$is_git_repository"
|
||||||
|
set --local git_prompt (_pure_prompt_git_branch)(_pure_prompt_git_dirty)(_pure_prompt_git_stash)
|
||||||
|
set --local git_pending_commits (_pure_prompt_git_pending_commits)
|
||||||
|
|
||||||
|
if test (_pure_string_width $git_pending_commits) -ne 0
|
||||||
|
set --append git_prompt $git_pending_commits
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $git_prompt
|
||||||
|
end
|
||||||
|
end
|
||||||
6
.config/fish/functions/_pure_prompt_git_branch.fish
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function _pure_prompt_git_branch
|
||||||
|
set --local git_branch (_pure_parse_git_branch) # current git branch
|
||||||
|
set --local git_branch_color (_pure_set_color $pure_color_git_branch)
|
||||||
|
|
||||||
|
echo "$git_branch_color$git_branch"
|
||||||
|
end
|
||||||
27
.config/fish/functions/_pure_prompt_git_dirty.fish
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
function _pure_prompt_git_dirty
|
||||||
|
set --local git_dirty_symbol
|
||||||
|
set --local git_dirty_color
|
||||||
|
|
||||||
|
set --local is_git_dirty (
|
||||||
|
# HEAD may not exist (e.g. immediately after git init); diff-index is
|
||||||
|
# fast for staged checks but requires a ref.
|
||||||
|
#
|
||||||
|
# The diff-index (or diff --staged) checks for staged changes; the diff
|
||||||
|
# checks for unstaged changes; the ls-files checks for untracked files.
|
||||||
|
# We put them in this order because checking staged changes is *fast*.
|
||||||
|
if command git rev-list --max-count=1 HEAD -- >/dev/null 2>&1;
|
||||||
|
not command git diff-index --ignore-submodules --cached --quiet HEAD -- >/dev/null 2>&1;
|
||||||
|
else;
|
||||||
|
not command git diff --staged --ignore-submodules --no-ext-diff --quiet --exit-code >/dev/null 2>&1;
|
||||||
|
end
|
||||||
|
or not command git diff --ignore-submodules --no-ext-diff --quiet --exit-code >/dev/null 2>&1
|
||||||
|
or command git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>&1
|
||||||
|
and echo "true"
|
||||||
|
)
|
||||||
|
if test -n "$is_git_dirty" # untracked or un-commited files
|
||||||
|
set git_dirty_symbol "$pure_symbol_git_dirty"
|
||||||
|
set git_dirty_color (_pure_set_color $pure_color_git_dirty)
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$git_dirty_color$git_dirty_symbol"
|
||||||
|
end
|
||||||
27
.config/fish/functions/_pure_prompt_git_pending_commits.fish
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
function _pure_prompt_git_pending_commits
|
||||||
|
set --local git_unpushed_commits
|
||||||
|
set --local git_unpulled_commits
|
||||||
|
|
||||||
|
set --local has_upstream (command git rev-parse --abbrev-ref '@{upstream}' 2>/dev/null)
|
||||||
|
if test -n "$has_upstream" # check there is an upstream repo configured
|
||||||
|
and test "$has_upstream" != '@{upstream}' # Fixed #179, dont check the empty repo
|
||||||
|
command git rev-list --left-right --count 'HEAD...@{upstream}' \
|
||||||
|
| read --local --array git_status
|
||||||
|
set --local commit_to_push $git_status[1]
|
||||||
|
set --local commit_to_pull $git_status[2]
|
||||||
|
|
||||||
|
if test "$commit_to_push" -gt 0 # upstream is behind local repo
|
||||||
|
set --local git_unpushed_commits_color \
|
||||||
|
(_pure_set_color $pure_color_git_unpushed_commits)
|
||||||
|
set git_unpushed_commits "$git_unpushed_commits_color$pure_symbol_git_unpushed_commits"
|
||||||
|
end
|
||||||
|
|
||||||
|
if test "$commit_to_pull" -gt 0 # upstream is ahead of local repo
|
||||||
|
set --local git_unpulled_commits_color \
|
||||||
|
(_pure_set_color $pure_color_git_unpulled_commits)
|
||||||
|
set git_unpulled_commits "$git_unpulled_commits_color$pure_symbol_git_unpulled_commits"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$git_unpushed_commits$git_unpulled_commits"
|
||||||
|
end
|
||||||
15
.config/fish/functions/_pure_prompt_git_stash.fish
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
function _pure_prompt_git_stash
|
||||||
|
set --local git_stash_symbol
|
||||||
|
set --local git_stash_color
|
||||||
|
|
||||||
|
set --local has_stashed_files (
|
||||||
|
command git rev-list --walk-reflogs --count refs/stash >/dev/null 2>&1
|
||||||
|
and echo "true"
|
||||||
|
)
|
||||||
|
if test -n "$has_stashed_files" # untracked or un-commited files
|
||||||
|
set git_stash_symbol " $pure_symbol_git_stash"
|
||||||
|
set git_stash_color (_pure_set_color $pure_color_git_stash)
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$git_stash_color$git_stash_symbol"
|
||||||
|
end
|
||||||
9
.config/fish/functions/_pure_prompt_jobs.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function _pure_prompt_jobs --description "Display number of running jobs"
|
||||||
|
if set --query pure_show_jobs; and test "$pure_show_jobs" = true
|
||||||
|
set --local njobs (count (jobs -p))
|
||||||
|
set --local jobs_color (_pure_set_color $pure_color_jobs)
|
||||||
|
if test "$njobs" -gt 0
|
||||||
|
echo "$jobs_color"[$njobs]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
16
.config/fish/functions/_pure_prompt_k8s.fish
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
function _pure_prompt_k8s
|
||||||
|
if set --query pure_enable_k8s;
|
||||||
|
and test "$pure_enable_k8s" = true;
|
||||||
|
and _pure_check_availability pure_enable_k8s kubectl
|
||||||
|
and test -n (_pure_k8s_context) # todo: use $(cmd) syntax when Fish 3.3.1 is dropped
|
||||||
|
|
||||||
|
set --local context (_pure_set_color $pure_color_k8s_context)(_pure_k8s_context)
|
||||||
|
|
||||||
|
if test -n "$context"
|
||||||
|
set --local symbol (_pure_set_color $pure_color_k8s_prefix)$pure_symbol_k8s_prefix
|
||||||
|
set --local namespace (_pure_set_color $pure_color_k8s_namespace)(_pure_k8s_namespace)
|
||||||
|
|
||||||
|
echo "$symbol $context/$namespace"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
11
.config/fish/functions/_pure_prompt_new_line.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function _pure_prompt_new_line \
|
||||||
|
--description "Do not add a line break to a brand new session" \
|
||||||
|
--on-event fish_prompt
|
||||||
|
|
||||||
|
set --local new_line ''
|
||||||
|
if not _pure_is_single_line_prompt; and test "$_pure_fresh_session" = false
|
||||||
|
set new_line "\n"
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -e -n (_pure_prompt_beginning)"$new_line"
|
||||||
|
end
|
||||||
13
.config/fish/functions/_pure_prompt_nixdevshell.fish
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
function _pure_prompt_nixdevshell \
|
||||||
|
--description "Indicate if nix develop shell is activated"
|
||||||
|
|
||||||
|
if set --query pure_enable_nixdevshell;
|
||||||
|
and test "$pure_enable_nixdevshell" = true;
|
||||||
|
and test -n "$IN_NIX_SHELL"
|
||||||
|
|
||||||
|
set --local prefix (_pure_set_color $pure_color_nixdevshell_prefix)$pure_symbol_nixdevshell_prefix
|
||||||
|
set --local symbol (_pure_set_color $pure_color_nixdevshell_status)$IN_NIX_SHELL
|
||||||
|
|
||||||
|
echo "$prefix$symbol"
|
||||||
|
end
|
||||||
|
end
|
||||||
5
.config/fish/functions/_pure_prompt_ssh.fish
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
function _pure_prompt_ssh
|
||||||
|
if test "$SSH_CONNECTION" != ""
|
||||||
|
echo "$pure_symbol_ssh_prefix"(_pure_user_at_host)
|
||||||
|
end
|
||||||
|
end
|
||||||
20
.config/fish/functions/_pure_prompt_symbol.fish
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
function _pure_prompt_symbol \
|
||||||
|
--description 'Print prompt symbol' \
|
||||||
|
--argument-names exit_code
|
||||||
|
|
||||||
|
set --local prompt_symbol (_pure_get_prompt_symbol)
|
||||||
|
set --local symbol_color_success (_pure_set_color $pure_color_prompt_on_success)
|
||||||
|
set --local symbol_color_error (_pure_set_color $pure_color_prompt_on_error)
|
||||||
|
set --local command_succeed 0
|
||||||
|
|
||||||
|
set --local symbol_color $symbol_color_success # default pure symbol color
|
||||||
|
if set --query exit_code; and test "$exit_code" -ne $command_succeed
|
||||||
|
set symbol_color $symbol_color_error # different pure symbol color when previous command failed
|
||||||
|
|
||||||
|
if set --query pure_separate_prompt_on_error; and test "$pure_separate_prompt_on_error" = true
|
||||||
|
set symbol_color "$symbol_color_error$prompt_symbol$symbol_color_success"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$symbol_color$prompt_symbol"
|
||||||
|
end
|
||||||
6
.config/fish/functions/_pure_prompt_system_time.fish
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function _pure_prompt_system_time --description "Display system time"
|
||||||
|
if set --query pure_show_system_time; and test "$pure_show_system_time" = true
|
||||||
|
set --local time_color (_pure_set_color $pure_color_system_time)
|
||||||
|
echo "$time_color"(date '+%T')
|
||||||
|
end
|
||||||
|
end
|
||||||
6
.config/fish/functions/_pure_prompt_vimode.fish
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function _pure_prompt_vimode
|
||||||
|
if set --query pure_reverse_prompt_symbol_in_vimode;
|
||||||
|
and test "$pure_reverse_prompt_symbol_in_vimode" = false
|
||||||
|
echo (fish_default_mode_prompt)
|
||||||
|
end
|
||||||
|
end
|
||||||
18
.config/fish/functions/_pure_prompt_virtualenv.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
function _pure_prompt_virtualenv --description "Display virtualenv directory"
|
||||||
|
|
||||||
|
if set --query pure_enable_virtualenv;
|
||||||
|
and test "$pure_enable_virtualenv" = true
|
||||||
|
|
||||||
|
set --local virtualenv ''
|
||||||
|
set --local virtualenv_color (_pure_set_color $pure_color_virtualenv)
|
||||||
|
if test -n "$VIRTUAL_ENV"
|
||||||
|
set virtualenv (basename "$VIRTUAL_ENV")
|
||||||
|
else if test -n "$CONDA_DEFAULT_ENV"
|
||||||
|
set virtualenv (basename "$CONDA_DEFAULT_ENV")
|
||||||
|
end
|
||||||
|
|
||||||
|
if test -n $virtualenv
|
||||||
|
echo "$pure_symbol_virtualenv_prefix$virtualenv_color$virtualenv"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
19
.config/fish/functions/_pure_set_color.fish
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
function _pure_set_color \
|
||||||
|
--description 'Set color' \
|
||||||
|
--argument-names var
|
||||||
|
|
||||||
|
set --local color $var
|
||||||
|
# Backwards compatibility for colors defined as control sequencies instead of fish colors
|
||||||
|
if not string match --quiet --all --regex '\e\[[^m]*m' $color[1]
|
||||||
|
and set -q $color
|
||||||
|
set color $$var
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local result $color
|
||||||
|
if not string match --quiet --all --regex '\e\[[^m]*m' $result[1]
|
||||||
|
and not test -z $result[1]
|
||||||
|
set result (set_color $color)
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$result"
|
||||||
|
end
|
||||||
11
.config/fish/functions/_pure_set_default.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
function _pure_set_default \
|
||||||
|
--description 'Set default value for configuration variable' \
|
||||||
|
--argument-names var default
|
||||||
|
|
||||||
|
set is_available_universally (not set --query --universal $var; or test -z $$var; echo $status)
|
||||||
|
set is_available_globally (not set --query --global $var; or test -z $$var; echo $status)
|
||||||
|
|
||||||
|
if test "$is_available_universally" -eq 0 -a $is_available_globally -eq 0
|
||||||
|
set --universal $var "$default"
|
||||||
|
end
|
||||||
|
end
|
||||||
9
.config/fish/functions/_pure_string_width.fish
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function _pure_string_width \
|
||||||
|
--description 'returns raw string length, i.e. ignore ANSI-color' \
|
||||||
|
--argument-names prompt
|
||||||
|
|
||||||
|
set --local empty ''
|
||||||
|
set --local raw_prompt (string replace --all --regex '\e\[[^m]*m' $empty -- $prompt)
|
||||||
|
|
||||||
|
string length -- $raw_prompt
|
||||||
|
end
|
||||||
13
.config/fish/functions/_pure_user_at_host.fish
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
function _pure_user_at_host
|
||||||
|
set --local username (id -u -n) # current user name
|
||||||
|
set --local at_sign "@"
|
||||||
|
set --local at_sign_color (_pure_set_color $pure_color_at_sign)
|
||||||
|
set --local hostname_color (_pure_set_color $pure_color_hostname)
|
||||||
|
|
||||||
|
set --local username_color (_pure_set_color $pure_color_username_normal) # default color
|
||||||
|
if test "$username" = root
|
||||||
|
set username_color (_pure_set_color $pure_color_username_root) # different color for root
|
||||||
|
end
|
||||||
|
|
||||||
|
echo "$username_color$username$at_sign_color$at_sign$hostname_color$hostname"
|
||||||
|
end
|
||||||
3
.config/fish/functions/fish_greeting.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function fish_greeting
|
||||||
|
_pure_check_for_new_release
|
||||||
|
end
|
||||||
2
.config/fish/functions/fish_mode_prompt.fish
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
function fish_mode_prompt
|
||||||
|
end
|
||||||
11
.config/fish/functions/fish_prompt.fish
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# a called to `_pure_prompt_new_line` is triggered by an event
|
||||||
|
function fish_prompt
|
||||||
|
set --local exit_code $status # save previous exit code
|
||||||
|
|
||||||
|
_pure_print_prompt_rows # manage default vs. compact prompt
|
||||||
|
_pure_place_iterm2_prompt_mark # place iTerm shell integration mark
|
||||||
|
echo -e -n (_pure_prompt $exit_code) # print prompt
|
||||||
|
echo -e (_pure_prompt_ending) # reset colors and end prompt
|
||||||
|
|
||||||
|
set _pure_fresh_session false
|
||||||
|
end
|
||||||
15
.config/fish/functions/fish_title.fish
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
function fish_title \
|
||||||
|
--description "Set title to current folder and shell name" \
|
||||||
|
--argument-names last_command
|
||||||
|
|
||||||
|
set --local current_folder (fish_prompt_pwd_dir_length=$pure_shorten_window_title_current_directory_length prompt_pwd)
|
||||||
|
set --local current_command (status current-command 2>/dev/null; or echo $_)
|
||||||
|
|
||||||
|
set --local prompt "$current_folder: $last_command $pure_symbol_title_bar_separator $current_command"
|
||||||
|
|
||||||
|
if test -z "$last_command"
|
||||||
|
set prompt "$current_folder $pure_symbol_title_bar_separator $current_command"
|
||||||
|
end
|
||||||
|
|
||||||
|
echo $prompt
|
||||||
|
end
|
||||||
240
.config/fish/functions/fisher.fish
Normal file
@@ -0,0 +1,240 @@
|
|||||||
|
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.5
|
||||||
|
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 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
|
||||||
|
isatty || read --local --null --array stdin && set --append argv $stdin
|
||||||
|
|
||||||
|
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
|
||||||
|
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 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)
|
||||||
|
|
||||||
|
if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
|
||||||
|
command cp -Rf \$temp/*/* $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
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
[General]
|
[General]
|
||||||
contrastOpacity=188
|
contrastOpacity=188
|
||||||
|
drawColor=#800000
|
||||||
|
savePath=/home/mike/Pictures
|
||||||
showStartupLaunchMessage=false
|
showStartupLaunchMessage=false
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
|
||||||
|
|
||||||
include "/home/mike/.gtkrc-2.0.mine"
|
include "/home/mike/.gtkrc-2.0.mine"
|
||||||
gtk-theme-name="catppuccin-latte-sapphire-standard+default"
|
gtk-theme-name="Gruvbox-Yellow-Dark"
|
||||||
gtk-icon-theme-name="Papirus-Light"
|
gtk-icon-theme-name="Papirus-Dark"
|
||||||
gtk-font-name="Roboto 11"
|
gtk-font-name="Roboto 11"
|
||||||
gtk-cursor-theme-name="catppuccin-latte-light-cursors"
|
gtk-cursor-theme-name="Simp1e-Gruvbox-Dark"
|
||||||
gtk-cursor-theme-size=24
|
gtk-cursor-theme-size=16
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||||
gtk-button-images=1
|
gtk-button-images=1
|
||||||
|
|||||||
5
.config/gtk-3.0/bookmarks
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
file:///home/mike/Documents
|
||||||
|
file:///home/mike/Music
|
||||||
|
file:///home/mike/Pictures
|
||||||
|
file:///home/mike/Videos
|
||||||
|
file:///home/mike/Downloads
|
||||||
@@ -1,17 +1,4 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-theme-name=catppuccin-latte-sapphire-standard+default
|
gtk-application-prefer-dark-theme=true
|
||||||
gtk-icon-theme-name=Papirus-Light
|
gtk-theme-name=Rosepine-Dark
|
||||||
gtk-font-name=Roboto 11
|
gtk-icon-theme-name=Papirus-Dark
|
||||||
gtk-cursor-theme-name=catppuccin-latte-light-cursors
|
|
||||||
gtk-cursor-theme-size=24
|
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
|
||||||
gtk-button-images=1
|
|
||||||
gtk-menu-images=1
|
|
||||||
gtk-enable-event-sounds=1
|
|
||||||
gtk-enable-input-feedback-sounds=0
|
|
||||||
gtk-xft-antialias=1
|
|
||||||
gtk-xft-hinting=1
|
|
||||||
gtk-xft-hintstyle=hintslight
|
|
||||||
gtk-xft-rgba=rgb
|
|
||||||
gtk-application-prefer-dark-theme=0
|
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-application-prefer-dark-theme=1
|
gtk-application-prefer-dark-theme=true
|
||||||
|
gtk-theme-name=Rosepine-Dark
|
||||||
|
gtk-icon-theme-name=Papirus-Dark
|
||||||
|
|||||||
@@ -1,9 +1,78 @@
|
|||||||
theme = "gruvbox_dark_soft"
|
theme = "rose_pine"
|
||||||
|
|
||||||
|
[editor]
|
||||||
|
mouse = true
|
||||||
|
auto-save = true
|
||||||
|
bufferline = "always"
|
||||||
|
cursorline = true
|
||||||
|
rulers = [80, 120]
|
||||||
|
true-color = true
|
||||||
|
end-of-line-diagnostics = "hint"
|
||||||
|
|
||||||
|
[editor.inline-diagnostics]
|
||||||
|
cursor-line = "error"
|
||||||
|
other-lines = "disable"
|
||||||
|
|
||||||
[editor.cursor-shape]
|
[editor.cursor-shape]
|
||||||
insert = "bar"
|
insert = "bar"
|
||||||
normal = "block"
|
normal = "block"
|
||||||
select = "underline"
|
select = "underline"
|
||||||
|
|
||||||
|
[editor.soft-wrap]
|
||||||
|
enable = true
|
||||||
|
wrap-indicator = "↩ "
|
||||||
|
|
||||||
|
[editor.whitespace.render]
|
||||||
|
space = "all"
|
||||||
|
tab = "all"
|
||||||
|
newline = "none"
|
||||||
|
|
||||||
|
[editor.whitespace.characters]
|
||||||
|
space = " "
|
||||||
|
nbsp = "⍽"
|
||||||
|
tab = "→"
|
||||||
|
newline = "⏎"
|
||||||
|
tabpad = "·"
|
||||||
|
|
||||||
|
[editor.indent-guides]
|
||||||
|
character = "╎"
|
||||||
|
render = true
|
||||||
|
skip-levels = 1
|
||||||
|
|
||||||
[editor.file-picker]
|
[editor.file-picker]
|
||||||
hidden = false
|
hidden = false
|
||||||
|
|
||||||
|
[editor.lsp]
|
||||||
|
auto-signature-help = false
|
||||||
|
display-messages = true
|
||||||
|
|
||||||
|
[editor.statusline]
|
||||||
|
left = [ "mode", "spinner", "diagnostics" ]
|
||||||
|
center = [ "file-name", "separator", "version-control", "separator" ]
|
||||||
|
right = [ "position", "position-percentage", "total-line-numbers" ]
|
||||||
|
separator = "│"
|
||||||
|
mode.normal = "NORMAL"
|
||||||
|
mode.insert = "INSERT"
|
||||||
|
mode.select = "SELECT"
|
||||||
|
|
||||||
|
[keys.normal]
|
||||||
|
"A-," = "goto_previous_buffer"
|
||||||
|
"A-." = "goto_next_buffer"
|
||||||
|
"A-w" = ":buffer-close"
|
||||||
|
"A-/" = "repeat_last_motion"
|
||||||
|
"A-x" = "extend_to_line_bounds"
|
||||||
|
"X" = "select_line_above"
|
||||||
|
";" = "command_mode"
|
||||||
|
"C-tab" = ":buffer-previous"
|
||||||
|
"C-S-tab" = ":buffer-next"
|
||||||
|
"C-r" = ":config-reload"
|
||||||
|
|
||||||
|
space.c = "toggle_comments"
|
||||||
|
|
||||||
|
p = "paste_clipboard_before"
|
||||||
|
y = "yank_main_selection_to_clipboard"
|
||||||
|
|
||||||
|
[keys.select]
|
||||||
|
"A-x" = "extend_to_line_bounds"
|
||||||
|
"X" = "select_line_above"
|
||||||
|
|
||||||
|
|||||||
@@ -42,14 +42,14 @@ column_meters_2=AllCPUs4 DiskIO
|
|||||||
column_meter_modes_2=3 3
|
column_meter_modes_2=3 3
|
||||||
tree_view=1
|
tree_view=1
|
||||||
sort_key=46
|
sort_key=46
|
||||||
tree_sort_key=39
|
tree_sort_key=46
|
||||||
sort_direction=1
|
sort_direction=1
|
||||||
tree_sort_direction=-1
|
tree_sort_direction=-1
|
||||||
tree_view_always_by_pid=0
|
tree_view_always_by_pid=0
|
||||||
all_branches_collapsed=1
|
all_branches_collapsed=1
|
||||||
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||||
.sort_key=PERCENT_CPU
|
.sort_key=PERCENT_CPU
|
||||||
.tree_sort_key=M_RESIDENT
|
.tree_sort_key=PERCENT_CPU
|
||||||
.tree_view_always_by_pid=0
|
.tree_view_always_by_pid=0
|
||||||
.tree_view=1
|
.tree_view=1
|
||||||
.sort_direction=1
|
.sort_direction=1
|
||||||
|
|||||||
@@ -7,12 +7,15 @@ swww-daemon &
|
|||||||
fcitx5 -d &
|
fcitx5 -d &
|
||||||
kanata -c ~/.config/kanata/config.kbd &
|
kanata -c ~/.config/kanata/config.kbd &
|
||||||
waybar &
|
waybar &
|
||||||
flameshot &
|
awatcher-bundle &
|
||||||
|
|
||||||
/usr/lib/polkit-kde-authentication-agent-1 &
|
/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 & disown
|
||||||
gnome-keyring-daemon --start --components=secrets,pkcs11,ssh &
|
sleep 1 && keepassxc &
|
||||||
|
ff2mpv-rust &
|
||||||
|
# gnome-keyring-daemon --start --components=secrets,pkcs11,ssh &
|
||||||
|
|
||||||
# for L in 64 ''; do
|
# for L in 64 ''; do
|
||||||
# A=/usr/lib$L/seahorse/seahorse-ssh-askpass
|
# A=/usr/lib$L/seahorse/seahorse-ssh-askpass
|
||||||
# [[ -x $A ]] && export SSH_ASKPASS=$A && break
|
# [[ -x $A ]] && export SSH_ASKPASS=$A && break
|
||||||
# done
|
# done
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ listener {
|
|||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 900 # 15min
|
timeout = 900 # 15min
|
||||||
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
on-timeout = systemctl hibernate
|
||||||
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
# on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||||
|
# on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||||
}
|
}
|
||||||
|
|
||||||
# listener {
|
# listener {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
grim -o HDMI-A-1 /tmp/screenshot-0.png && grim -o DP-1 /tmp/screenshot-1.png && grim -o DP-2 /tmp/screenshot-2.png && (pidof hyprlock || hyprlock)
|
grim /tmp/screenshot-0.png && (pidof hyprlock || hyprlock)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
;; Kanata configuration for caps to esc+ctrl
|
;; Kanata configuration for caps to esc+ctrl
|
||||||
|
|
||||||
|
(defcfg
|
||||||
|
linux-dev /dev/input/by-path/platform-i8042-serio-0-event-kbd
|
||||||
|
)
|
||||||
|
|
||||||
(defsrc
|
(defsrc
|
||||||
caps
|
caps
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,8 +3,23 @@ application/javascript=vim.desktop;
|
|||||||
application/vnd.rar=engrampa.desktop;
|
application/vnd.rar=engrampa.desktop;
|
||||||
image/jpeg=feh.desktop;
|
image/jpeg=feh.desktop;
|
||||||
image/png=feh.desktop;
|
image/png=feh.desktop;
|
||||||
text/html=vim.desktop;
|
text/html=vim.desktop;firefox.desktop;
|
||||||
application/pdf=okularApplication_pdf.desktop;
|
application/pdf=okularApplication_pdf.desktop;
|
||||||
|
video/x-matroska=mpv.desktop;
|
||||||
|
x-scheme-handler/mailto=userapp-Thunderbird-EIOL62.desktop;userapp-Evolution-ZIODU2.desktop;userapp-Evolution-RB4MU2.desktop;
|
||||||
|
x-scheme-handler/tonsite=org.telegram.desktop.desktop;
|
||||||
|
text/markdown=dev.zed.Zed.desktop;
|
||||||
|
x-scheme-handler/mid=userapp-Thunderbird-EIOL62.desktop;
|
||||||
|
text/plain=dev.zed.Zed.desktop;
|
||||||
|
x-scheme-handler/http=firefox.desktop;
|
||||||
|
x-scheme-handler/https=firefox.desktop;
|
||||||
|
x-scheme-handler/chrome=firefox.desktop;
|
||||||
|
application/x-extension-htm=firefox.desktop;
|
||||||
|
application/x-extension-html=firefox.desktop;
|
||||||
|
application/x-extension-shtml=firefox.desktop;
|
||||||
|
application/xhtml+xml=firefox.desktop;
|
||||||
|
application/x-extension-xhtml=firefox.desktop;
|
||||||
|
application/x-extension-xht=firefox.desktop;
|
||||||
|
|
||||||
[Default Applications]
|
[Default Applications]
|
||||||
application/pdf=xreader.desktop;
|
application/pdf=xreader.desktop;
|
||||||
@@ -13,7 +28,7 @@ application/x-compressed-*=engrampa.desktop;
|
|||||||
application/x-remmina=org.remmina.Remmina.desktop;
|
application/x-remmina=org.remmina.Remmina.desktop;
|
||||||
application/x-wine-extension-ini=vim.desktop;
|
application/x-wine-extension-ini=vim.desktop;
|
||||||
application/x-yaml=vim.desktop;
|
application/x-yaml=vim.desktop;
|
||||||
application/xhtml+xml=firefox.desktop;
|
application/xhtml+xml=firefox.desktop
|
||||||
image/jpeg=feh.desktop;
|
image/jpeg=feh.desktop;
|
||||||
image/png=feh.desktop;
|
image/png=feh.desktop;
|
||||||
image/svg+xml=feh.desktop;
|
image/svg+xml=feh.desktop;
|
||||||
@@ -23,11 +38,30 @@ text/yaml=vim.desktop;
|
|||||||
video/mp4=mpv.desktop;
|
video/mp4=mpv.desktop;
|
||||||
video/mpeg=mpv.desktop;
|
video/mpeg=mpv.desktop;
|
||||||
video/webm=mpv.desktop;
|
video/webm=mpv.desktop;
|
||||||
x-scheme-handler/http=firefox.desktop;
|
x-scheme-handler/http=firefox.desktop
|
||||||
x-scheme-handler/https=firefox.desktop;
|
x-scheme-handler/https=firefox.desktop
|
||||||
x-scheme-handler/mpv=mpv-handler.desktop;
|
x-scheme-handler/mpv=mpv-handler.desktop;
|
||||||
x-scheme-handler/rdp=org.remmina.Remmina.desktop;
|
x-scheme-handler/rdp=org.remmina.Remmina.desktop;
|
||||||
x-scheme-handler/remmina=org.remmina.Remmina.desktop;
|
x-scheme-handler/remmina=org.remmina.Remmina.desktop;
|
||||||
x-scheme-handler/spice=org.remmina.Remmina.desktop;
|
x-scheme-handler/spice=org.remmina.Remmina.desktop;
|
||||||
x-scheme-handler/terminal=kitty.desktop;
|
x-scheme-handler/terminal=kitty.desktop;
|
||||||
x-scheme-handler/vnc=org.remmina.Remmina.desktop;
|
x-scheme-handler/vnc=org.remmina.Remmina.desktop;
|
||||||
|
video/x-matroska=mpv.desktop
|
||||||
|
x-scheme-handler/mailto=userapp-Thunderbird-EIOL62.desktop
|
||||||
|
x-scheme-handler/tonsite=org.telegram.desktop.desktop
|
||||||
|
x-scheme-handler/mailspring=Mailspring.desktop
|
||||||
|
text/markdown=dev.zed.Zed.desktop
|
||||||
|
hoppscotch=hoppscotch-handler.desktop
|
||||||
|
text/html=firefox.desktop
|
||||||
|
x-scheme-handler/about=brave-browser.desktop
|
||||||
|
x-scheme-handler/unknown=brave-browser.desktop
|
||||||
|
x-scheme-handler/discord=equibop.desktop
|
||||||
|
application/uproject=com.epicgames.UnrealEngineEditor.desktop
|
||||||
|
message/rfc822=userapp-Thunderbird-EIOL62.desktop
|
||||||
|
x-scheme-handler/mid=userapp-Thunderbird-EIOL62.desktop
|
||||||
|
x-scheme-handler/chrome=firefox.desktop
|
||||||
|
application/x-extension-htm=firefox.desktop
|
||||||
|
application/x-extension-html=firefox.desktop
|
||||||
|
application/x-extension-shtml=firefox.desktop
|
||||||
|
application/x-extension-xhtml=firefox.desktop
|
||||||
|
application/x-extension-xht=firefox.desktop
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
music_directory "~/Music"
|
music_directory "~/music"
|
||||||
playlist_directory "~/.config/mpd/playlists"
|
playlist_directory "~/.config/mpd/playlists"
|
||||||
|
|
||||||
auto_update "yes"
|
auto_update "yes"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
ncmpcpp_directory = "~/.config/ncmpcpp"
|
ncmpcpp_directory = "~/.config/ncmpcpp"
|
||||||
lyrics_directory = "~/.local/share/lyrics"
|
lyrics_directory = "~/.local/share/lyrics"
|
||||||
mpd_music_dir = "~/Music"
|
mpd_music_dir = "~/music"
|
||||||
message_delay_time = "1"
|
message_delay_time = "1"
|
||||||
visualizer_type = "spectrum"
|
visualizer_type = "spectrum"
|
||||||
song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
|
song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
[Appearance]
|
[Appearance]
|
||||||
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
|
color_scheme_path=/home/mike/.config/qt5ct/colors/rose-pine.conf
|
||||||
custom_palette=false
|
custom_palette=true
|
||||||
icon_theme=Papirus-Light
|
icon_theme=Papirus-Light
|
||||||
standard_dialogs=default
|
standard_dialogs=default
|
||||||
style=kvantum-dark
|
style=Windows
|
||||||
|
|
||||||
[Fonts]
|
[Fonts]
|
||||||
fixed="Noto Sans,10,-1,5,50,0,0,0,0,0,Regular"
|
fixed="Noto Sans,10,-1,5,50,0,0,0,0,0,Regular"
|
||||||
@@ -25,7 +25,7 @@ underline_shortcut=1
|
|||||||
wheel_scroll_lines=3
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
[SettingsWindow]
|
[SettingsWindow]
|
||||||
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\x1h\0\0\t\xd5\0\0\x6\xb3\0\0\0\0\0\0\x1h\0\0\t\xd5\0\0\x6\xb3\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\x1h\0\0\t\xd5\0\0\x6\xb3)
|
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\a\x9e\0\0\0\x34\0\0\x11\x61\0\0\x5\x95\0\0\a\x9e\0\0\0\x34\0\0\x11\x61\0\0\x5\x95\0\0\0\0\0\0\0\0\n\0\0\0\a\x9e\0\0\0\x34\0\0\x11\x61\0\0\x5\x95)
|
||||||
|
|
||||||
[Troubleshooting]
|
[Troubleshooting]
|
||||||
force_raster_widgets=1
|
force_raster_widgets=1
|
||||||
|
|||||||
367
.config/rio/config.toml
Normal file
@@ -0,0 +1,367 @@
|
|||||||
|
|
||||||
|
# Hide the cursor while typing
|
||||||
|
#
|
||||||
|
# Default is `false`
|
||||||
|
#
|
||||||
|
# hide-cursor-when-typing = false
|
||||||
|
|
||||||
|
# Ignore theme selection foreground color
|
||||||
|
#
|
||||||
|
# Default is false
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# ignore-selection-foreground-color = false
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
#
|
||||||
|
# It makes Rio look for the specified theme in the themes folder
|
||||||
|
# (macos and linux: ~/.config/rio/themes/dracula.toml)
|
||||||
|
# (windows: C:\Users\USER\AppData\Local\rio\themes\dracula.toml)
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# theme = "dracula"
|
||||||
|
|
||||||
|
# Padding-x
|
||||||
|
#
|
||||||
|
# define x axis padding (default is 0)
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
padding-x = 10
|
||||||
|
|
||||||
|
# Padding-y
|
||||||
|
#
|
||||||
|
# define y axis padding based on a format [top, bottom]
|
||||||
|
# (default is [0, 0])
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
padding-y = [10, 10]
|
||||||
|
|
||||||
|
# Option as Alt
|
||||||
|
#
|
||||||
|
# This config only works on MacOS.
|
||||||
|
# Possible choices: 'both', 'left' and 'right'.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# option-as-alt = 'left'
|
||||||
|
|
||||||
|
# Line height
|
||||||
|
#
|
||||||
|
# This option will apply an modifier to line-height
|
||||||
|
# Default is `1.0`
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# line-height = 1.2
|
||||||
|
|
||||||
|
# Startup directory
|
||||||
|
#
|
||||||
|
# Directory the shell is started in. If this is unset the working
|
||||||
|
# directory of the parent process will be used.
|
||||||
|
#
|
||||||
|
# This configuration only has effect if use-fork is disabled.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# working-dir = "/Users/raphael/Documents/"
|
||||||
|
|
||||||
|
# Environment variables
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# env-vars = []
|
||||||
|
|
||||||
|
# Use fork
|
||||||
|
#
|
||||||
|
# Defaults for POSIX-based systems (Windows is not configurable):
|
||||||
|
# MacOS: spawn processes
|
||||||
|
# Linux/BSD: fork processes
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# use-fork = false
|
||||||
|
|
||||||
|
# Confirm before exiting Rio
|
||||||
|
# Default is `true`
|
||||||
|
#
|
||||||
|
confirm-before-quit = false
|
||||||
|
|
||||||
|
# Cursor
|
||||||
|
#
|
||||||
|
# shape - Default cursor shape is 'block'
|
||||||
|
# Other available options are: 'underline', 'beam' or 'hidden'
|
||||||
|
#
|
||||||
|
# blinking - Whether the cursor blinks. The default is false
|
||||||
|
#
|
||||||
|
# blinking-interval - Cursor update on milliseconds interval
|
||||||
|
#
|
||||||
|
# [cursor]
|
||||||
|
# shape = 'block'
|
||||||
|
# blinking = false
|
||||||
|
# blinking-interval = 800
|
||||||
|
|
||||||
|
# Editor
|
||||||
|
#
|
||||||
|
# Default editor on Linux and MacOS is "vi",
|
||||||
|
# on Windows it is "notepad".
|
||||||
|
#
|
||||||
|
# Whenever the key binding `OpenConfigEditor` is triggered it will
|
||||||
|
# use the value of the editor along with the rio configuration path.
|
||||||
|
# [editor]
|
||||||
|
# program = "vi"
|
||||||
|
# args = []
|
||||||
|
|
||||||
|
# Window configuration
|
||||||
|
#
|
||||||
|
# • width - define the initial window width.
|
||||||
|
# Default: 600
|
||||||
|
#
|
||||||
|
# • height - define the initial window height.
|
||||||
|
# Default: 400
|
||||||
|
#
|
||||||
|
# • mode - define how the window will be created
|
||||||
|
# - "Windowed" (default) is based on width and height
|
||||||
|
# - "Maximized" window is created with maximized
|
||||||
|
# - "Fullscreen" window is created with fullscreen
|
||||||
|
#
|
||||||
|
# • opacity - Set window opacity
|
||||||
|
#
|
||||||
|
# • blur - Set blur on the window background. Changing this config requires restarting Rio to take effect.
|
||||||
|
#
|
||||||
|
# • decorations - Set window decorations, options: "Enabled", "Disabled", "Transparent", "Buttonless"
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [window]
|
||||||
|
# width = 600
|
||||||
|
# height = 400
|
||||||
|
# mode = "windowed"
|
||||||
|
# opacity = 1.0
|
||||||
|
# blur = false
|
||||||
|
# decorations = "enabled"
|
||||||
|
|
||||||
|
# Renderer
|
||||||
|
#
|
||||||
|
# • Performance: Set WGPU rendering performance
|
||||||
|
# - High: Adapter that has the highest performance. This is often a discrete GPU.
|
||||||
|
# - Low: Adapter that uses the least possible power. This is often an integrated GPU.
|
||||||
|
#
|
||||||
|
# • Backend: Set WGPU rendering backend
|
||||||
|
# - Automatic: Leave Sugarloaf/WGPU to decide
|
||||||
|
# - GL: Supported on Linux/Android, and Windows and macOS/iOS via ANGLE
|
||||||
|
# - Vulkan: Supported on Windows, Linux/Android
|
||||||
|
# - DX12: Supported on Windows 10
|
||||||
|
# - Metal: Supported on macOS/iOS
|
||||||
|
#
|
||||||
|
# • disable-unfocused-render: This property disable renderer processes while Rio is unfocused.
|
||||||
|
#
|
||||||
|
# • level: Configure renderer level
|
||||||
|
# - Available options: 0 and 1.
|
||||||
|
# Higher the level more rendering features and computations
|
||||||
|
# will be done like enable font ligatures or emoji support.
|
||||||
|
# For more information please check the docs.
|
||||||
|
#
|
||||||
|
# • filters: A list of paths to RetroArch slang shaders. Might not work with OpenGL.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [renderer]
|
||||||
|
# performance = "high"
|
||||||
|
# backend = "automatic"
|
||||||
|
# disable-unfocused-render = false
|
||||||
|
# level = 1
|
||||||
|
# filters = []
|
||||||
|
|
||||||
|
# Keyboard
|
||||||
|
#
|
||||||
|
# use-kitty-keyboard-protocol - Enable Kitty Keyboard protocol
|
||||||
|
#
|
||||||
|
# disable-ctlseqs-alt - Disable ctlseqs with ALT keys
|
||||||
|
# - For example: Terminal.app does not deal with ctlseqs with ALT keys
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [keyboard]
|
||||||
|
# use-kitty-keyboard-protocol = false
|
||||||
|
# disable-ctlseqs-alt = false
|
||||||
|
|
||||||
|
# Fonts
|
||||||
|
#
|
||||||
|
# Configure fonts used by the terminal
|
||||||
|
#
|
||||||
|
# Note: You can set different font families but Rio terminal
|
||||||
|
# will always look for regular font bounds whene
|
||||||
|
#
|
||||||
|
# You can also set family on root to overwrite all fonts.
|
||||||
|
# [fonts]
|
||||||
|
# family = "cascadiamono"
|
||||||
|
#
|
||||||
|
# You can also specify extra fonts to load
|
||||||
|
# [fonts]
|
||||||
|
# extras = [{ family = "Microsoft JhengHei" }]
|
||||||
|
#
|
||||||
|
# In case you want to specify any font feature:
|
||||||
|
# [fonts]
|
||||||
|
# features = ["ss02", "ss03", "ss05", "ss19"]
|
||||||
|
#
|
||||||
|
# Note: Font features do not have support to live reload on configuration,
|
||||||
|
# so to reflect your changes, you will need to close and reopen Rio.
|
||||||
|
#
|
||||||
|
# You can also disable font hinting. Font hinting is enabled by default.
|
||||||
|
# [fonts]
|
||||||
|
# hinting = false
|
||||||
|
#
|
||||||
|
# You can also map the specified Unicode codepoints to a particular font.
|
||||||
|
# [fonts]
|
||||||
|
# symbol-map = [
|
||||||
|
# { start = "2297", end = "2299", font-family = "Cascadia Code NF" }
|
||||||
|
# ]
|
||||||
|
#
|
||||||
|
# Simple example:
|
||||||
|
# [fonts]
|
||||||
|
# size = 18
|
||||||
|
#
|
||||||
|
# [fonts.regular]
|
||||||
|
# family = "cascadiamono"
|
||||||
|
# style = "Normal"
|
||||||
|
# weight = 400
|
||||||
|
#
|
||||||
|
# [fonts.bold]
|
||||||
|
# family = "cascadiamono"
|
||||||
|
# style = "Normal"
|
||||||
|
# weight = 800
|
||||||
|
#
|
||||||
|
# [fonts.italic]
|
||||||
|
# family = "cascadiamono"
|
||||||
|
# style = "Italic"
|
||||||
|
# weight = 400
|
||||||
|
#
|
||||||
|
# [fonts.bold-italic]
|
||||||
|
# family = "cascadiamono"
|
||||||
|
# style = "Italic"
|
||||||
|
# weight = 800
|
||||||
|
|
||||||
|
# Scroll
|
||||||
|
#
|
||||||
|
# You can change how many lines are scrolled each time by setting this option.
|
||||||
|
#
|
||||||
|
# Scroll calculation for canonical mode will be based on `lines = (accumulated scroll * multiplier / divider)`,
|
||||||
|
# If you want a quicker scroll, keep increasing the multiplier.
|
||||||
|
# If you want to reduce scroll speed you will need to increase the divider.
|
||||||
|
# You can use both properties also to find the best scroll for you.
|
||||||
|
#
|
||||||
|
# Multiplier default is 3.0.
|
||||||
|
# Divider default is 1.0.
|
||||||
|
# Example:
|
||||||
|
# [scroll]
|
||||||
|
# multiplier = 3.0
|
||||||
|
# divider = 1.0
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
#
|
||||||
|
# "mode" - Define navigation mode
|
||||||
|
# • NativeTab (MacOS only)
|
||||||
|
# • Bookmark
|
||||||
|
# • BottomTab
|
||||||
|
# • TopTab
|
||||||
|
# • Plain
|
||||||
|
#
|
||||||
|
# "hide-if-single" - Hide navigation UI if is single.
|
||||||
|
# "clickable" - Enable click on tabs to switch.
|
||||||
|
# "use-current-path" - Use same path whenever a new tab is created (Note: requires `use-fork` to be set to false).
|
||||||
|
# "color-automation" - Set a specific color for the tab whenever a specific program is running, or in a specific directory.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [navigation]
|
||||||
|
# mode = "bookmark"
|
||||||
|
# clickable = false
|
||||||
|
# hide-if-single = true
|
||||||
|
# use-current-path = false
|
||||||
|
# color-automation = []
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
#
|
||||||
|
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||||
|
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) user login shell
|
||||||
|
# - (Linux/BSD) user login shell
|
||||||
|
# - (Windows) powershell
|
||||||
|
#
|
||||||
|
# Example 1 using fish shell from bin path:
|
||||||
|
#
|
||||||
|
# [shell]
|
||||||
|
# program = "/bin/fish"
|
||||||
|
# args = ["--login"]
|
||||||
|
#
|
||||||
|
# Example 2 for Windows using powershell
|
||||||
|
#
|
||||||
|
# [shell]
|
||||||
|
# program = "pwsh"
|
||||||
|
# args = []
|
||||||
|
#
|
||||||
|
# Example 3 for Windows using powershell with login
|
||||||
|
#
|
||||||
|
# [shell]
|
||||||
|
# program = "pwsh"
|
||||||
|
# args = ["-l"]
|
||||||
|
#
|
||||||
|
# Example 4 for MacOS with tmux installed by homebrew
|
||||||
|
#
|
||||||
|
# [shell]
|
||||||
|
# program = "/opt/homebrew/bin/tmux"
|
||||||
|
# args = ["new-session", "-c", "/var/www"]
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
#
|
||||||
|
# Colors definition will overwrite any property in theme
|
||||||
|
# (considering if theme folder does exists and is being used)
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [colors]
|
||||||
|
# background = '#0F0D0E'
|
||||||
|
# foreground = '#F9F4DA'
|
||||||
|
# cursor = '#F38BA3'
|
||||||
|
# tabs = '#443d40'
|
||||||
|
# tabs-active = '#F38BA3'
|
||||||
|
# green = '#0BA95B'
|
||||||
|
# red = '#ED203D'
|
||||||
|
# blue = '#12B5E5'
|
||||||
|
# yellow = '#FCBA28'
|
||||||
|
|
||||||
|
# Bindings
|
||||||
|
#
|
||||||
|
# Create custom Key bindings for Rio terminal
|
||||||
|
# More information in: https://raphamorim.io/rio/docs/key-bindings
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [bindings]
|
||||||
|
# keys = [
|
||||||
|
# { key = "q", with = "super", action = "Quit" },
|
||||||
|
# # Bytes[27, 91, 53, 126] is equivalent to "\x1b[5~"
|
||||||
|
# { key = "home", with = "super | shift", bytes = [27, 91, 53, 126] }
|
||||||
|
# ]
|
||||||
|
|
||||||
|
# Platform
|
||||||
|
#
|
||||||
|
# Rio now allows you to have different configurations per OS
|
||||||
|
# You can write ovewrite properties like `Shell`, `Navigation`
|
||||||
|
# and `Window`.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [shell]
|
||||||
|
# # default (in this case will be used only on MacOS)
|
||||||
|
# program = "/bin/fish"
|
||||||
|
# args = ["--login"]
|
||||||
|
#
|
||||||
|
# [platform]
|
||||||
|
# # Microsoft Windows overwrite
|
||||||
|
# windows.shell.program = "pwsh"
|
||||||
|
# windows.shell.args = ["-l"]
|
||||||
|
#
|
||||||
|
# # Linux overwrite
|
||||||
|
# linux.shell.program = "tmux"
|
||||||
|
# linux.shell.args = ["new-session", "-c", "/var/www"]
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
#
|
||||||
|
# This property enables log level filter and file. The default level is "OFF" and the logs are not logged to a file as default.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [developer]
|
||||||
|
# log-level = "OFF"
|
||||||
|
# enable-log-file = false
|
||||||
|
|
||||||
@@ -1 +1,136 @@
|
|||||||
@theme "/usr/share/rofi/themes/Arc.rasi"
|
@import "default"
|
||||||
|
|
||||||
|
* {
|
||||||
|
bg: #191724;
|
||||||
|
cur: #1f1d2e;
|
||||||
|
fgd: #e0def4;
|
||||||
|
cmt: #6e6a86;
|
||||||
|
cya: #9ccfd8;
|
||||||
|
grn: #31748f;
|
||||||
|
ora: #ebbcba;
|
||||||
|
pur: #c4a7e7;
|
||||||
|
red: #eb6f92;
|
||||||
|
yel: #f6c177;
|
||||||
|
|
||||||
|
font: "Cartograph CF 12";
|
||||||
|
|
||||||
|
foreground: @fgd;
|
||||||
|
background: @bg;
|
||||||
|
active-background: @grn;
|
||||||
|
urgent-background: @red;
|
||||||
|
|
||||||
|
selected-background: @active-background;
|
||||||
|
selected-urgent-background: @urgent-background;
|
||||||
|
selected-active-background: @active-background;
|
||||||
|
separatorcolor: @active-background;
|
||||||
|
bordercolor: @ora;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
background-color: @background;
|
||||||
|
border: 3;
|
||||||
|
border-radius: 6;
|
||||||
|
border-color: @bordercolor;
|
||||||
|
padding: 5;
|
||||||
|
}
|
||||||
|
#mainbox {
|
||||||
|
border: 0;
|
||||||
|
padding: 5;
|
||||||
|
}
|
||||||
|
#message {
|
||||||
|
border: 1px dash 0px 0px ;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
padding: 1px ;
|
||||||
|
}
|
||||||
|
#textbox {
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#listview {
|
||||||
|
fixed-height: 0;
|
||||||
|
border: 2px dash 0px 0px ;
|
||||||
|
border-color: @bordercolor;
|
||||||
|
spacing: 2px ;
|
||||||
|
scrollbar: false;
|
||||||
|
padding: 2px 0px 0px ;
|
||||||
|
}
|
||||||
|
#element {
|
||||||
|
border: 0;
|
||||||
|
padding: 1px ;
|
||||||
|
}
|
||||||
|
#element.normal.normal {
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.normal.urgent {
|
||||||
|
background-color: @urgent-background;
|
||||||
|
text-color: @urgent-foreground;
|
||||||
|
}
|
||||||
|
#element.normal.active {
|
||||||
|
background-color: @active-background;
|
||||||
|
text-color: @background;
|
||||||
|
}
|
||||||
|
#element.selected.normal {
|
||||||
|
background-color: @selected-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.selected.urgent {
|
||||||
|
background-color: @selected-urgent-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.selected.active {
|
||||||
|
background-color: @selected-active-background;
|
||||||
|
text-color: @background;
|
||||||
|
}
|
||||||
|
#element.alternate.normal {
|
||||||
|
background-color: @background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.alternate.urgent {
|
||||||
|
background-color: @urgent-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#element.alternate.active {
|
||||||
|
background-color: @active-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#scrollbar {
|
||||||
|
width: 2px ;
|
||||||
|
border: 0;
|
||||||
|
handle-width: 8px ;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#sidebar {
|
||||||
|
border: 2px dash 0px 0px ;
|
||||||
|
border-color: @separatorcolor;
|
||||||
|
}
|
||||||
|
#button.selected {
|
||||||
|
background-color: @selected-background;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#inputbar {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @foreground;
|
||||||
|
padding: 1px ;
|
||||||
|
}
|
||||||
|
#case-indicator {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @foreground;
|
||||||
|
}
|
||||||
|
#entry {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @cya;
|
||||||
|
}
|
||||||
|
#prompt {
|
||||||
|
spacing: 0;
|
||||||
|
text-color: @grn;
|
||||||
|
}
|
||||||
|
#inputbar {
|
||||||
|
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||||
|
}
|
||||||
|
#textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ":";
|
||||||
|
margin: 0px 0.3em 0em 0em;
|
||||||
|
text-color: @grn;
|
||||||
|
}
|
||||||
|
@theme "rose-pine"
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
xrandr --dpi 96 --output HDMI-0 --mode 1920x1080 --rate 60.00 --pos 0x360 --rotate normal \
|
xrandr --dpi 96 --output DP-0 --mode 2560x1440 --rate 74.92 --pos 4480x0 --rotate normal \
|
||||||
--output DP-0 --mode 2560x1440 --rate 74.92 --pos 4480x0 --rotate normal \
|
|
||||||
--output DP-2 --primary --mode 2560x1440 --rate 74.92 --pos 1920x0 --rotate normal
|
--output DP-2 --primary --mode 2560x1440 --rate 74.92 --pos 1920x0 --rotate normal
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[location]
|
[location]
|
||||||
lat = 50.15
|
lat = 50.27
|
||||||
lon = 18.82
|
lon = 19.04
|
||||||
|
|
||||||
[setter]
|
[setter]
|
||||||
# command = ['feh', '--bg-fill', '%f']
|
command = ['feh', '--bg-scale', '%f']
|
||||||
command = ['swww', 'img', '%f']
|
# command = ['swww', 'img', '%f']
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
# absolute path. No other format is supported.
|
# absolute path. No other format is supported.
|
||||||
#
|
#
|
||||||
XDG_DESKTOP_DIR="$HOME/"
|
XDG_DESKTOP_DIR="$HOME/Desktop"
|
||||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||||
XDG_TEMPLATES_DIR="$HOME/"
|
XDG_TEMPLATES_DIR="$HOME/Templates"
|
||||||
XDG_PUBLICSHARE_DIR="$HOME/"
|
XDG_PUBLICSHARE_DIR="$HOME/Public"
|
||||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
XDG_DOCUMENTS_DIR="$HOME/Documents"
|
||||||
XDG_MUSIC_DIR="$HOME/"
|
XDG_MUSIC_DIR="$HOME/Music"
|
||||||
XDG_PICTURES_DIR="$HOME/pictures"
|
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||||
XDG_VIDEOS_DIR="$HOME/"
|
XDG_VIDEOS_DIR="$HOME/Videos"
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
"cpu",
|
"cpu",
|
||||||
"memory",
|
"memory",
|
||||||
// "temperature",
|
// "temperature",
|
||||||
// "backlight",
|
"backlight",
|
||||||
// "keyboard-state",
|
// "keyboard-state",
|
||||||
// "battery",
|
"battery",
|
||||||
"clock",
|
"clock",
|
||||||
"tray",
|
"tray",
|
||||||
],
|
],
|
||||||
@@ -183,6 +183,7 @@
|
|||||||
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
|
"bat": "BAT0",
|
||||||
"states": {
|
"states": {
|
||||||
// "good": 95,
|
// "good": 95,
|
||||||
"warning": 30,
|
"warning": 30,
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ window#waybar.chromium {
|
|||||||
#backlight,
|
#backlight,
|
||||||
#network,
|
#network,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
|
#pulseaudio.muted,
|
||||||
|
#pulseaudio.bluetooth,
|
||||||
#wireplumber,
|
#wireplumber,
|
||||||
#custom-media,
|
#custom-media,
|
||||||
#tray,
|
#tray,
|
||||||
@@ -203,15 +205,12 @@ label:focus {
|
|||||||
background-color: #964B00;
|
background-color: #964B00;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#pulseaudio {
|
#pulseaudio,
|
||||||
|
#pulseaudio.muted,
|
||||||
|
#pulseaudio.bluetooth {
|
||||||
color: @cyan;
|
color: @cyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: #fbf1c7;
|
|
||||||
color: #af3a03;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
58
.config/wezterm/wezterm.lua
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
-- I recently switched from alacritty to wezterm. Supports mouse scrolling, has builtin emoji and multi-tab support. So far so good.
|
||||||
|
-- The config is in lua that I don't know much about. But the official doc has an example config to start with.
|
||||||
|
|
||||||
|
-- Pull in the wezterm API
|
||||||
|
local wezterm = require 'wezterm'
|
||||||
|
|
||||||
|
-- This table will hold the configuration.
|
||||||
|
local config = {}
|
||||||
|
|
||||||
|
-- In newer versions of wezterm, use the config_builder which will
|
||||||
|
-- help provide clearer error messages
|
||||||
|
if wezterm.config_builder then
|
||||||
|
config = wezterm.config_builder()
|
||||||
|
end
|
||||||
|
|
||||||
|
local act = wezterm.action
|
||||||
|
|
||||||
|
config.keys = {
|
||||||
|
{
|
||||||
|
key = 't',
|
||||||
|
mods = 'CMD|SHIFT',
|
||||||
|
action = act.ShowTabNavigator,
|
||||||
|
},
|
||||||
|
-- other keys
|
||||||
|
}
|
||||||
|
|
||||||
|
local theme = wezterm.plugin.require('https://github.com/neapsix/wezterm').main
|
||||||
|
|
||||||
|
-- This is where you actually apply your config choices
|
||||||
|
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- config.color_scheme = "rose-pine" -- Using custom Rose Pine theme
|
||||||
|
-- the font is named 'Source Code Pro ExtraLight', but I actually use the DemiBold weight. looks awesome
|
||||||
|
config.font = wezterm.font('Hack Nerd Font')
|
||||||
|
config.colors = theme.colors()
|
||||||
|
config.window_frame = theme.window_frame()
|
||||||
|
|
||||||
|
config.font_size = 14.0
|
||||||
|
config.line_height = 1.0
|
||||||
|
-- config.freetype_load_target = "Light"
|
||||||
|
-- config.freetype_render_target = "HorizontalLcd"
|
||||||
|
|
||||||
|
config.hide_tab_bar_if_only_one_tab = true
|
||||||
|
config.window_background_opacity = 0.80
|
||||||
|
|
||||||
|
config.foreground_text_hsb = {
|
||||||
|
hue = 1.0,
|
||||||
|
saturation = 1.0,
|
||||||
|
brightness = 1.0,
|
||||||
|
}
|
||||||
|
config.window_padding = {
|
||||||
|
left = 5,
|
||||||
|
right = 5,
|
||||||
|
top = 5,
|
||||||
|
bottom = 5,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- and finally, return the configuration to wezterm
|
||||||
|
return config
|
||||||
@@ -7,6 +7,11 @@
|
|||||||
// custom settings, run the `zed: Open Default Settings` command
|
// custom settings, run the `zed: Open Default Settings` command
|
||||||
// from the command palette
|
// from the command palette
|
||||||
{
|
{
|
||||||
|
"languages": {
|
||||||
|
"Rust": {
|
||||||
|
"show_edit_predictions": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"language_models": {
|
"language_models": {
|
||||||
"ollama": {
|
"ollama": {
|
||||||
"api_url": "http://localhost:11434"
|
"api_url": "http://localhost:11434"
|
||||||
@@ -16,8 +21,8 @@
|
|||||||
"buffer_font_size": 16,
|
"buffer_font_size": 16,
|
||||||
"theme": {
|
"theme": {
|
||||||
"mode": "system",
|
"mode": "system",
|
||||||
"light": "Catppuccin Latte",
|
"light": "Rosé Pine Dawn",
|
||||||
"dark": "Gruvbox Dark"
|
"dark": "Rosé Pine"
|
||||||
},
|
},
|
||||||
"telemetry": {
|
"telemetry": {
|
||||||
"diagnostics": false,
|
"diagnostics": false,
|
||||||
@@ -27,13 +32,13 @@
|
|||||||
"format_on_save": "on",
|
"format_on_save": "on",
|
||||||
"autosave": "on_window_change",
|
"autosave": "on_window_change",
|
||||||
"vim_mode": false,
|
"vim_mode": false,
|
||||||
"assistant": {
|
"agent": {
|
||||||
"default_model": {
|
"default_model": {
|
||||||
"provider": "ollama",
|
"provider": "copilot_chat",
|
||||||
"model": "mistral:7b-instruct-v0.3-q4_K_S"
|
"model": "gpt-4o"
|
||||||
},
|
},
|
||||||
"version": "2",
|
"version": "2",
|
||||||
"provider": null
|
"provider": "copilot_chat"
|
||||||
},
|
},
|
||||||
"lsp": {
|
"lsp": {
|
||||||
"rust-analyzer": {
|
"rust-analyzer": {
|
||||||
@@ -50,6 +55,13 @@
|
|||||||
{ "rule": "*", "severity": "warn" }
|
{ "rule": "*", "severity": "warn" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"pyright": {
|
||||||
|
"settings": {
|
||||||
|
"python": {
|
||||||
|
"pythonPath": ".venv/bin/python"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# TEMP ZED FIX
|
# TEMP ZED FIX
|
||||||
alias zed='env WEBKIT_DISABLE_DMABUF_RENDERER=1 zed '
|
alias zed='env WEBKIT_DISABLE_DMABUF_RENDERER=1 zed '
|
||||||
|
alias code='env ELECTRON_OZONE_PLATFORM_HINT=auto code '
|
||||||
|
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias cd..="cd .."
|
alias cd..="cd .."
|
||||||
|
|||||||
@@ -183,4 +183,5 @@ eval "$(zoxide init zsh)"
|
|||||||
|
|
||||||
# . "$HOME/.cargo/env"
|
# . "$HOME/.cargo/env"
|
||||||
|
|
||||||
. "/home/mike/.local/share/cargo/env"
|
. "$HOME/.local/share/cargo/env"
|
||||||
|
|
||||||
|
|||||||
315
.local/bin/dark
Executable file
@@ -0,0 +1,315 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set theme environment variable for current session and future sessions
|
||||||
|
export THEME="dark"
|
||||||
|
echo "export THEME=dark" > "$HOME/.theme_env"
|
||||||
|
|
||||||
|
# Update GTK theme using gsettings (more reliable)
|
||||||
|
if command -v gsettings >/dev/null 2>&1; then
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme "Rosepine-Dark"
|
||||||
|
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||||
|
gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update GTK configuration files directly
|
||||||
|
mkdir -p "$HOME/.config/gtk-3.0" "$HOME/.config/gtk-4.0"
|
||||||
|
|
||||||
|
# GTK 3 settings
|
||||||
|
cat > "$HOME/.config/gtk-3.0/settings.ini" << EOF
|
||||||
|
[Settings]
|
||||||
|
gtk-application-prefer-dark-theme=true
|
||||||
|
gtk-theme-name=Rosepine-Dark
|
||||||
|
gtk-icon-theme-name=Papirus-Dark
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# GTK 4 settings
|
||||||
|
cat > "$HOME/.config/gtk-4.0/settings.ini" << EOF
|
||||||
|
[Settings]
|
||||||
|
gtk-application-prefer-dark-theme=true
|
||||||
|
gtk-theme-name=Rosepine-Dark
|
||||||
|
gtk-icon-theme-name=Papirus-Dark
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# GTK 2 settings
|
||||||
|
cat > "$HOME/.gtkrc-2.0" << EOF
|
||||||
|
gtk-theme-name="Rosepine-Dark"
|
||||||
|
gtk-icon-theme-name="Papirus-Dark"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Configure xsettingsd for dynamic theme updates
|
||||||
|
mkdir -p "$HOME/.config/xsettingsd"
|
||||||
|
cat > "$HOME/.config/xsettingsd/xsettingsd.conf" << EOF
|
||||||
|
Net/ThemeName "Rosepine-Dark"
|
||||||
|
Net/IconThemeName "Papirus-Dark"
|
||||||
|
Gtk/CursorThemeName "Adwaita"
|
||||||
|
Net/EnableEventSounds 1
|
||||||
|
EnableInputFeedbackSounds 0
|
||||||
|
Xft/Antialias 1
|
||||||
|
Xft/Hinting 1
|
||||||
|
Xft/HintStyle "hintslight"
|
||||||
|
Xft/RGBA "rgb"
|
||||||
|
Net/DndDragThreshold 8
|
||||||
|
Gtk/CanChangeAccels 0
|
||||||
|
Gtk/ColorPalette "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"
|
||||||
|
Gtk/FontName "Ubuntu 11"
|
||||||
|
Gtk/IconSizes ""
|
||||||
|
Gtk/KeyThemeName ""
|
||||||
|
Gtk/ToolbarStyle "both"
|
||||||
|
Gtk/ToolbarIconSize "large-toolbar"
|
||||||
|
Gtk/MenuImages 1
|
||||||
|
Gtk/ButtonImages 1
|
||||||
|
Gtk/MenuBarAccel "F10"
|
||||||
|
Gtk/CursorBlinkTime 1200
|
||||||
|
Gtk/CursorThemeSize 24
|
||||||
|
Gtk/DecorationLayout "close,minimize,maximize:"
|
||||||
|
Gtk/DialogsUseHeader 1
|
||||||
|
Gtk/PrimaryButtonWarpsSlider 1
|
||||||
|
Gtk/RecentFilesMaxAge 30
|
||||||
|
Gtk/ShellShowsAppMenu 0
|
||||||
|
Gtk/ShellShowsDesktop 0
|
||||||
|
Gtk/ShellShowsMenubar 0
|
||||||
|
Gtk/ShowInputMethodMenu 1
|
||||||
|
Gtk/ShowUnicodeMenu 1
|
||||||
|
Gtk/TimeoutExpand 500
|
||||||
|
Gtk/TimeoutInitial 200
|
||||||
|
Gtk/TimeoutRepeat 50
|
||||||
|
Gtk/TitlebarDoubleClick "toggle_maximize"
|
||||||
|
Gtk/TitlebarMiddleClick "lower"
|
||||||
|
Gtk/TitlebarRightClick "menu"
|
||||||
|
Gtk/UseOverlayScrollbars 1
|
||||||
|
Gtk/ApplicationPreferDarkTheme 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Update Qt6 theme using qt6ct
|
||||||
|
if command -v qt6ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt6ct
|
||||||
|
mkdir -p "$HOME/.config/qt6ct/colors"
|
||||||
|
if [ -f "$HOME/.config/qt6ct/qt6ct.conf" ]; then
|
||||||
|
sed -i 's/^color_scheme_path=.*/color_scheme_path=\/home\/mike\/.config\/qt6ct\/colors\/rose-pine.conf/' "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
|
sed -i 's/^color_scheme=.*/color_scheme=rose-pine/' "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
|
else
|
||||||
|
# Create basic qt6ct config if it doesn't exist
|
||||||
|
cat > "$HOME/.config/qt6ct/qt6ct.conf" << EOF
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=/home/mike/.config/qt6ct/colors/rose-pine.conf
|
||||||
|
color_scheme=rose-pine
|
||||||
|
custom_palette=true
|
||||||
|
standard_dialogs=default
|
||||||
|
style=Fusion
|
||||||
|
|
||||||
|
[Fonts]
|
||||||
|
fixed=@Variant(\0\0\0@\0\0\0\x12\0M\0o\0n\0o\0s\0p\0\x61\0\x63\0\x65@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
general=@Variant(\0\0\0@\0\0\0\x12\0U\0\x62\0u\0n\0t\0u@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
|
||||||
|
[Interface]
|
||||||
|
activate_item_on_single_click=1
|
||||||
|
buttonbox_layout=0
|
||||||
|
cursor_flash_time=1000
|
||||||
|
dialog_buttons_have_icons=1
|
||||||
|
double_click_interval=400
|
||||||
|
gui_effects=@Invalid()
|
||||||
|
keyboard_scheme=2
|
||||||
|
menus_have_icons=true
|
||||||
|
show_shortcuts_in_context_menus=true
|
||||||
|
stylesheets=@Invalid()
|
||||||
|
toolbutton_style=4
|
||||||
|
underline_shortcut=1
|
||||||
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
|
[SettingsWindow]
|
||||||
|
geometry=@ByteArray()
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update Qt5 theme using qt5ct
|
||||||
|
if command -v qt5ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
|
mkdir -p "$HOME/.config/qt5ct/colors"
|
||||||
|
if [ -f "$HOME/.config/qt5ct/qt5ct.conf" ]; then
|
||||||
|
sed -i 's/^color_scheme_path=.*/color_scheme_path=\/home\/mike\/.config\/qt5ct\/colors\/rose-pine.conf/' "$HOME/.config/qt5ct/qt5ct.conf"
|
||||||
|
sed -i 's/^color_scheme=.*/color_scheme=rose-pine/' "$HOME/.config/qt5ct/qt5ct.conf"
|
||||||
|
else
|
||||||
|
# Create basic qt5ct config if it doesn't exist
|
||||||
|
cat > "$HOME/.config/qt5ct/qt5ct.conf" << EOF
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=/home/mike/.config/qt5ct/colors/rose-pine.conf
|
||||||
|
color_scheme=rose-pine
|
||||||
|
custom_palette=true
|
||||||
|
standard_dialogs=default
|
||||||
|
style=Fusion
|
||||||
|
|
||||||
|
[Fonts]
|
||||||
|
fixed=@Variant(\0\0\0@\0\0\0\x12\0M\0o\0n\0o\0s\0p\0\x61\0\x63\0\x65@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
general=@Variant(\0\0\0@\0\0\0\x12\0U\0\x62\0u\0n\0t\0u@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
|
||||||
|
[Interface]
|
||||||
|
activate_item_on_single_click=1
|
||||||
|
buttonbox_layout=0
|
||||||
|
cursor_flash_time=1000
|
||||||
|
dialog_buttons_have_icons=1
|
||||||
|
double_click_interval=400
|
||||||
|
gui_effects=@Invalid()
|
||||||
|
keyboard_scheme=2
|
||||||
|
menus_have_icons=true
|
||||||
|
show_shortcuts_in_context_menus=true
|
||||||
|
stylesheets=@Invalid()
|
||||||
|
toolbutton_style=4
|
||||||
|
underline_shortcut=1
|
||||||
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
|
[SettingsWindow]
|
||||||
|
geometry=@ByteArray()
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update Rofi theme
|
||||||
|
mkdir -p "$HOME/.config/rofi"
|
||||||
|
if [ -f "$HOME/.config/rofi/config.rasi" ]; then
|
||||||
|
# Update existing config.rasi
|
||||||
|
if grep -q "@theme" "$HOME/.config/rofi/config.rasi"; then
|
||||||
|
sed -i 's/@theme ".*"/@theme "rose-pine"/' "$HOME/.config/rofi/config.rasi"
|
||||||
|
else
|
||||||
|
echo '@theme "rose-pine"' >> "$HOME/.config/rofi/config.rasi"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Create new config.rasi with Rose Pine (dark) theme
|
||||||
|
cat > "$HOME/.config/rofi/config.rasi" << EOF
|
||||||
|
configuration {
|
||||||
|
modi: "drun,run,window";
|
||||||
|
show-icons: true;
|
||||||
|
icon-theme: "Papirus-Dark";
|
||||||
|
display-drun: "";
|
||||||
|
display-run: "";
|
||||||
|
display-window: "";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
disable-history: false;
|
||||||
|
hide-scrollbar: true;
|
||||||
|
sidebar-mode: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme "rose-pine"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update Wezterm theme
|
||||||
|
if [ -f "$HOME/.config/wezterm/wezterm.lua" ]; then
|
||||||
|
# Update Rose Pine theme variant to main (dark)
|
||||||
|
sed -i "s/local theme = wezterm\.plugin\.require('https:\/\/github\.com\/neapsix\/wezterm')\.\(main\|moon\|dawn\)/local theme = wezterm.plugin.require('https:\/\/github.com\/neapsix\/wezterm').main/" "$HOME/.config/wezterm/wezterm.lua"
|
||||||
|
# Also handle manual require statements
|
||||||
|
sed -i "s/local theme = require('lua\/rose-pine')\.\(main\|moon\|dawn\)/local theme = require('lua\/rose-pine').main/" "$HOME/.config/wezterm/wezterm.lua"
|
||||||
|
# Fallback for older color_scheme format
|
||||||
|
sed -i 's/config.color_scheme = .*/-- config.color_scheme = "rose-pine" -- Using custom Rose Pine theme/' "$HOME/.config/wezterm/wezterm.lua"
|
||||||
|
elif [ -f "$HOME/.wezterm.lua" ]; then
|
||||||
|
# Update Rose Pine theme variant to main (dark)
|
||||||
|
sed -i "s/local theme = wezterm\.plugin\.require('https:\/\/github\.com\/neapsix\/wezterm')\.\(main\|moon\|dawn\)/local theme = wezterm.plugin.require('https:\/\/github.com\/neapsix\/wezterm').main/" "$HOME/.wezterm.lua"
|
||||||
|
# Also handle manual require statements
|
||||||
|
sed -i "s/local theme = require('lua\/rose-pine')\.\(main\|moon\|dawn\)/local theme = require('lua\/rose-pine').main/" "$HOME/.wezterm.lua"
|
||||||
|
# Fallback for older color_scheme format
|
||||||
|
sed -i 's/config.color_scheme = .*/-- config.color_scheme = "rose-pine" -- Using custom Rose Pine theme/' "$HOME/.wezterm.lua"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set environment variables for current session
|
||||||
|
export THEME="dark"
|
||||||
|
export GTK_THEME="Rosepine-Dark:dark"
|
||||||
|
|
||||||
|
# Create theme indicator file for bar.sh to detect
|
||||||
|
echo "dark" > "$HOME/.current_theme"
|
||||||
|
|
||||||
|
# Verify the file was written
|
||||||
|
if [ "$(cat "$HOME/.current_theme")" = "dark" ]; then
|
||||||
|
echo "✓ Theme file updated to 'dark'"
|
||||||
|
else
|
||||||
|
echo "✗ Failed to update theme file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if bar is running
|
||||||
|
if pgrep -f "bar.sh" > /dev/null; then
|
||||||
|
echo "✓ Bar is running - theme should update immediately"
|
||||||
|
else
|
||||||
|
echo "⚠ Bar is not running - start it with: ~/repos/dwm/bar.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start or restart xsettingsd to apply theme changes dynamically
|
||||||
|
if command -v xsettingsd >/dev/null 2>&1; then
|
||||||
|
echo "Restarting xsettingsd for dynamic theme updates..."
|
||||||
|
# Kill existing xsettingsd
|
||||||
|
pkill xsettingsd >/dev/null 2>&1 || true
|
||||||
|
sleep 0.2
|
||||||
|
# Start xsettingsd with new configuration
|
||||||
|
nohup xsettingsd >/dev/null 2>&1 &
|
||||||
|
sleep 0.5
|
||||||
|
echo "✓ xsettingsd started with dark theme configuration"
|
||||||
|
else
|
||||||
|
echo "⚠ xsettingsd not found - install it for dynamic GTK theme updates"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart GTK settings daemon if using GNOME
|
||||||
|
if pgrep -x "gnome-session" >/dev/null; then
|
||||||
|
dbus-send --session --type=method_call --dest=org.gnome.SettingsDaemon.Color /org/gnome/SettingsDaemon/Color org.gnome.SettingsDaemon.Color.ApplySettings >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update theme state file for bar.sh
|
||||||
|
echo "dark" > "$HOME/.current_theme"
|
||||||
|
|
||||||
|
# Load dark theme Xresources and reload dwm colors
|
||||||
|
if [ -f "$HOME/.Xresources.dark" ]; then
|
||||||
|
echo "Loading dark theme Xresources..."
|
||||||
|
xrdb -merge "$HOME/.Xresources.dark"
|
||||||
|
|
||||||
|
# Send signal to dwm to reload colors (equivalent to Mod+Shift+F5)
|
||||||
|
# First try using xdotool to simulate the key combination
|
||||||
|
if command -v xdotool >/dev/null 2>&1; then
|
||||||
|
xdotool key --clearmodifiers Super_L+shift+F5 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Alternative: if you have dwm-msg or similar IPC tool
|
||||||
|
# dwm-msg run_command xrdb 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Refresh system tray icons and Qt applications
|
||||||
|
echo "Refreshing system tray and Qt applications..."
|
||||||
|
|
||||||
|
# Restart common tray applications to refresh their icons
|
||||||
|
for app in nm-applet blueman-applet pasystray; do
|
||||||
|
if pgrep "$app" >/dev/null; then
|
||||||
|
pkill "$app" 2>/dev/null
|
||||||
|
sleep 0.5
|
||||||
|
nohup "$app" >/dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Notify Qt applications of theme change
|
||||||
|
if command -v qt5ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
|
fi
|
||||||
|
if command -v qt6ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt6ct
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Notify about theme change
|
||||||
|
echo "Switched to Rose Pine (dark) theme"
|
||||||
|
|
||||||
|
# Update shell configuration to source theme on new terminals
|
||||||
|
if [ -n "$SHELL" ]; then
|
||||||
|
shell_name=$(basename "$SHELL")
|
||||||
|
case "$shell_name" in
|
||||||
|
"bash")
|
||||||
|
if ! grep -q "source.*\.theme_env" "$HOME/.bashrc" 2>/dev/null; then
|
||||||
|
echo "[ -f \"\$HOME/.theme_env\" ] && source \"\$HOME/.theme_env\"" >> "$HOME/.bashrc"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"fish")
|
||||||
|
mkdir -p "$HOME/.config/fish"
|
||||||
|
if ! grep -q "source.*\.theme_env" "$HOME/.config/fish/config.fish" 2>/dev/null; then
|
||||||
|
echo "[ -f \"\$HOME/.theme_env\" ] && source \"\$HOME/.theme_env\"" >> "$HOME/.config/fish/config.fish"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"zsh")
|
||||||
|
if ! grep -q "source.*\.theme_env" "$HOME/.zshrc" 2>/dev/null; then
|
||||||
|
echo "[ -f \"\$HOME/.theme_env\" ] && source \"\$HOME/.theme_env\"" >> "$HOME/.zshrc"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
316
.local/bin/light
Executable file
@@ -0,0 +1,316 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set theme environment variable for current session and future sessions
|
||||||
|
export THEME="light"
|
||||||
|
echo "export THEME=light" > "$HOME/.theme_env"
|
||||||
|
|
||||||
|
# Update GTK theme using gsettings (more reliable)
|
||||||
|
if command -v gsettings >/dev/null 2>&1; then
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme "Rosepine-Light"
|
||||||
|
gsettings set org.gnome.desktop.interface color-scheme "prefer-light"
|
||||||
|
gsettings set org.gnome.desktop.interface icon-theme "Papirus-Light"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update GTK configuration files directly
|
||||||
|
mkdir -p "$HOME/.config/gtk-3.0" "$HOME/.config/gtk-4.0"
|
||||||
|
|
||||||
|
# GTK 3 settings
|
||||||
|
cat > "$HOME/.config/gtk-3.0/settings.ini" << EOF
|
||||||
|
[Settings]
|
||||||
|
gtk-application-prefer-dark-theme=false
|
||||||
|
gtk-theme-name=Rosepine-Light
|
||||||
|
gtk-icon-theme-name=Papirus-Light
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# GTK 4 settings
|
||||||
|
cat > "$HOME/.config/gtk-4.0/settings.ini" << EOF
|
||||||
|
[Settings]
|
||||||
|
gtk-application-prefer-dark-theme=false
|
||||||
|
gtk-theme-name=Rosepine-Light
|
||||||
|
gtk-icon-theme-name=Papirus-Light
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# GTK 2 settings
|
||||||
|
cat > "$HOME/.gtkrc-2.0" << EOF
|
||||||
|
gtk-theme-name="Rosepine-Light"
|
||||||
|
gtk-icon-theme-name="Papirus-Light"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Configure xsettingsd for dynamic theme updates
|
||||||
|
mkdir -p "$HOME/.config/xsettingsd"
|
||||||
|
cat > "$HOME/.config/xsettingsd/xsettingsd.conf" << EOF
|
||||||
|
Net/ThemeName "Rosepine-Light"
|
||||||
|
Net/IconThemeName "Papirus-Light"
|
||||||
|
Gtk/CursorThemeName "Adwaita"
|
||||||
|
Net/EnableEventSounds 1
|
||||||
|
EnableInputFeedbackSounds 0
|
||||||
|
Xft/Antialias 1
|
||||||
|
Xft/Hinting 1
|
||||||
|
Xft/HintStyle "hintslight"
|
||||||
|
Xft/RGBA "rgb"
|
||||||
|
Net/DndDragThreshold 8
|
||||||
|
Gtk/CanChangeAccels 0
|
||||||
|
Gtk/ColorPalette "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"
|
||||||
|
Gtk/FontName "Ubuntu 11"
|
||||||
|
Gtk/IconSizes ""
|
||||||
|
Gtk/KeyThemeName ""
|
||||||
|
Gtk/ToolbarStyle "both"
|
||||||
|
Gtk/ToolbarIconSize "large-toolbar"
|
||||||
|
Gtk/MenuImages 1
|
||||||
|
Gtk/ButtonImages 1
|
||||||
|
Gtk/MenuBarAccel "F10"
|
||||||
|
Gtk/CursorBlinkTime 1200
|
||||||
|
Gtk/CursorThemeSize 24
|
||||||
|
Gtk/DecorationLayout "close,minimize,maximize:"
|
||||||
|
Gtk/DialogsUseHeader 1
|
||||||
|
Gtk/PrimaryButtonWarpsSlider 1
|
||||||
|
Gtk/RecentFilesMaxAge 30
|
||||||
|
Gtk/ShellShowsAppMenu 0
|
||||||
|
Gtk/ShellShowsDesktop 0
|
||||||
|
Gtk/ShellShowsMenubar 0
|
||||||
|
Gtk/ShowInputMethodMenu 1
|
||||||
|
Gtk/ShowUnicodeMenu 1
|
||||||
|
Gtk/TimeoutExpand 500
|
||||||
|
Gtk/TimeoutInitial 200
|
||||||
|
Gtk/TimeoutRepeat 50
|
||||||
|
Gtk/TitlebarDoubleClick "toggle_maximize"
|
||||||
|
Gtk/TitlebarMiddleClick "lower"
|
||||||
|
Gtk/TitlebarRightClick "menu"
|
||||||
|
Gtk/UseOverlayScrollbars 1
|
||||||
|
Gtk/ApplicationPreferDarkTheme 0
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Update Qt6 theme using qt6ct
|
||||||
|
if command -v qt6ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt6ct
|
||||||
|
mkdir -p "$HOME/.config/qt6ct/colors"
|
||||||
|
if [ -f "$HOME/.config/qt6ct/qt6ct.conf" ]; then
|
||||||
|
sed -i 's/^color_scheme_path=.*/color_scheme_path=\/home\/mike\/.config\/qt6ct\/colors\/rose-pine-dawn.conf/' "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
|
sed -i 's/^color_scheme=.*/color_scheme=rose-pine-dawn/' "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
|
else
|
||||||
|
# Create basic qt6ct config if it doesn't exist
|
||||||
|
cat > "$HOME/.config/qt6ct/qt6ct.conf" << EOF
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=/home/mike/.config/qt6ct/colors/rose-pine-dawn.conf
|
||||||
|
color_scheme=rose-pine-dawn
|
||||||
|
custom_palette=true
|
||||||
|
standard_dialogs=default
|
||||||
|
style=Fusion
|
||||||
|
|
||||||
|
[Fonts]
|
||||||
|
fixed=@Variant(\0\0\0@\0\0\0\x12\0M\0o\0n\0o\0s\0p\0\x61\0\x63\0\x65@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
general=@Variant(\0\0\0@\0\0\0\x12\0U\0\x62\0u\0n\0t\0u@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
|
||||||
|
[Interface]
|
||||||
|
activate_item_on_single_click=1
|
||||||
|
buttonbox_layout=0
|
||||||
|
cursor_flash_time=1000
|
||||||
|
dialog_buttons_have_icons=1
|
||||||
|
double_click_interval=400
|
||||||
|
gui_effects=@Invalid()
|
||||||
|
keyboard_scheme=2
|
||||||
|
menus_have_icons=true
|
||||||
|
show_shortcuts_in_context_menus=true
|
||||||
|
stylesheets=@Invalid()
|
||||||
|
toolbutton_style=4
|
||||||
|
underline_shortcut=1
|
||||||
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
|
[SettingsWindow]
|
||||||
|
geometry=@ByteArray()
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update Qt5 theme using qt5ct
|
||||||
|
if command -v qt5ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
|
mkdir -p "$HOME/.config/qt5ct/colors"
|
||||||
|
if [ -f "$HOME/.config/qt5ct/qt5ct.conf" ]; then
|
||||||
|
sed -i 's/^color_scheme_path=.*/color_scheme_path=\/home\/mike\/.config\/qt5ct\/colors\/rose-pine-dawn.conf/' "$HOME/.config/qt5ct/qt5ct.conf"
|
||||||
|
sed -i 's/^color_scheme=.*/color_scheme=rose-pine-dawn/' "$HOME/.config/qt5ct/qt5ct.conf"
|
||||||
|
else
|
||||||
|
# Create basic qt5ct config if it doesn't exist
|
||||||
|
cat > "$HOME/.config/qt5ct/qt5ct.conf" << EOF
|
||||||
|
[Appearance]
|
||||||
|
color_scheme_path=/home/mike/.config/qt5ct/colors/rose-pine-dawn.conf
|
||||||
|
color_scheme=rose-pine-dawn
|
||||||
|
custom_palette=true
|
||||||
|
standard_dialogs=default
|
||||||
|
style=Fusion
|
||||||
|
|
||||||
|
[Fonts]
|
||||||
|
fixed=@Variant(\0\0\0@\0\0\0\x12\0M\0o\0n\0o\0s\0p\0\x61\0\x63\0\x65@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
general=@Variant(\0\0\0@\0\0\0\x12\0U\0\x62\0u\0n\0t\0u@\"\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||||
|
|
||||||
|
[Interface]
|
||||||
|
activate_item_on_single_click=1
|
||||||
|
buttonbox_layout=0
|
||||||
|
cursor_flash_time=1000
|
||||||
|
dialog_buttons_have_icons=1
|
||||||
|
double_click_interval=400
|
||||||
|
gui_effects=@Invalid()
|
||||||
|
keyboard_scheme=2
|
||||||
|
menus_have_icons=true
|
||||||
|
show_shortcuts_in_context_menus=true
|
||||||
|
stylesheets=@Invalid()
|
||||||
|
toolbutton_style=4
|
||||||
|
underline_shortcut=1
|
||||||
|
wheel_scroll_lines=3
|
||||||
|
|
||||||
|
[SettingsWindow]
|
||||||
|
geometry=@ByteArray()
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update Rofi theme
|
||||||
|
mkdir -p "$HOME/.config/rofi"
|
||||||
|
if [ -f "$HOME/.config/rofi/config.rasi" ]; then
|
||||||
|
# Update existing config.rasi
|
||||||
|
if grep -q "@theme" "$HOME/.config/rofi/config.rasi"; then
|
||||||
|
sed -i 's/@theme ".*"/@theme "rose-pine-dawn"/' "$HOME/.config/rofi/config.rasi"
|
||||||
|
else
|
||||||
|
echo '@theme "rose-pine-dawn"' >> "$HOME/.config/rofi/config.rasi"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Create new config.rasi with Rose Pine Dawn (light) theme
|
||||||
|
cat > "$HOME/.config/rofi/config.rasi" << EOF
|
||||||
|
configuration {
|
||||||
|
modi: "drun,run,window";
|
||||||
|
show-icons: true;
|
||||||
|
icon-theme: "Papirus-Light";
|
||||||
|
display-drun: "";
|
||||||
|
display-run: "";
|
||||||
|
display-window: "";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
disable-history: false;
|
||||||
|
hide-scrollbar: true;
|
||||||
|
sidebar-mode: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme "rose-pine-dawn"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update Wezterm theme
|
||||||
|
if [ -f "$HOME/.config/wezterm/wezterm.lua" ]; then
|
||||||
|
# Update Rose Pine theme variant to dawn (light)
|
||||||
|
sed -i "s/local theme = wezterm\.plugin\.require('https:\/\/github\.com\/neapsix\/wezterm')\.\(main\|moon\|dawn\)/local theme = wezterm.plugin.require('https:\/\/github.com\/neapsix\/wezterm').dawn/" "$HOME/.config/wezterm/wezterm.lua"
|
||||||
|
# Also handle manual require statements
|
||||||
|
sed -i "s/local theme = require('lua\/rose-pine')\.\(main\|moon\|dawn\)/local theme = require('lua\/rose-pine').dawn/" "$HOME/.config/wezterm/wezterm.lua"
|
||||||
|
# Fallback for older color_scheme format
|
||||||
|
sed -i 's/config.color_scheme = .*/-- config.color_scheme = "rose-pine-dawn" -- Using custom Rose Pine theme/' "$HOME/.config/wezterm/wezterm.lua"
|
||||||
|
elif [ -f "$HOME/.wezterm.lua" ]; then
|
||||||
|
# Update Rose Pine theme variant to dawn (light)
|
||||||
|
sed -i "s/local theme = wezterm\.plugin\.require('https:\/\/github\.com\/neapsix\/wezterm')\.\(main\|moon\|dawn\)/local theme = wezterm.plugin.require('https:\/\/github.com\/neapsix\/wezterm').dawn/" "$HOME/.wezterm.lua"
|
||||||
|
# Also handle manual require statements
|
||||||
|
sed -i "s/local theme = require('lua\/rose-pine')\.\(main\|moon\|dawn\)/local theme = require('lua\/rose-pine').dawn/" "$HOME/.wezterm.lua"
|
||||||
|
# Fallback for older color_scheme format
|
||||||
|
sed -i 's/config.color_scheme = .*/-- config.color_scheme = "rose-pine-dawn" -- Using custom Rose Pine theme/' "$HOME/.wezterm.lua"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set environment variables for current session
|
||||||
|
export THEME="light"
|
||||||
|
export GTK_THEME=""
|
||||||
|
unset GTK_THEME # Unset to use theme from config files
|
||||||
|
|
||||||
|
# Create theme indicator file for bar.sh to detect
|
||||||
|
echo "light" > "$HOME/.current_theme"
|
||||||
|
|
||||||
|
# Verify the file was written
|
||||||
|
if [ "$(cat "$HOME/.current_theme")" = "light" ]; then
|
||||||
|
echo "✓ Theme file updated to 'light'"
|
||||||
|
else
|
||||||
|
echo "✗ Failed to update theme file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if bar is running
|
||||||
|
if pgrep -f "bar.sh" > /dev/null; then
|
||||||
|
echo "✓ Bar is running - theme should update immediately"
|
||||||
|
else
|
||||||
|
echo "⚠ Bar is not running - start it with: ~/repos/dwm/bar.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start or restart xsettingsd to apply theme changes dynamically
|
||||||
|
if command -v xsettingsd >/dev/null 2>&1; then
|
||||||
|
echo "Restarting xsettingsd for dynamic theme updates..."
|
||||||
|
# Kill existing xsettingsd
|
||||||
|
pkill xsettingsd >/dev/null 2>&1 || true
|
||||||
|
sleep 0.2
|
||||||
|
# Start xsettingsd with new configuration
|
||||||
|
nohup xsettingsd >/dev/null 2>&1 &
|
||||||
|
sleep 0.5
|
||||||
|
echo "✓ xsettingsd started with light theme configuration"
|
||||||
|
else
|
||||||
|
echo "⚠ xsettingsd not found - install it for dynamic GTK theme updates"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Restart GTK settings daemon if using GNOME
|
||||||
|
if pgrep -x "gnome-session" >/dev/null; then
|
||||||
|
dbus-send --session --type=method_call --dest=org.gnome.SettingsDaemon.Color /org/gnome/SettingsDaemon/Color org.gnome.SettingsDaemon.Color.ApplySettings >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update theme state file for bar.sh
|
||||||
|
echo "light" > "$HOME/.current_theme"
|
||||||
|
|
||||||
|
# Load light theme Xresources and reload dwm colors
|
||||||
|
if [ -f "$HOME/.Xresources.light" ]; then
|
||||||
|
echo "Loading light theme Xresources..."
|
||||||
|
xrdb -merge "$HOME/.Xresources.light"
|
||||||
|
|
||||||
|
# Send signal to dwm to reload colors (equivalent to Mod+Shift+F5)
|
||||||
|
# First try using xdotool to simulate the key combination
|
||||||
|
if command -v xdotool >/dev/null 2>&1; then
|
||||||
|
xdotool key --clearmodifiers Super_L+shift+F5 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Alternative: if you have dwm-msg or similar IPC tool
|
||||||
|
# dwm-msg run_command xrdb 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Refresh system tray icons and Qt applications
|
||||||
|
echo "Refreshing system tray and Qt applications..."
|
||||||
|
|
||||||
|
# Restart common tray applications to refresh their icons
|
||||||
|
for app in nm-applet blueman-applet pasystray; do
|
||||||
|
if pgrep "$app" >/dev/null; then
|
||||||
|
pkill "$app" 2>/dev/null
|
||||||
|
sleep 0.5
|
||||||
|
nohup "$app" >/dev/null 2>&1 &
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Notify Qt applications of theme change
|
||||||
|
if command -v qt5ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||||
|
fi
|
||||||
|
if command -v qt6ct >/dev/null 2>&1; then
|
||||||
|
export QT_QPA_PLATFORMTHEME=qt6ct
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Notify about theme change
|
||||||
|
echo "Switched to Rose Pine Dawn (light) theme"
|
||||||
|
|
||||||
|
# Update shell configuration to source theme on new terminals
|
||||||
|
if [ -n "$SHELL" ]; then
|
||||||
|
shell_name=$(basename "$SHELL")
|
||||||
|
case "$shell_name" in
|
||||||
|
"bash")
|
||||||
|
if ! grep -q "source.*\.theme_env" "$HOME/.bashrc" 2>/dev/null; then
|
||||||
|
echo "[ -f \"\$HOME/.theme_env\" ] && source \"\$HOME/.theme_env\"" >> "$HOME/.bashrc"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"fish")
|
||||||
|
mkdir -p "$HOME/.config/fish"
|
||||||
|
if ! grep -q "source.*\.theme_env" "$HOME/.config/fish/config.fish" 2>/dev/null; then
|
||||||
|
echo "[ -f \"\$HOME/.theme_env\" ] && source \"\$HOME/.theme_env\"" >> "$HOME/.config/fish/config.fish"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"zsh")
|
||||||
|
if ! grep -q "source.*\.theme_env" "$HOME/.zshrc" 2>/dev/null; then
|
||||||
|
echo "[ -f \"\$HOME/.theme_env\" ] && source \"\$HOME/.theme_env\"" >> "$HOME/.zshrc"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/bottom-active.png
Normal file
|
After Width: | Height: | Size: 144 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/bottom-inactive.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/bottom-left-active.png
Normal file
|
After Width: | Height: | Size: 195 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/bottom-left-inactive.png
Normal file
|
After Width: | Height: | Size: 184 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/bottom-right-active.png
Normal file
|
After Width: | Height: | Size: 176 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/bottom-right-inactive.png
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/close-active.png
Normal file
|
After Width: | Height: | Size: 900 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/close-inactive.png
Normal file
|
After Width: | Height: | Size: 808 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/close-prelight.png
Normal file
|
After Width: | Height: | Size: 903 B |
BIN
.themes/Rosepine-Dark-hdpi/xfwm4/close-pressed.png
Normal file
|
After Width: | Height: | Size: 864 B |