From 363ba43bcc0ad547af28e6c68847e477b38758e6 Mon Sep 17 00:00:00 2001 From: PieckA Date: Fri, 7 Jun 2024 14:03:08 +0200 Subject: [PATCH 01/31] addet dev environment --- config.fish | 10 +++------- fish_variables | 2 ++ init/setup.fish | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/config.fish b/config.fish index 0b5522f..6fce20c 100644 --- a/config.fish +++ b/config.fish @@ -10,7 +10,7 @@ end # ╰───────────────────────────────────────────────────╯ # ────────────────────────────────────────< sources >────────────────────────────────────── -source $HOME/.config/fish/init/*.fish +# source $HOME/.config/fish/init/setup.fish # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) @@ -45,10 +45,6 @@ else end end end -# ─< set alias for clearl >───────────────────────────────────────────────────────────────── -if alias l >/dev/null 2>&1 - alias clearl="command clear && l" -end # ─< colored everything >─────────────────────────────────────────────────────────────────── alias ip="ip --color=always" @@ -110,7 +106,7 @@ if command -v git >/dev/null 2>&1 alias gc="git clone --recurse-submodule" alias ga="git add" alias gp="git pull --recurse-submodule" - alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" + # alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" alias gcm="git commit -m" alias gpu="git push --recurse-submodule=on-demand" end @@ -127,7 +123,7 @@ if command -v fastfetch >/dev/null 2>&1 alias f="fastfetch --config os" # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── case '*' - git clone https://git.k4li.de/mirror/fastfetch $HOME/.local/share/fastfetch >/dev/null 2>&1 + git clone https://git.k4li.de/mirrors/fastfetch $HOME/.local/share/fastfetch >/dev/null 2>&1 # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── exec fish end diff --git a/fish_variables b/fish_variables index 0b5fdad..3ebd35b 100644 --- a/fish_variables +++ b/fish_variables @@ -1,7 +1,9 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 +SETUVAR FISH_INSTALL:paru\x20install\x20\x2d\x2dnoconfirm SETUVAR __fish_initialized:3400 SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/autopair\x2efish\x1epatrickf1/fzf\x2efish\x1epatrickf1/colored_man_pages\x2efish +SETUVAR _fisher_upgraded_to_4_4:\x1d SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:005fd7 diff --git a/init/setup.fish b/init/setup.fish index ffce5bc..d60bae2 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -238,6 +238,6 @@ function check_fishr end # ────────────────────────────────────< setup some stuff >──────────────────────────────────── -upin -dep_fisher +#upin +#dep_fisher #check_fishr From 6181609d76cce87ddd79d7ab786d1a4dcc7ce020 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 8 Jun 2024 15:05:06 +0200 Subject: [PATCH 02/31] addet oh-my-posh --- zen.toml | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 zen.toml diff --git a/zen.toml b/zen.toml new file mode 100644 index 0000000..7edb6f0 --- /dev/null +++ b/zen.toml @@ -0,0 +1,74 @@ +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +final_space = true +console_title_template = '{{ .Shell }} in {{ .Folder }}' + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'path' + style = 'plain' + background = 'transparent' + foreground = 'blue' + template = '{{ .Path }}' + + [blocks.segments.properties] + style = 'full' + + [[blocks.segments]] + type = 'git' + style = 'plain' + foreground = 'p:grey' + background = 'transparent' + template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' + + [blocks.segments.properties] + branch_icon = '' + commit_icon = '@' + fetch_status = true + +[[blocks]] + type = 'rprompt' + overflow = 'hidden' + + [[blocks.segments]] + type = 'executiontime' + style = 'plain' + foreground = 'yellow' + background = 'transparent' + template = '{{ .FormattedMs }}' + + [blocks.segments.properties] + threshold = 5000 + +[[blocks]] + type = 'prompt' + alignment = 'left' + newline = true + + [[blocks.segments]] + type = 'text' + style = 'plain' + foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}magenta{{end}}", + ] + background = 'transparent' + template = '❯' + +[transient_prompt] + foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}magenta{{end}}", + ] + background = 'transparent' + template = '❯ ' + +[secondary_prompt] + foreground = 'magenta' + background = 'transparent' + template = '❯❯ ' From 7bebd83cbffcf3c6f2e03cfc6e7a2be114eaff6f Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 8 Jun 2024 15:06:36 +0200 Subject: [PATCH 03/31] addet oh-my-posh sourcing --- config.fish | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/config.fish b/config.fish index 0b5522f..eaf166f 100644 --- a/config.fish +++ b/config.fish @@ -150,14 +150,19 @@ if command -v zoxide >/dev/null 2>&1 end # ─< starship >───────────────────────────────────────────────────────────────────────────── -if command -v starship >/dev/null 2>&1 - function starship_transient_prompt_func - starship module character - end - starship init fish | source - enable_transience -else - curl -sS https://starship.rs/install.sh | sh && exec fish +# if command -v starship >/dev/null 2>&1 +# function starship_transient_prompt_func +# starship module character +# end +# starship init fish | source +# enable_transience +# else +# curl -sS https://starship.rs/install.sh | sh && exec fish +# end + +# ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── +if command -v oh-my-posh >/dev/null 2&>1 + oh-my-posh init fish --config ~/.config/fish/zen.toml | source end # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── From 70ff2485b3e5b78fcaa65d340a0fd694c32b1687 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 8 Jun 2024 15:17:58 +0200 Subject: [PATCH 04/31] bugfixes --- config.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.fish b/config.fish index eaf166f..72985ea 100644 --- a/config.fish +++ b/config.fish @@ -161,7 +161,7 @@ end # end # ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── -if command -v oh-my-posh >/dev/null 2&>1 +if command -v oh-my-posh >/dev/null 2>&1 oh-my-posh init fish --config ~/.config/fish/zen.toml | source end From 4560a48d5f07d6767d2782872dc7d43c16482c1f Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 8 Jun 2024 22:52:33 +0200 Subject: [PATCH 05/31] addet themes --- themes/bubbles.toml | 167 ++++++++++++++++++++++++++++++++++++++++ themes/hul10.toml | 124 +++++++++++++++++++++++++++++ themes/tokyo_storm.toml | 136 ++++++++++++++++++++++++++++++++ themes/zen.toml | 74 ++++++++++++++++++ 4 files changed, 501 insertions(+) create mode 100644 themes/bubbles.toml create mode 100644 themes/hul10.toml create mode 100644 themes/tokyo_storm.toml create mode 100644 themes/zen.toml diff --git a/themes/bubbles.toml b/themes/bubbles.toml new file mode 100644 index 0000000..00d1fb1 --- /dev/null +++ b/themes/bubbles.toml @@ -0,0 +1,167 @@ +"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" +final_space = true +version = 2 + +[[blocks]] +alignment = "right" +type = "prompt" + +[[blocks.segments]] +background = "#29315A" +foreground = "#E64747" +leading_diamond = "" +style = "diamond" +template = "{{ .UserName }}" +trailing_diamond = " " +type = "session" + +[[blocks.segments]] +background = "#29315A" +foreground = "#3EC669" +leading_diamond = "" +style = "diamond" +template = " {{ .Path }}" +trailing_diamond = "" +type = "path" + + [blocks.segments.properties] +style = "folder" + +[[blocks.segments]] +background = "#29315A" +foreground = "#43CCEA" +leading_diamond = " " +style = "diamond" +template = "{{ .HEAD }}" +trailing_diamond = "" +type = "git" + + [blocks.segments.properties] +branch_icon = "" + +[[blocks.segments]] +background = "#29315A" +foreground = "#E4F34A" +leading_diamond = " " +style = "diamond" +template = "{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}" +trailing_diamond = "" +type = "python" + + [blocks.segments.properties] +fetch_version = false + +[[blocks.segments]] +background = "#29315A" +foreground = "#7FD5EA" +leading_diamond = " " +style = "diamond" +template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" +trailing_diamond = "" +type = "go" + + [blocks.segments.properties] +fetch_version = false + +[[blocks.segments]] +background = "#29315A" +foreground = "#42E66C" +leading_diamond = " " +style = "diamond" +template = "{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}" +trailing_diamond = "" +type = "node" + + [blocks.segments.properties] +fetch_version = false + +[[blocks.segments]] +background = "#29315A" +foreground = "#E64747" +leading_diamond = " " +style = "diamond" +template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" +trailing_diamond = "" +type = "ruby" + + [blocks.segments.properties] +fetch_version = false + +[[blocks.segments]] +background = "#29315A" +foreground = "#E64747" +leading_diamond = " " +style = "diamond" +template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" +trailing_diamond = "" +type = "java" + + [blocks.segments.properties] +fetch_version = false + +[[blocks.segments]] +background = "#29315A" +foreground = "#9B6BDF" +leading_diamond = " " +style = "diamond" +template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " +trailing_diamond = "" +type = "julia" + + [blocks.segments.properties] +fetch_version = false + +[[blocks.segments]] +background = "#29315A" +foreground = "#9B6BDF" +foreground_templates = [ + "{{if eq \"Charging\" .State.String}}#40c4ff{{end}}", + "{{if eq \"Discharging\" .State.String}}#ff5722{{end}}", + "{{if eq \"Full\" .State.String}}#4caf50{{end}}" +] +leading_diamond = " " +style = "diamond" +template = "{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}" +trailing_diamond = "" +type = "battery" + + [blocks.segments.properties] +charged_icon = "• " +charging_icon = "⇡ " +discharging_icon = "⇣ " + +[[blocks]] +alignment = "left" +newline = true +type = "prompt" + +[[blocks.segments]] +background = "#29315A" +foreground = "#AEA4BF" +leading_diamond = "" +style = "diamond" +template = "{{ .FormattedMs }}" +trailing_diamond = " " +type = "executiontime" + + [blocks.segments.properties] +style = "austin" +threshold = 150 + +[[blocks.segments]] +background = "#29315A" +foreground = "#7FD5EA" +leading_diamond = "" +style = "diamond" +template = "❯" +trailing_diamond = "" +type = "text" + +[transient_prompt] +foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}magenta{{end}}", +] +background = 'transparent' +template = '❯ ' + diff --git a/themes/hul10.toml b/themes/hul10.toml new file mode 100644 index 0000000..7cb7778 --- /dev/null +++ b/themes/hul10.toml @@ -0,0 +1,124 @@ +"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" +console_title_template = "{{if .Root}}[root] {{end}}{{.Shell}} in <{{.Folder}}>" +final_space = true +version = 2 + +[palette] +white = "#f7f7f7" +black = "#111111" + +[transient_prompt] +foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}magenta{{end}}", +] +background = 'transparent' +template = '❯ ' + +[[blocks]] +type = "prompt" +alignment = "left" +newline = true + +[[blocks.segments]] +background = "transparent" +foreground = "p:white" +style = "plain" +template = "┌" +type = "text" + +[[blocks.segments]] +background = "#464646" +foreground = "p:white" +style = "plain" +template = " {{.Icon}}{{if .WSL}} (WSL){{end}}⠀" +type = "os" + + [blocks.segments.properties] +windows = "" +linux = "" +ubuntu = "" +macos = "" + +[[blocks.segments]] +background = "p:white" +foreground = "p:black" +style = "plain" +template = "  {{.Name}}⠀" +type = "shell" + +[[blocks.segments]] +background = "#ffe093" +foreground = "p:black" +style = "plain" +template = "  {{.HostName}}{{.UserName}}⠀" +type = "session" + +[[blocks.segments]] +background = "#ffffd6" +foreground = "p:black" +style = "plain" +template = "{{.HEAD}}⠀" +type = "git" + + [blocks.segments.properties] +branch_icon = "  " + +[[blocks]] +type = "prompt" +alignment = "right" + +[[blocks.segments]] +background = "transparent" +foreground = "#b3ffde" +style = "plain" +template = "{{.FormattedMs}}" +type = "executiontime" + + [blocks.segments.properties] +style = "austin" +threshold = 0 + +[[blocks.segments]] +background = "transparent" +foreground = "#b3ffde" +style = "plain" +template = " · {{.CurrentDate | date .Format}}" +type = "time" + + [blocks.segments.properties] +time_format = "02/01/06 15:04" + +[[blocks]] +type = "prompt" +alignment = "left" +newline = true + +[[blocks.segments]] +background = "transparent" +foreground = "p:white" +style = "plain" +template = "└<#93d0ff>[ {{.Path}} <#93d0ff>]" +type = "path" + + [blocks.segments.properties] +folder_icon = "" +folder_separator_template = "<#93d0ff> » " +home_icon = "" +style = "agnoster" + +[[blocks]] +type = "prompt" +alignment = "left" +newline = true + +[[blocks.segments]] +background = "transparent" +foreground = "#81ff91" +foreground_templates = [ "{{if gt .Code 0}}#ff3030{{end}}" ] +style = "plain" +template = "❯" +type = "status" + + [blocks.segments.properties] +always_enabled = true diff --git a/themes/tokyo_storm.toml b/themes/tokyo_storm.toml new file mode 100644 index 0000000..95efaca --- /dev/null +++ b/themes/tokyo_storm.toml @@ -0,0 +1,136 @@ +"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" +console_title_template = " {{ .Folder }} :: {{if .Root}}Admin{{end}}" +final_space = true +version = 2 +terminal_background = "p:t-background" + +[palette] +main-bg = "#24283b" +terminal-red = "#f7768e" +pistachio-green = "#9ece6a" +terminal-green = "#73daca" +terminal-yellow = "#e0af68" +terminal-blue = "#7aa2f7" +celeste-blue = "#b4f9f8" +light-sky-blue = "#7dcfff" +terminal-white = "#c0caf5" +white-blue = "#a9b1d6" +blue-bell = "#9aa5ce" +pastal-grey = "#cfc9c2" +terminal-magenta = "#bb9af7" +blue-black = "#565f89" +terminal-black = "#414868" +t-background = "p:main-bg" + +[[blocks]] +alignment = "left" +type = "prompt" + +[[blocks.segments]] +type = "text" +style = "plain" +background = "transparent" +foreground = "p:terminal-blue" +template = "➜ " + +[[blocks.segments]] +type = "path" +style = "plain" +foreground = "p:terminal-magenta" +template = "{{ .Path }} ⚡" + + [blocks.segments.properties] +style = "folder" + +[[blocks.segments]] +type = "git" +style = "plain" +foreground = "p:light-sky-blue" +foreground_templates = [ + "{{ if or (.Working.Changed) (.Staging.Changed) }}p:terminal-red{{ end }}", + "{{ if and (gt .Ahead 0) (gt .Behind 0)}}p:light-sky-blue {{ end }}", + "{{ if gt .Ahead 0 }}p:terminal-blue{{ end }}", + "{{ if gt .Behind 0 }}p:celeste-blue{{ end }}" +] +template = "({{ .HEAD}})" + + [blocks.segments.properties] +fetch_status = true +branch_icon = " " + +[[blocks.segments]] +type = "status" +style = "plain" +foreground = "p:terminal-red" +template = " " + +[[blocks]] +alignment = "right" +overflow = "hide" +type = "prompt" + +[[blocks.segments]] +type = "node" +style = "plain" +foreground = "p:pistachio-green" +template = " {{ .Full }} " + +[[blocks.segments]] +type = "php" +style = "plain" +foreground = "p:terminal-blue" +template = " {{ .Full }} " + +[[blocks.segments]] +type = "python" +style = "plain" +foreground = "p:terminal-yellow" +template = " {{ .Full }}" + +[[blocks.segments]] +type = "julia" +style = "plain" +foreground = "p:terminal-magenta" +template = " {{ .Full }}" + +[[blocks.segments]] +type = "ruby" +style = "plain" +foreground = "p:terminal-red" +template = " {{ .Full}}" + +[[blocks.segments]] +type = "go" +style = "plain" +foreground = "p:light-sky-blue" +template = "ﳑ {{ .Full}}" + +[[blocks.segments]] +type = "command" +style = "plain" +foreground = "p:white-blue" + + [blocks.segments.properties] +command = "git log --pretty=format:%cr -1 || date +%H:%M:%S" +shell = "bash" + +[[blocks]] +alignment = "left" +newline = true +type = "prompt" + +[[blocks.segments]] +foreground = "p:pistachio-green" +style = "plain" +template = "▶" +type = "text" + +[secondary_prompt] +background = "transparent" +foreground = "p:terminal-blue" +template = "➜ " + +[transient_prompt] +background = "p:t-background" +foreground = "p:terminal-blue" +template = "➜ " diff --git a/themes/zen.toml b/themes/zen.toml new file mode 100644 index 0000000..0800b9c --- /dev/null +++ b/themes/zen.toml @@ -0,0 +1,74 @@ +#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json + +version = 2 +final_space = true +console_title_template = '{{ .Shell }} in {{ .Folder }}' + +[[blocks]] +type = 'prompt' +alignment = 'left' +newline = true + +[[blocks.segments]] +type = 'path' +style = 'plain' +background = 'transparent' +foreground = 'blue' +template = '{{ .Path }}' + + [blocks.segments.properties] +style = 'full' + +[[blocks.segments]] +type = 'git' +style = 'plain' +foreground = 'p:grey' +background = 'transparent' +template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' + + [blocks.segments.properties] +branch_icon = '' +commit_icon = '@' +fetch_status = true + +[[blocks]] +type = 'rprompt' +overflow = 'hidden' + +[[blocks.segments]] +type = 'executiontime' +style = 'plain' +foreground = 'yellow' +background = 'transparent' +template = '{{ .FormattedMs }}' + + [blocks.segments.properties] +threshold = 5000 + +[[blocks]] +type = 'prompt' +alignment = 'left' +newline = true + +[[blocks.segments]] +type = 'text' +style = 'plain' +foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}magenta{{end}}", +] +background = 'transparent' +template = '❯' + +[transient_prompt] +foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}magenta{{end}}", +] +background = 'transparent' +template = '❯ ' + +[secondary_prompt] +foreground = 'magenta' +background = 'transparent' +template = '❯❯ ' From 04ddc3600a4231bacc59b1868cff30a26daa3b55 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 9 Jun 2024 09:45:15 +0200 Subject: [PATCH 06/31] set some themes --- config.fish | 2 +- themes/tokyo_storm.toml | 13 ++++---- zen.toml | 74 ----------------------------------------- 3 files changed, 8 insertions(+), 81 deletions(-) delete mode 100644 zen.toml diff --git a/config.fish b/config.fish index 72985ea..3825f2b 100644 --- a/config.fish +++ b/config.fish @@ -162,7 +162,7 @@ end # ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── if command -v oh-my-posh >/dev/null 2>&1 - oh-my-posh init fish --config ~/.config/fish/zen.toml | source + oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source end # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── diff --git a/themes/tokyo_storm.toml b/themes/tokyo_storm.toml index 95efaca..59416c3 100644 --- a/themes/tokyo_storm.toml +++ b/themes/tokyo_storm.toml @@ -5,7 +5,7 @@ version = 2 terminal_background = "p:t-background" [palette] -main-bg = "#24283b" +main-bg = "transparent" terminal-red = "#f7768e" pistachio-green = "#9ece6a" terminal-green = "#73daca" @@ -62,7 +62,7 @@ branch_icon = " " type = "status" style = "plain" foreground = "p:terminal-red" -template = " " +template = " " [[blocks]] alignment = "right" @@ -122,15 +122,16 @@ type = "prompt" [[blocks.segments]] foreground = "p:pistachio-green" style = "plain" -template = "▶" +template = "" type = "text" [secondary_prompt] background = "transparent" foreground = "p:terminal-blue" -template = "➜ " +template = " " [transient_prompt] -background = "p:t-background" +type = "status" +background = "transparent" foreground = "p:terminal-blue" -template = "➜ " +template = "" diff --git a/zen.toml b/zen.toml deleted file mode 100644 index 7edb6f0..0000000 --- a/zen.toml +++ /dev/null @@ -1,74 +0,0 @@ -#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json - -version = 2 -final_space = true -console_title_template = '{{ .Shell }} in {{ .Folder }}' - -[[blocks]] - type = 'prompt' - alignment = 'left' - newline = true - - [[blocks.segments]] - type = 'path' - style = 'plain' - background = 'transparent' - foreground = 'blue' - template = '{{ .Path }}' - - [blocks.segments.properties] - style = 'full' - - [[blocks.segments]] - type = 'git' - style = 'plain' - foreground = 'p:grey' - background = 'transparent' - template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' - - [blocks.segments.properties] - branch_icon = '' - commit_icon = '@' - fetch_status = true - -[[blocks]] - type = 'rprompt' - overflow = 'hidden' - - [[blocks.segments]] - type = 'executiontime' - style = 'plain' - foreground = 'yellow' - background = 'transparent' - template = '{{ .FormattedMs }}' - - [blocks.segments.properties] - threshold = 5000 - -[[blocks]] - type = 'prompt' - alignment = 'left' - newline = true - - [[blocks.segments]] - type = 'text' - style = 'plain' - foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}magenta{{end}}", - ] - background = 'transparent' - template = '❯' - -[transient_prompt] - foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}magenta{{end}}", - ] - background = 'transparent' - template = '❯ ' - -[secondary_prompt] - foreground = 'magenta' - background = 'transparent' - template = '❯❯ ' From 489af14d64a7c191f6ce9215c59e9d6ed8d0678a Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 9 Jun 2024 12:47:48 +0200 Subject: [PATCH 07/31] bugfixing --- config.fish | 20 +++++++------------- init/setup.fish | 4 ---- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/config.fish b/config.fish index 3825f2b..1e5a714 100644 --- a/config.fish +++ b/config.fish @@ -10,8 +10,12 @@ end # ╰───────────────────────────────────────────────────╯ # ────────────────────────────────────────< sources >────────────────────────────────────── -source $HOME/.config/fish/init/*.fish +source $HOME/.config/fish/init/setup.fish +# ────────────────────────────────────< setup some stuff >──────────────────────────────────── +upin +dep_fisher +# check_fishr # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) @@ -45,6 +49,7 @@ else end end end + # ─< set alias for clearl >───────────────────────────────────────────────────────────────── if alias l >/dev/null 2>&1 alias clearl="command clear && l" @@ -127,7 +132,7 @@ if command -v fastfetch >/dev/null 2>&1 alias f="fastfetch --config os" # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── case '*' - git clone https://git.k4li.de/mirror/fastfetch $HOME/.local/share/fastfetch >/dev/null 2>&1 + git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── exec fish end @@ -149,17 +154,6 @@ if command -v zoxide >/dev/null 2>&1 zoxide init fish | source end -# ─< starship >───────────────────────────────────────────────────────────────────────────── -# if command -v starship >/dev/null 2>&1 -# function starship_transient_prompt_func -# starship module character -# end -# starship init fish | source -# enable_transience -# else -# curl -sS https://starship.rs/install.sh | sh && exec fish -# end - # ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── if command -v oh-my-posh >/dev/null 2>&1 oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source diff --git a/init/setup.fish b/init/setup.fish index ffce5bc..0127d0c 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -237,7 +237,3 @@ function check_fishr end end -# ────────────────────────────────────< setup some stuff >──────────────────────────────────── -upin -dep_fisher -#check_fishr From 8bf0cbbe7295e85f4faa1a3739b709fd4e142a3e Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 9 Jun 2024 14:06:49 +0200 Subject: [PATCH 08/31] bugfixing --- themes/homelab.toml | 189 ++++++++++++++++++++++++++++++++++++++++ themes/tokyo_storm.toml | 13 ++- 2 files changed, 199 insertions(+), 3 deletions(-) create mode 100644 themes/homelab.toml diff --git a/themes/homelab.toml b/themes/homelab.toml new file mode 100644 index 0000000..1cebabb --- /dev/null +++ b/themes/homelab.toml @@ -0,0 +1,189 @@ +"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" +console_title_template = " {{ .Folder }} :: {{if .Root}}Admin{{end}}" +final_space = true +version = 2 +terminal_background = "p:t-background" + +[palette] +main-bg = "transparent" +terminal-red = "#f7768e" +pistachio-green = "#9ece6a" +terminal-green = "#73daca" +terminal-yellow = "#e0af68" +terminal-blue = "#7aa2f7" +celeste-blue = "#b4f9f8" +light-sky-blue = "#7dcfff" +terminal-white = "#c0caf5" +white-blue = "#a9b1d6" +blue-bell = "#9aa5ce" +pastal-grey = "#cfc9c2" +terminal-magenta = "#bb9af7" +blue-black = "#565f89" +terminal-black = "#414868" +t-background = "p:main-bg" + +[[blocks]] +alignment = "left" +type = "prompt" + +[[blocks.segments]] +type = "text" +style = "plain" +background = "transparent" +foreground = "p:terminal-blue" +template = "➜ " + +[[blocks.segments]] +type = "username" +style = "plain" +foreground = "#090c0c" +background = "#dc2b4b" +template = " {{ .User }}" + +[[blocks.segments]] +type = "hostname" +style = "plain" +background = "#d9647a" +foreground = "#090c0c" +template = " {{ .Host }} 󰿘 󰣀 " + +[[blocks.segments]] +type = "path" +style = "plain" +foreground = "#f4b9e8" +background = "#9d2163" +template = "{{ .Path }} ⚡" + + [blocks.segments.properties] +style = "folder" +truncation_length = 3 +truncation_symbol = "󰇘/" + +[[blocks.segments]] +type = "git" +style = "plain" +foreground = "#f289c1" +background = "#6d274d" +template = " {{ .HEAD }}" + + [blocks.segments.properties] +fetch_status = true +branch_icon = " " + +[[blocks.segments]] +type = "git_status" +style = "plain" +foreground = "#AC53EE" +background = "#6d274d" +template = "[[$all_status$ahead_behind]]" + +[[blocks.segments]] +type = "php" +style = "plain" +foreground = "#769ff0" +background = "#212736" +template = " {{ .Full }}" + +[[blocks.segments]] +type = "custom" +style = "plain" +foreground = "#5972e3" +template = "" + [blocks.segments.properties] +command = "echo " +files = ["Dockerfile", "dockerfile", "docker-compose.yml", "docker-compose.yaml", "compose.yml", "compose.yaml"] + +[[blocks.segments]] +type = "custom" +style = "plain" +foreground = "#AC53EE" +background = "#6d274d" +template = "" + [blocks.segments.properties] +command = "echo " +files = [".gitignore", ".gitmodules", ".git/"] + +[[blocks.segments]] +type = "cmd_duration" +style = "plain" +foreground = "#AC53EE" +background = "#3a1424" +template = "took 󱦟 {{ .Duration }}" + + [blocks.segments.properties] +min_time = 50 + +[[blocks.segments]] +type = "time" +style = "plain" +foreground = "#ed4f91" +background = "#3a1424" +template = "since  {{ .Time }}" + + [blocks.segments.properties] +time_format = "%R" # Hour:Minute Format + +[[blocks.segments]] +type = "character" +style = "plain" +foreground = "#53e67a" +template = "󰒍" + + [blocks.segments.properties] +success_symbol = "󰒍 󰨃" +error_symbol = "󰒎 󱈸󰨂" +vimcmd_symbol = "" + +[[blocks]] +alignment = "right" +overflow = "hide" +type = "prompt" + +[[blocks.segments]] +type = "node" +style = "plain" +foreground = "p:pistachio-green" +template = " {{ .Full }} " + +[[blocks.segments]] +type = "rust" +style = "plain" +foreground = "p:769ff0" +template = " {{ .Full }} " + +[[blocks.segments]] +type = "go" +style = "plain" +foreground = "p:light-sky-blue" +template = " {{ .Full }}" + +[[blocks.segments]] +type = "command" +style = "plain" +foreground = "p:white-blue" + + [blocks.segments.properties] +command = "git log --pretty=format:%cr -1 || date +%H:%M:%S" +shell = "bash" + +[[blocks]] +alignment = "left" +newline = true +type = "prompt" + +[[blocks.segments]] +foreground = "p:pistachio-green" +style = "plain" +template = "" +type = "text" + +[secondary_prompt] +background = "transparent" +foreground = "p:terminal-blue" +template = " " + +[transient_prompt] +type = "status" +background = "transparent" +foreground = "p:terminal-blue" +template = "" diff --git a/themes/tokyo_storm.toml b/themes/tokyo_storm.toml index 59416c3..f7ec40e 100644 --- a/themes/tokyo_storm.toml +++ b/themes/tokyo_storm.toml @@ -30,7 +30,7 @@ type = "prompt" type = "text" style = "plain" background = "transparent" -foreground = "p:terminal-blue" +foreground = "p:terminal-magenta" template = "➜ " [[blocks.segments]] @@ -120,8 +120,11 @@ newline = true type = "prompt" [[blocks.segments]] -foreground = "p:pistachio-green" style = "plain" +foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}green{{end}}", +] template = "" type = "text" @@ -133,5 +136,9 @@ template = " " [transient_prompt] type = "status" background = "transparent" -foreground = "p:terminal-blue" +foreground_templates = [ + "{{if gt .Code 0}}red{{end}}", + "{{if eq .Code 0}}green{{end}}", +] +# foreground = "p:terminal-blue" template = "" From 781cd9fd5d634f89559b4242eec27457f5bbf8d7 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 10 Jun 2024 11:30:20 +0200 Subject: [PATCH 09/31] addet lazygit alias --- config.fish | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config.fish b/config.fish index 1e5a714..7e52580 100644 --- a/config.fish +++ b/config.fish @@ -19,6 +19,12 @@ dep_fisher # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) +if command -v codium >/dev/null 2>&1 + alias code="codium" + set -e EDITOR + set -p EDITOR codium +end + # ─< colorized ls >───────────────────────────────────────────────────────────────────────── # ─< lsd >────────────────────────────────────────────────────────────────────────────────── if command -v lsd >/dev/null 2>&1 @@ -118,6 +124,9 @@ if command -v git >/dev/null 2>&1 alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" alias gcm="git commit -m" alias gpu="git push --recurse-submodule=on-demand" + if command -v lazygit >/dev/null 2>&1 + alias lg="lazygit" + end end # ─< fastfetch >──────────────────────────────────────────────────────────────────────────── From 7974f34e8af041bf246ec490cbdd0fac08bff604 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 10 Jun 2024 12:52:18 +0200 Subject: [PATCH 10/31] addet newline for tokyo_storm --- config.fish | 3 +++ themes/tokyo_storm.toml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/config.fish b/config.fish index 7e52580..c777e19 100644 --- a/config.fish +++ b/config.fish @@ -165,7 +165,10 @@ end # ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── if command -v oh-my-posh >/dev/null 2>&1 + # ─< tokyo-storm config >─────────────────────────────────────────────────────────────────── oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source + # ─< zen config >─────────────────────────────────────────────────────────────────────────── + # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source end # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── diff --git a/themes/tokyo_storm.toml b/themes/tokyo_storm.toml index f7ec40e..c9e0f5e 100644 --- a/themes/tokyo_storm.toml +++ b/themes/tokyo_storm.toml @@ -25,6 +25,7 @@ t-background = "p:main-bg" [[blocks]] alignment = "left" type = "prompt" +newline = true [[blocks.segments]] type = "text" @@ -127,6 +128,7 @@ foreground_templates = [ ] template = "" type = "text" +newline = true [secondary_prompt] background = "transparent" From 9cebfe766ffa1cb0a5ef01d2cc662b7dd2599e57 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 10 Jun 2024 13:35:53 +0200 Subject: [PATCH 11/31] some changes regarding the file structure --- aliases.fish | 244 +++++++++++++++++++++++++++++++++++++++++++++++++++ config.fish | 158 +++------------------------------ 2 files changed, 257 insertions(+), 145 deletions(-) create mode 100644 aliases.fish diff --git a/aliases.fish b/aliases.fish new file mode 100644 index 0000000..561f4cc --- /dev/null +++ b/aliases.fish @@ -0,0 +1,244 @@ + +# ─< VSCodium >───────────────────────────────────────────────────────────────────────────── +if command -v codium >/dev/null 2>&1 + alias code="codium" + set -e EDITOR + set -p EDITOR codium +end + +# ─< colorized ls >───────────────────────────────────────────────────────────────────────── +# ─< lsd >────────────────────────────────────────────────────────────────────────────────── +if command -v lsd >/dev/null 2>&1 + alias ls="lsd --long --git" + alias l="lsd -1 --almost-all" + alias ll="lsd -lA" + alias clearl="command clear && l" + alias tree="lsd --tree" +else + # ─< exa >────────────────────────────────────────────────────────────────────────────────── + if command -v exa >/dev/null 2>&1 + alias ls="exa --icons --long --git" + alias l="exa --icons -l" + alias ll="exa --icons -laa" + alias tree="exa --icons -l -tree" + else + # ─< eza >────────────────────────────────────────────────────────────────────────────────── + if command -v eza >/dev/null 2>&1 + alias ls="eza --icons --long --git" + alias l="eza --icons -l" + alias ll="eza --icons -laa" + alias tree="eza --icons -l -tree" + else + # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── + alias ls="ls --color=always -lph" + alias l="ls --color=always -lph" + alias ll="ls --color=always -lAph" + end + end +end + +# ─< set alias for clearl >───────────────────────────────────────────────────────────────── +if alias l >/dev/null 2>&1 + alias clearl="command clear && l" +end + +# ─< colored everything >─────────────────────────────────────────────────────────────────── +alias ip="ip --color=always" + +# ─< check for rg >───────────────────────────────────────────────────────────────────────── +if command -v rg >/dev/null 2>&1 + alias grep="rg --color=always" +else + alias grep="grep --color=always" +end + +# ─< weather >────────────────────────────────────────────────────────────────────────────── +alias www="curl wttr.in/Ulm" + +# ─< rsync >──────────────────────────────────────────────────────────────────────────────── +if command -v rsync >/dev/null 2>&1 + alias cp="rsync -avP" + alias scp="rsync -avP" +end + +# ─< bat alias >──────────────────────────────────────────────────────────────────────────── +if command -v batcat >/dev/null 2>&1 + alias cat="batcat --color=always -p --paging=never" + alias less="batcat --paging always --color=always" + alias gd="batcat --diff" +end + +# ─< batcat alias >───────────────────────────────────────────────────────────────────────── +if command -v bat >/dev/null 2>&1 + alias cat="bat --color=always -p" + alias less="bat --paging always --color=always" + alias gd="bat --diff" +end + +# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── +if command -v tmux >/dev/null 2>&1 + alias ts="tmux source $HOME/.tmux.conf" + alias t="tmux" +end + +# ─< d stands for docker >────────────────────────────────────────────────────────────────── +if command -v docker >/dev/null 2>&1 + alias up="docker compose up" + alias down="docker compose down" + alias pull="docker compose pull" + alias d="docker" + alias dr="docker run --rm -it" + alias ds="docker ps -a" + alias dc="docker compose" + alias appupdate="docker compose pull && docker compose up -d --force-recreate" +end + +# ─< g stands for git >───────────────────────────────────────────────────────────────────── +if command -v git >/dev/null 2>&1 + alias g="git" + alias gs="git status" + alias gf="git fetch" + alias gf="git fetch && git merge" + alias gc="git clone --recurse-submodule" + alias ga="git add" + alias gp="git pull --recurse-submodule" + alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" + alias gcm="git commit -m" + alias gpu="git push --recurse-submodule=on-demand" + if command -v lazygit >/dev/null 2>&1 + alias lg="lazygit" + end +end + +# ─< fastfetch >──────────────────────────────────────────────────────────────────────────── +# ─< colorized ls >───────────────────────────────────────────────────────────────────────── +# ─< lsd >────────────────────────────────────────────────────────────────────────────────── +if command -v lsd >/dev/null 2>&1 + alias ls="lsd --long --git" + alias l="lsd -1 --almost-all" + alias ll="lsd -lA" + alias clearl="command clear && l" + alias tree="lsd --tree" +else + # ─< exa >────────────────────────────────────────────────────────────────────────────────── + if command -v exa >/dev/null 2>&1 + alias ls="exa --icons --long --git" + alias l="exa --icons -l" + alias ll="exa --icons -laa" + alias tree="exa --icons -l -tree" + else + # ─< eza >────────────────────────────────────────────────────────────────────────────────── + if command -v eza >/dev/null 2>&1 + alias ls="eza --icons --long --git" + alias l="eza --icons -l" + alias ll="eza --icons -laa" + alias tree="eza --icons -l -tree" + else + # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── + alias ls="ls --color=always -lph" + alias l="ls --color=always -lph" + alias ll="ls --color=always -lAph" + end + end +end + +# ─< set alias for clearl >───────────────────────────────────────────────────────────────── +if alias l >/dev/null 2>&1 + alias clearl="command clear && l" +end + +# ─< colored everything >─────────────────────────────────────────────────────────────────── +alias ip="ip --color=always" + +# ─< check for rg >───────────────────────────────────────────────────────────────────────── +if command -v rg >/dev/null 2>&1 + alias grep="rg --color=always" +else + alias grep="grep --color=always" +end + +# ─< weather >────────────────────────────────────────────────────────────────────────────── +alias www="curl wttr.in/Ulm" + +# ─< rsync >──────────────────────────────────────────────────────────────────────────────── +if command -v rsync >/dev/null 2>&1 + alias cp="rsync -avP" + alias scp="rsync -avP" +end + +# ─< bat alias >──────────────────────────────────────────────────────────────────────────── +if command -v batcat >/dev/null 2>&1 + alias cat="batcat --color=always -p --paging=never" + alias less="batcat --paging always --color=always" + alias gd="batcat --diff" +end + +# ─< batcat alias >───────────────────────────────────────────────────────────────────────── +if command -v bat >/dev/null 2>&1 + alias cat="bat --color=always -p" + alias less="bat --paging always --color=always" + alias gd="bat --diff" +end + +# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── +if command -v tmux >/dev/null 2>&1 + alias ts="tmux source $HOME/.tmux.conf" + alias t="tmux" +end + +# ─< d stands for docker >────────────────────────────────────────────────────────────────── +if command -v docker >/dev/null 2>&1 + alias up="docker compose up" + alias down="docker compose down" + alias pull="docker compose pull" + alias d="docker" + alias dr="docker run --rm -it" + alias ds="docker ps -a" + alias dc="docker compose" + alias appupdate="docker compose pull && docker compose up -d --force-recreate" +end + +# ─< g stands for git >───────────────────────────────────────────────────────────────────── +if command -v git >/dev/null 2>&1 + alias g="git" + alias gs="git status" + alias gf="git fetch" + alias gf="git fetch && git merge" + alias gc="git clone --recurse-submodule" + alias ga="git add" + alias gp="git pull --recurse-submodule" + alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" + alias gcm="git commit -m" + alias gpu="git push --recurse-submodule=on-demand" + if command -v lazygit >/dev/null 2>&1 + alias lg="lazygit" + end +end + +# ─< fastfetch >──────────────────────────────────────────────────────────────────────────── +if command -v fastfetch >/dev/null 2>&1 + alias ff="fastfetch" + alias clearff="command clear & fastfetch" + # ─< check for fastfetch module-existence >───────────────────────────────────────────────── + command fastfetch --config os >/dev/null 2>&1 + # ─< check the status >───────────────────────────────────────────────────────────────────── + switch $status + case 0 + alias f="fastfetch --config os" + # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── + case '*' + git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 + # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── + exec fish + end + clear & f + alias clear="clear & f" +end + +# ─< set nmap-alias >─────────────────────────────────────────────────────────────────────── +if command -v nmap >/dev/null 2>&1 + alias scanvuln="sudo nmap --script vuln -vvv" + alias sv="scanvuln" + alias portscan="sudo nmap -sT" + alias ps="portscan" +end diff --git a/config.fish b/config.fish index c777e19..c42decc 100644 --- a/config.fish +++ b/config.fish @@ -6,157 +6,25 @@ end # │ FISH CONFIG BY PIKA │ # │ │ # │ If you have any questions, check the git page at: │ -# │ https://git.k4li.de/pika/fish.git │ +# │ https://git.k4li.de/dotfiles/fish.git │ # ╰───────────────────────────────────────────────────╯ # ────────────────────────────────────────< sources >────────────────────────────────────── -source $HOME/.config/fish/init/setup.fish - -# ────────────────────────────────────< setup some stuff >──────────────────────────────────── -upin -dep_fisher -# check_fishr +if test -d $HOME/.config/fish/init/ + source $HOME/.config/fish/init/setup.fish + # ────────────────────────────────────< setup some stuff >──────────────────────────────────── + upin + dep_fisher + # check_fishr +else + notify-send "no fish config.." +end +if test -e $HOME/.config/fish/aliases.fish + source $HOME/.config/fish/aliases.fish +end # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) -if command -v codium >/dev/null 2>&1 - alias code="codium" - set -e EDITOR - set -p EDITOR codium -end - -# ─< colorized ls >───────────────────────────────────────────────────────────────────────── -# ─< lsd >────────────────────────────────────────────────────────────────────────────────── -if command -v lsd >/dev/null 2>&1 - alias ls="lsd --long --git" - alias l="lsd -1 --almost-all" - alias ll="lsd -lA" - alias clearl="command clear && l" - alias tree="lsd --tree" -else - # ─< exa >────────────────────────────────────────────────────────────────────────────────── - if command -v exa >/dev/null 2>&1 - alias ls="exa --icons --long --git" - alias l="exa --icons -l" - alias ll="exa --icons -laa" - alias tree="exa --icons -l -tree" - else - # ─< eza >────────────────────────────────────────────────────────────────────────────────── - if command -v eza >/dev/null 2>&1 - alias ls="eza --icons --long --git" - alias l="eza --icons -l" - alias ll="eza --icons -laa" - alias tree="eza --icons -l -tree" - else - # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── - alias ls="ls --color=always -lph" - alias l="ls --color=always -lph" - alias ll="ls --color=always -lAph" - end - end -end - -# ─< set alias for clearl >───────────────────────────────────────────────────────────────── -if alias l >/dev/null 2>&1 - alias clearl="command clear && l" -end - -# ─< colored everything >─────────────────────────────────────────────────────────────────── -alias ip="ip --color=always" - -# ─< check for rg >───────────────────────────────────────────────────────────────────────── -if command -v rg >/dev/null 2>&1 - alias grep="rg --color=always" -else - alias grep="grep --color=always" -end - -# ─< weather >────────────────────────────────────────────────────────────────────────────── -alias www="curl wttr.in/Ulm" - -# ─< rsync >──────────────────────────────────────────────────────────────────────────────── -if command -v rsync >/dev/null 2>&1 - alias cp="rsync -avP" - alias scp="rsync -avP" -end - -# ─< bat alias >──────────────────────────────────────────────────────────────────────────── -if command -v batcat >/dev/null 2>&1 - alias cat="batcat --color=always -p --paging=never" - alias less="batcat --paging always --color=always" - alias gd="batcat --diff" -end - -# ─< batcat alias >───────────────────────────────────────────────────────────────────────── -if command -v bat >/dev/null 2>&1 - alias cat="bat --color=always -p" - alias less="bat --paging always --color=always" - alias gd="bat --diff" -end - -# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── -if command -v tmux >/dev/null 2>&1 - alias ts="tmux source $HOME/.tmux.conf" - alias t="tmux" -end - -# ─< d stands for docker >────────────────────────────────────────────────────────────────── -if command -v docker >/dev/null 2>&1 - alias up="docker compose up" - alias down="docker compose down" - alias pull="docker compose pull" - alias d="docker" - alias dr="docker run --rm -it" - alias ds="docker ps -a" - alias dc="docker compose" - alias appupdate="docker compose pull && docker compose up -d --force-recreate" -end - -# ─< g stands for git >───────────────────────────────────────────────────────────────────── -if command -v git >/dev/null 2>&1 - alias g="git" - alias gs="git status" - alias gf="git fetch" - alias gf="git fetch && git merge" - alias gc="git clone --recurse-submodule" - alias ga="git add" - alias gp="git pull --recurse-submodule" - alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" - alias gcm="git commit -m" - alias gpu="git push --recurse-submodule=on-demand" - if command -v lazygit >/dev/null 2>&1 - alias lg="lazygit" - end -end - -# ─< fastfetch >──────────────────────────────────────────────────────────────────────────── -if command -v fastfetch >/dev/null 2>&1 - alias ff="fastfetch" - alias clearff="command clear & fastfetch" - # ─< check for fastfetch module-existence >───────────────────────────────────────────────── - command fastfetch --config os >/dev/null 2>&1 - # ─< check the status >───────────────────────────────────────────────────────────────────── - switch $status - case 0 - alias f="fastfetch --config os" - # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── - case '*' - git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 - # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── - exec fish - end - clear & f - alias clear="clear & f" -end - -# ─< set nmap-alias >─────────────────────────────────────────────────────────────────────── -if command -v nmap >/dev/null 2>&1 - alias scanvuln="sudo nmap --script vuln -vvv" - alias sv="scanvuln" - alias portscan="sudo nmap -sT" - alias ps="portscan" -end - # ────────────────────────────────────────< functions >───────────────────────────────────── # ─< z stands for Zoxide >────────────────────────────────────────────────────────────────── if command -v zoxide >/dev/null 2>&1 From a4af14e765c68f72aa95255aed83c07cfeed760d Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 10 Jun 2024 15:46:33 +0200 Subject: [PATCH 12/31] addet telnet alias for starwars and some minor changes --- aliases.fish | 4 ++++ config.fish | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/aliases.fish b/aliases.fish index 561f4cc..a98a403 100644 --- a/aliases.fish +++ b/aliases.fish @@ -55,6 +55,10 @@ end # ─< weather >────────────────────────────────────────────────────────────────────────────── alias www="curl wttr.in/Ulm" +# ─< telnet (starwars) >──────────────────────────────────────────────────────────────────── +if command -v telnet >/dev/null 2>&1 + alias starwars="telnet -a telehack.com" +end # ─< rsync >──────────────────────────────────────────────────────────────────────────────── if command -v rsync >/dev/null 2>&1 alias cp="rsync -avP" diff --git a/config.fish b/config.fish index c42decc..a6ab98e 100644 --- a/config.fish +++ b/config.fish @@ -14,7 +14,7 @@ if test -d $HOME/.config/fish/init/ source $HOME/.config/fish/init/setup.fish # ────────────────────────────────────< setup some stuff >──────────────────────────────────── upin - dep_fisher + # dep_fisher # check_fishr else notify-send "no fish config.." From 253fd4c7112a2faf50b8809fb69fdd966524fa38 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 13 Jun 2024 11:56:36 +0200 Subject: [PATCH 13/31] addet oh-my-posh config --- config.fish | 53 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/config.fish b/config.fish index a6ab98e..9b10060 100644 --- a/config.fish +++ b/config.fish @@ -10,35 +10,42 @@ end # ╰───────────────────────────────────────────────────╯ # ────────────────────────────────────────< sources >────────────────────────────────────── -if test -d $HOME/.config/fish/init/ - source $HOME/.config/fish/init/setup.fish - # ────────────────────────────────────< setup some stuff >──────────────────────────────────── - upin - # dep_fisher - # check_fishr -else - notify-send "no fish config.." -end -if test -e $HOME/.config/fish/aliases.fish - source $HOME/.config/fish/aliases.fish +function _source + if test -d $HOME/.config/fish/init/ + source $HOME/.config/fish/init/setup.fish + # ────────────────────────────────────< setup some stuff >──────────────────────────────────── + upin + # dep_fisher + # check_fishr + else + notify-send "no fish config.." + end + if test -e $HOME/.config/fish/aliases.fish + source $HOME/.config/fish/aliases.fish + end end # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) # ────────────────────────────────────────< functions >───────────────────────────────────── # ─< z stands for Zoxide >────────────────────────────────────────────────────────────────── -if command -v zoxide >/dev/null 2>&1 - zoxide init fish | source +function _zox + if command -v zoxide >/dev/null 2>&1 + zoxide init fish | source + end end # ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── -if command -v oh-my-posh >/dev/null 2>&1 - # ─< tokyo-storm config >─────────────────────────────────────────────────────────────────── - oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source - # ─< zen config >─────────────────────────────────────────────────────────────────────────── - # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source +function _omp + if command -v oh-my-posh >/dev/null 2>&1 + # ─< tokyo-storm config >─────────────────────────────────────────────────────────────────── + oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source + # ─< zen config >─────────────────────────────────────────────────────────────────────────── + # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source + else + curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin + end end - # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── if test -d $HOME/.config/fish/functions/ set -g theme_nerd_fonts yes @@ -46,3 +53,11 @@ if test -d $HOME/.config/fish/functions/ # available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha) set -g theme_color_scheme catppuccin-mocha end + +function main + _source + _zox + _omp +end + +main From a7224fbde1df3facae941cf8405a44cb042ca074 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 20 Jun 2024 00:23:13 +0200 Subject: [PATCH 14/31] addet neovide config --- aliases.fish | 8 +++++++- config.fish | 51 ++++++++++++++++++++++++++++++++++----------------- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/aliases.fish b/aliases.fish index a98a403..102e9ab 100644 --- a/aliases.fish +++ b/aliases.fish @@ -1,4 +1,4 @@ - +#!/bin/fish # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── if command -v codium >/dev/null 2>&1 alias code="codium" @@ -6,6 +6,12 @@ if command -v codium >/dev/null 2>&1 set -p EDITOR codium end +# ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── +if test -d $HOME/.local/share/neovide/ + set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') + alias nvim="$neovide" +end + # ─< colorized ls >───────────────────────────────────────────────────────────────────────── # ─< lsd >────────────────────────────────────────────────────────────────────────────────── if command -v lsd >/dev/null 2>&1 diff --git a/config.fish b/config.fish index 9b10060..98f7c9f 100644 --- a/config.fish +++ b/config.fish @@ -1,5 +1,18 @@ if status is-interactive # ─< Commands to run in interactive sessions can go here >────────────── + function _source + if test -d $HOME/.config/fish/init/ + source $HOME/.config/fish/init/setup.fish + # ────────────────────────────────────< setup some stuff >──────────────────────────────────── + upin + # dep_fisher + else + notify-send "no fish config.." + end + if test -e $HOME/.config/fish/aliases.fish + source $HOME/.config/fish/aliases.fish + end + end end # ╭───────────────────────────────────────────────────╮ @@ -16,7 +29,6 @@ function _source # ────────────────────────────────────< setup some stuff >──────────────────────────────────── upin # dep_fisher - # check_fishr else notify-send "no fish config.." end @@ -24,10 +36,12 @@ function _source source $HOME/.config/fish/aliases.fish end end + # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) # ────────────────────────────────────────< functions >───────────────────────────────────── + # ─< z stands for Zoxide >────────────────────────────────────────────────────────────────── function _zox if command -v zoxide >/dev/null 2>&1 @@ -35,29 +49,32 @@ function _zox end end -# ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── -function _omp - if command -v oh-my-posh >/dev/null 2>&1 - # ─< tokyo-storm config >─────────────────────────────────────────────────────────────────── - oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source - # ─< zen config >─────────────────────────────────────────────────────────────────────────── - # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source - else - curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin +# ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── +function _bobfish + if test -d $HOME/.config/fish/functions/bobthefish/ + source $HOME/.config/fish/functions/bobthefish/*.fish + set -g theme_nerd_fonts yes + set -g defaults_user (echo $USER) + # available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha) + set -g theme_color_scheme catppuccin-mocha end end -# ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── -if test -d $HOME/.config/fish/functions/ - set -g theme_nerd_fonts yes - set -g defaults_user (echo $USER) - # available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha) - set -g theme_color_scheme catppuccin-mocha + +# ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── +if command -v oh-my-posh >/dev/null 2>&1 + # ─< tokyo-storm config >─────────────────────────────────────────────────────────────────── + oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source + # ─< zen config >─────────────────────────────────────────────────────────────────────────── + # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source +else + _bobfish + curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin end function main _source _zox - _omp + # _omp end main From 8bb72f20edf2fabd069936b1c1f95939483d5575 Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 20 Jun 2024 00:34:06 +0200 Subject: [PATCH 15/31] bugfixing --- aliases.fish | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aliases.fish b/aliases.fish index 102e9ab..4dec600 100644 --- a/aliases.fish +++ b/aliases.fish @@ -9,7 +9,10 @@ end # ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── if test -d $HOME/.local/share/neovide/ set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') - alias nvim="$neovide" + alias neovide="$neovide" + function nvim + neovide + end end # ─< colorized ls >───────────────────────────────────────────────────────────────────────── From e2ab3de5f893ed1d894b4242141b2dced7ef13df Mon Sep 17 00:00:00 2001 From: pika Date: Thu, 20 Jun 2024 00:37:42 +0200 Subject: [PATCH 16/31] bugfixing --- aliases.fish | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/aliases.fish b/aliases.fish index 4dec600..102e9ab 100644 --- a/aliases.fish +++ b/aliases.fish @@ -9,10 +9,7 @@ end # ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── if test -d $HOME/.local/share/neovide/ set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') - alias neovide="$neovide" - function nvim - neovide - end + alias nvim="$neovide" end # ─< colorized ls >───────────────────────────────────────────────────────────────────────── From 6029060d460e4806b89d9dc182e3e77bb59c2b84 Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 22 Jun 2024 12:02:15 +0200 Subject: [PATCH 17/31] some changes --- aliases.fish | 215 +++++++++++++++------------------------------------ 1 file changed, 63 insertions(+), 152 deletions(-) diff --git a/aliases.fish b/aliases.fish index 102e9ab..3c2df05 100644 --- a/aliases.fish +++ b/aliases.fish @@ -1,17 +1,4 @@ #!/bin/fish -# ─< VSCodium >───────────────────────────────────────────────────────────────────────────── -if command -v codium >/dev/null 2>&1 - alias code="codium" - set -e EDITOR - set -p EDITOR codium -end - -# ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── -if test -d $HOME/.local/share/neovide/ - set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') - alias nvim="$neovide" -end - # ─< colorized ls >───────────────────────────────────────────────────────────────────────── # ─< lsd >────────────────────────────────────────────────────────────────────────────────── if command -v lsd >/dev/null 2>&1 @@ -65,110 +52,6 @@ alias www="curl wttr.in/Ulm" if command -v telnet >/dev/null 2>&1 alias starwars="telnet -a telehack.com" end -# ─< rsync >──────────────────────────────────────────────────────────────────────────────── -if command -v rsync >/dev/null 2>&1 - alias cp="rsync -avP" - alias scp="rsync -avP" -end - -# ─< bat alias >──────────────────────────────────────────────────────────────────────────── -if command -v batcat >/dev/null 2>&1 - alias cat="batcat --color=always -p --paging=never" - alias less="batcat --paging always --color=always" - alias gd="batcat --diff" -end - -# ─< batcat alias >───────────────────────────────────────────────────────────────────────── -if command -v bat >/dev/null 2>&1 - alias cat="bat --color=always -p" - alias less="bat --paging always --color=always" - alias gd="bat --diff" -end - -# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── -if command -v tmux >/dev/null 2>&1 - alias ts="tmux source $HOME/.tmux.conf" - alias t="tmux" -end - -# ─< d stands for docker >────────────────────────────────────────────────────────────────── -if command -v docker >/dev/null 2>&1 - alias up="docker compose up" - alias down="docker compose down" - alias pull="docker compose pull" - alias d="docker" - alias dr="docker run --rm -it" - alias ds="docker ps -a" - alias dc="docker compose" - alias appupdate="docker compose pull && docker compose up -d --force-recreate" -end - -# ─< g stands for git >───────────────────────────────────────────────────────────────────── -if command -v git >/dev/null 2>&1 - alias g="git" - alias gs="git status" - alias gf="git fetch" - alias gf="git fetch && git merge" - alias gc="git clone --recurse-submodule" - alias ga="git add" - alias gp="git pull --recurse-submodule" - alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" - alias gcm="git commit -m" - alias gpu="git push --recurse-submodule=on-demand" - if command -v lazygit >/dev/null 2>&1 - alias lg="lazygit" - end -end - -# ─< fastfetch >──────────────────────────────────────────────────────────────────────────── -# ─< colorized ls >───────────────────────────────────────────────────────────────────────── -# ─< lsd >────────────────────────────────────────────────────────────────────────────────── -if command -v lsd >/dev/null 2>&1 - alias ls="lsd --long --git" - alias l="lsd -1 --almost-all" - alias ll="lsd -lA" - alias clearl="command clear && l" - alias tree="lsd --tree" -else - # ─< exa >────────────────────────────────────────────────────────────────────────────────── - if command -v exa >/dev/null 2>&1 - alias ls="exa --icons --long --git" - alias l="exa --icons -l" - alias ll="exa --icons -laa" - alias tree="exa --icons -l -tree" - else - # ─< eza >────────────────────────────────────────────────────────────────────────────────── - if command -v eza >/dev/null 2>&1 - alias ls="eza --icons --long --git" - alias l="eza --icons -l" - alias ll="eza --icons -laa" - alias tree="eza --icons -l -tree" - else - # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── - alias ls="ls --color=always -lph" - alias l="ls --color=always -lph" - alias ll="ls --color=always -lAph" - end - end -end - -# ─< set alias for clearl >───────────────────────────────────────────────────────────────── -if alias l >/dev/null 2>&1 - alias clearl="command clear && l" -end - -# ─< colored everything >─────────────────────────────────────────────────────────────────── -alias ip="ip --color=always" - -# ─< check for rg >───────────────────────────────────────────────────────────────────────── -if command -v rg >/dev/null 2>&1 - alias grep="rg --color=always" -else - alias grep="grep --color=always" -end - -# ─< weather >────────────────────────────────────────────────────────────────────────────── -alias www="curl wttr.in/Ulm" # ─< rsync >──────────────────────────────────────────────────────────────────────────────── if command -v rsync >/dev/null 2>&1 @@ -190,41 +73,6 @@ if command -v bat >/dev/null 2>&1 alias gd="bat --diff" end -# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── -if command -v tmux >/dev/null 2>&1 - alias ts="tmux source $HOME/.tmux.conf" - alias t="tmux" -end - -# ─< d stands for docker >────────────────────────────────────────────────────────────────── -if command -v docker >/dev/null 2>&1 - alias up="docker compose up" - alias down="docker compose down" - alias pull="docker compose pull" - alias d="docker" - alias dr="docker run --rm -it" - alias ds="docker ps -a" - alias dc="docker compose" - alias appupdate="docker compose pull && docker compose up -d --force-recreate" -end - -# ─< g stands for git >───────────────────────────────────────────────────────────────────── -if command -v git >/dev/null 2>&1 - alias g="git" - alias gs="git status" - alias gf="git fetch" - alias gf="git fetch && git merge" - alias gc="git clone --recurse-submodule" - alias ga="git add" - alias gp="git pull --recurse-submodule" - alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" - alias gcm="git commit -m" - alias gpu="git push --recurse-submodule=on-demand" - if command -v lazygit >/dev/null 2>&1 - alias lg="lazygit" - end -end - # ─< fastfetch >──────────────────────────────────────────────────────────────────────────── if command -v fastfetch >/dev/null 2>&1 alias ff="fastfetch" @@ -252,3 +100,66 @@ if command -v nmap >/dev/null 2>&1 alias portscan="sudo nmap -sT" alias ps="portscan" end + +# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── +if command -v tmux >/dev/null 2>&1 + alias ts="tmux source $HOME/.tmux.conf" + alias t="tmux" +end + +# ─< d stands for docker >────────────────────────────────────────────────────────────────── +if command -v docker >/dev/null 2>&1 + alias up="docker compose up" + alias down="docker compose down" + alias pull="docker compose pull" + alias d="docker" + alias dr="docker run --rm -it" + alias ds="docker ps -a" + alias dc="docker compose" + alias appupdate="docker compose pull && docker compose up -d --force-recreate" +end + +# ─< g stands for GIT >───────────────────────────────────────────────────────────────────── +if command -v git >/dev/null 2>&1 + alias g="git" + alias gs="git status" + alias gm='git checkout main && git merge' + alias gc="git clone --recurse-submodule" + alias ga="git add" + alias gp="git pull --recurse-submodule" + alias gms='git maintenance start' + alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" + alias gcm="git commit -m" + alias gpu="git push --recurse-submodule=on-demand" + if command -v lazygit >/dev/null 2>&1 + alias lg="lazygit" + end +end + +# ╭────────╮ +# │ CODING │ +# ╰────────╯ + +# ─< h stands for HUGO >────────────────────────────────────────────────────────────────── +if command -v hugo >/dev/null 2>&1 + alias h='hugo' + alias hs='hugo server -D --noHTTPCache' +end + +# ─< VSCodium >───────────────────────────────────────────────────────────────────────────── +if command -v codium >/dev/null 2>&1 + alias code="codium" + set -e EDITOR + set -p EDITOR codium +end + +# ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── +if test -d $HOME/.local/share/neovide/ + if command -v neovide >/dev/null 2>&1 + alias nvim='neovide --fork' + else + set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide "neovide" + alias nvim="$neovide" +end +end + From 1ed4f0e1474501828c05711a40cf05f49186c284 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 5 Jul 2024 14:43:24 +0200 Subject: [PATCH 18/31] some changes --- aliases.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aliases.fish b/aliases.fish index 3c2df05..13d1300 100644 --- a/aliases.fish +++ b/aliases.fish @@ -143,7 +143,7 @@ end # ─< h stands for HUGO >────────────────────────────────────────────────────────────────── if command -v hugo >/dev/null 2>&1 alias h='hugo' - alias hs='hugo server -D --noHTTPCache' + alias hs='hugo server -D --noHTTPCache --disableFastRender' end # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── @@ -158,7 +158,7 @@ if test -d $HOME/.local/share/neovide/ if command -v neovide >/dev/null 2>&1 alias nvim='neovide --fork' else - set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide "neovide" + set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide "neovide" || exit 1 alias nvim="$neovide" end end From b5723a70e189a1b134b406edfe4b9717249b9b69 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 5 Jul 2024 22:19:16 +0200 Subject: [PATCH 19/31] cake alias --- aliases.fish | 70 +++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/aliases.fish b/aliases.fish index 13d1300..f701d85 100644 --- a/aliases.fish +++ b/aliases.fish @@ -10,23 +10,23 @@ if command -v lsd >/dev/null 2>&1 else # ─< exa >────────────────────────────────────────────────────────────────────────────────── if command -v exa >/dev/null 2>&1 - alias ls="exa --icons --long --git" - alias l="exa --icons -l" - alias ll="exa --icons -laa" - alias tree="exa --icons -l -tree" + alias ls="exa --icons --long --git" + alias l="exa --icons -l" + alias ll="exa --icons -laa" + alias tree="exa --icons -l -tree" else - # ─< eza >────────────────────────────────────────────────────────────────────────────────── - if command -v eza >/dev/null 2>&1 - alias ls="eza --icons --long --git" - alias l="eza --icons -l" - alias ll="eza --icons -laa" - alias tree="eza --icons -l -tree" - else - # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── - alias ls="ls --color=always -lph" - alias l="ls --color=always -lph" - alias ll="ls --color=always -lAph" - end + # ─< eza >────────────────────────────────────────────────────────────────────────────────── + if command -v eza >/dev/null 2>&1 + alias ls="eza --icons --long --git" + alias l="eza --icons -l" + alias ll="eza --icons -laa" + alias tree="eza --icons -l -tree" + else + # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── + alias ls="ls --color=always -lph" + alias l="ls --color=always -lph" + alias ll="ls --color=always -lAph" + end end end @@ -81,13 +81,13 @@ if command -v fastfetch >/dev/null 2>&1 command fastfetch --config os >/dev/null 2>&1 # ─< check the status >───────────────────────────────────────────────────────────────────── switch $status - case 0 - alias f="fastfetch --config os" - # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── - case '*' - git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 - # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── - exec fish + case 0 + alias f="fastfetch --config os" + # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── + case '*' + git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 + # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── + exec fish end clear & f alias clear="clear & f" @@ -132,7 +132,7 @@ if command -v git >/dev/null 2>&1 alias gcm="git commit -m" alias gpu="git push --recurse-submodule=on-demand" if command -v lazygit >/dev/null 2>&1 - alias lg="lazygit" + alias lg="lazygit" end end @@ -142,10 +142,15 @@ end # ─< h stands for HUGO >────────────────────────────────────────────────────────────────── if command -v hugo >/dev/null 2>&1 - alias h='hugo' - alias hs='hugo server -D --noHTTPCache --disableFastRender' + alias h='hugo' + alias hs='hugo server -D --noHTTPCache --disableFastRender' end +# ─< c stands for bin/cake >────────────────────────────────────────────────────────────── +alias cake='bin/cake' +alias c='cake' +alias cs='c server -p 1313' + # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── if command -v codium >/dev/null 2>&1 alias code="codium" @@ -155,11 +160,10 @@ end # ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── if test -d $HOME/.local/share/neovide/ - if command -v neovide >/dev/null 2>&1 - alias nvim='neovide --fork' - else - set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide "neovide" || exit 1 - alias nvim="$neovide" + if command -v neovide >/dev/null 2>&1 + alias nvim='neovide --fork' + else + set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide neovide || exit 1 + alias nvim="$neovide" + end end -end - From f926e105891dc2b1e78864abb4889287c1fa14f5 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 23 Jul 2024 19:58:46 +0200 Subject: [PATCH 20/31] some changes --- aliases.fish | 65 ++++++++++++++++++++++++------------------------- init/tools.fish | 11 --------- 2 files changed, 32 insertions(+), 44 deletions(-) delete mode 100644 init/tools.fish diff --git a/aliases.fish b/aliases.fish index 13d1300..d885e1b 100644 --- a/aliases.fish +++ b/aliases.fish @@ -10,23 +10,23 @@ if command -v lsd >/dev/null 2>&1 else # ─< exa >────────────────────────────────────────────────────────────────────────────────── if command -v exa >/dev/null 2>&1 - alias ls="exa --icons --long --git" - alias l="exa --icons -l" - alias ll="exa --icons -laa" - alias tree="exa --icons -l -tree" + alias ls="exa --icons --long --git" + alias l="exa --icons -l" + alias ll="exa --icons -laa" + alias tree="exa --icons -l -tree" else - # ─< eza >────────────────────────────────────────────────────────────────────────────────── - if command -v eza >/dev/null 2>&1 - alias ls="eza --icons --long --git" - alias l="eza --icons -l" - alias ll="eza --icons -laa" - alias tree="eza --icons -l -tree" - else - # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── - alias ls="ls --color=always -lph" - alias l="ls --color=always -lph" - alias ll="ls --color=always -lAph" - end + # ─< eza >────────────────────────────────────────────────────────────────────────────────── + if command -v eza >/dev/null 2>&1 + alias ls="eza --icons --long --git" + alias l="eza --icons -l" + alias ll="eza --icons -laa" + alias tree="eza --icons -l -tree" + else + # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── + alias ls="ls --color=always -lph" + alias l="ls --color=always -lph" + alias ll="ls --color=always -lAph" + end end end @@ -81,13 +81,13 @@ if command -v fastfetch >/dev/null 2>&1 command fastfetch --config os >/dev/null 2>&1 # ─< check the status >───────────────────────────────────────────────────────────────────── switch $status - case 0 - alias f="fastfetch --config os" - # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── - case '*' - git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 - # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── - exec fish + case 0 + alias f="fastfetch --config os" + # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── + case '*' + git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 + # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── + exec fish end clear & f alias clear="clear & f" @@ -132,7 +132,7 @@ if command -v git >/dev/null 2>&1 alias gcm="git commit -m" alias gpu="git push --recurse-submodule=on-demand" if command -v lazygit >/dev/null 2>&1 - alias lg="lazygit" + alias lg="lazygit" end end @@ -142,8 +142,8 @@ end # ─< h stands for HUGO >────────────────────────────────────────────────────────────────── if command -v hugo >/dev/null 2>&1 - alias h='hugo' - alias hs='hugo server -D --noHTTPCache --disableFastRender' + alias h='hugo' + alias hs='hugo server -D --noHTTPCache --disableFastRender' end # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── @@ -155,11 +155,10 @@ end # ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── if test -d $HOME/.local/share/neovide/ - if command -v neovide >/dev/null 2>&1 - alias nvim='neovide --fork' - else - set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage') || set -p neovide "neovide" || exit 1 - alias nvim="$neovide" + if command -v neovide >/dev/null 2>&1 + alias nvim='neovide --fork' + else + set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage' >/dev/null 2>&1) || exit 1 + alias nvim="$neovide --fork" + end end -end - diff --git a/init/tools.fish b/init/tools.fish deleted file mode 100644 index 998c068..0000000 --- a/init/tools.fish +++ /dev/null @@ -1,11 +0,0 @@ -# ─< tools creation >─────────────────────────────────────────────────────────────────────── -set fish_greeting -set toolbox "The following tools are active: -" -set warnings "The following packages are NOT active: -" - -function tools - -end - From 45f4c0aa3a10ef9f29a5ba71af042c54965c69a3 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 23 Jul 2024 21:37:17 +0200 Subject: [PATCH 21/31] addet progressbar to rsync --- aliases.fish | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/aliases.fish b/aliases.fish index 2e5d3c2..ae5917a 100644 --- a/aliases.fish +++ b/aliases.fish @@ -1,4 +1,58 @@ #!/bin/fish + +# ─< Function to echo text with bold black color >──────────────────────────────────────── +function black + echo -ne (set_color --bold black)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold red color >────────────────────────────────────────── +function red + echo -ne (set_color --bold red)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold green color >──────────────────────────────────────── +function green + echo -ne (set_color --bold green)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold yellow color >─────────────────────────────────────── +function yellow + echo -ne (set_color --bold yellow)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold blue color >───────────────────────────────────────── +function blue + echo -ne (set_color --bold blue)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold magenta color >────────────────────────────────────── +function magenta + echo -ne (set_color --bold magenta)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold cyan color >───────────────────────────────────────── +function cyan + echo -ne (set_color --bold cyan)"$argv"(set_color normal)"\n" +end + +# ─< Function to echo text with bold white color >──────────────────────────────────────── +function white + echo -ne (set_color --bold white)"$argv"(set_color normal)"\n" +end + +# ─< t stands for trash(-cli) >─────────────────────────────────────────────────────────── +function _trash + if command -v trash >/dev/null 2>&1 + alias rm="trash" + else + if command -v trash-cli >/dev/null 2>&1 + alias rm="trash-cli" + else + red "You do not have trash or trash-cli installed! Your 'rm' will be permanent!" + end + end +end + # ─< colorized ls >───────────────────────────────────────────────────────────────────────── # ─< lsd >────────────────────────────────────────────────────────────────────────────────── if command -v lsd >/dev/null 2>&1 @@ -55,7 +109,7 @@ end # ─< rsync >──────────────────────────────────────────────────────────────────────────────── if command -v rsync >/dev/null 2>&1 - alias cp="rsync -avP" + alias cp="rsync -avP --info=progress2" alias scp="rsync -avP" end @@ -92,6 +146,8 @@ if command -v fastfetch >/dev/null 2>&1 clear & f alias clear="clear & f" end +# ─< calling the trash function, which will warn you if you don't have trash installed >── +_trash # ─< set nmap-alias >─────────────────────────────────────────────────────────────────────── if command -v nmap >/dev/null 2>&1 From 0f3d2cd489027250576f3cb619c30fc24a569e51 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 30 Jul 2024 19:17:00 +0200 Subject: [PATCH 22/31] addet some aliases? --- aliases.fish | 46 +++++++++++++++++++++++----- fish_variables | 6 ++++ init/setup.fish | 81 ++++++++++++++++++++++++++----------------------- 3 files changed, 88 insertions(+), 45 deletions(-) diff --git a/aliases.fish b/aliases.fish index ae5917a..de9bbc3 100644 --- a/aliases.fish +++ b/aliases.fish @@ -56,9 +56,9 @@ end # ─< colorized ls >───────────────────────────────────────────────────────────────────────── # ─< lsd >────────────────────────────────────────────────────────────────────────────────── if command -v lsd >/dev/null 2>&1 - alias ls="lsd --long --git" - alias l="lsd -1 --almost-all" - alias ll="lsd -lA" + alias ls="lsd -l -1 -h1 --almost-all --git" + alias l="lsd -1" + alias ll="lsd -1 --almost-all" alias clearl="command clear && l" alias tree="lsd --tree" else @@ -77,9 +77,9 @@ else alias tree="eza --icons -l -tree" else # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── - alias ls="ls --color=always -lph" - alias l="ls --color=always -lph" - alias ll="ls --color=always -lAph" + alias ls="ls --color=always -lAph" + alias l="ls --color=always -lph -w1" + alias ll="ls --color=always -lph" end end end @@ -108,8 +108,40 @@ if command -v telnet >/dev/null 2>&1 end # ─< rsync >──────────────────────────────────────────────────────────────────────────────── + +function _rsync + # Check if the 'find' command exists + if command -v find >/dev/null 2>&1 + # Initialize the number of files to 0 + set numbers 0 + # Loop through all arguments except the last one (which is the destination) + for source in $argv[1..-2] + # Count the number of files in the source directory + set numbers (math $numbers + (find $source -type f | wc -l)) + end + # Set the destination (last argument) + set destination $argv[-1] + + # Set the color to magenta + set_color magenta + + # Use rsync with pv for progress + rsync -avP --info=progress2 $argv[1..-2] $destination | pv -lpes $numbers + + # Reset the color to normal + set_color normal + else + # If 'find' is not installed, display a warning message + echo "We could not find 'find'. Please install 'find' to enable the progress bar. (hit 'CTRL + C' to exit now)" + sleep 5 + + # Run rsync without progress bar + rsync -avP --info=progress2 $argv + end +end + if command -v rsync >/dev/null 2>&1 - alias cp="rsync -avP --info=progress2" + alias cp="_rsync" alias scp="rsync -avP" end diff --git a/fish_variables b/fish_variables index 0b5fdad..e71b724 100644 --- a/fish_variables +++ b/fish_variables @@ -1,7 +1,13 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 +SETUVAR FISH_INSTALL:yay\x20install\x20\x2d\x2dnoconfirm SETUVAR __fish_initialized:3400 +SETUVAR _fisher_jorgebucaran_2F_autopair_2E_fish_files:\x7e/\x2econfig/fish/functions/_autopair_backspace\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_left\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_right\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_same\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_tab\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/autopair\x2efish +SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish +SETUVAR _fisher_patrickf1_2F_colored__man__pages_2E_fish_files:\x7e/\x2econfig/fish/functions/cless\x2efish\x1e\x7e/\x2econfig/fish/functions/man\x2efish +SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/autopair\x2efish\x1epatrickf1/fzf\x2efish\x1epatrickf1/colored_man_pages\x2efish +SETUVAR _fisher_upgraded_to_4_4:\x1d SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:005fd7 diff --git a/init/setup.fish b/init/setup.fish index 0127d0c..7a379c1 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -2,11 +2,11 @@ function upin # ─< check for sudo/root >────────────────────────────────────────────────────────────────── - if [ $USER = "root" ] + if [ $USER = root ] set su "" else if command -v sudo >/dev/null 2>&1 - set su "sudo" + set su sudo end end @@ -43,7 +43,7 @@ function upin # ─< Pacman - Arch >──────────────────────────────────────────────────── if command -v paru >/dev/null 2>&1 - set pkg "paru" + set pkg paru set install "$pkg -S" set update "$pkg -Syu" set search "$pkg -Ss" @@ -51,7 +51,7 @@ function upin set unattendet "$pkg install --noconfirm" else if command -v yay >/dev/null 2>&1 - set pkg "yay" + set pkg yay set install "$pkg -S" set update "$pkg -Syu" set search "$pkg -Ss" @@ -93,7 +93,7 @@ function upin set -U FISH_INSTALL $install end if test -n "$install" - set vars "install" "update" "search" "remove" + set vars install update search remove for env in $vars if not test -z "$env" alias "$env"="$$env" @@ -125,7 +125,7 @@ function gsa echo "-- enter the repository to add as a submodule --" echo "-- (type 'quit' to quit) --" read repo - if [ "$repo" = "quit" ] + if [ "$repo" = quit ] exit 1 end @@ -134,7 +134,7 @@ function gsa echo "-- enter the relative path, where the submodule will be cloned to. (!! do it like this: ./path/to/clone/to) --" echo "-- (type 'quit' to quit) --" read -S path - if [ "$path" = "quit" ] + if [ "$path" = quit ] exit 1 end @@ -142,14 +142,14 @@ function gsa echo "-- enter the branch to checkout (main/master..) --" echo "-- (type 'quit' to quit) --" read branch - if [ "$branch" = "quit" ] + if [ "$branch" = quit ] exit 1 end echo "-- enter a name for the submodule --" echo "-- (type 'quit' to quit) --" read -l name - if [ "$name" = "quit" ] + if [ "$name" = quit ] exit 1 end @@ -161,22 +161,28 @@ function gsa # ─< Switch statement to handle the user's confirmation input >───────────────────────────── switch $comm # ─< If the user inputs 'y' or 'Y', execute the git submodule add command >───────────────── - case 'y' 'Y' - git submodule add --branch $branch --name $name $repo $path - git submodule update --init --recursive - git add . - git commit -m "Addet $name as a submodule" - git push + case y Y + git submodule add --branch $branch --name $name $repo $path + git submodule update --init --recursive + git add . + git commit -m "Addet $name as a submodule" + git push - # ─< If the user inputs 'n' or 'N', notify them to try again >────────────────────────────── - case 'n' 'N' - echo "-- all right, just try again :) --" + # ─< If the user inputs 'n' or 'N', notify them to try again >────────────────────────────── + case n N + echo "-- all right, just try again :) --" end end -# ╭───────────────────────────────────────────────────╮ -# │ FUNCTION: set tmux command to always work with ta │ -# ╰───────────────────────────────────────────────────╯ +# ╭────────────────────────────────────╮ +# │ FUNCTION: ssh-agent initialisation │ +# ╰────────────────────────────────────╯ + +set -x SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent.socket + +# ╭───────────────────────────────────────────────────╮ +# │ FUNCTION: set tmux command to always work with ta │ +# ╰───────────────────────────────────────────────────╯ if command -v tmux >/dev/null 2>&1 set tmux_y "tmux-session active!" @@ -184,20 +190,20 @@ if command -v tmux >/dev/null 2>&1 function ta command tmux list-sessions >/dev/null 2>&1 switch $status - case 0 - if command -v notify-send >/dev/null 2>&1 - notify-send "$tmux_y" - end - echo "$tmux_y" - sleep 0.5 - tmux a - case '*' - if command -v notify-send >/dev/null 2>&1 - notify-send "$tmux_n" - end - echo "No Tmux session found. Creating one now! --" - sleep 0.5 - tmux + case 0 + if command -v notify-send >/dev/null 2>&1 + notify-send "$tmux_y" + end + echo "$tmux_y" + sleep 0.5 + tmux a + case '*' + if command -v notify-send >/dev/null 2>&1 + notify-send "$tmux_n" + end + echo "No Tmux session found. Creating one now! --" + sleep 0.5 + tmux end end end @@ -208,7 +214,7 @@ end function dep_fisher # ─< Define dependencies for the plugins used by fisher >─────────────────────────────────── - set dependencies "fzf" "btop" "fastfetch" "curl" "wget" "cmatrix" + set dependencies fzf btop fastfetch curl wget cmatrix # ─< Check and install dependencies >─────────────────────────────────────────────────────── for dep in $dependencies if not command -v $dep >/dev/null 2>&1 @@ -232,8 +238,7 @@ function check_fishr fisher update else if test ! -e $HOME/.config/fish/functions/fisher.fish - echo "you did it!!"> $HOME/.config/fish/.fishr.init && curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher + echo "you did it!!" >$HOME/.config/fish/.fishr.init && curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher end end end - From 374e5e3cf899baf7db2124f1bcedb6745bf3198b Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 2 Aug 2024 12:58:51 +0200 Subject: [PATCH 23/31] corrected oh my posh --- config.fish | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config.fish b/config.fish index 98f7c9f..bdb85cc 100644 --- a/config.fish +++ b/config.fish @@ -68,13 +68,12 @@ if command -v oh-my-posh >/dev/null 2>&1 # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source else _bobfish - curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin + curl -s https://ohmyposh.dev/install.sh | bash -s -- -d /usr/bin/ end function main _source _zox - # _omp end main From 667118794cc2ae7f660029b01139989a63a8df8f Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 2 Aug 2024 13:22:30 +0200 Subject: [PATCH 24/31] merge conflicts --- aliases.fish | 45 +-------------------------------------------- config.fish | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 68 deletions(-) diff --git a/aliases.fish b/aliases.fish index de9bbc3..b2e4cd5 100644 --- a/aliases.fish +++ b/aliases.fish @@ -1,44 +1,5 @@ #!/bin/fish -# ─< Function to echo text with bold black color >──────────────────────────────────────── -function black - echo -ne (set_color --bold black)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold red color >────────────────────────────────────────── -function red - echo -ne (set_color --bold red)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold green color >──────────────────────────────────────── -function green - echo -ne (set_color --bold green)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold yellow color >─────────────────────────────────────── -function yellow - echo -ne (set_color --bold yellow)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold blue color >───────────────────────────────────────── -function blue - echo -ne (set_color --bold blue)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold magenta color >────────────────────────────────────── -function magenta - echo -ne (set_color --bold magenta)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold cyan color >───────────────────────────────────────── -function cyan - echo -ne (set_color --bold cyan)"$argv"(set_color normal)"\n" -end - -# ─< Function to echo text with bold white color >──────────────────────────────────────── -function white - echo -ne (set_color --bold white)"$argv"(set_color normal)"\n" -end # ─< t stands for trash(-cli) >─────────────────────────────────────────────────────────── function _trash @@ -59,7 +20,6 @@ if command -v lsd >/dev/null 2>&1 alias ls="lsd -l -1 -h1 --almost-all --git" alias l="lsd -1" alias ll="lsd -1 --almost-all" - alias clearl="command clear && l" alias tree="lsd --tree" else # ─< exa >────────────────────────────────────────────────────────────────────────────────── @@ -84,10 +44,7 @@ else end end -# ─< set alias for clearl >───────────────────────────────────────────────────────────────── -if alias l >/dev/null 2>&1 - alias clearl="command clear && l" -end +alias clearl="command clear && l" # ─< colored everything >─────────────────────────────────────────────────────────────────── alias ip="ip --color=always" diff --git a/config.fish b/config.fish index bdb85cc..bac184e 100644 --- a/config.fish +++ b/config.fish @@ -1,17 +1,17 @@ if status is-interactive # ─< Commands to run in interactive sessions can go here >────────────── function _source - if test -d $HOME/.config/fish/init/ - source $HOME/.config/fish/init/setup.fish - # ────────────────────────────────────< setup some stuff >──────────────────────────────────── - upin - # dep_fisher - else - notify-send "no fish config.." - end - if test -e $HOME/.config/fish/aliases.fish - source $HOME/.config/fish/aliases.fish - end + if test -d $HOME/.config/fish/init/ + source $HOME/.config/fish/init/setup.fish + # ────────────────────────────────────< setup some stuff >──────────────────────────────────── + upin + # dep_fisher + else + notify-send "no fish config.." + end + if test -e $HOME/.config/fish/aliases.fish + source $HOME/.config/fish/aliases.fish + end end end @@ -25,15 +25,15 @@ end # ────────────────────────────────────────< sources >────────────────────────────────────── function _source if test -d $HOME/.config/fish/init/ - source $HOME/.config/fish/init/setup.fish - # ────────────────────────────────────< setup some stuff >──────────────────────────────────── - upin - # dep_fisher + source $HOME/.config/fish/init/setup.fish + # ────────────────────────────────────< setup some stuff >──────────────────────────────────── + upin + # dep_fisher else - notify-send "no fish config.." + notify-send "no fish config.." end if test -e $HOME/.config/fish/aliases.fish - source $HOME/.config/fish/aliases.fish + source $HOME/.config/fish/aliases.fish end end @@ -45,18 +45,18 @@ set -p EDITOR (which nvim) # ─< z stands for Zoxide >────────────────────────────────────────────────────────────────── function _zox if command -v zoxide >/dev/null 2>&1 - zoxide init fish | source + zoxide init fish | source end end # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── function _bobfish if test -d $HOME/.config/fish/functions/bobthefish/ - source $HOME/.config/fish/functions/bobthefish/*.fish - set -g theme_nerd_fonts yes - set -g defaults_user (echo $USER) - # available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha) - set -g theme_color_scheme catppuccin-mocha + source $HOME/.config/fish/functions/bobthefish/*.fish + set -g theme_nerd_fonts yes + set -g defaults_user (echo $USER) + # available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha) + set -g theme_color_scheme catppuccin-mocha end end @@ -68,7 +68,7 @@ if command -v oh-my-posh >/dev/null 2>&1 # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source else _bobfish - curl -s https://ohmyposh.dev/install.sh | bash -s -- -d /usr/bin/ + curl -s https://ohmyposh.dev/install.sh | sudo bash -s -- -d /usr/bin/ end function main From 4a52acbe4425ef04a7e7f40202c6c7a1f526df08 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 2 Aug 2024 15:32:38 +0200 Subject: [PATCH 25/31] addet gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 327b6e7..85f1cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ cless.fish fzf_* man.fish .proxy_url +fish_variables From 1b5ffcdb39c03e354b420d4719d7382d1114927e Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 2 Aug 2024 16:36:56 +0200 Subject: [PATCH 26/31] addet npm and php server aliasse --- aliases.fish | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aliases.fish b/aliases.fish index b2e4cd5..89a3923 100644 --- a/aliases.fish +++ b/aliases.fish @@ -191,6 +191,15 @@ if command -v hugo >/dev/null 2>&1 alias hs='hugo server -D --noHTTPCache --disableFastRender' end + +IP=(ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) +if command -v php >/dev/null 2>&1 + alias phpserve="php artisan serve --host=$IP" +end +if command -v npm >/dev/null 2>&1 + alias npmrun="npm run dev -- --host=$IP" +end + # ─< c stands for bin/cake >────────────────────────────────────────────────────────────── alias cake='bin/cake' alias c='cake' From 19763f0a58e8fe074f6c48d6748a11896acea74d Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 2 Aug 2024 16:38:29 +0200 Subject: [PATCH 27/31] addet npm and php server aliasse --- aliases.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aliases.fish b/aliases.fish index 89a3923..d580c0d 100644 --- a/aliases.fish +++ b/aliases.fish @@ -192,7 +192,7 @@ if command -v hugo >/dev/null 2>&1 end -IP=(ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) +set IP (ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) if command -v php >/dev/null 2>&1 alias phpserve="php artisan serve --host=$IP" end From 79473ef90f7937b743df540a8c7b625dab9bdfa9 Mon Sep 17 00:00:00 2001 From: pika Date: Fri, 2 Aug 2024 16:58:07 +0200 Subject: [PATCH 28/31] addet coding aliasses --- aliases.fish | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/aliases.fish b/aliases.fish index d580c0d..80883cb 100644 --- a/aliases.fish +++ b/aliases.fish @@ -192,18 +192,21 @@ if command -v hugo >/dev/null 2>&1 end -set IP (ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) +# set IP (ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) +function get_ip + command ip a | command grep 'inet ' | command grep -v '127.0.0.1' | command awk '{print $2}' | command cut -d/ -f1 | head -n 1 +end if command -v php >/dev/null 2>&1 - alias phpserve="php artisan serve --host=$IP" + alias phprun="php artisan serve --host=(get_ip) --port=8000" end if command -v npm >/dev/null 2>&1 - alias npmrun="npm run dev -- --host=$IP" + alias npmrun="npm run dev -- --host=(get_ip) --port=8001" end # ─< c stands for bin/cake >────────────────────────────────────────────────────────────── alias cake='bin/cake' alias c='cake' -alias cs='c server -p 1313' +alias cs='c server -p 1313 --host=(get_ip)' # ─< VSCodium >───────────────────────────────────────────────────────────────────────────── if command -v codium >/dev/null 2>&1 From 06593e35ea1005d2d7746cc8d6ab95fa131ddec6 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 5 Aug 2024 22:14:56 +0200 Subject: [PATCH 29/31] addet check_fisher function with auto setup and addet linutil command alias --- aliases.fish | 3 +++ init/setup.fish | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/aliases.fish b/aliases.fish index 80883cb..5b700e0 100644 --- a/aliases.fish +++ b/aliases.fish @@ -59,6 +59,9 @@ end # ─< weather >────────────────────────────────────────────────────────────────────────────── alias www="curl wttr.in/Ulm" +# ─< linutil >──────────────────────────────────────────────────────────────────────────── +alias linutil="curl -fsSL https://christitus.com/linux | sh" + # ─< telnet (starwars) >──────────────────────────────────────────────────────────────────── if command -v telnet >/dev/null 2>&1 alias starwars="telnet -a telehack.com" diff --git a/init/setup.fish b/init/setup.fish index 7a379c1..6de8792 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -234,11 +234,13 @@ end # ╰───────────────────────────────────────────────────────╯ function check_fishr - if test -e $HOME/.config/fish/.fishr.init + if command -v fisher >/dev/null 2>&1 fisher update else if test ! -e $HOME/.config/fish/functions/fisher.fish - echo "you did it!!" >$HOME/.config/fish/.fishr.init && curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher + curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher + fisher update end end end +check_fishr From 709c4a53091604a6436001a854f90007f31273b2 Mon Sep 17 00:00:00 2001 From: Alexander Pieck Date: Tue, 6 Aug 2024 06:43:37 +0000 Subject: [PATCH 30/31] Update init/setup.fish --- init/setup.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/init/setup.fish b/init/setup.fish index 6de8792..8dc4a75 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -239,6 +239,7 @@ function check_fishr else if test ! -e $HOME/.config/fish/functions/fisher.fish curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher + else fisher update end end From d773d3ed0ddc6865622d08f0ead46de7e5cbef44 Mon Sep 17 00:00:00 2001 From: Alexander Pieck Date: Tue, 6 Aug 2024 06:47:31 +0000 Subject: [PATCH 31/31] Update init/setup.fish --- init/setup.fish | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init/setup.fish b/init/setup.fish index 8dc4a75..736c514 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -243,5 +243,4 @@ function check_fishr fisher update end end -end -check_fishr +end \ No newline at end of file