lxlauncher script help
  • rfry85rfry85
    PMPosts: 210
    I was wondering if someone who is good with scripts could help me out.

    I am working on a Unity Paradigm in LXLE. Why? Just for fun, and I want to see how closely it can be mimicked.






    I am using lxlauncher with a script to mimic the Unity Launcher (Menu). The script is a toggle script so when you click it, it appears and if you click it again it disappears. It will also disappear after a set amount of time.



    I would like to have it disappear when you click off of it or click on an application selection in it (like a normal menu). But as you can see below ...




    I have to wait for it to timeout or click the app menu button again.

    I was wondering if anyone might know how to create a script to accomplish this. I am no script master as you will see from my script below.

    Any advice would be helpful.

    Here's my script text.


    SERVICE='lxlauncher'
     
    if ps ax | grep -v grep | grep $SERVICE > /dev/null
    then
        pkill lxlauncher &&
        wmctrl -k off &
    else
        wmctrl -k on &
    lxlauncher &
    #transset -n lxlauncher .65 &
    sleep 60 &&
    pkill lxlauncher &&
    wmctrl -k off &
    fi



  • lxlelxle
    PMPosts: 2,656
    I played around with this sorta setup for days a few months back using the lxlauncher. Nice job though so far.. I'll look around for something and or see if there is a solution somewhere.
  • rfry85rfry85
    PMPosts: 210
    Thanks!
  • I finally hacked together a script that uses xdotool to close the lxlauncher, when another window or program gets activated. I'll post the contents of the script below. You'll have to add the "#!/bin/bash" at the top yourself.

    wmctrl -k on
    sleep 1
    wmctrl -r lxlauncher -N give-lxlauncher-a-name
    wmctrl -a lxlaunchers -new-name-from-line-above
    sleep 1
    while [ true ]
    do
    window=`xdotool getactivewindow getwindowname`
    if [ "$window" = "lxlaunchers -new-name-from-line-above" ]; then
    sleep 2
    else pkill lxlauncher
    break
    fi
    done>






    Install lxlauncher,xdotool, and wmctrl. Then create a .desktop file and point it to the script. put it on your panel launcher and yo should have a decent graphical menu.
  • rfry85rfry85
    PMPosts: 210
    Update 4 years later...
    I've still been using a script for lxlauncher, mainly cause I hated the background. Then I found this git repo and compiled lxlauncher from source. Now I can add backgrounds to the menu tabs (instructions in the readme). Depending on how you compile it, and I'm no expert, you can put your images in /usr/local/share/lxlauncher/background (stock location if you don't change the configuration while compiling) and rename them to the lxlauncher tab (menu) names. As it stays out of the way, it now just looks like the normal desktop background. 

    I've tried adding backgrounds to stock Ubuntu Lxlauncher and even Fedora but it seems they are compiled without this option.  I am now going to try and compile this for my Debian install on Userland on my Android tablet. This would be perfect for the tablets 8" screen.


  • rfry85rfry85
    PMPosts: 210
    imageimage
  • rfry85rfry85
    PMPosts: 210
    Screenshot
  • rfry85rfry85
    PMPosts: 210
    image
  • rfry85rfry85
    PMPosts: 210
    Screenshot.image
  • rfry85rfry85
    PMPosts: 210
    screenshot image