[MAJOR] Added theme change script to raycast and fix a bunch of theme related stuff
This commit is contained in:
parent
bfcf25e086
commit
9fd8314ee1
28 changed files with 443 additions and 490 deletions
76
.local/bin/change-theme.sh
Executable file
76
.local/bin/change-theme.sh
Executable file
|
@ -0,0 +1,76 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Required parameters:
|
||||
# @raycast.schemaVersion 1
|
||||
# @raycast.title Theme Switcher
|
||||
# @raycast.mode silent
|
||||
# @raycast.argument1 { "type": "dropdown","placeholder":"Theme", "data": [{"title": "Catppuccin Frappe", "value": "catppuccin-frappe"},{"title": "Catppuccin Latte", "value": "catppuccin-latte"},{"title": "Gruvbox Material Dark", "value": "gruvbox-material-dark"},{"title": "Gruvbox Material Light", "value": "gruvbox-material-light"}]}
|
||||
#
|
||||
|
||||
alacritty_theme_name=""
|
||||
zsh_theme_name=""
|
||||
|
||||
case $1 in
|
||||
"catppuccin-latte")
|
||||
alacritty_theme_name="catppuccin_latte"
|
||||
zsh_theme_name="catppuccin_latte"
|
||||
|
||||
set +e
|
||||
#Clear nvim theme file
|
||||
> ~/.config/nvim/lua/core/theme.lua
|
||||
echo "vim.cmd('colorscheme catppuccin-latte')" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':colorscheme catppuccin-latte<CR>'
|
||||
set -e
|
||||
;;
|
||||
|
||||
"catppuccin-frappe")
|
||||
alacritty_theme_name="catppuccin_frappe"
|
||||
zsh_theme_name="catppuccin_frappe"
|
||||
|
||||
set +e
|
||||
#Clear nvim theme file
|
||||
> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':colorscheme catppuccin-frappe<CR>'
|
||||
echo "vim.cmd('colorscheme catppuccin-frappe')" >> ~/.config/nvim/lua/core/theme.lua
|
||||
set -e
|
||||
;;
|
||||
|
||||
"gruvbox-material-dark")
|
||||
alacritty_theme_name="gruvbox_material_dark"
|
||||
zsh_theme_name="gruvbox_dark"
|
||||
|
||||
set +e
|
||||
#Clear nvim theme file
|
||||
> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>'
|
||||
echo "vim.g.gruvbox_material_better_performance = 1" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "medium"<CR>'
|
||||
echo "vim.g.gruvbox_material_background = 'medium'" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "dark"<CR>'
|
||||
echo "vim.opt.background = 'dark'" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':colorscheme gruvbox-material<CR>'
|
||||
echo "vim.cmd('colorscheme gruvbox-material')" >> ~/.config/nvim/lua/core/theme.lua
|
||||
set -e
|
||||
;;
|
||||
|
||||
"gruvbox-material-light")
|
||||
alacritty_theme_name="gruvbox_material_light"
|
||||
zsh_theme_name="gruvbox_light"
|
||||
|
||||
set +e
|
||||
#Clear nvim theme file
|
||||
> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>'
|
||||
echo "vim.g.gruvbox_material_better_performance = 1" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "soft"<CR>'
|
||||
echo "vim.g.gruvbox_material_background = 'soft'" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "light"<CR>'
|
||||
echo "vim.opt.background = 'light'" >> ~/.config/nvim/lua/core/theme.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':colorscheme gruvbox-material<CR>'
|
||||
echo "vim.cmd('colorscheme gruvbox-material')" >> ~/.config/nvim/lua/core/theme.lua
|
||||
set -e
|
||||
;;
|
||||
esac
|
||||
|
||||
sed -i '' -e "s|import = \[\"~/.config/alacritty/themes/.*\"\]|import = [\"~/.config/alacritty/themes/${alacritty_theme_name}.toml\"]|g" ~/.config/alacritty/alacritty.toml
|
||||
sed -i '' -e "s|source \$HOME/.config/zsh/themes/.*zsh|source \$HOME/.config/zsh/themes/${zsh_theme_name}.zsh|g" ~/.zshrc
|
13
.local/bin/open-in-iina.sh
Executable file
13
.local/bin/open-in-iina.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Required parameters:
|
||||
# @raycast.schemaVersion 1
|
||||
# @raycast.title IINA
|
||||
# @raycast.mode silent
|
||||
|
||||
# Optional parameters:
|
||||
# @raycast.icon /Applications/IINA.app/Contents/Resources/AppIcon.icns
|
||||
# @raycast.packageName Open urls in IINA
|
||||
# @raycast.argument1 { "type": "text", "placeholder": "url..." }
|
||||
|
||||
open ${1// /%20} -a IINA
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Define a list of themes
|
||||
themes="latte\nfrappe"
|
||||
|
||||
# Display theme options in Rofi
|
||||
selected_theme=$(echo -e "${themes[@]}" | rofi -dmenu -p "Select a theme:")
|
||||
|
||||
case $selected_theme in
|
||||
"latte")
|
||||
# Change to Latte theme
|
||||
#kitty
|
||||
kitty +kitten themes --reload-in=all catppuccin-latte
|
||||
sed -i 's/flavour = ".*"/flavour = "latte"/' "$HOME"/.config/nvim/lua/plugins/catppuccin.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':colorscheme catppuccin-latte<CR>'
|
||||
sed -i 's/set -g @catppuccin_flavour .*/set -g @catppuccin_flavour '\''latte'\''/' "$HOME"/.config/tmux/tmux.conf
|
||||
fish -c "echo \"Y\" | fish_config theme save \"Catppuccin Latte\""
|
||||
;;
|
||||
"frappe")
|
||||
# Change to Frappe theme
|
||||
#kitty
|
||||
kitty +kitten themes --reload-in=all catppuccin-frappe
|
||||
sed -i 's/flavour = ".*"/flavour = "frappe"/' "$HOME"/.config/nvim/lua/plugins/catppuccin.lua
|
||||
nvim --server /tmp/nvim.pipe --remote-send ':colorscheme catppuccin-frappe<CR>'
|
||||
sed -i 's/set -g @catppuccin_flavour .*/set -g @catppuccin_flavour '\''frappe'\''/' "$HOME"/.config/tmux/tmux.conf
|
||||
fish -c "echo \"Y\" | fish_config theme save \"Catppuccin Frappe\""
|
||||
;;
|
||||
*)
|
||||
# Handle an invalid selection or cancel
|
||||
echo "Invalid selection or canceled."
|
||||
;;
|
||||
esac
|
||||
|
||||
tmux source-file "$HOME/.config/tmux/tmux.conf"
|
Loading…
Add table
Add a link
Reference in a new issue