Browse Source

Moved from dmenu to bemenu

master
Micah Halter 11 months ago
parent
commit
f50550461d
18 changed files with 90 additions and 60 deletions
  1. +2
    -0
      CHANGELOG.md
  2. +2
    -1
      Makefile
  3. +14
    -14
      i3/.config/i3/config
  4. +2
    -0
      networkmanager_dmenu/.config/networkmanager-dmenu/config.ini
  5. +2
    -2
      scripts/.config/Scripts/bemenubluetooth
  6. +17
    -0
      scripts/.config/Scripts/bemenucolor
  7. +1
    -1
      scripts/.config/Scripts/bemenuexpand
  8. +3
    -0
      scripts/.config/Scripts/bemenui3
  9. +1
    -1
      scripts/.config/Scripts/bemenulatex
  10. +4
    -4
      scripts/.config/Scripts/bemenumount
  11. +25
    -0
      scripts/.config/Scripts/bemenupass
  12. +2
    -2
      scripts/.config/Scripts/bemenushutdown
  13. +2
    -2
      scripts/.config/Scripts/bemenuumount
  14. +1
    -1
      scripts/.config/Scripts/bemenuunicode
  15. +2
    -2
      scripts/.config/Scripts/bemenuwpg
  16. +10
    -10
      scripts/.config/Scripts/displayselect
  17. +0
    -17
      scripts/.config/Scripts/dmenucolor
  18. +0
    -3
      scripts/.config/Scripts/dmenui3

+ 2
- 0
CHANGELOG.md View File

@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Migrated from `dmenu` to `bemenu` to fix some bugs that haven't been fixed for
almost a year
- Created `dmenulatex` for selecting latex characters based on latex commands
- Added more unicode characters to `dmenuunicode` script


+ 2
- 1
Makefile View File

@ -45,13 +45,13 @@ arch: pacman
alsa-utils \
aria2 \
asciinema \
bemenu \
biber \
cronie \
ctags \
cups \
cups-pdf \
dhclient \
dmenu \
dunst \
exfat-utils \
fd \
@ -193,6 +193,7 @@ configs: stow-pre
ncpamixer \
neofetch \
neovim \
networkmanager_dmenu \
newsboat \
pass \
picom \


+ 14
- 14
i3/.config/i3/config View File

