{"id":81,"date":"2012-09-20T01:53:19","date_gmt":"2012-09-20T01:53:19","guid":{"rendered":"http:\/\/timbertops.co.uk\/blog\/?p=81"},"modified":"2014-02-10T23:11:04","modified_gmt":"2014-02-10T23:11:04","slug":"add-a-button-to-toggle-auto-hide-with-lxde-on-ubuntu-12-04","status":"publish","type":"post","link":"https:\/\/timbertops.co.uk\/index.php\/2012\/09\/20\/add-a-button-to-toggle-auto-hide-with-lxde-on-ubuntu-12-04\/","title":{"rendered":"Add a button to toggle auto-hide with XFCE on Ubuntu 12.04"},"content":{"rendered":"<p>I took the plunge today and installed Xfce on my Ubuntu Laptop after my last fight with unity on gnome after discovering the magic of panels and the fact you can have them auto hide I am glad I switched but one thing is missing a button the toggle the auto-hide so I cant turn it off easily with out going through many layers of menus, so I decided to add one. <!--more-->5 minutes of googling later I found my answer <a href=\"http:\/\/ubuntuforums.org\/showpost.php?p=11958577&amp;postcount=2\">here<\/a> with these two commands:<\/p>\n<p><code lang=\"bash\">xfconf-query -c xfce4-panel -p \/panels\/panel-[panel number]\/autohide -s false<br \/>\nxfconf-query -c xfce4-panel -p \/panels\/panel-[panel number]\/autohide -s true<\/code><\/p>\n<p>where [panel number] is replaced with number of the panel you wish to control. Panel numbers here start at 0 where as the panel numbers the GUIs and menus use start at 1 so thats something to take note of.<\/p>\n<p>further down in the thread I linked to earlier someone had posed to code to toggle the auto hide which I modified to work on both the default panels proved with Xfce<\/p>\n<p><code lang=\"bash[lines]\">#!\/bin\/sh<\/p>\n<p>PANEL1=$(xfconf-query -c xfce4-panel -p \/panels\/panel-0\/autohide)<br \/>\nPANEL2=$(xfconf-query -c xfce4-panel -p \/panels\/panel-1\/autohide)<\/p>\n<p>if test $PANEL1 = false -o $PANEL2 = false; then<br \/>\n  xfconf-query -c xfce4-panel -p \/panels\/panel-0\/autohide -s true<br \/>\n  xfconf-query -c xfce4-panel -p \/panels\/panel-1\/autohide -s true<br \/>\nelse<br \/>\n  xfconf-query -c xfce4-panel -p \/panels\/panel-0\/autohide -s false<br \/>\n  xfconf-query -c xfce4-panel -p \/panels\/panel-1\/autohide -s false<br \/>\nfi<\/code><\/p>\n<p>I saved it, ran chmod +x on it to make it executable then tested it one I was happy it worked I copied it to \/usr\/bin (not good practice but i&#8217;m lazy) once all done I right clicked on the panel at the bottom of my screen from the context menu I chose Panel &gt; Add New Items and launcher. right clicked on the new icon chose properties then the blank page with the green plus icon on the right of the window, set a name for the launcher and typed in the path and name though in my case as I had copied it to \/usr\/bin it just needed the file name finally I set an icon and clicked create and there it was good to go a couple of clicks to test it low and behold it works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I took the plunge today and installed Xfce on my Ubuntu Laptop after my last fight with unity on gnome after discovering the magic of panels and the fact you can have them auto hide I am glad I switched but one thing is missing a button the toggle the auto-hide so I cant turn &hellip; <a href=\"https:\/\/timbertops.co.uk\/index.php\/2012\/09\/20\/add-a-button-to-toggle-auto-hide-with-lxde-on-ubuntu-12-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Add a button to toggle auto-hide with XFCE on Ubuntu 12.04&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24],"tags":[43,31,29,25,44],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-programming","category-ubuntu","tag-bash","tag-console","tag-linux","tag-ubuntu-2","tag-xfce"],"_links":{"self":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":4,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":125,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/81\/revisions\/125"}],"wp:attachment":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}