mirror of
https://github.com/szymon-jozef/superior_dotfiles.git
synced 2026-09-07 20:20:38 +02:00
Remove .config/kitty/theme.conf
Add .config/kitty/theme.conf Add .config/fish/completions/.keep Add .config/fish/conf.d/omf.fish Add .config/fish/fish_plugins Add .config/fish/fish_variables Add .config/fish/functions/cpc.fish Add .config/fish/functions/fish_prompt.1713041410.copy Add .config/fish/functions/fish_prompt.1711301070.copy Add .config/fish/functions/fish_prompt.fish Add .config/fish/functions/lsblk.fish Add .config/fish/functions/xampp_link.fish Add .config/fish/themes/Catppuccin Frappe.theme Add .config/fish/themes/Catppuccin Latte.theme Add .config/fish/themes/Catppuccin Macchiato.theme Add .config/fish/themes/Catppuccin Mocha.theme
This commit is contained in:
14
private_dot_config/private_fish/functions/cpc.fish
Normal file
14
private_dot_config/private_fish/functions/cpc.fish
Normal file
@@ -0,0 +1,14 @@
|
||||
function cpc
|
||||
if test (count $argv) -eq 1
|
||||
set filename (basename $argv[1] .cpp)
|
||||
g++ -o $filename $argv[1]
|
||||
if test -x $filename
|
||||
./$filename
|
||||
rm $filename
|
||||
else
|
||||
echo "Compilation failed."
|
||||
end
|
||||
else
|
||||
echo "Usage: cpc filename.cpp"
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,90 @@
|
||||
function fish_prompt
|
||||
set -l __last_command_exit_status $status
|
||||
|
||||
if not set -q -g __fish_arrow_functions_defined
|
||||
set -g __fish_arrow_functions_defined
|
||||
function _git_branch_name
|
||||
set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null)
|
||||
if set -q branch[1]
|
||||
echo (string replace -r '^refs/heads/' '' $branch)
|
||||
else
|
||||
echo (git rev-parse --short HEAD 2>/dev/null)
|
||||
end
|
||||
end
|
||||
|
||||
function _is_git_dirty
|
||||
not command git diff-index --cached --quiet HEAD -- &>/dev/null
|
||||
or not command git diff --no-ext-diff --quiet --exit-code &>/dev/null
|
||||
end
|
||||
|
||||
function _is_git_repo
|
||||
type -q git
|
||||
or return 1
|
||||
git rev-parse --git-dir >/dev/null 2>&1
|
||||
end
|
||||
|
||||
function _hg_branch_name
|
||||
echo (hg branch 2>/dev/null)
|
||||
end
|
||||
|
||||
function _is_hg_dirty
|
||||
set -l stat (hg status -mard 2>/dev/null)
|
||||
test -n "$stat"
|
||||
end
|
||||
|
||||
function _is_hg_repo
|
||||
fish_print_hg_root >/dev/null
|
||||
end
|
||||
|
||||
function _repo_branch_name
|
||||
_$argv[1]_branch_name
|
||||
end
|
||||
|
||||
function _is_repo_dirty
|
||||
_is_$argv[1]_dirty
|
||||
end
|
||||
|
||||
function _repo_type
|
||||
if _is_hg_repo
|
||||
echo hg
|
||||
return 0
|
||||
else if _is_git_repo
|
||||
echo git
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
set -l cyan (set_color -o cyan)
|
||||
set -l yellow (set_color -o yellow)
|
||||
set -l red (set_color -o red)
|
||||
set -l green (set_color -o green)
|
||||
set -l blue (set_color -o blue)
|
||||
set -l normal (set_color normal)
|
||||
|
||||
set -l arrow_color "$green"
|
||||
if test $__last_command_exit_status != 0
|
||||
set arrow_color "$red"
|
||||
end
|
||||
|
||||
set -l arrow "$arrow_color➜ "
|
||||
if fish_is_root_user
|
||||
set arrow "$arrow_color# "
|
||||
end
|
||||
|
||||
set -l cwd $cyan(basename (prompt_pwd))
|
||||
|
||||
set -l repo_info
|
||||
if set -l repo_type (_repo_type)
|
||||
set -l repo_branch $red(_repo_branch_name $repo_type)
|
||||
set repo_info "$blue $repo_type:($repo_branch$blue)"
|
||||
|
||||
if _is_repo_dirty $repo_type
|
||||
set -l dirty "$yellow ✗"
|
||||
set repo_info "$repo_info$dirty"
|
||||
end
|
||||
end
|
||||
|
||||
echo -n -s $arrow ' '$cwd $repo_info $normal ' '
|
||||
end
|
||||
@@ -0,0 +1,90 @@
|
||||
function fish_prompt
|
||||
set -l __last_command_exit_status $status
|
||||
|
||||
if not set -q -g __fish_arrow_functions_defined
|
||||
set -g __fish_arrow_functions_defined
|
||||
function _git_branch_name
|
||||
set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null)
|
||||
if set -q branch[1]
|
||||
echo (string replace -r '^refs/heads/' '' $branch)
|
||||
else
|
||||
echo (git rev-parse --short HEAD 2>/dev/null)
|
||||
end
|
||||
end
|
||||
|
||||
function _is_git_dirty
|
||||
not command git diff-index --cached --quiet HEAD -- &>/dev/null
|
||||
or not command git diff --no-ext-diff --quiet --exit-code &>/dev/null
|
||||
end
|
||||
|
||||
function _is_git_repo
|
||||
type -q git
|
||||
or return 1
|
||||
git rev-parse --git-dir >/dev/null 2>&1
|
||||
end
|
||||
|
||||
function _hg_branch_name
|
||||
echo (hg branch 2>/dev/null)
|
||||
end
|
||||
|
||||
function _is_hg_dirty
|
||||
set -l stat (hg status -mard 2>/dev/null)
|
||||
test -n "$stat"
|
||||
end
|
||||
|
||||
function _is_hg_repo
|
||||
fish_print_hg_root >/dev/null
|
||||
end
|
||||
|
||||
function _repo_branch_name
|
||||
_$argv[1]_branch_name
|
||||
end
|
||||
|
||||
function _is_repo_dirty
|
||||
_is_$argv[1]_dirty
|
||||
end
|
||||
|
||||
function _repo_type
|
||||
if _is_hg_repo
|
||||
echo hg
|
||||
return 0
|
||||
else if _is_git_repo
|
||||
echo git
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
set -l cyan (set_color -o cyan)
|
||||
set -l yellow (set_color -o yellow)
|
||||
set -l red (set_color -o red)
|
||||
set -l green (set_color -o green)
|
||||
set -l blue (set_color -o blue)
|
||||
set -l normal (set_color normal)
|
||||
|
||||
set -l arrow_color "$green"
|
||||
if test $__last_command_exit_status != 0
|
||||
set arrow_color "$red"
|
||||
end
|
||||
|
||||
set -l arrow "$arrow_color➜ "
|
||||
if fish_is_root_user
|
||||
set arrow "$arrow_color# "
|
||||
end
|
||||
|
||||
set -l cwd $cyan(basename (prompt_pwd))
|
||||
|
||||
set -l repo_info
|
||||
if set -l repo_type (_repo_type)
|
||||
set -l repo_branch $red(_repo_branch_name $repo_type)
|
||||
set repo_info "$blue $repo_type:($repo_branch$blue)"
|
||||
|
||||
if _is_repo_dirty $repo_type
|
||||
set -l dirty "$yellow ✗"
|
||||
set repo_info "$repo_info$dirty"
|
||||
end
|
||||
end
|
||||
|
||||
echo -n -s $arrow ' '$cwd $repo_info $normal ' '
|
||||
end
|
||||
90
private_dot_config/private_fish/functions/fish_prompt.fish
Normal file
90
private_dot_config/private_fish/functions/fish_prompt.fish
Normal file
@@ -0,0 +1,90 @@
|
||||
function fish_prompt
|
||||
set -l __last_command_exit_status $status
|
||||
|
||||
if not set -q -g __fish_arrow_functions_defined
|
||||
set -g __fish_arrow_functions_defined
|
||||
function _git_branch_name
|
||||
set -l branch (git symbolic-ref --quiet HEAD 2>/dev/null)
|
||||
if set -q branch[1]
|
||||
echo (string replace -r '^refs/heads/' '' $branch)
|
||||
else
|
||||
echo (git rev-parse --short HEAD 2>/dev/null)
|
||||
end
|
||||
end
|
||||
|
||||
function _is_git_dirty
|
||||
not command git diff-index --cached --quiet HEAD -- &>/dev/null
|
||||
or not command git diff --no-ext-diff --quiet --exit-code &>/dev/null
|
||||
end
|
||||
|
||||
function _is_git_repo
|
||||
type -q git
|
||||
or return 1
|
||||
git rev-parse --git-dir >/dev/null 2>&1
|
||||
end
|
||||
|
||||
function _hg_branch_name
|
||||
echo (hg branch 2>/dev/null)
|
||||
end
|
||||
|
||||
function _is_hg_dirty
|
||||
set -l stat (hg status -mard 2>/dev/null)
|
||||
test -n "$stat"
|
||||
end
|
||||
|
||||
function _is_hg_repo
|
||||
fish_print_hg_root >/dev/null
|
||||
end
|
||||
|
||||
function _repo_branch_name
|
||||
_$argv[1]_branch_name
|
||||
end
|
||||
|
||||
function _is_repo_dirty
|
||||
_is_$argv[1]_dirty
|
||||
end
|
||||
|
||||
function _repo_type
|
||||
if _is_hg_repo
|
||||
echo hg
|
||||
return 0
|
||||
else if _is_git_repo
|
||||
echo git
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
set -l cyan (set_color -o cyan)
|
||||
set -l yellow (set_color -o yellow)
|
||||
set -l red (set_color -o red)
|
||||
set -l green (set_color -o green)
|
||||
set -l blue (set_color -o blue)
|
||||
set -l normal (set_color normal)
|
||||
|
||||
set -l arrow_color "$green"
|
||||
if test $__last_command_exit_status != 0
|
||||
set arrow_color "$red"
|
||||
end
|
||||
|
||||
set -l arrow "$arrow_color➜ "
|
||||
if fish_is_root_user
|
||||
set arrow "$arrow_color# "
|
||||
end
|
||||
|
||||
set -l cwd $cyan(basename (prompt_pwd))
|
||||
|
||||
set -l repo_info
|
||||
if set -l repo_type (_repo_type)
|
||||
set -l repo_branch $red(_repo_branch_name $repo_type)
|
||||
set repo_info "$blue $repo_type:($repo_branch$blue)"
|
||||
|
||||
if _is_repo_dirty $repo_type
|
||||
set -l dirty "$yellow ✗"
|
||||
set repo_info "$repo_info$dirty"
|
||||
end
|
||||
end
|
||||
|
||||
echo -n -s $arrow ' '$cwd $repo_info $normal ' '
|
||||
end
|
||||
4
private_dot_config/private_fish/functions/lsblk.fish
Normal file
4
private_dot_config/private_fish/functions/lsblk.fish
Normal file
@@ -0,0 +1,4 @@
|
||||
function lsblk --description 'alias lsblk=lsblk -o NAME,SIZE,LABEL,FSTYPE,MOUNTPOINTS,TRAN'
|
||||
command lsblk -o NAME,SIZE,LABEL,FSTYPE,MOUNTPOINT,TRAN $argv
|
||||
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
function xampp_link --wraps='sudo ls -s /home/szymon/Dokumenty/kodowanie/piesio /opt/lampp/htdocs/piesio' --description 'alias xampp_link=sudo ls -s /home/szymon/Dokumenty/kodowanie/piesio /opt/lampp/htdocs/piesio'
|
||||
sudo ls -s /home/szymon/Dokumenty/kodowanie/piesio /opt/lampp/htdocs/piesio $argv
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user