blob: 4a2fb4effa7c1a94d006d7292ef3f1a29298c1a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
function _out -a colour -a level -a text
set_color $colour
# Pass arguments other than text to echo
echo $argv[4..] -- ":: [$level] $text"
set_color normal
end
function log -a text
_out cyan LOG $text $argv[2..]
end
function warn -a text
_out yellow WARN $text $argv[2..]
end
function error -a text
_out red ERROR $text $argv[2..]
return 1
end
function input -a text
_out blue INPUT $text $argv[2..]
end
set -q XDG_CONFIG_HOME && set CONFIG $XDG_CONFIG_HOME/caelestia || set CONFIG $HOME/.config/caelestia
set -q XDG_CACHE_HOME && set CACHE $XDG_CACHE_HOME/caelestia || set CACHE $HOME/.cache/caelestia
|