aboutsummaryrefslogtreecommitdiff
path: root/.config/fish
diff options
context:
space:
mode:
authordelta <darkussdelta@gmail.com>2023-03-04 22:04:55 +0100
committerdelta <darkussdelta@gmail.com>2023-03-04 22:18:21 +0100
commitf0b32f45746c026d402651013b7e98315d6956a1 (patch)
treef42609e98522da081cebdd21a674a702d1054bbc /.config/fish
parenta0f8b5fa6acdd1c2477fb1881dd9067956bf0ae6 (diff)
restructure awesome config, add fresnel
Diffstat (limited to '.config/fish')
-rw-r--r--.config/fish/bindings.fish1
-rw-r--r--.config/fish/colors.fish23
-rw-r--r--.config/fish/config.fish59
-rw-r--r--.config/fish/done_cfg.fish1
-rw-r--r--.config/fish/fish_variables34
-rw-r--r--.config/fish/functions/up-or-search.fish28
-rw-r--r--.config/fish/path.fish20
7 files changed, 166 insertions, 0 deletions
diff --git a/.config/fish/bindings.fish b/.config/fish/bindings.fish
new file mode 100644
index 0000000..1ed7313
--- /dev/null
+++ b/.config/fish/bindings.fish
@@ -0,0 +1 @@
+bind \b backward-kill-word
diff --git a/.config/fish/colors.fish b/.config/fish/colors.fish
new file mode 100644
index 0000000..de32d6d
--- /dev/null
+++ b/.config/fish/colors.fish
@@ -0,0 +1,23 @@
+# prompt
+set fish_color_normal white
+set fish_color_command white
+set fish_color_keyword blue
+set fish_color_quote yellow
+set fish_color_redirection yellow
+set fish_color_end pink
+set fish_color_error white
+set fish_color_param white
+set fish_color_valid_path white
+set fish_color_option white
+set fish_color_comment "#8893a5"
+set fish_color_operator white
+set fish_color_escape yellow
+set fish_color_autosuggestion "#8893a5"
+set fish_color_search_match --background=black
+
+# pager
+set fish_pager_color_progress "#8893a5"
+set fish_pager_color_prefix white
+set fish_pager_color_completion "#8893a5"
+set fish_pager_color_description "#8893a5"
+set fish_pager_color_selected_background --background=black
diff --git a/.config/fish/config.fish b/.config/fish/config.fish
new file mode 100644
index 0000000..2051e42
--- /dev/null
+++ b/.config/fish/config.fish
@@ -0,0 +1,59 @@
+# fish
+set -gx FISH_CFG $XDG_CONFIG_HOME/fish
+set -g fish_greeting
+source $FISH_CFG/path.fish
+set -gx LANG "en_US.UTF-8"
+
+# xdg
+set -gx XDG_CONFIG_HOME "$HOME/.config"
+set -gx XDG_CACHE_HOME "$HOME/.cache"
+set -gx XDG_DATA_HOME "$HOME/.local/share"
+set -gx XDG_STATE_HOME "$HOME/.local/state"
+
+# program
+set -gx EDITOR "nvim"
+set -gx VISUAL "lite-xl"
+set -gx PF_INFO "ascii title os wm editor shell kernel palette"
+set -gx BAT_THEME "ansi"
+set -gx PNPM_HOME "$HOME/.local/share/pnpm"
+set -gx GTK_USE_PORTAL 1
+set -gx LITE_SCALE 1.3
+
+# $PATH
+source $FISH_CFG/path.fish
+
+# colors
+source $FISH_CFG/colors.fish
+
+# bindings
+source $FISH_CFG/bindings.fish
+
+# configs
+source $FISH_CFG/done_cfg.fish
+
+# abbreviations & aliases
+abbr -a paru paru --limit 10
+abbr -a projects cd ~/DesktopTemp/RealProjects
+abbr -a gc git commit -m
+abbr -a ga git add
+abbr -a gcl git clone
+alias dots="git --git-dir=$HOME/.dots --work-tree=$HOME"
+alias sudo="doas"
+alias ls="ls --color=auto"
+function ssh
+ export TERM=xterm-color
+ /usr/bin/ssh $argv
+ export TERM=xterm-kitty
+end
+function multicd
+ echo (string repeat -n (math (string length -- $argv[1]) - 1) ../)
+end
+abbr -a dotdot --regex '^\.\.+$' --position anywhere --function multicd
+function last_history_item
+ echo $history[1]
+end
+abbr -a !! --position anywhere --function last_history_item
+
+# shell init
+eval "$(ssh-agent -c)"
+starship init fish | source
diff --git a/.config/fish/done_cfg.fish b/.config/fish/done_cfg.fish
new file mode 100644
index 0000000..1b8e154
--- /dev/null
+++ b/.config/fish/done_cfg.fish
@@ -0,0 +1 @@
+set -gx __done_exclude "lite-xl"
diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables
new file mode 100644
index 0000000..fc6415f
--- /dev/null
+++ b/.config/fish/fish_variables
@@ -0,0 +1,34 @@
+# This file contains fish universal variable definitions.
+# VERSION: 3.0
+SETUVAR __done_exclude:lite\x2dxl
+SETUVAR __fish_initialized:3400
+SETUVAR fish_color_autosuggestion:\x238893a5
+SETUVAR fish_color_cancel:\x2dr
+SETUVAR fish_color_command:white
+SETUVAR fish_color_comment:\x238893a5
+SETUVAR fish_color_cwd:green
+SETUVAR fish_color_cwd_root:red
+SETUVAR fish_color_end:pink
+SETUVAR fish_color_error:white
+SETUVAR fish_color_escape:yellow
+SETUVAR fish_color_history_current:\x2d\x2dbold
+SETUVAR fish_color_host:normal
+SETUVAR fish_color_host_remote:yellow
+SETUVAR fish_color_normal:white
+SETUVAR fish_color_operator:white
+SETUVAR fish_color_param:white
+SETUVAR fish_color_quote:yellow
+SETUVAR fish_color_redirection:yellow
+SETUVAR fish_color_search_match:\x2d\x2dbackground\x3dblack
+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:white
+SETUVAR fish_greeting:\x1d
+SETUVAR fish_key_bindings:fish_default_key_bindings
+SETUVAR fish_pager_color_completion:\x238893a5
+SETUVAR fish_pager_color_description:\x238893a5
+SETUVAR fish_pager_color_prefix:white
+SETUVAR fish_pager_color_progress:\x238893a5
+SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dblack
+SETUVAR fish_user_paths:/home/delta/\x2elocal/share/pnpm\x1e/home/delta/\x2elocal/bin\x1e/home/delta/\x2ecargo/bin\x1e/home/delta/\x2elocal/share/gem/ruby/3\x2e0\x2e0/bin\x1e/home/delta/\x2espicetify\x1e/home/delta/go/bin\x1e/home/delta/\x2edeno/bin
diff --git a/.config/fish/functions/up-or-search.fish b/.config/fish/functions/up-or-search.fish
new file mode 100644
index 0000000..11ef268
--- /dev/null
+++ b/.config/fish/functions/up-or-search.fish
@@ -0,0 +1,28 @@
+# Depending on cursor position and current mode, either search backward or move up one line"
+function up-or-search -d "Search back or move cursor up 1 line"
+ # If we are already in search mode, continue
+ if commandline --search-mode
+ commandline -f history-prefix-search-backward
+ return
+ end
+
+ # If we are navigating the pager, then up always navigates
+ if commandline --paging-mode
+ commandline -f up-line
+ return
+ end
+
+ # We are not already in search mode.
+ # If we are on the top line, start search mode,
+ # otherwise move up
+ set -l lineno (commandline -L)
+
+ switch $lineno
+ case 1
+ commandline -f history-prefix-search-backward
+
+ case '*'
+ commandline -f up-line
+ end
+end
+
diff --git a/.config/fish/path.fish b/.config/fish/path.fish
new file mode 100644
index 0000000..d0d3144
--- /dev/null
+++ b/.config/fish/path.fish
@@ -0,0 +1,20 @@
+alias fp="fish_add_path -a"
+
+# function pa
+# set -x PATH PATH $argv[1]
+# end
+#
+# function pp
+# set -x PATH $argv[1] PATH
+# end
+
+# ik this is not the "correct" way to set path but persistent path sucks
+
+fp $PNPM_HOME
+fp ~/.deno/bin
+fp ~/.local/bin
+fp ~/usr/bin
+fp ~/.cargo/bin
+fp ~/.local/share/gem/ruby/3.0.0/bin
+fp ~/.spicetify
+fp ~/go/bin