sway menu

This commit is contained in:
tavo 2025-09-05 15:19:52 -06:00
parent b12caae894
commit 4ba93cafa4
4 changed files with 59 additions and 47 deletions

View file

@ -11,3 +11,5 @@ steam: com.valvesoftware.Steam
flatseal: com.github.tchx84.Flatseal flatseal: com.github.tchx84.Flatseal
loupe: org.gnome.Loupe loupe: org.gnome.Loupe
citations: org.gnome.World.Citations citations: org.gnome.World.Citations
libreoffice: org.libreoffice.LibreOffice
qbittorrent: org.qbittorrent.qBittorrent

View file

@ -3,7 +3,7 @@ MENU_BACKEND="${MENU_BACKEND:-menu_bemenu}"
# Configuration # Configuration
font="JetbrainsMono" font="JetbrainsMono"
font_size="11" font_size="10"
col_white="#ebdbb2" # White col_white="#ebdbb2" # White
col_nb="#1e2326" # Normal background col_nb="#1e2326" # Normal background
col_nf="#374145" # Normal foreground col_nf="#374145" # Normal foreground
@ -15,7 +15,7 @@ _help() {
} }
menu_bemenu() { menu_bemenu() {
bemenu$BRUN \ bemenu$BRUN \
--no-exec \ --no-exec \
-i \ -i \
-c \ -c \
@ -42,7 +42,7 @@ bemenu$BRUN \
} }
menu_dmenu() { menu_dmenu() {
dmenu$DRUN \ dmenu$DRUN \
-i \ -i \
-l 10 \ -l 10 \
-nb $col_nb \ -nb $col_nb \
@ -55,18 +55,18 @@ dmenu$DRUN \
} }
menu_tofi() { menu_tofi() {
tofi$TRUN \ tofi$TRUN \
--prompt-text "$PROMPT" --prompt-text "$PROMPT"
} }
menu_fzf() { menu_fzf() {
fzf \ fzf \
--cycle \ --cycle \
--reverse --reverse
} }
menu_wofi() { menu_wofi() {
wofi $WRUN \ wofi $WRUN \
-i \ -i \
--prompt "$PROMPT" \ --prompt "$PROMPT" \
$WPASS $WPASS
@ -74,24 +74,30 @@ wofi $WRUN \
MODE="$1" PROMPT="$2" MODE="$1" PROMPT="$2"
case "$MODE" in case "$MODE" in
run) run)
BRUN="-run" BRUN="-run"
DRUN="_run" DRUN="_run"
TRUN="-run" TRUN="-run"
FRUN="" FRUN=""
WRUN="--show drun -I" WRUN="--show drun -I"
$MENU_BACKEND ;; $MENU_BACKEND
dmenu) ;;
dmenu)
BRUN="" BRUN=""
DRUN="" DRUN=""
TRUN="" TRUN=""
FRUN="" FRUN=""
WRUN="--show dmenu" WRUN="--show dmenu"
$MENU_BACKEND ;; $MENU_BACKEND
pass) ;;
pass)
BPASS="-x" BPASS="-x"
DPASS="-P" DPASS="-P"
WPASS="-P" WPASS="-P"
$MENU_BACKEND ;; $MENU_BACKEND
*) _help ; exit 0;; ;;
*)
_help
exit 0
;;
esac esac

View file

@ -3,12 +3,16 @@ EXPORTS_BIN_PREFIX="$HOME/.local/bin"
FLATPAK_BIN_PREFIX="/var/lib/flatpak/exports/bin" FLATPAK_BIN_PREFIX="/var/lib/flatpak/exports/bin"
FLATPAK_LIST="$XDG_CONFIG_HOME"/packages/flatpak/list.yml FLATPAK_LIST="$XDG_CONFIG_HOME"/packages/flatpak/list.yml
if ! [ -d "$EXPORTS_BIN_PREFIX" ]; then
mkdir -p "$EXPORTS_BIN_PREFIX"
fi
while read line; do while read line; do
bin="${line%%:*}" bin="${line%%:*}"
app="${line##*:}" app="${line##*:}"
app="${app##* }" app="${app##* }"
ln -sf "$FLATPAK_BIN_PREFIX"/"$app" "$EXPORTS_BIN_PREFIX"/"$bin" ln -sf "$FLATPAK_BIN_PREFIX"/"$app" "$EXPORTS_BIN_PREFIX"/"$bin"
app_list="$app_list $app" app_list="$app_list $app"
done < "$FLATPAK_LIST" done <"$FLATPAK_LIST"
flatpak install -y $app_list flatpak install -y $app_list

View file

@ -36,7 +36,7 @@ set $filemgr thunar
set $browser firefox set $browser firefox
set $browserh firefox-hardened set $browserh firefox-hardened
# - # -
set $menu wofi --show drun -I set $menu exec $(~/.config/scripts/menu/menu run "Run:")
set $passmgr ~/.config/scripts/sway/swaypass set $passmgr ~/.config/scripts/sway/swaypass
set $passotp ~/.config/scripts/sway/swayotp set $passotp ~/.config/scripts/sway/swayotp
# - # -
@ -121,7 +121,7 @@ font pango:JetBrainsMono Medium 8
bar { bar {
position bottom position bottom
font pango:JetBrainsMono Bold 9 font pango:JetBrainsMono Bold 8
status_command ~/.config/scripts/sway/swaystatus status_command ~/.config/scripts/sway/swaystatus
tray_padding 4 tray_padding 4