@ -179,8 +179,8 @@ bindsym $mod+Shift+w exec --no-startup-id i3-cliprog weather "wttr && re
bindsym $mod+Control+w exec --no-startup-id $ALTBROWSER
#bindsym $mod+Shift+Control+w
bindsym $mod+e exec --no-startup-id dmenuunicode
bindsym $mod+Shift+e exec --no-startup-id dmenulatex
bindsym $mod+e exec --no-startup-id bemenuunicode
bindsym $mod+Shift+e exec --no-startup-id bemenulatex
#bindsym $mod+Control+e
#bindsym $mod+Shift+Control+e
@ -239,8 +239,8 @@ bindsym $mod+f fullscreen toggle
#bindsym $mod+Control+f
#bindsym $mod+Shift+Control+f
bindsym $mod+g exec --no-startup-id dmenubluetooth
bindsym $mod+Shift+g exec --no-startup-id dmenubluetooth -d
bindsym $mod+g exec --no-startup-id bemenubluetooth
bindsym $mod+Shift+g exec --no-startup-id bemenubluetooth -d
#bindsym $mod+Control+g
bindsym $mod+Shift+Control+g exec --no-startup-id killall gpymusic & killall cava & echo '' > $HOME/.nowplaying
@ -264,8 +264,8 @@ bindsym $mod+Shift+l move right
bindsym $mod+Control+l exec --no-startup-id i3-resize right
bindsym $mod+Shift+Control+l move workspace to output right
bindsym $mod+z exec --no-startup-id dmenumount
bindsym $mod+Shift+z exec --no-startup-id dmenuumount
bindsym $mod+z exec --no-startup-id bemenumount
bindsym $mod+Shift+z exec --no-startup-id bemenuumount
#bindsym $mod+Control+z
#bindsym $mod+Shift+Control+z
@ -284,9 +284,9 @@ bindsym $mod+Shift+v exec --no-startup-id $TERMINAL -e 'i3-runner "rtv -
#bindsym $mod+Control+v
#bindsym $mod+Shift+Control+v
bindsym $mod+b exec --no-startup-id dmenuexpand $HOME/.bookmarks $BROWSER "Bookmarks:" $BROWSER
bindsym $mod+Shift+b exec --no-startup-id dmenuwpg
bindsym $mod+Control+b exec --no-startup-id dmenuexpand $HOME/.bookmarks $ALTBROWSER "Bookmarks:" $ALTBROWSER
bindsym $mod+b exec --no-startup-id bemenuexpand $HOME/.bookmarks $BROWSER "Bookmarks:" $BROWSER
bindsym $mod+Shift+b exec --no-startup-id bemenuwpg
bindsym $mod+Control+b exec --no-startup-id bemenuexpand $HOME/.bookmarks $ALTBROWSER "Bookmarks:" $ALTBROWSER
#bindsym $mod+Shift+Control+b
#bindsym $mod+n
@ -376,8 +376,8 @@ bindsym $mod+Shift+Control+bracketleft exec --no-startup-id light -U 10
#bindsym $mod+Shift+bracketright
bindsym $mod+Shift+Control+bracketright exec --no-startup-id light -A 10
bindsym $mod+backslash exec --no-startup-id dmenucolor -c passmenu -p 'Passwords:'
bindsym $mod+Shift+backslash exec --no-startup-id dmenucolor -c networkmanager_dmenu
bindsym $mod+backslash exec --no-startup-id bemenupass
bindsym $mod+Shift+backslash exec --no-startup-id networkmanager_dmenu
#bindsym $mod+Shift+Control+backslash
#bindsym $mod+semicolon
@ -389,7 +389,7 @@ bindsym $mod+Shift+semicolon exec --no-startup-id $TERMINAL --name=ca
#bindsym $mod+Shift+Control+apostrophe
bindsym $mod+Return exec --no-startup-id $TERMINAL
bindsym $mod+Shift+Return exec --no-startup-id i3-dmenu-desktop --dmenu="dmenucolor -p 'Applications:'"
bindsym $mod+Shift+Return exec --no-startup-id i3-dmenu-desktop --dmenu="bemenucolor -i -p 'Applications:'"
#bindsym $mod+Shift+Control+Return
#bindsym $mod+comma
@ -401,7 +401,7 @@ bindsym $mod+Shift+Return exec --no-startup-id i3-dmenu-desktop --
#bindsym $mod+Shift+Control+period
#bindsym $mod+slash
bindsym $mod+Shift+slash exec --no-startup-id dmenui3
bindsym $mod+Shift+slash exec --no-startup-id bemenui3
#bindsym $mod+Shift+Control+slash
bindsym $mod+space focus mode_toggle
@ -475,7 +475,7 @@ bindsym $mod+Delete exec --no-startup-id killall ffmpeg & ki
bindsym $mod+Next reload
bindsym $mod+Shift+Next restart
bindsym $mod+Shift+Control+Next exec --no-startup-id dmenushutdown
bindsym $mod+Shift+Control+Next exec --no-startup-id bemenushutdown
#####################


+ 2
- 0
networkmanager_dmenu/.config/networkmanager-dmenu/config.ini View File

@ -0,0 +1,2 @@
[dmenu]
dmenu_command = bemenucolor

scripts/.config/Scripts/dmenubluetooth → scripts/.config/Scripts/bemenubluetooth View File

@ -10,7 +10,7 @@ i=2
for arg do
if [[ $arg == :: ]]; then
dmenu_args=( "${@:$i}" )
bemenu_args=( "${@:$i}" )
break
fi
@ -82,7 +82,7 @@ execute_mode() {
return 2
fi
name=$(printf '%s\n' "${!DEVICES[@]}" | dmenucolor -p "Bluetooth $mode" "${dmenu_args[@]}")
name=$(printf '%s\n' "${!DEVICES[@]}" | bemenucolor -p "Bluetooth-$mode" "${bemenu_args[@]}")
[[ $name ]] || return
mac=${DEVICES["$name"]}

+ 17
- 0
scripts/.config/Scripts/bemenucolor View File

@ -0,0 +1,17 @@
#!/bin/bash
source ~/.cache/wal/colors.sh
command=bemenu
if [[ "$1" == "-c" ]]; then
while getopts 'c:' option; do
case $option in
c) command=$OPTARG && break;;
esac
done
shift $(($OPTIND - 1))
fi
$command -p "" --nb=$background --nf=$foreground --hb=$foreground --hf=$background --sb=$foreground --sf=$background --tb=$foreground --tf=$background --ff=$foreground --fb=$background --scb=$background --scf=$foreground --fn="mono 10" $@

scripts/.config/Scripts/dmenuexpand → scripts/.config/Scripts/bemenuexpand View File

@ -5,7 +5,7 @@ action=$2
prompt=$3
alternate=$4
chosen=$(sed -n 's/^\([^:]*\):.*$/\1/p' $lookup|dmenucolor -i -p "$prompt")
chosen=$(sed -n 's/^\([^:]*\):.*$/\1/p' $lookup|bemenucolor -i -p "$prompt")
expanded=$(sed -n "s/^${chosen}:\(.*\)$/\1/p" $lookup)
if [ "$expanded" != "" ]; then

