Add lemon bar and 'now' function
This commit is contained in:
parent
f437eeb28a
commit
9dbe3022b6
2 changed files with 28 additions and 0 deletions
3
dotfiles/fish/.config/fish/functions/now.fish
Normal file
3
dotfiles/fish/.config/fish/functions/now.fish
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
function now --wraps='date +%a%l:%M%p' --description 'alias now date +%a%l:%M%p'
|
||||||
|
date +%a%l:%M%p $argv;
|
||||||
|
end
|
||||||
25
dotfiles/lemonbar/.config/lemonbar/lemonbar.fish
Executable file
25
dotfiles/lemonbar/.config/lemonbar/lemonbar.fish
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/fish
|
||||||
|
|
||||||
|
|
||||||
|
while true
|
||||||
|
set batt_str (battery)
|
||||||
|
set batt_emoji = ""
|
||||||
|
|
||||||
|
switch $batt_str
|
||||||
|
case "Full*"
|
||||||
|
set batt_emoji "✔️"
|
||||||
|
set batt (battery | cut -d ' ' -f2)%
|
||||||
|
case 'Discharging*'
|
||||||
|
set batt_emoji "🔋"
|
||||||
|
set batt (battery | cut -d ' ' -f2)%
|
||||||
|
case 'Not*'
|
||||||
|
set batt_emoji "X"
|
||||||
|
set batt (battery | cut -d ' ' -f3)%
|
||||||
|
case 'Charging*'
|
||||||
|
set batt_emoji "⚡"
|
||||||
|
set batt (battery | cut -d ' ' -f2)%
|
||||||
|
end
|
||||||
|
|
||||||
|
echo -e "%{c}$(now) %{r}$(sugar --lb) $batt_emoji $batt "
|
||||||
|
sleep 1
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue