@ -0,0 +1,34 @@ | |||||
# Fr1nge's Dotfiles | |||||
Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke and lose all my memory. You're very welcome to explore and use anything in this repository. Have fun! | |||||
## My Setup: | |||||
* Arch Linux | |||||
* DWM ([dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch)) | |||||
* dmenu | |||||
* st (simple terminal) | |||||
* dunst | |||||
* zsh with powerlevel10k and antibody | |||||
* tmux | |||||
* zathura | |||||
* [Material Ocean](https://github.com/material-ocean/) color scheme for pretty much everything | |||||
## Installation | |||||
Just run `git clone --recurse-submodules github.com/yigitcolakoglu/dotfiles.git ~/.dotfiles`. This will download everything you need. After that, I have a list of all the packages I have installed on my machine in the directory chroot/. If you have any problems regarding the setup, you should first check whether you have missing packages. After the clone process, it is pretty straightforward, you can run the `install.sh` script which creates necessary symlinks. Finally, DO NOT FORGET to run sudo make clean install in each directory under suckless, I also have a script named build.sh in that directory which does that automatically. | |||||
## Some eye candy | |||||
![Workspace 1](screenshots/w1.jpg) | |||||
![Workspace 1](screenshots/w2.jpg) | |||||
![Workspace 1](screenshots/w4.jpg) | |||||
## TODOs | |||||
* Switch to surf & tabbed | |||||
* Find more cool stuff to add to your rice |
@ -1,78 +0,0 @@ | |||||
[options] | |||||
allow_bold = true | |||||
#audible_bell = false | |||||
#bold_is_bright = true | |||||
#cell_height_scale = 1.0 | |||||
#cell_width_scale = 1.0 | |||||
clickable_url = true | |||||
dynamic_title = true | |||||
font = CaskaydiaCove Nerd Font 12 | |||||
#fullscreen = true | |||||
#icon_name = terminal | |||||
#mouse_autohide = false | |||||
#scroll_on_output = false | |||||
#scroll_on_keystroke = true | |||||
# Length of the scrollback buffer, 0 disabled the scrollback buffer | |||||
# and setting it to a negative value means "infinite scrollback" | |||||
scrollback_lines = 10000 | |||||
#search_wrap = true | |||||
#urgent_on_bell = true | |||||
#hyperlinks = false | |||||
# $BROWSER is used by default if set, with xdg-open as a fallback | |||||
browser = xdg-open | |||||
# "system", "on" or "off" | |||||
cursor_blink = system | |||||
# "block", "underline" or "ibeam" | |||||
cursor_shape = block | |||||
# Hide links that are no longer valid in url select overlay mode | |||||
#filter_unmatched_urls = true | |||||
# Emit escape sequences for extra modified keys | |||||
#modify_other_keys = false | |||||
# set size hints for the window | |||||
#size_hints = false | |||||
# "off", "left" or "right" | |||||
#scrollbar = off | |||||
# ==================================== | |||||
[colors] | |||||
# http://www.xcolors.net/dl/gnometerm | |||||
# Black | |||||
color0= #000000 | |||||
color8= #555753 | |||||
# Red | |||||
color1= #cc0000 | |||||
color9= #ef2929 | |||||
# Green | |||||
color2= #4e9a06 | |||||
color10= #8ae234 | |||||
# Yellow | |||||
color3= #c4a000 | |||||
color11= #fce94f | |||||
# Blue | |||||
color4= #3465a4 | |||||
color12= #729fcf | |||||
# Magenta | |||||
color5= #75507b | |||||
color13= #ad7fa8 | |||||
# Cyan | |||||
color6= #06989a | |||||
color14= #34e2e2 | |||||
# White | |||||
color7= #d3d7cf | |||||
color15= #eeeeec |
@ -1,69 +0,0 @@ | |||||
[options] | |||||
allow_bold = true | |||||
#audible_bell = false | |||||
#bold_is_bright = true | |||||
#cell_height_scale = 1.0 | |||||
#cell_width_scale = 1.0 | |||||
clickable_url = true | |||||
dynamic_title = true | |||||
font = Cascadia Mono 12 | |||||
#fullscreen = true | |||||
#icon_name = terminal | |||||
#mouse_autohide = false | |||||
#scroll_on_output = false | |||||
#scroll_on_keystroke = true | |||||
# Length of the scrollback buffer, 0 disabled the scrollback buffer | |||||
# and setting it to a negative value means "infinite scrollback" | |||||
scrollback_lines = 10000 | |||||
#search_wrap = true | |||||
#urgent_on_bell = true | |||||
#hyperlinks = false | |||||
# $BROWSER is used by default if set, with xdg-open as a fallback | |||||
browser = xdg-open | |||||
# "system", "on" or "off" | |||||
cursor_blink = system | |||||
# "block", "underline" or "ibeam" | |||||
cursor_shape = block | |||||
# Hide links that are no longer valid in url select overlay mode | |||||
#filter_unmatched_urls = true | |||||
# Emit escape sequences for extra modified keys | |||||
#modify_other_keys = false | |||||
# set size hints for the window | |||||
#size_hints = false | |||||
# "off", "left" or "right" | |||||
#scrollbar = off | |||||
# ==================================== | |||||
[colors] | |||||
cursor = #d8dee9 | |||||
cursor_foreground = #2e3440 | |||||
foreground = #d8dee9 | |||||
foreground_bold = #d8dee9 | |||||
background = #0F111A | |||||
highlight = #4c566a | |||||
color0 = #3b4252 | |||||
color1 = #bf616a | |||||
color2 = #a3be8c | |||||
color3 = #ebcb8b | |||||
color4 = #81a1c1 | |||||
color5 = #b48ead | |||||
color6 = #88c0d0 | |||||
color7 = #e5e9f0 | |||||
color8 = #4c566a | |||||
color9 = #bf616a | |||||
color10 = #a3be8c | |||||
color11 = #ebcb8b | |||||
color12 = #81a1c1 | |||||
color13 = #b48ead | |||||
color14 = #8fbcbb | |||||
color15 = #eceff4 |
@ -0,0 +1,14 @@ | |||||
#!/bin/bash | |||||
for d in */ ; do | |||||
echo "Building in $d..." | |||||
cd $d | |||||
sudo make clean install | |||||
if [ $? -ne 0 ]; then | |||||
echo "An error occured..." | |||||
exit 1 | |||||
cd .. | |||||
echo "Done..." | |||||
done | |||||
echo "All builds done, you might want to check whether any errors has occures |
@ -0,0 +1,23 @@ | |||||
MIT/X Consortium License | |||||
© 2009-2011 Enno Boland <g s01 de> | |||||
© 2011,2015 Connor Lane Smith <cls@lubutu.com> | |||||
© 2012-2015 Christoph Lohmann <20h@r-36.net> | |||||
Permission is hereby granted, free of charge, to any person obtaining a | |||||
copy of this software and associated documentation files (the "Software"), | |||||
to deal in the Software without restriction, including without limitation | |||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the | |||||
Software is furnished to do so, subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included in | |||||
all copies or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |||||
DEALINGS IN THE SOFTWARE. |
@ -0,0 +1,65 @@ | |||||
# tabbed - tabbing interface | |||||
# See LICENSE file for copyright and license details. | |||||
include config.mk | |||||
SRC = tabbed.c xembed.c | |||||
OBJ = ${SRC:.c=.o} | |||||
BIN = ${OBJ:.o=} | |||||
all: options ${BIN} | |||||
options: | |||||
@echo tabbed build options: | |||||
@echo "CFLAGS = ${CFLAGS}" | |||||
@echo "LDFLAGS = ${LDFLAGS}" | |||||
@echo "CC = ${CC}" | |||||
.c.o: | |||||
@echo CC $< | |||||
@${CC} -c ${CFLAGS} $< | |||||
${OBJ}: config.h config.mk | |||||
config.h: | |||||
@echo creating $@ from config.def.h | |||||
@cp config.def.h $@ | |||||
.o: | |||||
@echo CC -o $@ | |||||
@${CC} -o $@ $< ${LDFLAGS} | |||||
clean: | |||||
@echo cleaning | |||||
@rm -f ${BIN} ${OBJ} tabbed-${VERSION}.tar.gz | |||||
dist: clean | |||||
@echo creating dist tarball | |||||
@mkdir -p tabbed-${VERSION} | |||||
@cp -R LICENSE Makefile README config.def.h config.mk \ | |||||
tabbed.1 arg.h ${SRC} tabbed-${VERSION} | |||||
@tar -cf tabbed-${VERSION}.tar tabbed-${VERSION} | |||||
@gzip tabbed-${VERSION}.tar | |||||
@rm -rf tabbed-${VERSION} | |||||
install: all | |||||
@echo installing executable files to ${DESTDIR}${PREFIX}/bin | |||||
@mkdir -p "${DESTDIR}${PREFIX}/bin" | |||||
@cp -f ${BIN} "${DESTDIR}${PREFIX}/bin" | |||||
@chmod 755 "${DESTDIR}${PREFIX}/bin/tabbed" | |||||
@echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1 | |||||
@mkdir -p "${DESTDIR}${MANPREFIX}/man1" | |||||
@sed "s/VERSION/${VERSION}/g" < tabbed.1 > "${DESTDIR}${MANPREFIX}/man1/tabbed.1" | |||||
@chmod 644 "${DESTDIR}${MANPREFIX}/man1/tabbed.1" | |||||
@sed "s/VERSION/${VERSION}/g" < xembed.1 > "${DESTDIR}${MANPREFIX}/man1/xembed.1" | |||||
@chmod 644 "${DESTDIR}${MANPREFIX}/man1/xembed.1" | |||||
uninstall: | |||||
@echo removing executable files from ${DESTDIR}${PREFIX}/bin | |||||
@rm -f "${DESTDIR}${PREFIX}/bin/tabbed" | |||||
@rm -f "${DESTDIR}${PREFIX}/bin/xembed" | |||||
@echo removing manual pages from ${DESTDIR}${MANPREFIX}/man1 | |||||
@rm -f "${DESTDIR}${MANPREFIX}/man1/tabbed.1" | |||||
@rm -f "${DESTDIR}${MANPREFIX}/man1/xembed.1" | |||||
.PHONY: all options clean dist install uninstall |
@ -0,0 +1,22 @@ | |||||
tabbed - generic tabbed interface | |||||
================================= | |||||
tabbed is a simple tabbed X window container. | |||||
Requirements | |||||
------------ | |||||
In order to build tabbed you need the Xlib header files. | |||||
Installation | |||||
------------ | |||||
Edit config.mk to match your local setup (tabbed is installed into | |||||
the /usr/local namespace by default). | |||||
Afterwards enter the following command to build and install tabbed | |||||
(if necessary as root): | |||||
make clean install | |||||
Running tabbed | |||||
-------------- | |||||
See the man page for details. | |||||
@ -0,0 +1,4 @@ | |||||
# TODO | |||||
* add some way to detach windows | |||||
* add some way to attach windows | |||||
@ -0,0 +1,48 @@ | |||||
/* | |||||
* Copy me if you can. | |||||
* by 20h | |||||
*/ | |||||
#ifndef ARG_H__ | |||||
#define ARG_H__ | |||||
extern char *argv0; | |||||
/* use main(int argc, char *argv[]) */ | |||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ | |||||
argv[0] && argv[0][0] == '-'\ | |||||
&& argv[0][1];\ | |||||
argc--, argv++) {\ | |||||
char argc_;\ | |||||
char **argv_;\ | |||||
int brk_;\ | |||||
if (argv[0][1] == '-' && argv[0][2] == '\0') {\ | |||||
argv++;\ | |||||
argc--;\ | |||||
break;\ | |||||
}\ | |||||
for (brk_ = 0, argv[0]++, argv_ = argv;\ | |||||
argv[0][0] && !brk_;\ | |||||
argv[0]++) {\ | |||||
if (argv_ != argv)\ | |||||
break;\ | |||||
argc_ = argv[0][0];\ | |||||
switch (argc_) | |||||
#define ARGEND }\ | |||||
} | |||||
#define ARGC() argc_ | |||||
#define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ | |||||
((x), abort(), (char *)0) :\ | |||||
(brk_ = 1, (argv[0][1] != '\0')?\ | |||||
(&argv[0][1]) :\ | |||||
(argc--, argv++, argv[0]))) | |||||
#define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ | |||||
(char *)0 :\ | |||||
(brk_ = 1, (argv[0][1] != '\0')?\ | |||||
(&argv[0][1]) :\ | |||||
(argc--, argv++, argv[0]))) | |||||
#endif |
@ -0,0 +1,66 @@ | |||||
/* See LICENSE file for copyright and license details. */ | |||||
/* appearance */ | |||||
static const char font[] = "monospace:size=9"; | |||||
static const char* normbgcolor = "#222222"; | |||||
static const char* normfgcolor = "#cccccc"; | |||||
static const char* selbgcolor = "#555555"; | |||||
static const char* selfgcolor = "#ffffff"; | |||||
static const char* urgbgcolor = "#111111"; | |||||
static const char* urgfgcolor = "#cc0000"; | |||||
static const char before[] = "<"; | |||||
static const char after[] = ">"; | |||||
static const char titletrim[] = "..."; | |||||
static const int tabwidth = 200; | |||||
static const Bool foreground = True; | |||||
static Bool urgentswitch = False; | |||||
/* | |||||
* Where to place a new tab when it is opened. When npisrelative is True, | |||||
* then the current position is changed + newposition. If npisrelative | |||||
* is False, then newposition is an absolute position. | |||||
*/ | |||||
static int newposition = 0; | |||||
static Bool npisrelative = False; | |||||
#define SETPROP(p) { \ | |||||
.v = (char *[]){ "/bin/sh", "-c", \ | |||||
"prop=\"`xwininfo -children -id $1 | grep '^ 0x' |" \ | |||||
"sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' |" \ | |||||
"xargs -0 printf %b | dmenu -l 10 -w $1`\" &&" \ | |||||
"xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ | |||||
p, winid, NULL \ | |||||
} \ | |||||
} | |||||
#define MODKEY ControlMask | |||||
static Key keys[] = { | |||||
/* modifier key function argument */ | |||||
{ MODKEY|ShiftMask, XK_Return, focusonce, { 0 } }, | |||||
{ MODKEY|ShiftMask, XK_Return, spawn, { 0 } }, | |||||
{ MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } }, | |||||
{ MODKEY|ShiftMask, XK_h, rotate, { .i = -1 } }, | |||||
{ MODKEY|ShiftMask, XK_j, movetab, { .i = -1 } }, | |||||
{ MODKEY|ShiftMask, XK_k, movetab, { .i = +1 } }, | |||||
{ MODKEY, XK_Tab, rotate, { .i = 0 } }, | |||||
{ MODKEY, XK_grave, spawn, SETPROP("_TABBED_SELECT_TAB") }, | |||||
{ MODKEY, XK_1, move, { .i = 0 } }, | |||||
{ MODKEY, XK_2, move, { .i = 1 } }, | |||||
{ MODKEY, XK_3, move, { .i = 2 } }, | |||||
{ MODKEY, XK_4, move, { .i = 3 } }, | |||||
{ MODKEY, XK_5, move, { .i = 4 } }, | |||||
{ MODKEY, XK_6, move, { .i = 5 } }, | |||||
{ MODKEY, XK_7, move, { .i = 6 } }, | |||||
{ MODKEY, XK_8, move, { .i = 7 } }, | |||||
{ MODKEY, XK_9, move, { .i = 8 } }, | |||||
{ MODKEY, XK_0, move, { .i = 9 } }, | |||||
{ MODKEY, XK_q, killclient, { 0 } }, | |||||
{ MODKEY, XK_u, focusurgent, { 0 } }, | |||||
{ MODKEY|ShiftMask, XK_u, toggle, { .v = (void*) &urgentswitch } }, | |||||
{ 0, XK_F11, fullscreen, { 0 } }, | |||||
}; |
@ -0,0 +1,33 @@ | |||||
# tabbed version | |||||
VERSION = 0.6 | |||||
# Customize below to fit your system | |||||
# paths | |||||
PREFIX = /usr/local | |||||
MANPREFIX = ${PREFIX}/share/man | |||||
X11INC = /usr/X11R6/include | |||||
X11LIB = /usr/X11R6/lib | |||||
# freetype | |||||
FREETYPELIBS = -lfontconfig -lXft | |||||
FREETYPEINC = /usr/include/freetype2 | |||||
# OpenBSD (uncomment) | |||||
#FREETYPEINC = ${X11INC}/freetype2 | |||||
# includes and libs | |||||
INCS = -I. -I/usr/include -I$(X11INC) -I${FREETYPEINC} | |||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${FREETYPELIBS} | |||||
# flags | |||||
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE | |||||
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} | |||||
LDFLAGS = -s ${LIBS} | |||||
# Solaris | |||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" | |||||
#LDFLAGS = ${LIBS} | |||||
# compiler and linker | |||||
CC = cc |
@ -0,0 +1,54 @@ | |||||
diff --git a/tabbed.c b/tabbed.c | |||||
index eafe28a..b0b9662 100644 | |||||
--- a/tabbed.c | |||||
+++ b/tabbed.c | |||||
@@ -152,7 +152,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = { | |||||
[MapRequest] = maprequest, | |||||
[PropertyNotify] = propertynotify, | |||||
}; | |||||
-static int bh, obh, wx, wy, ww, wh; | |||||
+static int bh, obh, wx, wy, ww, wh, vbh; | |||||
static unsigned int numlockmask; | |||||
static Bool running = True, nextfocus, doinitspawn = True, | |||||
fillagain = False, closelastclient = False, | |||||
@@ -324,7 +324,7 @@ void | |||||
drawbar(void) | |||||
{ | |||||
XftColor *col; | |||||
- int c, cc, fc, width; | |||||
+ int c, cc, fc, width, nbh, i; | |||||
char *name = NULL; | |||||
if (nclients == 0) { | |||||
@@ -332,12 +332,21 @@ drawbar(void) | |||||
dc.w = ww; | |||||
XFetchName(dpy, win, &name); | |||||
drawtext(name ? name : "", dc.norm); | |||||
- XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0); | |||||
+ XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, vbh, 0, 0); | |||||
XSync(dpy, False); | |||||
return; | |||||
} | |||||
+ nbh = nclients > 1 ? vbh : 0; | |||||
+ if (bh != nbh) { | |||||
+ bh = nbh; | |||||
+ for (i = 0; i < nclients; i++) | |||||
+ XMoveResizeWindow(dpy, clients[i]->win, 0, bh, ww, wh - bh); | |||||
+ } | |||||
+ if (bh == 0) | |||||
+ return; | |||||
+ | |||||
width = ww; | |||||
cc = ww / tabwidth; | |||||
if (nclients > cc) | |||||
@@ -984,7 +993,7 @@ setup(void) | |||||
screen = DefaultScreen(dpy); | |||||
root = RootWindow(dpy, screen); | |||||
initfont(font); | |||||
- bh = dc.h = dc.font.height + 2; | |||||
+ vbh = dc.h = dc.font.height + 2; | |||||
/* init atoms */ | |||||
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); |
@ -0,0 +1,171 @@ | |||||
.TH TABBED 1 tabbed\-VERSION | |||||
.SH NAME | |||||
tabbed \- generic tabbed interface | |||||
.SH SYNOPSIS | |||||
.B tabbed | |||||
.RB [ \-c ] | |||||
.RB [ \-d ] | |||||
.RB [ \-k ] | |||||
.RB [ \-s ] | |||||
.RB [ \-v ] | |||||
.RB [ \-g | |||||
.IR geometry ] | |||||
.RB [ \-n | |||||
.IR name ] | |||||
.RB [ \-p | |||||
.RB [ s {+/-} ] \fIpos\fR ] | |||||
.RB [ \-o | |||||
.IR normbgcol ] | |||||
.RB [ \-O | |||||
.IR normfgcol ] | |||||
.RB [ \-t | |||||
.IR selbgcol ] | |||||
.RB [ \-T | |||||
.IR selfgcol ] | |||||
.RB [ \-u | |||||
.IR urgbgcol ] | |||||
.RB [ \-U | |||||
.IR urgfgcol ] | |||||
.RB [ \-r | |||||
.IR narg ] | |||||
.RI [ "command ..." ] | |||||
.SH DESCRIPTION | |||||
.B tabbed | |||||
is a simple tabbed container for applications which support XEmbed. Tabbed | |||||
will then run the provided command with the xid of tabbed as appended | |||||
argument. (See EXAMPLES.) The automatic spawning of the command can be | |||||
disabled by providing the -s parameter. If no command is provided | |||||
tabbed will just print its xid and run no command. | |||||
.SH OPTIONS | |||||
.TP | |||||
.B \-c | |||||
close tabbed when the last tab is closed. Mutually exclusive with -f. | |||||
.TP | |||||
.B \-d | |||||
detaches tabbed from the terminal and prints its XID to stdout. | |||||
.TP | |||||
.B \-f | |||||
fill up tabbed again by spawning the provided command, when the last tab is | |||||
closed. Mutually exclusive with -c. | |||||
.TP | |||||
.BI \-g " geometry" | |||||
defines the X11 geometry string, which will fixate the height and width of | |||||
tabbed. | |||||
The syntax is | |||||
.RI [=][ width {xX} height ][{+-} xoffset {+-} yoffset ]. | |||||
See | |||||
.BR XParseGeometry (3) | |||||
for further details. | |||||
.TP | |||||
.B \-k | |||||
close foreground tabbed client (instead of tabbed and all clients) when | |||||
WM_DELETE_WINDOW is sent. | |||||
.TP | |||||
.BI \-n " name" | |||||
will set the WM_CLASS attribute to | |||||
.I name. | |||||
.TP | |||||
.BR \-p " [" s {+-}] \fIpos\fR | |||||
will set the absolute or relative position of where to start a new tab. When | |||||
.I pos | |||||
is is given without 's' in front it is an absolute position. Then negative | |||||
numbers will be the position from the last tab, where -1 is the last tab. | |||||
If 's' is given, then | |||||
.I pos | |||||
is a relative position to the current selected tab. If this reaches the limits | |||||
of the tabs; those limits then apply. | |||||
.TP | |||||
.BI \-r " narg" | |||||
will replace the | |||||
.I narg | |||||
th argument in | |||||
.I command | |||||
with the window id, rather than appending it to the end. | |||||
.TP | |||||
.B \-s | |||||
will disable automatic spawning of the command. | |||||
.TP | |||||
.BI \-o " normbgcol" | |||||
defines the normal background color. | |||||
.RI # RGB , | |||||
.RI # RRGGBB , | |||||
and X color names are supported. | |||||
.TP | |||||
.BI \-O " normfgcol" | |||||
defines the normal foreground color. | |||||
.TP | |||||
.BI \-t " selbgcol" | |||||
defines the selected background color. | |||||
.TP | |||||
.BI \-T " selfgbcol" | |||||
defines the selected foreground color. | |||||
.TP | |||||
.BI \-u " urgbgcol" | |||||
defines the urgent background color. | |||||
.TP | |||||
.BI \-U " urgfgbcol" | |||||
defines the urgent foreground color. | |||||
.TP | |||||
.B \-v | |||||
prints version information to stderr, then exits. | |||||
.SH USAGE | |||||
.TP | |||||
.B Ctrl\-Shift\-Return | |||||
open new tab | |||||
.TP | |||||
.B Ctrl\-Shift\-h | |||||
previous tab | |||||
.TP | |||||
.B Ctrl\-Shift\-l | |||||
next tab | |||||
.TP | |||||
.B Ctrl\-Shift\-j | |||||
move selected tab one to the left | |||||
.TP | |||||
.B Ctrl\-Shift\-k | |||||
move selected tab one to the right | |||||
.TP | |||||
.B Ctrl\-Shift\-u | |||||
toggle autofocus of urgent tabs | |||||
.TP | |||||
.B Ctrl\-Tab | |||||
toggle between the selected and last selected tab | |||||
.TP | |||||
.B Ctrl\-` | |||||
open dmenu to either create a new tab appending the entered string or select | |||||
an already existing tab. | |||||
.TP | |||||
.B Ctrl\-q | |||||
close tab | |||||
.TP | |||||
.B Ctrl\-u | |||||
focus next urgent tab | |||||
.TP | |||||
.B Ctrl\-[0..9] | |||||
jumps to nth tab | |||||
.TP | |||||
.B F11 | |||||
Toggle fullscreen mode. | |||||
.SH EXAMPLES | |||||
$ tabbed surf -e | |||||
.TP | |||||
$ tabbed urxvt -embed | |||||
.TP | |||||
$ tabbed xterm -into | |||||
.TP | |||||
$ $(tabbed -d >/tmp/tabbed.xid); urxvt -embed $(</tmp/tabbed.xid); | |||||
.TP | |||||
$ tabbed -r 2 st -w '' -e tmux | |||||
.SH CUSTOMIZATION | |||||
.B tabbed | |||||
can be customized by creating a custom config.h and (re)compiling the source | |||||
code. This keeps it fast, secure and simple. | |||||
.SH AUTHORS | |||||
See the LICENSE file for the authors. | |||||
.SH LICENSE | |||||
See the LICENSE file for the terms of redistribution. | |||||
.SH SEE ALSO | |||||
.BR st (1), | |||||
.BR xembed (1) | |||||
.SH BUGS | |||||
Please report them. |
@ -0,0 +1,35 @@ | |||||
.TH XEMBED 1 tabbed\-VERSION | |||||
.SH NAME | |||||
xembed \- XEmbed foreground process | |||||
.SH SYNOPSIS | |||||
.B xembed | |||||
.I flag command | |||||
.RI [ "argument ..." ] | |||||
.SH DESCRIPTION | |||||
If the environment variable XEMBED is set, and | |||||
.B xembed | |||||
is in the foreground of its controlling tty, it will execute | |||||
.IP | |||||
command flag $XEMBED [argument ...] | |||||
.LP | |||||
Otherwise it will execute | |||||
.IP | |||||
command [argument ...] | |||||
.LP | |||||
.SH EXAMPLE | |||||
In a terminal emulator within a | |||||
.B tabbed | |||||
session, the shell alias | |||||
.IP | |||||
$ alias surf='xembed -e surf' | |||||
.LP | |||||
will cause `surf' to open in a new tab, unless it is run in the background, | |||||
i.e. `surf &', in which case it will instead open in a new window. | |||||
.SH AUTHORS | |||||
See the LICENSE file for the authors. | |||||
.SH LICENSE | |||||
See the LICENSE file for the terms of redistribution. | |||||
.SH SEE ALSO | |||||
.BR tabbed (1) | |||||
.SH BUGS | |||||
Please report them. |
@ -0,0 +1,45 @@ | |||||
/* | |||||
* See LICENSE file for copyright and license details. | |||||
*/ | |||||
#include <fcntl.h> | |||||
#include <stdio.h> | |||||
#include <stdlib.h> | |||||
#include <unistd.h> | |||||
int | |||||
main(int argc, char *argv[]) | |||||
{ | |||||
char *xembed; | |||||
int tty; | |||||
pid_t pgrp, tcpgrp; | |||||
if (argc < 3) { | |||||
fprintf(stderr, "usage: %s flag cmd ...\n", argv[0]); | |||||
return 2; | |||||
} | |||||
if (!(xembed = getenv("XEMBED"))) | |||||
goto noembed; | |||||
if ((tty = open("/dev/tty", O_RDONLY)) < 0) | |||||
goto noembed; | |||||
pgrp = getpgrp(); | |||||
tcpgrp = tcgetpgrp(tty); | |||||
close(tty); | |||||
if (pgrp == tcpgrp) { /* in foreground of tty */ | |||||
argv[0] = argv[2]; | |||||
argv[2] = xembed; | |||||
} else { | |||||
noembed: | |||||
argv += 2; | |||||
} | |||||
execvp(argv[0], argv); | |||||
perror(argv[0]); /* failed to execute */ | |||||
return 1; | |||||
} |