+ 3
- 0
scripts/.config/Scripts/bemenui3 View File

@ -0,0 +1,3 @@
#!/bin/bash
i3-msg "$(cat ~/.config/i3/config | sed -E 's/^bindsym\s*(\S*)\s*(\S.*$)/\1|\2/;t;d'|column -s'|' -t | bemenucolor -l 30 | cut -d' ' -f2- | xargs -0)"

scripts/.config/Scripts/dmenulatex → scripts/.config/Scripts/bemenulatex View File

@ -2,7 +2,7 @@
xclip -h >/dev/null || exit
chosen=$(grep -v "#" -h $HOME/.config/Scripts/latexchars | dmenucolor -i -l 20)
chosen=$(grep -v "#" -h $HOME/.config/Scripts/latexchars | bemenucolor -l 20)
[ "$chosen" != "" ] || exit

scripts/.config/Scripts/dmenumount → scripts/.config/Scripts/bemenumount View File

@ -1,11 +1,11 @@
#!/bin/bash
pgrep -x dmenu && exit
pgrep -x bemenu && exit
mountable=$(lsblk -lp -o NAME,FSTYPE,SIZE,TYPE,MOUNTPOINT|grep 'part\|lvm'|grep -v "\(part\|lvm\)[[:space:]]\+/\|t[[:space:]]\+\[SWAP\]\|crypto_LUKS"|awk '{print $1, "(" $3 ")"}')
[[ "$mountable" = "" ]] && exit 1
chosen=$(echo "$mountable"|dmenucolor -i -p "Unmounted Drives:"|awk '{print $1}')
chosen=$(echo "$mountable"|bemenucolor -i -p "Unmounted Drives:"|awk '{print $1}')
[[ "$chosen" = "" ]] && exit 1
sudo mount "$chosen" && exit 0
@ -14,11 +14,11 @@ already_mounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/b
dirs=$(find /mnt /media /mount /home -type d -maxdepth 5 $already_mounted 2>/dev/null)
mountpoint=$(echo "$dirs"|dmenucolor -i -p "Mount Point:")
mountpoint=$(echo "$dirs"|bemenucolor -i -p "Mount Point:")
[[ "$mountpoint" = "" ]] && exit 1
if [[ ! -d "$mountpoint" ]]; then
mkdiryn=$(echo -e "No\nYes" | dmenucolor -i -p "Create?")
mkdiryn=$(echo -e "No\nYes" | bemenucolor -i -p "Create?")
[[ "$mkdiryn" = Yes ]] && sudo mkdir -p "$mountpoint"
fi

+ 25
- 0
scripts/.config/Scripts/bemenupass View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | bemenucolor -p "Passwords:" -i "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
xdotool type --clearmodifiers --file -
fi

scripts/.config/Scripts/dmenushutdown → scripts/.config/Scripts/bemenushutdown View File

@ -1,7 +1,7 @@
#!/bin/bash
MESSAGE="lock\\nexit\\nreboot\\nshutdown"
ACTION="$(printf "$MESSAGE" | dmenucolor -i -p "Power Menu:")"
MESSAGE="lock\\nexit\\nreboot\\nshutdown\\n"
ACTION="$(printf "$MESSAGE" | bemenucolor -i -p "Power Menu:")"
case "$ACTION" in
"lock") lock ;;

scripts/.config/Scripts/dmenuumount → scripts/.config/Scripts/bemenuumount View File

@ -1,10 +1,10 @@
#!/bin/bash
pgrep -x dmenu && exit
pgrep -x bemenu && exit
exclusionregex="\(/boot\|/home\|/\)$"
drives=$(lsblk -lp | grep "\(part\|lvm\)[[:space:]]\+/" | grep -v "$exclusionregex" | awk '{print $1, "(" $4 ")", "on", $7}')
[[ "$drives" = "" ]] && exit
chosen=$(echo "$drives" | dmenucolor -i -p "Unmount:" | awk '{print $1}')
chosen=$(echo "$drives" | bemenucolor -i -p "Unmount:" | awk '{print $1}')
[[ "$chosen" = "" ]] && exit
sudo umount $chosen && notify-send "$chosen unmounted."

scripts/.config/Scripts/dmenuunicode → scripts/.config/Scripts/bemenuunicode View File

