-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep window open when closing the last (only) tab #233
Comments
This could be a variable that uzbl-tabbed pays attention to. |
I was very accustomed to that too, but that was due to "firefox bias" :) Now I don't actually see any reason for a feature like that - what do you need an empty browser for? You'll most likely want to navigate to another site anyway, so why bother about what's currently open? |
I don't like to keep open any page if I don't need it. Reasons mainly: resource usage, privacy. I also have my own customized home page and I'd like to see that if my browser is "empty". I also don't like to relaunch the browser every time, so this is why I need a solution for this. |
The best place to implement this would be inside tabbed. |
Today I wrote a little "workaround". Can be used as a temporary solution until uzbl gets a proper option/setting for this: exit_keep_last_tab.sh
Then I set the key binding for this in the config:
|
Just an FYI, that will fail for any number of reasons because the |
Yeah, you are right, But a proper config setting or something would be better of course. :) |
I figured, but before others go and run with this script, the caveats might be useful to know :) . |
Unfortunately my script is not working well with the git version of uzbl. It was okay with the quite old Arch Linux package, but today I installed the git version (tabbed-next) from the AUR and the tab closing is "hanging" for seconds with the script I wrote. I added a notification for the script to check the execution time, it was okay (instant), but for some reason the tab didn't get closed until a few seconds. The interesting thing is if I hit any key after the close, then it closes instantly. I can hit the I tried with the FIFO and the socket too, I tried the git master branch too, the results are all the same. |
There's some buffering happening in the I/O system :/ . Thought that was finally fixed. |
Given you mention "resource usage", I realized that your process of opening an entirely new window may be (unneccesarily?) complicated. Otherwise you could just close the window altogether. I use Also, I always made heavy use of tabs. After switching to dwm I realized that I was just solving a problem I wouldn't need to have in the first place. Tabs leave you guessing about their contents until you switch (back) to them. A proper WM let's you preview contents of all windows and switch quickly. Also, tabs cause additional headache: Now I exclusively use The browser surf, for example, implements the Xembed specification so it can be "tabbed" using an according tool like http://tools.suckless.org/tabbed => Unix philosophy |
Ah, and why not just start your browser with this command:
=> Whenever you close the last tab, you get a fresh uzbl. |
With some tiling WMs you can live without tabbed, but if someone uses for example Openbox, it won't be a nice user experience. Also, every modern browser have tabs, even w3m (which is a CLI/TUI browser) has this feature. And it's a preference. I prefer tabs.
With the older version of uzbl this worked for me (mostly):
Seems like it doesn't work anymore. But maybe it can be fixed somehow. For the I know this tab thing isn't the biggest problem, we can use a "workaround" like the script I wrote above. That I/O buffering issue which was mentioned before is more of a problem now (but it's another topic/issue I think). |
Just to clear a few things up. uzbl-core also implements xembed and should in theory work with suckless tabbed or some similiar tool. In fact uzbl-tabbed works exactly the same way by launching a full uzbl for each tab and it turns out to not be a big deal performance wise. autofocus is implemented in the config, you could simply drop that line if you don't want it |
Cool.
autofocus is implemented in the config, you could simply drop that line if you don't want it
I had dropped it when I still used uzbl-tabbed. Now using uzbl-browser exclusively, I found that it's more comfortable to just use a more complex key-combination for switching tabs/windows as opposed to a simple one that uzbl interprets depending on the current mode.
(Though I admit, it was cool to switch between tabs using , and . :)
|
Is there a way to prevent closing the window when closing the last tab?
If there is only one tab and I close it, I'd like uzbl to open a blank page or home page in its place instead of closing the whole browser. Now I'm using the
CLEAN_TABS
event for this (as a temporary solution), but this way I have to use another key for closing the last tab.Maybe some command could check whether it's the last tab and use the
exit
orCLEAN_TABS
event depending on the command's output?The text was updated successfully, but these errors were encountered: