5

Here are the questions about persistent dash customization for my Ubuntu 12.04 LTS:

  1. Assign the Application Lens as the default lens selected when the dash is called with Super or other assigned key OR, assign a different lens as my dash home;

  2. Show the full list of the installed applications as in the snapshot below (I am looking for a customization where full app list would be the default);

  3. The Filter results should too come up pre-selected with the dash.

snap1

rusty
  • 16,327
  • You can Set via gsettings set com.canonical.Unity.Dash scopes <your order> where you can select as you want in <your order>. To get current setting, run gsettings get com.canonical.Unity.Dash scopes. – Pandya Jun 27 '14 at 16:39
  • @Pandya the value set for com.canonical.Unity.Dash's only key (in my 12.04 system) home-lens-ordering is ['applications.lens', 'files.lens', 'music.lens'].. yes app-lens is the first, but still it's not the default that shows up when I call the dash with Super.. – rusty Jun 28 '14 at 04:50

1 Answers1

4

This is quite a hacky answer.

I would suggest you assign this script to another key, such as a function key. I went for F3 because it doesn't do much in any applications I use.

You need to install xdotool:

sudo apt-get install xdotool

First run the commands

touch .dashopen
gedit .dashopen

and write into it

closed

And the commands

touch .filteropen

Now you need to create a cron job. Run:

crontab -e

and into it, write

@reboot echo 'closed' > .filteropen

then do

touch dasha.sh
gedit dasha.sh

into that you need to put the following:

#! /bin/bash

#DASHOPEN

# get the state of the dash.
do=$(<.dashopen)
fo=$(<.filteropen)

# if it is closed:
if [ $do = 'closed' ]; then
    # open the applications pane
    xdotool key super+a
    # and record that it is open
    echo 'open' > .dashopen
# if it is open
else
    # close it with the super key
    xdotool key super
    # record that it is closed
    echo 'closed' > .dashopen
fi

#FILTEROPEN

# if it is closed:
if [ $fo = 'closed' ]; then
    # get the mouse location
    eval $(xdotool getmouselocation --shell)
    # move to the filter button and click
    xdotool mousemove 1000 60 # CHANGE THIS LINE TO WORK ON YOUR SCREEN.
    # click after 1 second
    sleep 1 && xdotool click 1
    # and record that it is open
    echo 'open' > .filteropen
    # move back to original location
    xdotool mousemove $X $Y
fi

make it executable:

chmod +x dasha.sh

Now you need to add the keyboard shortcut:

Open system settings, and click keyboard.

enter image description here

Click Shortcuts, then custom shortcuts.

enter image description here

Click [+] then type the following:

Dash Application

./dasha.sh

enter image description here

Click disabled and press your chosen shortcut key:

enter image description here

Please comment if I've made a mistake

Tim
  • 32,861
  • 27
  • 118
  • 178
  • Isn't your script just a new way of opening Dash? – LittleByBlue Aug 06 '14 at 08:27
  • it's not exactly the one.. – rusty Aug 06 '14 at 11:12
  • @LittleByBlue My script opens the application pane by default using the keyboard shortcut Super+A. – Tim Aug 06 '14 at 11:37
  • @rusty I have done quite a bit of research and can't see another way... – Tim Aug 06 '14 at 11:39
  • Not sure if this would be easier. Get xdotool, use the xtool command in your script, set custom keybind as Super, use ccsm (CompizConfigSettingsManager) to change launcher open to different binding (mines Super F). Not sure about how this is expanding the "Full List of Installed.." and filter, but I think they edited post. I can't test this right now, as my apt-get is not working all of a sudden – No Time Aug 08 '14 at 07:16
  • @Notime, can't set a custom keybind as Super with xbindkeys... and ccsm doesn't let me change off super, although it should. – Tim Aug 08 '14 at 09:59
  • @NoTime the post was edited prior to any answers was posted, and nothing much has changed actually.. you can see the revisions here http://askubuntu.com/posts/488838/revisions – rusty Aug 08 '14 at 12:21
  • @rusty it won't expand, but if it was already open it will stay open... You have to open it onece per login – Tim Aug 09 '14 at 11:18
  • Yeah that's okay... I have been thinking about the mouse move thing but it would depend on screen size... I'll add in the basics later today that you can adjust... – Tim Aug 10 '14 at 07:14
  • @rusty I have changed it, it now opens the filter tab. – Tim Aug 10 '14 at 08:52