2024-07-17 12:18:27 +00:00
|
|
|
#!/bin/env fish
|
|
|
|
begin
|
|
|
|
set -l dir (status dirname)
|
|
|
|
source "$dir/../../Scripts/software.fish"
|
|
|
|
|
2024-09-26 22:58:39 +00:00
|
|
|
function setFlags -a user
|
|
|
|
set -l flags
|
|
|
|
set -l bins codium code
|
|
|
|
|
|
|
|
if [ -n "$user" ]
|
|
|
|
set homeDir ~"$user"
|
|
|
|
set flags -u "$user"
|
|
|
|
else
|
|
|
|
set homeDir "/etc/skel"
|
|
|
|
end
|
|
|
|
|
|
|
|
for bin in $bins
|
|
|
|
if type -q "$bin"
|
|
|
|
begin
|
|
|
|
set -l file "$homeDir/.config/$bin-flags.conf"
|
|
|
|
sudo $flags mkdir -p (dirname "$file")
|
|
|
|
echo "--touch-events" | sudo $flags tee "$file" > /dev/null
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-07-17 12:18:27 +00:00
|
|
|
function installSW
|
|
|
|
yayinst \
|
|
|
|
vscodium-bin \
|
2024-07-17 13:49:30 +00:00
|
|
|
visual-studio-code-bin (
|
|
|
|
# Trash functionality
|
|
|
|
) gvfs
|
2024-07-17 12:18:27 +00:00
|
|
|
end
|
|
|
|
|
2024-07-17 14:33:59 +00:00
|
|
|
function configureSW -V dir
|
2024-09-26 22:58:39 +00:00
|
|
|
setFlags
|
2024-09-20 03:46:11 +00:00
|
|
|
end
|
2024-07-17 12:18:27 +00:00
|
|
|
|
2024-09-20 03:46:11 +00:00
|
|
|
function userConfig -V dir
|
2024-09-26 22:58:39 +00:00
|
|
|
setFlags $argv
|
2024-09-20 03:46:11 +00:00
|
|
|
fish "$dir/../../../Common/Software/vscode/main.fish" userConfig $argv
|
2024-07-17 12:18:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
runInstaller $argv
|
|
|
|
end
|