Initialize
This commit is contained in:
19
.config/fish/config.fish
Normal file
19
.config/fish/config.fish
Normal file
@@ -0,0 +1,19 @@
|
||||
set fish_greeting
|
||||
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
||||
oh-my-posh init fish --config $HOME/.config/ohmyposh/atomic.omp.json | source
|
||||
pokeget $(shuf -i 1-721 -n 1) --hide-name
|
||||
|
||||
alias ll="ls -lh"
|
||||
alias la="ls -lha"
|
||||
alias fulltree="tree -I \".git\" -a ."
|
||||
|
||||
alias burn-orphanage="pacman -Qqtd | sudo pacman -Rsu -"
|
||||
|
||||
alias cd..="cd .."
|
||||
alias girlboss="sudo"
|
||||
|
||||
alias vifish="vim $HOME/.config/fish/config.fish"
|
||||
31
.config/fish/fish_variables
Normal file
31
.config/fish/fish_variables
Normal file
@@ -0,0 +1,31 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:3800
|
||||
SETUVAR fish_color_autosuggestion:brblack
|
||||
SETUVAR fish_color_cancel:\x2dr
|
||||
SETUVAR fish_color_command:blue
|
||||
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
|
||||
36
.config/fish/functions/_read_confirm.fish
Normal file
36
.config/fish/functions/_read_confirm.fish
Normal file
@@ -0,0 +1,36 @@
|
||||
function _read_confirm
|
||||
# Parse arguments
|
||||
argparse --name _read_confirm 'p/prompt=' 'y/defaultyes' -- $argv or return
|
||||
# If prompt not set, do a default
|
||||
if test -z "$_flag_p"
|
||||
set _flag_p "Continue?"
|
||||
end
|
||||
|
||||
while true
|
||||
# declare variable
|
||||
set confirm ''
|
||||
|
||||
if test "$_flag_y"
|
||||
read -p 'set_color green; echo -n "$_flag_p [Y/n]: "; set_color normal' -l temp_conf
|
||||
# write to $confirm
|
||||
set confirm "$temp_conf"
|
||||
else
|
||||
read -p 'set_color green; echo -n "$_flag_p [y/N]: "; set_color normal' -l temp_conf
|
||||
set confirm "$temp_conf"
|
||||
end
|
||||
|
||||
switch $confirm
|
||||
case Y y
|
||||
return 0
|
||||
case N n
|
||||
return 1
|
||||
case ''
|
||||
if test "$_flag_y"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
18
.config/fish/functions/update_mirrorlist.fish
Normal file
18
.config/fish/functions/update_mirrorlist.fish
Normal file
@@ -0,0 +1,18 @@
|
||||
function update_mirrorlist
|
||||
if not _read_confirm -p 'Are you sure you want to update your mirrorlist?' -d
|
||||
return
|
||||
end
|
||||
|
||||
sudo -v
|
||||
|
||||
echo "Backing up old mirrorlist"
|
||||
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist_(date +%Y-%m-%d_%H-%M-%S).bak
|
||||
|
||||
echo "Generating new mirrorlist"
|
||||
sudo reflector -c DE --protocol https --sort rate --latest 50 --download-timeout 5 --threads 5 --save /etc/pacman.d/mirrorlist
|
||||
|
||||
echo "Updating mirrors"
|
||||
sudo pacman -Sy
|
||||
|
||||
echo Done
|
||||
end
|
||||
11
.config/fish/functions/whoseturn.fish
Normal file
11
.config/fish/functions/whoseturn.fish
Normal file
@@ -0,0 +1,11 @@
|
||||
function whoseturn
|
||||
set start_date (date -d "2025-01-01" +%s)
|
||||
set current_date (date +%s)
|
||||
set days_passed (math floor\((math $current_date - $start_date) / 86400\))
|
||||
|
||||
if test (math $days_passed % 2) -eq 0
|
||||
echo "Alex's turn"
|
||||
else
|
||||
echo "My turn"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user