update:custom rofi images

This commit is contained in:
kokopi-dev
2025-12-07 14:09:54 +09:00
parent 5a1ff168ee
commit f13af3b019
5 changed files with 34 additions and 68 deletions

View File

@@ -1,10 +0,0 @@
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec mango
fi

View File

@@ -1,55 +0,0 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '
alias ll="ls -l"
alias v="nvim"
alias ..="cd .."
alias ux='chmod u+x'
alias mkdir='mkdir -p'
alias ziptar="tar -zcvf"
alias unziptar="tar -xvzf"
alias gadd='git add'
alias gdiff='git diff'
alias mpush='git push origin master'
alias gstat='git status'
function gcom() {
GITMESSAGE="$*"
git commit -m "$GITMESSAGE"
}
alias ll='exa -lg --icons'
alias lll='exa -lga'
alias cat='bat --style=header,grid'
export PATH="$PATH:$HOME/.local/bin"
export PATH="$PATH:$HOME/go/bin"
eval "$(fnm env --use-on-cd)"
eval "$(starship init bash)"
pass() {
(cd /home/kokopi/kp/syncpass && bash /home/kokopi/kp/syncpass/syncpass "$@")
}
export PASSWORD_STORE_EXTENSION_COMMANDS=("c")
__password_store_extension_complete_c() {
COMPREPLY+=($(compgen -W "-o --option" -- ${cur}))
_pass_complete_entries 1
}
export GTK_THEME=tokyonight-dark
bind 'TAB:menu-complete'
bind 'set show-all-if-ambiguous on'
eval "$(fzf --bash)"
export FZF_CTRL_T_COMMAND="fd --type f --type d --hidden --follow --exclude .git --exclude venv --exclude node_modules --exclude .cache --exclude cache --exclude __pycache__ --exclude pkg --exclude .vim --exclude .themes --exclude .cargo --exclude .config/discord --exclude .npm --exclude .mozilla --exclude .rustup --search-path ."

View File

@@ -2,6 +2,19 @@
# ln -s ~/.config/rofi/config-manager/rofi-config-manager.sh ~/.local/bin/rofi-config-manager.sh # ln -s ~/.config/rofi/config-manager/rofi-config-manager.sh ~/.local/bin/rofi-config-manager.sh
THEME_FILE=~/.config/rofi/config-manager/config-manager.rasi THEME_FILE=~/.config/rofi/config-manager/config-manager.rasi
post_rofi() {
local image_dir="$HOME/.config/rofi/images/sg"
local current_image=$(grep "background-image: url" "$THEME_FILE" | cut -d'"' -f2)
local new_image=$(find "$image_dir" -type f | sort -R | head -n 1 | sed "s|^$HOME|~|")
while true; do
if [[ "$new_image" != "$current_image" ]]; then
sed -i 's|url("[^"]*"|url("'"$new_image"'"|' "$THEME_FILE"
break
fi
new_image=$(find "$image_dir" -type f | sort -R | head -n 1 | sed "s|^$HOME|~|")
done
}
MANGO=" Mango" MANGO=" Mango"
BACK=" Back" BACK=" Back"
MANGO_CONF=" Config" MANGO_CONF=" Config"
@@ -18,13 +31,14 @@ ROFI_APP=" App"
ROFI_SETT=" Setting" ROFI_SETT=" Setting"
ROFI_CONF=" Config" ROFI_CONF=" Config"
ROFI_POW=" Power" ROFI_POW=" Power"
ROFI_HELP=" Help"
MAKO=" Mako" MAKO=" Mako"
KANSHI="󰍺 Kanshi" KANSHI="󰍺 Kanshi"
if [[ "$1" == "mango" ]]; then if [[ "$1" == "mango" ]]; then
chosen=$(echo -e "$MANGO_CONF\n$MANGO_START\n$MANGO_BIND\n$MANGO_RULES\n$MANGO_ENV\n$MANGO_EXEC\n$BACK" | rofi -mesg "󰨇 Mango" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi) chosen=$(echo -e "$MANGO_CONF\n$MANGO_START\n$MANGO_BIND\n$MANGO_RULES\n$MANGO_ENV\n$MANGO_EXEC\n$BACK" | rofi -mesg "󰨇 Mango" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi)
elif [[ "$1" == "rofi" ]]; then elif [[ "$1" == "rofi" ]]; then
chosen=$(echo -e "$ROFI_APP\n$ROFI_SETT\n$ROFI_CONF\n$ROFI_POW\n$BACK" | rofi -mesg " Rofi" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi) chosen=$(echo -e "$ROFI_APP\n$ROFI_SETT\n$ROFI_CONF\n$ROFI_POW\n$ROFI_HELP\n$BACK" | rofi -mesg " Rofi" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi)
else else
chosen=$(echo -e "$MANGO\n$NVIM\n$WAYBAR\n$GHOSTTY\n$ROFI\n$KANSHI\n$MAKO" | rofi -mesg " Configs" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi) chosen=$(echo -e "$MANGO\n$NVIM\n$WAYBAR\n$GHOSTTY\n$ROFI\n$KANSHI\n$MAKO" | rofi -mesg " Configs" -dmenu -p "Action:" -config ~/.config/rofi/config-manager/config-manager.rasi)
fi fi
@@ -88,7 +102,15 @@ case $chosen in
ghostty -e nvim ~/.config/rofi/power-manager/power-manager.rasi & disown ghostty -e nvim ~/.config/rofi/power-manager/power-manager.rasi & disown
ghostty -e nvim ~/.config/rofi/power-manager/rofi-power-manager.sh & disown ghostty -e nvim ~/.config/rofi/power-manager/rofi-power-manager.sh & disown
;; ;;
"$ROFI_HELP")
ghostty -e nvim ~/.config/rofi/help-manager/help-manager.rasi & disown
ghostty -e nvim ~/.config/rofi/help-manager/rofi-help-manager.sh & disown
;;
"$KANSHI") "$KANSHI")
ghostty -e nvim ~/.config/kanshi/config & disown ghostty -e nvim ~/.config/kanshi/config & disown
;; ;;
esac esac
if [[ "$HOSTNAME" == "astra" ]]; then
post_rofi &
fi

View File

@@ -34,9 +34,16 @@ case $chosen in
echo "Creating firefox profile" echo "Creating firefox profile"
mkdir -p /tmp/firefox-dev mkdir -p /tmp/firefox-dev
firefox -CreateProfile "dev-profile /tmp/firefox-dev" firefox -CreateProfile "dev-profile /tmp/firefox-dev"
cat >> /tmp/firefox-dev/prefs.js << EOF
user_pref("browser.download.dir", "~/downloads");
user_pref("browser.download.folderList", 2);
EOF
fi fi
firefox -P dev-profile -private-window https://devhints.io/bash & firefox -P dev-profile -private-window https://devhints.io/bash &
;; ;;
esac esac
post_rofi &
if [[ "$HOSTNAME" == "astra" ]]; then
post_rofi &
fi

View File

@@ -32,4 +32,6 @@ case $chosen in
;; ;;
esac esac
post_rofi & if [[ "$HOSTNAME" == "astra" ]]; then
post_rofi &
fi