chore: Added a theme change in rofi script. Need to add rofi itself and other stuff still

This commit is contained in:
Afonso Franco 2023-11-01 22:56:14 +00:00
parent f0899924f0
commit 0d8809b596
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
13 changed files with 139 additions and 19 deletions

View file

@ -15,7 +15,6 @@ fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/.ghcup/bin
fish_add_path /usr/bin/vendor_perl
source ~/.config/fish/myfunctions/code.fish
source ~/.config/fish/myfunctions/dotfiles.fish
source ~/.config/fish/myfunctions/pacman.fish
source ~/.config/fish/myfunctions/qol.fish

View file

@ -1,8 +0,0 @@
function vim
nvim $argv
end
function ta
tmux attach
end

View file

@ -1,9 +1,14 @@
function ls
eza --icons -l --sort type $argv
end
function nvim
/usr/bin/nvim --listen /tmp/nvim.pipe $argv
end
function vim
/usr/bin/nvim --listen /tmp/nvim.pipe $argv
end
abbr -a find fd
abbr -a df duf
abbr -a v nvim
abbr -a lg lazygit
function rm
echo "rm is disabled, use trash instead"

View file

@ -0,0 +1,30 @@
# name: 'Catppuccin latte'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword d20f39
fish_color_quote 40a02b
fish_color_redirection ea76cb
fish_color_end fe640b
fish_color_comment 8c8fa1
fish_color_error d20f39
fish_color_gray 9ca0b0
fish_color_selection --background=ccd0da
fish_color_search_match --background=ccd0da
fish_color_option 40a02b
fish_color_operator ea76cb
fish_color_escape e64553
fish_color_autosuggestion 9ca0b0
fish_color_cancel d20f39
fish_color_cwd df8e1d
fish_color_user 179299
fish_color_host_remote 40a02b
fish_color_host 1e66f5
fish_color_status d20f39
fish_pager_color_progress 9ca0b0
fish_pager_color_prefix ea76cb
fish_pager_color_completion 4c4f69
fish_pager_color_description 9ca0b0

View file

@ -34,3 +34,9 @@ env TERM=xterm-256color
include current-theme.conf
# BEGIN_KITTY_THEME
# Catppuccin-Frappe
include current-theme.conf
# END_KITTY_THEME

View file

@ -0,0 +1,42 @@
font_family FiraCode Nerd Font Mono Normal
font_size 14.0
enable_audio_bell no
window_padding_width 6
confirm_os_window_close 0
env TERM=xterm-256color
# Multiplexer mappings
#map ctrl+u kitten pass_keys.py neighboring_window bottom ctrl+u
#map ctrl+i kitten pass_keys.py neighboring_window top ctrl+i
#map ctrl+y kitten pass_keys.py neighboring_window left ctrl+y
#map ctrl+o kitten pass_keys.py neighboring_window right ctrl+o
#
#map ctrl+shift+w no_op
#map ctrl+x close_window
#map ctrl+shift+x close_tab
#
#map ctrl+shift+enter no_op
#map ctrl+n new_window
#map ctrl+shift+n new_tab
#
#map ctrl+f toggle_layout stack
#
# Remote control
#allow_remote_control yes
#listen-on unix:@"$(date +%s%N)"
#Project management
#map ctrl+space launch --type=overlay fish -ic "kitty @ ls | jq -r '.[0].tabs | map(.title) | .[]' | fzf | xargs -I _ kitty @ focus-tab --match title:_"
include current-theme.conf
# BEGIN_KITTY_THEME
# Catppuccin-Latte
include current-theme.conf
# END_KITTY_THEME

View file

@ -1,3 +1,4 @@
require("core.variables")
require('core.package_manager')
require('plugins.remote-theme')
require('impatient')

View file

@ -7,6 +7,7 @@ lazy.setup({
-------------------------------------------THEMES------------------------------------------
{
'catppuccin/nvim',
name = "catppuccin",
lazy = false,
priority = 1000,
config = function()

View file

@ -48,19 +48,20 @@ local capabilities = vim.tbl_deep_extend(
require('cmp_nvim_lsp').default_capabilities()
)
local setup = {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
mason_lspconfig.setup_handlers {
-- This is a default handler that will be called for each installed server (also for new servers that are installed during a session)
function(server_name)
lspconfig[server_name].setup { setup }
lspconfig[server_name].setup {
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}
end,
}
lspconfig["ocamllsp"].setup {
setup
lspconfig["ocamllsp"].setup{
on_attach = on_attach,
flags = lsp_flags,
capabilities = capabilities,
}

View file

@ -7,6 +7,7 @@ null_ls.setup({
null_ls.builtins.formatting.blue,
null_ls.builtins.formatting.gofmt,
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.formatting.beautysh,
null_ls.builtins.formatting.prettierd.with({
filetypes = { "html", "json", "css", "js", "yaml", "markdown" },
}),

View file

@ -0,0 +1,8 @@
local M = {}
M.change_theme = function(scheme)
vim.cmd('colorscheme ' .. scheme)
end
return M

View file

@ -46,7 +46,7 @@ set -g @catppuccin_flavour 'frappe'
set -g @catppuccin_window_tabs_enabled on
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
#set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
set -g @continuum-boot 'on'

34
.local/bin/rofi-change-theme Executable file
View file

@ -0,0 +1,34 @@
#!/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"