@ -2,7 +2,7 @@
xclip -h >/dev/null || exit
chosen=$(grep -v "#" -h $HOME/.config/Scripts/emoji $HOME/.config/Scripts/unicode | dmenucolor -i -l 20)
chosen=$(grep -v "#" -h $HOME/.config/Scripts/emoji $HOME/.config/Scripts/unicode | bemenucolor -i -l 20)
[ "$chosen" != "" ] || exit

scripts/.config/Scripts/dmenuwpg → scripts/.config/Scripts/bemenuwpg View File

@ -1,9 +1,9 @@
#!/bin/bash
pgrep -x dmenu && exit
pgrep -x bemenu && exit
walls=$(wpg -l)
[[ "$walls" = "" ]] && exit 1
chosen=$(echo "$walls"|dmenucolor -i -p "Wallpapers:"|awk '{print $1}')
chosen=$(echo "$walls"|bemenucolor -l 20-i -p "Wallpapers:"|awk '{print $1}')
[[ "$chosen" = "" ]] && exit 1
setbackground $chosen wal

+ 10
- 10
scripts/.config/Scripts/displayselect View File

@ -9,11 +9,11 @@ layoutloc=$HOME/.screenlayout
twoscreen() { # If multi-monitor is selected and there are two screens.
mirror=$(printf "no\\nyes" | dmenucolor -i -p "Mirror displays?")
mirror=$(printf "no\\nyes" | bemenucolor -i -p "Mirror displays?")
# Mirror displays using native resolution of external display and a scaled
# version for the internal display
if [ "$mirror" = "yes" ]; then
external=$(echo "$screens" | dmenucolor -i -p "Optimize resolution for:")
external=$(echo "$screens" | bemenucolor -i -p "Optimize resolution for:")
internal=$(echo "$screens" | grep -v "$external")
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
@ -34,19 +34,19 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
--scale "$scale_x"x"$scale_y"
else
primary=$(echo "$screens" | dmenucolor -i -p "Select primary display:")
primary=$(echo "$screens" | bemenucolor -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | dmenucolor -i -p "What side of $primary should $secondary be on?")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | bemenucolor -i -p "What side of $primary should $secondary be on?")
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction" "$primary" --auto --scale 1.0x1.0
fi
}
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenucolor -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | dmenucolor -i -p "Select secondary display:")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | dmenucolor -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenucolor -i -p "Select third display:")
direction2=$(printf "left-of\\nright-of\\nabove\\nbelow" | grep -v "$direction" | dmenucolor -i -p "What side of $primary should $tertiary be on?")
primary=$(echo "$screens" | bemenucolor -i -p "Select primary display:")
secondary=$(echo "$screens" | grep -v "$primary" | bemenucolor -i -p "Select secondary display:")
direction=$(printf "left-of\\nright-of\\nabove\\nbelow" | bemenucolor -i -p "What side of $primary should $secondary be on?")
tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | bemenucolor -i -p "Select third display:")
direction2=$(printf "left-of\\nright-of\\nabove\\nbelow" | grep -v "$direction" | bemenucolor -i -p "What side of $primary should $tertiary be on?")
xrandr --output "$primary" --auto --output "$secondary" --"$direction" "$primary" --auto --output "$tertiary" --"$direction2" "$primary" --auto
}
@ -65,7 +65,7 @@ screens=$(echo "$allposs" | grep " connected" | awk '{print $1}')
layouts=$(find $layoutloc -type f -name "*.sh" -printf "%f\n")
# Get user choice including multi-monitor and manual selection:
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection\\n%s" "$screens" "$layouts" | dmenucolor -i -p "Select display arangement:") &&
chosen=$(printf "%s\\nmulti-monitor\\nmanual selection\\n%s\\n" "$screens" "$layouts" | bemenucolor -i -p "Select display arangement:") &&
case "$chosen" in
"manual selection") arandr ; exit ;;
"multi-monitor") multimon ;;


+ 0
- 17
scripts/.config/Scripts/dmenucolor View File

@ -1,17 +0,0 @@
#!/bin/bash
source ~/.cache/wal/colors.sh
command=dmenu
if [[ "$1" == "-c" ]]; then
while getopts 'c:' option; do
case $option in
c) command=$OPTARG && break;;
esac
done
shift $(($OPTIND - 1))
fi
$command -i -nb "$background" -nf "$foreground" -sb "$foreground" -sf "$background" -fn "mono-10" "$@"

+ 0
- 3
scripts/.config/Scripts/dmenui3 View File

@ -1,3 +0,0 @@
#!/bin/bash
i3-msg "$(cat ~/.config/i3/config | sed -E 's/^bindsym\s*(\S*)\s*(\S.*$)/\1|\2/;t;d'|column -s'|' -t | dmenucolor -l 30 | cut -d' ' -f2- | xargs -0)"

Loading…
Cancel
Save