summaryrefslogtreecommitdiff
path: root/cfg
diff options
context:
space:
mode:
Diffstat (limited to 'cfg')
-rw-r--r--cfg/fish/config.fish (renamed from cfg/config.fish)0
-rw-r--r--cfg/fish/fish_greeting.fish (renamed from cfg/fish_greeting.fish)0
-rw-r--r--cfg/fish/fish_prompt.fish (renamed from cfg/fish_prompt[s].fish)2
-rw-r--r--cfg/fish/fish_right_prompt.fish28
4 files changed, 29 insertions, 1 deletions
diff --git a/cfg/config.fish b/cfg/fish/config.fish
index 166ddd4..166ddd4 100644
--- a/cfg/config.fish
+++ b/cfg/fish/config.fish
diff --git a/cfg/fish_greeting.fish b/cfg/fish/fish_greeting.fish
index e25c117..e25c117 100644
--- a/cfg/fish_greeting.fish
+++ b/cfg/fish/fish_greeting.fish
diff --git a/cfg/fish_prompt[s].fish b/cfg/fish/fish_prompt.fish
index 06d5c6c..916e276 100644
--- a/cfg/fish_prompt[s].fish
+++ b/cfg/fish/fish_prompt.fish
@@ -2,7 +2,7 @@ function fish_prompt
set -l user $USER
set -l cwd $PWD
set -l home $HOME
-
+
if test "$cwd" = "$home"
# if in ~
echo -e (set_color white)"╭"(set_color red)"("(set_color white)"$user" \
diff --git a/cfg/fish/fish_right_prompt.fish b/cfg/fish/fish_right_prompt.fish
new file mode 100644
index 0000000..d9bf744
--- /dev/null
+++ b/cfg/fish/fish_right_prompt.fish
@@ -0,0 +1,28 @@
+function fish_right_prompt
+ set last_status $status
+
+ # check for which color to use
+ if test $last_status -eq 0
+ set color white
+ else
+ set color red
+ end
+
+ # set inverse color
+ if test $color = "white"
+ set colorInverse red
+ else
+ set color white
+ end
+
+ # set date in dt
+ set dt $(date '+%Y-%m-%d %H:%M')
+
+ # set battery capacity in bat
+ set bat $(cat /sys/class/power_supply/BAT0/capacity)
+
+ # print prompt
+ echo -e (set_color $colorInverse)"( "(set_color $color)"$last_status"(set_color $colorInverse)" | " \
+ (set_color $color)"bat.$bat%"(set_color $colorInverse) " | " \
+ (set_color $color)"$dt"(set_color $colorInverse)" )"
+end