22 lines
786 B
Fish
22 lines
786 B
Fish
function theme
|
|
if test (count $argv) -eq 1
|
|
if test "$argv[1]" = "dark"
|
|
if command -q osascript
|
|
command osascript -e 'tell application "System Events" to set dark mode of appearance preferences to true'
|
|
end
|
|
fish_config theme choose "Catppuccin Frappe"
|
|
else if test "$argv[1]" = "light"
|
|
if command -q osascript
|
|
command osascript -e 'tell application "System Events" to set dark mode of appearance preferences to false'
|
|
end
|
|
fish_config theme choose "Catppuccin Latte"
|
|
else
|
|
echo "Error: Invalid theme. Use 'dark' or 'light'." >&2
|
|
return 1
|
|
end
|
|
else
|
|
echo "Usage: theme [dark|light]" >&2
|
|
return 1
|
|
end
|
|
end
|