5digits / dactyl

Pentadactyl and other related Gecko extensions
Other
469 stars 98 forks source link

[macOS] Is there any way to toggle Pentadactyl's address bar and status bar? #189

Closed for-coursera closed 8 years ago

for-coursera commented 8 years ago

To illustrate my question, here are two screenshots of Vimperator with the address and status bars hidden and shown.

With Vimperator, I have these two snippets in my rc file (taken from somewhere but they seem to do the job):

js <<EOF
function toggle_navbar() {
    var nb = document.getElementById('nav-bar');
    if (!nb)
        return;
    nb.style.visibility = (nb.style.visibility == '') ? 'collapse' : '';
    nb.style.overflow = (nb.style.height == '') ? '' : 'hidden';
    }
toggle_navbar();
EOF
js <<EOF
function toggle_statbar(p) {
    var bb = document.getElementById('liberator-bottombar');
    if (!bb)
        return;
    if (p == 'on'){
        bb.style.height = '';
        bb.style.overflow = '';
        return;
    }
    if (p == 'off'){
        bb.style.height = '0px';
        bb.style.overflow = 'hidden';
        return;
    }
    bb.style.height = (bb.style.height == '') ? '0px' : '';
    bb.style.overflow = (bb.style.height == '') ? '' : 'hidden';
}
toggle_statbar();
EOF

But unfrtunately these two fail with Pentadactyl. Thus, I'd be grateful for any workaround here if possible :).

maturanomx commented 8 years ago

From your screenshots, I think you can archive that with: :set go!=T. You can see :help guioptions for more information.

for-coursera commented 8 years ago

Yep, that seems to do the trick. Strangely, I recall trying :set go+=T with no effect.

Anyway, thanks once again, @maturano!