mirror of
https://github.com/liclac/ambient
synced 2024-11-28 06:20:25 +00:00
MVP widget system
This commit is contained in:
parent
e4b6d0501c
commit
e750dccea4
3 changed files with 21 additions and 0 deletions
8
ambient-widgets
Executable file
8
ambient-widgets
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
# Change to the script's directory for now, it makes things easier.
|
||||||
|
set -l ambient_path (dirname (status --current-filename))
|
||||||
|
cd $ambient_path
|
||||||
|
|
||||||
|
# Use ambient to run the widget dispatcher with data in the environment.
|
||||||
|
./ambient ./lib/_dispatch_widgets.fish
|
4
lib/_dispatch_widgets.fish
Executable file
4
lib/_dispatch_widgets.fish
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env fish
|
||||||
|
for file in ./widgets.d/**/*.fish
|
||||||
|
source $file
|
||||||
|
end
|
9
widgets.d/trains/DE_ICE.fish
Normal file
9
widgets.d/trains/DE_ICE.fish
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
if set -q AMBIENT_DE_ICE_STOP_NEXT
|
||||||
|
echo " $AMBIENT_DE_ICE_STOP_NEXT"
|
||||||
|
end
|
||||||
|
if set -q AMBIENT_DE_ICE_TRAIN_TYPE
|
||||||
|
echo " $AMBIENT_DE_ICE_TRAIN_TYPE-$AMBIENT_DE_ICE_VZN"
|
||||||
|
end
|
||||||
|
if set -q AMBIENT_DE_ICE_SPEED
|
||||||
|
echo " $AMBIENT_DE_ICE_SPEED km/h"
|
||||||
|
end
|
Loading…
Reference in a new issue