blob: 674b966de373129b5c9a45914eb9d6017eddff0e (
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
27
28
29
30
31
32
33
34
35
36
37
|
#!/usr/bin/env nu
#
# ~~~ dotfiles installer
#
#
# ~~~ variables
# get device
let DEVICE_ID = match (uname | get nodename) {
"glados" => "010",
"wheatley" => "020",
"chell" => "030",
"hx7124" => "040",
"companioncube" => "110",
"cavejohnson" => "120",
_ => { error make -u { msg: "invalid device" } }
}
# get locations
let DOTFILES_DIR = match ($DEVICE_ID) {
"010" | "020" => $"($env.HOME)/src/dotfiles/src",
"110" | "120" => $"($env.HOME)/dotfiles/src",
_ => { error make -u { msg: "unsupported device" } }
}
#
# ~~~ dotfiles
# gammastep
if ($DEVICE_ID == "010" or $DEVICE_ID == "020") {
mkdir $"($env.HOME)/.config/gammastep"
cp $"($DOTFILES_DIR)/gammastep/($DEVICE_ID)_config.ini" $"($env.HOME)/.config/gammastep/config.ini"
}
|