From 83e8e093291e3dc99c941b6a4b86483b2a199fe7 Mon Sep 17 00:00:00 2001 From: tiago Date: Fri, 15 Mar 2024 21:20:19 +0000 Subject: [PATCH 1/2] fish vi keybinds --- .config/fish/config.fish | 9 ++-- .config/fish/themes/catppuccin-dark.theme | 52 +++++++++---------- .../fish/themes/gruvbox-material-dark.theme | 8 +-- 3 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index bbac16a..afc523f 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -21,19 +21,18 @@ export PKG_CONFIG_PATH="/usr/lib/pkgconfig" source $XDG_CONFIG_HOME/fish/aliasrc -fish_default_key_bindings -#fish_vi_key_bindings +#fish_default_key_bindings +fish_vi_key_bindings bind \cH backward-kill-path-component bind "[3;5~" kill-word -bind \cf $XDG_DATA_HOME/scripts/tmux-sessionizer.sh +bind -M insert \cf $XDG_DATA_HOME/scripts/tmux-sessionizer.sh +bind -M default \cf $XDG_DATA_HOME/scripts/tmux-sessionizer.sh set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/tsousa/.ghcup/bin $PATH # ghcup-env fish_add_path $HOME/.local/share/nvim/mason/bin/ fish_add_path $HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin fish_add_path $HOME/.cargo/bin/ fish_add_path $HOME/.config/emacs/bin -# google cloud bin -fish_add_path /opt/google-cloud-cli/bin starship init fish | source diff --git a/.config/fish/themes/catppuccin-dark.theme b/.config/fish/themes/catppuccin-dark.theme index bed45c9..0d16072 100644 --- a/.config/fish/themes/catppuccin-dark.theme +++ b/.config/fish/themes/catppuccin-dark.theme @@ -1,29 +1,29 @@ # name: 'Catppuccin macchiato' # url: 'https://github.com/catppuccin/fish' -# preferred_background: 24273a +# preferred_background: #24273a -fish_color_normal cad3f5 -fish_color_command 8aadf4 -fish_color_param f0c6c6 -fish_color_keyword ed8796 -fish_color_quote a6da95 -fish_color_redirection f5bde6 -fish_color_end f5a97f -fish_color_comment 8087a2 -fish_color_error ed8796 -fish_color_gray 6e738d -fish_color_selection --background=363a4f -fish_color_search_match --background=363a4f -fish_color_operator f5bde6 -fish_color_escape ee99a0 -fish_color_autosuggestion 6e738d -fish_color_cancel ed8796 -fish_color_cwd eed49f -fish_color_user 8bd5ca -fish_color_host 8aadf4 -fish_color_host_remote a6da95 -fish_color_status ed8796 -fish_pager_color_progress 6e738d -fish_pager_color_prefix f5bde6 -fish_pager_color_completion cad3f5 -fish_pager_color_description 6e738d +fish_color_normal #cad3f5 +fish_color_command #8aadf4 +fish_color_param #f0c6c6 +fish_color_keyword #ed8796 +fish_color_quote #a6da95 +fish_color_redirection #f5bde6 +fish_color_end #f5a97f +fish_color_comment #8087a2 +fish_color_error #ed8796 +fish_color_gray #6e738d +fish_color_selection --background=#363a4f +fish_color_search_match --background=#363a4f +fish_color_operator #f5bde6 +fish_color_escape #ee99a0 +fish_color_autosuggestion #6e738d +fish_color_cancel #ed8796 +fish_color_cwd #eed49f +fish_color_user #8bd5ca +fish_color_host #8aadf4 +fish_color_host_remote #a6da95 +fish_color_status #ed8796 +fish_pager_color_progress #6e738d +fish_pager_color_prefix #f5bde6 +fish_pager_color_completion #cad3f5 +fish_pager_color_description #6e738d diff --git a/.config/fish/themes/gruvbox-material-dark.theme b/.config/fish/themes/gruvbox-material-dark.theme index bd31e28..36c85d6 100644 --- a/.config/fish/themes/gruvbox-material-dark.theme +++ b/.config/fish/themes/gruvbox-material-dark.theme @@ -1,17 +1,17 @@ fish_color_normal D4BE98 -fish_color_command 89B482 +fish_color_command A9B665 fish_color_keyword 7DAEA3 fish_color_quote D8A657 fish_color_redirection D4BE98 fish_color_end E78A4E fish_color_error EA6962 -fish_color_param D3869B -fish_color_comment D3869B +fish_color_param D4BE98 +fish_color_comment 7C6F64 fish_color_selection --background=504945 fish_color_search_match --background=504945 fish_color_operator A9B665 fish_color_escape 7DAEA3 -fish_color_autosuggestion 8F3F71 +fish_color_autosuggestion 5A524C fish_pager_color_progress 8F3F71 fish_pager_color_prefix 89B482 From 867117f29784b8c29b80cbc7155f9e4ca067577f Mon Sep 17 00:00:00 2001 From: tiago Date: Fri, 15 Mar 2024 21:21:25 +0000 Subject: [PATCH 2/2] theme selector and powermenu --- .local/share/scripts/powermenu.sh | 16 ++++++++++++++-- .local/share/scripts/theme-selector.sh | 5 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.local/share/scripts/powermenu.sh b/.local/share/scripts/powermenu.sh index 96f30a9..bf94642 100755 --- a/.local/share/scripts/powermenu.sh +++ b/.local/share/scripts/powermenu.sh @@ -1,10 +1,14 @@ #!/bin/bash # Define options -options="Shutdown\nRestart\nSuspend\nLock" +options="Shutdown\nRestart\nSuspend\nLogout\nLock" # Prompt user to select an option using Rofi -selected_option=$(echo -e "$options" | rofi -dmenu -p "Power Menu") +selected_option=$(echo -e "$options" | rofi -dmenu -p "Power Menu" -lines 6 -theme-str 'configuration {show-icons: false;} entry {placeholder: "Choose..."}') + +if [ -z "$selected_option" ]; then + exit 0 +fi # Function to display confirmation dialog confirm_action() { @@ -32,6 +36,14 @@ case $selected_option in "Suspend") systemctl suspend ;; +"Logout") + confirmation=$(confirm_action "Logout?") + if [ "$confirmation" == "Yes" ]; then + i3-msg exit + else + exit 0 + fi + ;; "Lock") i3-msg exit ;; diff --git a/.local/share/scripts/theme-selector.sh b/.local/share/scripts/theme-selector.sh index bfbd55a..4d1877f 100755 --- a/.local/share/scripts/theme-selector.sh +++ b/.local/share/scripts/theme-selector.sh @@ -10,8 +10,9 @@ theme_options=( # rofi script to get what theme to use chosen=$(printf '%s\n' "${theme_options[@]}" | rofi -dmenu -p "Theme" -theme-str "configuration {show-icons:false;}") -if [[ $chosen == "-" ]]; then - exit 1 + +if [[ $chosen == "" ]]; then + exit 0 fi theme=$(echo "${chosen}" | rev | cut -d- -f2- | rev)