Home
       Kill theming - qmenu - manage qubes os via dmenu (drkhsh fork)
  HTML git clone git://git.drkhsh.at/qmenu.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 1603f064cd503ef90573271941aaec78785b2bb3
   DIR parent 289fb50f7a66c0f7fd07bf009a236fdff176198b
  HTML Author: drkhsh <me@drkhsh.at>
       Date:   Sat, 21 Jan 2023 03:59:39 +0100
       
       Kill theming
       
       Interferes with patched in colorschemes in dmenu.
       
       Diffstat:
         M README.md                           |       6 +++---
         M qmenu-al                            |      14 +++-----------
         M qmenu-dm                            |      22 ++++------------------
         M qmenu-vm                            |      23 ++++-------------------
       
       4 files changed, 14 insertions(+), 51 deletions(-)
       ---
   DIR diff --git a/README.md b/README.md
       @@ -26,7 +26,7 @@ the following contents:
        ## qmenu-al
        Launch domU applications.
        
       -    Usage: qmenu-al [OPTION] (--light-theme)
       +    Usage: qmenu-al [OPTION]
        
             --all
             --focused
       @@ -34,7 +34,7 @@ Launch domU applications.
        ## qmenu-dm
        List and manage your connected devices.
        
       -    Usage: qmenu-dm [OPTION] (--light-theme)
       +    Usage: qmenu-dm [OPTION]
        
             --all
             --audio-input
       @@ -46,7 +46,7 @@ List, manage and configure your qubes.
        
        Selecting the top row, instead of any qube, will refresh the list.
        
       -    Usage: qmenu-vm [OPTION] (--light-theme)
       +    Usage: qmenu-vm [OPTION]
        
             --all
             --focused
   DIR diff --git a/qmenu-al b/qmenu-al
       @@ -2,24 +2,16 @@
        # Author: SINE3o14NNAE <https://github.com/sine3o14nnae/qmenu/>
        
        help() {
       -  printf "qmenu-al [OPTION] (--light-theme)\nLaunch domU applications.\n\n --all\n --focused\n"
       +  printf "qmenu-al [OPTION]\nLaunch domU applications.\n\n --all\n --focused\n"
        }
        
       -if [ "$2" = "--light-theme" ]; then
       -    theme_0='#ffffff'
       -    theme_1='#000000'
       -else
       -    theme_0='#000000'
       -    theme_1='#ffffff'
       -fi
       -
        case $1 in
            --all)
                app_list=$(cat "$HOME"/.local/share/applications/*.desktop |
                    grep '^Name=.*\|^Exec=.*' | grep -vw 'Qube Settings\|qubes-vm-settings')
        
                chosen=$(echo "$app_list" | grep '^Name=.*' | cut -c 6- |
       -            dmenu -f -m 0 -nb $theme_0 -nf $theme_1 -sb $theme_1 -sf $theme_0)
       +            dmenu -f -m 0)
        
                if [ -n "$chosen" ]; then
                    if ! echo "$app_list" | grep -A1 "$chosen" | grep '^Exec=.*' | cut -c 6-; then exit 2; fi
       @@ -55,7 +47,7 @@ case $1 in
                        grep -vw 'Qube Settings\|qubes-vm-settings')
        
                    chosen=$(echo "$app_list" | grep '^Name=.*' | cut -f2- -d: |
       -                dmenu -p "$qube:" -f -m 0 -nb $theme_0 -nf $theme_1 -sb "$qube_label" -sf $theme_1)
       +                dmenu -p "$qube:" -f -m 0 -sb "$qube_label")
        
                    if [ -n "$chosen" ]; then
                        if ! echo "$app_list" | grep -A1 "$chosen" | grep '^Exec=.*' | cut -c 6-; then exit 2; fi
   DIR diff --git a/qmenu-dm b/qmenu-dm
       @@ -23,23 +23,9 @@ rearrange_qube_list() {
           ' | sort -t- -k1,1n | cut -d- -f2-)
        }
        
       -
       -
       -
       -
       -if [ "$2"  = "--light-theme" ]; then
       -
       -  theme_0='#ffffff'
       -  theme_1='#000000'
       -else
       -
       -  theme_0='#000000'
       -  theme_1='#ffffff'
       -fi
       -
        # Note that the '-m 0' option in 'dmenu' is important
        # for security as it restricts it to monitor 0.
       -dmenu_fmc="-f -m 0 -nb $theme_0 -nf $theme_1 -sb $theme_1 -sf $theme_0"
       +dmenu_fmc="-f -m 0"
        
        case $1 in
        
       @@ -62,7 +48,7 @@ case $1 in
        
          *)
        
       -    printf "qmenu-dm [OPTION] (--light-theme)\nList and manage your connected devices.\n\n --all\n --audio-input\n --block\n --usb\n\n\nqmenu v1.3\n<https://github.com/sine3o14nnae/qmenu/>\n<https://gitlab.com/sine3o14nnae/qmenu/>\n\n"
       +    printf "qmenu-dm [OPTION]\nList and manage your connected devices.\n\n --all\n --audio-input\n --block\n --usb\n\n\nqmenu v1.3\n<https://github.com/sine3o14nnae/qmenu/>\n<https://gitlab.com/sine3o14nnae/qmenu/>\n\n"
        
            if [ "$1" = "--help" ]; then exit 0; fi
        esac
       @@ -131,7 +117,7 @@ while [ -n "$device" ]; do
        
                prompt=$(printf "No\nYes" |\
                  dmenu -i -p "Attach $device_name to $target_qube?"\
       -          -f -m 0 -nb $theme_0 -nf $theme_1 -sb $qube_label -sf $theme_1)
       +          -f -m 0 -sb $qube_label)
        
                if [ "$prompt" = "Yes" ]; then
        
       @@ -149,7 +135,7 @@ while [ -n "$device" ]; do
        
              prompt=$(printf "No\nYes" |\
                dmenu -i -p "Detach $device_name from $target_qube?"\
       -        -f -m 0 -nb $theme_0 -nf $theme_1 -sb $qube_label -sf $theme_1)
       +        -f -m 0 -sb $qube_label)
        
              if [ "$prompt" = "Yes" ]; then
        
   DIR diff --git a/qmenu-vm b/qmenu-vm
       @@ -2,7 +2,7 @@
        
        fmenu_fqubes() (
        
       - dmenu_fmc="-f -m 0 -nb $theme_0 -nf $theme_1 -sb $theme_1 -sf $theme_0"
       + dmenu_fmc="-f -m 0"
        
         chosefrom=0
        
       @@ -1423,7 +1423,7 @@ get_qube_label() {
        
         # Note that the '-m 0' option in 'dmenu' is important
         # for security, as it restricts it to monitor 0.
       - dmenu_fmc="-f -m 0 -nb $theme_0 -nf $theme_1 -sb $qube_label -sf $theme_1"
       + dmenu_fmc="-f -m 0 -sb $qube_label"
        }
        
        rearrange_qube_list() {
       @@ -1438,20 +1438,6 @@ rearrange_qube_list() {
           ' | sort -t- -k1,1n | cut -d- -f2-)
        }
        
       -
       -
       -
       -
       -if [ "$2" = "--light-theme" ]; then
       -
       -  theme_0='#ffffff'
       -  theme_1='#000000'
       -else
       -
       -  theme_0='#000000'
       -  theme_1='#ffffff'
       -fi
       -
        case $1 in
        
          --all)
       @@ -1482,7 +1468,7 @@ case $1 in
        
          *)
        
       -    printf "qmenu-vm [OPTION] (--light-theme)\nList, manage and configure your qubes.\n\n --all\n --focused\n --halted\n --paused\n --running\n --tags=[TAG]\n\n\nqmenu v1.3\n<https://github.com/sine3o14nnae/qmenu/>\n<https://gitlab.com/sine3o14nnae/qmenu/>\n\n"
       +    printf "qmenu-vm [OPTION]\nList, manage and configure your qubes.\n\n --all\n --focused\n --halted\n --paused\n --running\n --tags=[TAG]\n\n\nqmenu v1.3\n<https://github.com/sine3o14nnae/qmenu/>\n<https://gitlab.com/sine3o14nnae/qmenu/>\n\n"
        
            if [ "$1" = "--help" ]; then exit 0; else exit 2; fi
        esac
       @@ -1503,8 +1489,7 @@ while true; do
          # into $qube_list, whenever the user selects the 'qvm-ls' top row.
          while [ "$target_qube" != "NAME" ]; do
        
       -    target_qube=$(echo "$qube_list" | dmenu -f -m 0 -l 69 \
       -      -nb $theme_0 -nf $theme_1 -sb $theme_1 -sf $theme_0 |\
       +    target_qube=$(echo "$qube_list" | dmenu -f -m 0 -l 69 |\
              awk '{print $1}')
        
            if [ -z "$target_qube" ]; then exit 1