summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fish2024/config.fish5
-rw-r--r--fish2024/fish_variables43
-rw-r--r--fish2024/functions/_extract_description_from_task.fish5
-rw-r--r--fish2024/functions/_mealplan.fish20
-rw-r--r--fish2024/functions/annex-sync.fish4
-rw-r--r--fish2024/functions/blog.fish4
-rw-r--r--fish2024/functions/bud.fish4
-rw-r--r--fish2024/functions/forge-logins.fish3
-rw-r--r--fish2024/functions/gitrepos.fish5
-rw-r--r--fish2024/functions/gloga.fish4
-rw-r--r--fish2024/functions/khal.fish4
-rw-r--r--fish2024/functions/khard.fish4
-rw-r--r--fish2024/functions/lookforsyncerrors.fish4
-rw-r--r--fish2024/functions/notes.fish4
-rw-r--r--fish2024/functions/t.fish4
-rw-r--r--fish2024/functions/thomeprojects.fish4
-rw-r--r--fish2024/functions/tkilled.fish4
-rw-r--r--fish2024/functions/tprojects.fish4
-rw-r--r--fish2024/functions/ttagged.fish4
-rw-r--r--fish2024/functions/ttoday.fish4
-rw-r--r--fish2024/functions/tuntagged.fish4
-rw-r--r--fish2024/functions/tworkprojects.fish4
-rw-r--r--fish2024/functions/vdirsyncer.fish4
-rw-r--r--fish2024/functions/xclip.fish4
24 files changed, 153 insertions, 0 deletions
diff --git a/fish2024/config.fish b/fish2024/config.fish
new file mode 100644
index 0000000..abe69b1
--- /dev/null
+++ b/fish2024/config.fish
@@ -0,0 +1,5 @@
+if status is-interactive
+ # Commands to run in interactive sessions can go here
+ set -gx EDITOR nvim
+ set -gx LEDGER_FILE $HOME/Budget/hledger/budget.ledger
+end
diff --git a/fish2024/fish_variables b/fish2024/fish_variables
new file mode 100644
index 0000000..d78358b
--- /dev/null
+++ b/fish2024/fish_variables
@@ -0,0 +1,43 @@
+# This file contains fish universal variable definitions.
+# VERSION: 3.0
+SETUVAR __fish_initialized:3400
+SETUVAR fish_color_autosuggestion:9C9C9C
+SETUVAR fish_color_cancel:\x2d\x2dreverse
+SETUVAR fish_color_command:F4F4F4
+SETUVAR fish_color_comment:B0B0B0
+SETUVAR fish_color_cwd:green
+SETUVAR fish_color_cwd_root:red
+SETUVAR fish_color_end:969696
+SETUVAR fish_color_error:FFA779
+SETUVAR fish_color_escape:00a6b2
+SETUVAR fish_color_history_current:\x2d\x2dbold
+SETUVAR fish_color_host:normal
+SETUVAR fish_color_host_remote:\x1d
+SETUVAR fish_color_keyword:\x1d
+SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
+SETUVAR fish_color_normal:normal
+SETUVAR fish_color_operator:00a6b2
+SETUVAR fish_color_option:\x1d
+SETUVAR fish_color_param:A0A0F0
+SETUVAR fish_color_quote:666A80
+SETUVAR fish_color_redirection:FAFAFA
+SETUVAR fish_color_search_match:bryellow\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_background:\x1d
+SETUVAR fish_pager_color_completion:normal
+SETUVAR fish_pager_color_description:B3A06D
+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_secondary_background:\x1d
+SETUVAR fish_pager_color_secondary_completion:\x1d
+SETUVAR fish_pager_color_secondary_description:\x1d
+SETUVAR fish_pager_color_secondary_prefix:\x1d
+SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
+SETUVAR fish_pager_color_selected_completion:\x1d
+SETUVAR fish_pager_color_selected_description:\x1d
+SETUVAR fish_pager_color_selected_prefix:\x1d
+SETUVAR fish_user_paths:/home/lemon/\x2elocal/bin
diff --git a/fish2024/functions/_extract_description_from_task.fish b/fish2024/functions/_extract_description_from_task.fish
new file mode 100644
index 0000000..0b82d9d
--- /dev/null
+++ b/fish2024/functions/_extract_description_from_task.fish
@@ -0,0 +1,5 @@
+function _extract_description_from_task --description 'Given a taskwarrior task ID, it returns the description of the task and adds it to clipboard'
+ set desc (task $argv[1] |grep Description |cut -d' ' -f4-)
+ echo $desc |xclip
+ echo $desc
+end
diff --git a/fish2024/functions/_mealplan.fish b/fish2024/functions/_mealplan.fish
new file mode 100644
index 0000000..30c8a20
--- /dev/null
+++ b/fish2024/functions/_mealplan.fish
@@ -0,0 +1,20 @@
+function _mealplan
+ #set -l cmd "grep Monday ~/Documents/Notes/2.Areas/Health/Breakfast_and_Lunch_Plan_IBD.md|cut -d: -f3"
+ if test -z $argv[1]
+ echo "Usage: mealplan <day> <meal>"
+ echo " day: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday"
+ echo " meal: b, l, t"
+ return
+ end
+
+ set -l day $argv[1]
+
+ if test $argv[2] = "b"
+ set -f meal "-f2"
+ else if test $argv[2] = "l"
+ set -f meal "-f3"
+ else if test $argv[2] = "t"
+ set -f meal "-f4"
+ end
+ echo (grep -i $day ~/Documents/Notes/2.Areas/Health/Breakfast_and_Lunch_Plan_IBD.md|cut -d: $meal)
+end
diff --git a/fish2024/functions/annex-sync.fish b/fish2024/functions/annex-sync.fish
new file mode 100644
index 0000000..39ac15c
--- /dev/null
+++ b/fish2024/functions/annex-sync.fish
@@ -0,0 +1,4 @@
+function annex-sync --wraps='cd ~/annex/ && git annex sync && cd -' --description 'alias annex-sync=cd ~/annex/ && git annex sync && cd -'
+ cd ~/annex/ && git annex sync && cd - $argv
+
+end
diff --git a/fish2024/functions/blog.fish b/fish2024/functions/blog.fish
new file mode 100644
index 0000000..16f2061
--- /dev/null
+++ b/fish2024/functions/blog.fish
@@ -0,0 +1,4 @@
+function blog --wraps='cd ~/code/html/yulqen.org' --description 'alias blog=cd ~/code/html/yulqen.org'
+ cd ~/code/html/yulqen.org $argv
+
+end
diff --git a/fish2024/functions/bud.fish b/fish2024/functions/bud.fish
new file mode 100644
index 0000000..28c2f31
--- /dev/null
+++ b/fish2024/functions/bud.fish
@@ -0,0 +1,4 @@
+function bud --wraps='cd ~/Budget/hledger' --description 'alias bud=cd ~/Budget/hledger'
+ cd ~/Budget/hledger $argv
+
+end
diff --git a/fish2024/functions/forge-logins.fish b/fish2024/functions/forge-logins.fish
new file mode 100644
index 0000000..67f538f
--- /dev/null
+++ b/fish2024/functions/forge-logins.fish
@@ -0,0 +1,3 @@
+function forge-logins --description 'Get logins on forge server - provide data as 10Feb2024 as first arg.'
+ ssh minecraft "find ~/forge-server/logs -name \*.gz -print0|xargs -0 zgrep \"joined the game\"|grep \"$argv[1]\"|awk '{print \$1, \$2, \$6}'|cut -d\":\" -f2-|cut -d\" \" -f2-|sed 's/]//'"
+end
diff --git a/fish2024/functions/gitrepos.fish b/fish2024/functions/gitrepos.fish
new file mode 100644
index 0000000..bf009a4
--- /dev/null
+++ b/fish2024/functions/gitrepos.fish
@@ -0,0 +1,5 @@
+function gitrepos --wraps='ssh git@joannalemon.com "tree -L 2 repositories"' --wraps='ssh git@joannalemon.com "find repositories/ -maxdepth 2 -type d|cut -d/ -f2-"' --description 'alias gitrepos=ssh git@joannalemon.com "find repositories/ -maxdepth 2 -type d|cut -d/ -f2-"'
+ # ssh git@joannalemon.com "tree -L 2 repositories" $argv
+ ssh git@joannalemon.com "find repositories/ -maxdepth 2 -type d|cut -d/ -f2-"
+
+end
diff --git a/fish2024/functions/gloga.fish b/fish2024/functions/gloga.fish
new file mode 100644
index 0000000..98da2aa
--- /dev/null
+++ b/fish2024/functions/gloga.fish
@@ -0,0 +1,4 @@
+function gloga --wraps='git log --oneline --decorate --graph --all' --description 'alias gloga=git log --oneline --decorate --graph --all'
+ git log --oneline --decorate --graph --all $argv
+
+end
diff --git a/fish2024/functions/khal.fish b/fish2024/functions/khal.fish
new file mode 100644
index 0000000..6181c55
--- /dev/null
+++ b/fish2024/functions/khal.fish
@@ -0,0 +1,4 @@
+function khal --wraps=/home/lemon/src/virtualenvs/khal-venv/bin/khal --description 'alias khal=/home/lemon/src/virtualenvs/khal-venv/bin/khal'
+ /home/lemon/src/virtualenvs/khal-venv/bin/khal $argv
+
+end
diff --git a/fish2024/functions/khard.fish b/fish2024/functions/khard.fish
new file mode 100644
index 0000000..bae9702
--- /dev/null
+++ b/fish2024/functions/khard.fish
@@ -0,0 +1,4 @@
+function khard --wraps='~/src/virtualenvs/khal-venv/bin/khard' --description 'alias khard=~/src/virtualenvs/khal-venv/bin/khard'
+ ~/src/virtualenvs/khal-venv/bin/khard $argv
+
+end
diff --git a/fish2024/functions/lookforsyncerrors.fish b/fish2024/functions/lookforsyncerrors.fish
new file mode 100644
index 0000000..55131fc
--- /dev/null
+++ b/fish2024/functions/lookforsyncerrors.fish
@@ -0,0 +1,4 @@
+function lookforsyncerrors --wraps='find . -iname "*sync*"' --description 'alias lookforsyncerrors=find . -iname "*sync*"'
+ find . -iname "*sync-conflict*" $argv
+
+end
diff --git a/fish2024/functions/notes.fish b/fish2024/functions/notes.fish
new file mode 100644
index 0000000..9ded8d2
--- /dev/null
+++ b/fish2024/functions/notes.fish
@@ -0,0 +1,4 @@
+function notes --wraps='cd /home/lemon/Documents/Notes/' --description 'alias notes=cd /home/lemon/Documents/Notes/'
+ cd /home/lemon/Documents/Notes/ $argv
+
+end
diff --git a/fish2024/functions/t.fish b/fish2024/functions/t.fish
new file mode 100644
index 0000000..c23e31c
--- /dev/null
+++ b/fish2024/functions/t.fish
@@ -0,0 +1,4 @@
+function t --wraps=task --description 'alias t=task'
+ task $argv
+
+end
diff --git a/fish2024/functions/thomeprojects.fish b/fish2024/functions/thomeprojects.fish
new file mode 100644
index 0000000..f6f8d49
--- /dev/null
+++ b/fish2024/functions/thomeprojects.fish
@@ -0,0 +1,4 @@
+function thomeprojects --wraps=task\ _unique\ project\|grep\ \"h\\.\" --description alias\ thomeprojects=task\ _unique\ project\|grep\ \"h\\.\"
+ task _unique project|grep "h\." $argv
+
+end
diff --git a/fish2024/functions/tkilled.fish b/fish2024/functions/tkilled.fish
new file mode 100644
index 0000000..2d89ec6
--- /dev/null
+++ b/fish2024/functions/tkilled.fish
@@ -0,0 +1,4 @@
+function tkilled --wraps='task +killlist list' --description 'alias tkilled=task +killlist list'
+ task +killlist list $argv
+
+end
diff --git a/fish2024/functions/tprojects.fish b/fish2024/functions/tprojects.fish
new file mode 100644
index 0000000..e3eef8e
--- /dev/null
+++ b/fish2024/functions/tprojects.fish
@@ -0,0 +1,4 @@
+function tprojects --wraps='task rc.list.all.projects=1 projects' --description 'alias tprojects=task rc.list.all.projects=1 projects'
+ task rc.list.all.projects=1 projects $argv
+
+end
diff --git a/fish2024/functions/ttagged.fish b/fish2024/functions/ttagged.fish
new file mode 100644
index 0000000..5ee8596
--- /dev/null
+++ b/fish2024/functions/ttagged.fish
@@ -0,0 +1,4 @@
+function ttagged --wraps='task tags.any: list' --description 'alias ttagged=task tags.any: list'
+ task tags.any: list $argv
+
+end
diff --git a/fish2024/functions/ttoday.fish b/fish2024/functions/ttoday.fish
new file mode 100644
index 0000000..e9c62fc
--- /dev/null
+++ b/fish2024/functions/ttoday.fish
@@ -0,0 +1,4 @@
+function ttoday --wraps='task ml_due_or_scheduled_today' --description 'alias ttoday=task ml_due_or_scheduled_today'
+ task ml_due_or_scheduled_today $argv
+
+end
diff --git a/fish2024/functions/tuntagged.fish b/fish2024/functions/tuntagged.fish
new file mode 100644
index 0000000..6569130
--- /dev/null
+++ b/fish2024/functions/tuntagged.fish
@@ -0,0 +1,4 @@
+function tuntagged --wraps='task tags.none: list' --description 'alias tuntagged=task tags.none: list'
+ task tags.none: list $argv
+
+end
diff --git a/fish2024/functions/tworkprojects.fish b/fish2024/functions/tworkprojects.fish
new file mode 100644
index 0000000..2890978
--- /dev/null
+++ b/fish2024/functions/tworkprojects.fish
@@ -0,0 +1,4 @@
+function tworkprojects --wraps=task\ _unique\ project\|grep\ \"w\\.\" --description alias\ tworkprojects=task\ _unique\ project\|grep\ \"w\\.\"
+ task _unique project|grep "w\." $argv
+
+end
diff --git a/fish2024/functions/vdirsyncer.fish b/fish2024/functions/vdirsyncer.fish
new file mode 100644
index 0000000..6f12d53
--- /dev/null
+++ b/fish2024/functions/vdirsyncer.fish
@@ -0,0 +1,4 @@
+function vdirsyncer --wraps=/home/lemon/src/virtualenvs/khal-venv/bin/vdirsyncer --description 'alias vdirsyncer=/home/lemon/src/virtualenvs/khal-venv/bin/vdirsyncer'
+ /home/lemon/src/virtualenvs/khal-venv/bin/vdirsyncer $argv
+
+end
diff --git a/fish2024/functions/xclip.fish b/fish2024/functions/xclip.fish
new file mode 100644
index 0000000..b552ec6
--- /dev/null
+++ b/fish2024/functions/xclip.fish
@@ -0,0 +1,4 @@
+function xclip --description 'alias xclip=xclip -selection c'
+ command xclip -selection c $argv
+
+end