Commit Graph

258 Commits

Author SHA1 Message Date
Yash Karandikar 0fbf1949f3 Edit tabbing hotkeys 2022-11-02 15:51:15 -05:00
Yash Karandikar c0bb591af9 Initial commit 2022-11-02 13:21:59 -05:00
mikau dabf6a25ab Fixed crash when window height was less or equal to bar height
When resizing, the embedded client is being resized to (height = wh - bh),
which is (<= 0) if (wh <= bh). This generates a BadValue Error leading to a
crash.  This patch fixes that by hiding the tab bar if the window height is too
small, and also sets a min_height WM hint to prevent that situation from
happening in the first place.
2020-05-30 21:28:25 +02:00
Lucas Gabriel Vuotto b5f9ec647a Add OpenBSD support to config.mk
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
2018-03-11 13:21:25 +01:00
Lucas Gabriel Vuotto a327374a23 Embed dmenu in tabbed own window
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
2018-03-11 13:21:23 +01:00
Alessandro Caputo bbcdf1544c Fix minor inconsistency in man page 2017-09-29 21:32:33 +02:00
Caleb Malchik 6dc3978edf Fix movetab and focusurgent when there's no client
Accessing those would crash with a floating point exception.
2017-05-08 08:58:45 +02:00
Quentin Rameau 05f583c519 Move tab selection keybinding from Ctrl-t to Ctrl-` 2017-05-02 18:23:04 +02:00
Christoph Lohmann 00c4143202 One killclient() is enough. 2017-03-28 20:53:33 +02:00
Christoph Lohmann bc236142fa The forgotten half of the last patch. 2016-04-25 13:53:12 +02:00
Justin Keogh 95b46cd3a9 add -k to close tabbed foreground client on WMDelete
Hello, this is useful when you want to use the same key binding that closes windows to close tabs. I got tired of loosing my tabbed/surf session when I hit my WM's close key. "Last tab" behavior still respects -c/-f.

Cheers
-J

From 829e95855f0fe78a368788a5e72231bd6456a8cf Mon Sep 17 00:00:00 2001
From: jakeogh <github.com@v6y.net>
Date: Mon, 21 Mar 2016 01:36:28 +0000
Subject: [PATCH] add -k to close foreground tabbed client on WM_DELETE_WINDOW

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-03-25 07:41:43 +01:00
Christoph Lohmann 4ccaba4968 Import the arg.h from st with the fixed oob bug. 2016-02-21 17:22:58 +01:00
Lucas Gabriel Vuotto 3c79bcb408 Added xft support
Based on xft tabbed patch from the wiki.

Signed-off-by: Lucas Gabriel Vuotto <l.vuotto92@gmail.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-02-18 16:56:57 +01:00
Quentin Rameau 8920c1ba19 Add configuration option for title truncation string
Permit to use arbitrary string instead of "..." (ie "$") when truncating
client title.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-04 18:29:40 +01:00
Quentin Rameau eb0ff62120 Remove h flag, put usage() in the default case
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-03 14:11:20 +01:00
Quentin Rameau 105855240e Arrange diagnostic messages
Fix error messages to use argv0 instead of fixed “tabbed”.
Break usage message into multiple lines.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-03 14:11:02 +01:00
Quentin Rameau 735bed5824 Style cleanup
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-03 14:10:38 +01:00
Quentin Rameau 46887ac550 Fix install paths and default build flag
Ensure that paths are quoted.
Compile with -Os by default.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-03 09:24:32 +01:00
Christoph Lohmann df8261e89f Bumping up the year.
Thanks for the bug report, FRIGN!
2016-01-03 09:01:20 +01:00
Christoph Lohmann 7f6085d42a Bump year. 2016-01-01 14:19:10 +01:00
Jonas Rabenstein 9d4b71ecad autofocus urgent tabs
When tabbed becomes urgent because one of it tabs becomes urgent, it
may be desireable to automatically focus that tab. As a notification may
be lost, if another notification comes in before you focused tabbed, the
switch is only done, if tabbed is not urgent already.
Moreover, it may be anoying, if you just type into one tab, another tab
gets urgent -therfore focused- and you type into the other tab, you may
switch between autofocus and nofocus using Ctrl-Shift-u.
Maybe it would also be usefull, if there would be an commandline
parameter to toggle that option, but as -u is already used for
urgent-tab-color, i did not implement that.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-08-19 21:17:37 +02:00
Jonas Rabenstein 5d0c5be102 focus urgent tabs
With a lot of open tabs its quite annoying to toggle through all tabs
until reaching the next one with an urgent hint set. Also with using
Ctrl-[0..9] to get to the first 10 tabs, in some cases this may have
disadvantages:
1. with more than 10 tabs, you can not use that quickselection
2. with a small tabbed window, you do not see every tab in the
   statusbar and therefore do not know which tab got urgent

Therefore I created a function, which iterates over all currently
managed tabs, focus the first urgent tab found or stays at the current
tab, if there is no urgent-tab. By default, that function is mapped to
Ctrl-u.

Signed-off-by: Jonas Rabenstein <jonas.rabenstein@studium.uni-erlangen.de>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-08-19 21:17:33 +02:00
Christoph Lohmann 55dc32b27b Fixing some manpage formatting and formatting in xembed.c. 2015-05-09 21:06:00 +02:00
Connor Lane Smith d60069a3e7 add xembed wrapper utility
xembed will cause a command to attempt to XEmbed into the window given
by the environment variable XEMBED, so long as it is in the foreground
of its controlling terminal. This causes a process to effectively take
the place of the terminal window, unless it is backgrounded.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-05-09 20:03:08 +02:00
Markus Teich 0728caee30 fix bug in unmanage: check if lastsel is initialized
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-03-10 21:23:27 +01:00
Christoph Lohmann c2ce9be471 My libc wants _DEFAULT_SOURCE. 2015-01-25 10:52:10 +01:00
Markus Teich 74115f685f revise drawbar and related mechanisms.
This also fixes a bug, where the last tab was hidden and no "after" text was
displayed.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-01-25 10:51:48 +01:00
Markus Teich 829980f28a movetab(): Move selected tab instead of switching
Before this patch, movetab() just switched positions of the selected tab with
the new position. This resulted in unexpected behaviour when „moving“ a tab over
one end of the list.

Now tabs are moved correctly by the specified amount of indizes.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-10-14 18:40:59 +02:00
Okan Demirmen 5c560f3784 tabbed: UnmapNotify patch
Hi,

Simple patch for tabbed that prevents tabbed from killing a client that it
should no longer be managing due to an UnmapNotify event.

Add support for UnmapNotify; allows a window to map and unmap without
needing it to be destroyed.

Thanks,
Okan

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-09-13 07:56:29 +02:00
Peter Hofmann b4fed5a100 Clear urgency hint on sel == c
- Run "tabbed xterm -into".
 - Open a new tab using Ctrl+Shift+Enter, switch to it using Ctrl+Tab.
 - Run "sleep 2; printf '\a'".
 - Quickly change back to the first tab (c = 0) and wait for the second
   one (c = 1) to get the urgency hint.
 - Close the first tab using Ctrl+Q or Ctrl+D. This sets sel = 0 and c =
   0, so focus() won't touch the urgency hint.
 - Now, the urgency hint on the second tab has not been cleared. Open a
   new tab to verify it.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-08-04 23:10:39 +02:00
noname 9d1d6d9409 Replace emallocz with ecalloc.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-06-01 16:13:21 +02:00
Markus Teich c778de59e3 add urgent color cmdline options
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-05-19 19:34:34 +02:00
Markus Teich 5dd3d19ef9 support urgency wm hints
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-05-19 19:34:09 +02:00
Christoph Lohmann 030eda81cc Simplifying the lastsel handling a bit.
Some checks and comments were removed to simplify the function.
2014-01-26 20:05:40 +01:00
Christoph Lohmann 4ed0a2da67 The check for a minimal new lastsel is not needed anymore. 2014-01-26 18:52:53 +01:00
Christoph Lohmann 4b2dfb110f Applying the client sel handling of quinq.
When after unmanaging the the last selected client was unmanaged, select the
last client.
2014-01-26 18:48:52 +01:00
Markus Teich 0120447e04 update years in copyright notices
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-01-22 06:34:10 +01:00
Christoph Lohmann 7a15235114 Adding conforming documentation of the commandline color support. 2014-01-21 19:43:40 +01:00
Christoph Lohmann 53a43774db Release 0.6. 2014-01-21 19:22:03 +01:00
Gregor Best 0214014fbe Fix crash on client termination
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-01-21 19:19:58 +01:00
Markus Teich e68297ed05 Allow selecting the colors on command line.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-12-16 17:58:26 +01:00
Christoph Lohmann 06f6bade81 Document the new ctrl+t feature. 2013-12-01 20:06:32 +01:00
Markus Teich a1aa453e99 select or open new tab with Ctrl-T
The default config will display all open tabs in dmenu. You can either select
one of them, or if you enter a string, that does not start with „0x“, tabbed
will open a new tab and run the command specified at tabbed-startup but append
the entered string to the command first.

With
tabbed -r 2 surf -e ''
you can hit Ctrl-T and either select an already opened tab or enter an URL,
which will be opened in a new tab with surf.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-12-01 20:03:40 +01:00
Christoph Lohmann b46a3a2788 Revert "select tab with X ClientMessage event"
This reverts commit 34baef933d.
2013-12-01 20:03:16 +01:00
Markus Teich 34baef933d select tab with X ClientMessage event
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-12-01 19:59:22 +01:00
Alexander Sedov 14beaabe6c Fixed obscure miscalculation when a client is closed.
This crops up whenever you just switched from tab # N+1 to tab # N
and close current tab. unmanage() first decreases lastsel
(so it becomes N) then erroneously tests it against sel and focuses first tab
instead. One can see that focus() would never set lastsel == sel,
so I took liberty to fix this annoying behaviour which happens to frequently
with newposition = 0 and npisrelative = True settings.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-10-10 18:45:19 +02:00
Christoph Lohmann 361ddc85d5 Fixing the manpage project name.
Thanks Joerg Jung for noticing!
2013-08-21 06:47:51 +02:00
Christoph Lohmann 9b007101f2 Adding a geometry flag to tabbed.
Thanks for the hint Thorsten Glaser!
2013-08-20 18:44:00 +02:00
Gregor Best 97ce0f717a Don't set cmd[0] to the window ID
Ahoy,

the attached patch fixes a tiny issue with tabbed. When running it
without a command and having it run spawn(), it tried to execute its
window ID as a command. While most people probably don't have
executables called 341123 or the like in their path, I think that is not
exactly intended. The following patch fixes that:

From c7ade36f8ef6429546ad89bc9ab479fa44c4790a Mon Sep 17 00:00:00 2001
From: Gregor Best <gbe@ring0.de>
Date: Sun, 7 Jul 2013 20:36:06 +0200
Subject: [PATCH] Don't set cmd[0] to the window ID

Starting tabbed without a command sets cmd[0] to the window ID of
tabbed. This leads to funky errors such as "execvp: <ID> failed: no such
file or directory" when running spawn().

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-07-12 06:48:18 +02:00
Christoph Lohmann 18eef19217 Noone likes -Wextra.
I don't have the time to care for X11 that much.
2013-06-23 21:10:15 +02:00