dot

packages and services management
Log | Files | Refs | README

commit 20a7f8acde41efd1aa278b9df6658b5b3e32dd76
parent a70c9eea808d3af222d02437ec5b1d4b00f2e2a3
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Thu, 20 Jul 2017 21:00:33 +0200

quite finished ratox

Diffstat:
Ddvtm/build | 3---
Ddvtm/config.h | 268-------------------------------------------------------------------------------
Ddvtm/dvtm-focused-tags.diff.disabled | 37-------------------------------------
Ddvtm/dvtm-status | 15---------------
Ddvtm/profile | 1-
Ddvtm/url | 1-
Dlib-tox/.build.swp | 0
Mlib-tox/build | 11+++++++----
Mprofile | 2+-
Aratox/build | 3+++
Dtinc/url | 1-
Dtmux/.tmux.conf | 105-------------------------------------------------------------------------------
Dtmux/build | 6------
Dtmux/url | 1-
Dwily/url | 1-
15 files changed, 11 insertions(+), 444 deletions(-)

diff --git a/dvtm/build b/dvtm/build @@ -1,3 +0,0 @@ -cp "$ETC/dvtm/config.h" config.h -cp "$ETC/dvtm/dvtm-status" dvtm-status -make PREFIX="$PREFIX" install diff --git a/dvtm/config.h b/dvtm/config.h @@ -1,268 +0,0 @@ -/* scroll back buffer size in lines */ -#define SCROLL_HISTORY 500 - - -/* colors --------------------------------------------------------------------*/ - -/* valid curses attributes are listed below they can be ORed - * - * A_NORMAL Normal display (no highlight) - * A_STANDOUT Best highlighting mode of the terminal. - * A_UNDERLINE Underlining - * A_REVERSE Reverse video - * A_BLINK Blinking - * A_DIM Half bright - * A_BOLD Extra bright or bold - * A_PROTECT Protected mode - * A_INVIS Invisible or blank mode - */ - -enum { DEFAULT, RED, BLACK, }; - -static Color colors[] = { - [DEFAULT] = { .fg = -1, .bg = -1, .fg256 = -1, .bg256 = -1, }, - [RED] = { .fg = COLOR_RED, .bg = -1, .fg256 = 1, .bg256 = -1, }, - [BLACK] = { .fg = COLOR_BLACK, .bg = -1, .fg256 = 0, .bg256 = -1, }, -}; - -#define COLOR(c) COLOR_PAIR(colors[c].pair) - -static const ColorRule colorrules[] = { - { "", A_NORMAL, &colors[DEFAULT] }, /* default */ -}; - - -/* borders -------------------------------------------------------------------*/ - -/* curses attributes for the currently focused window */ -#define SELECTED_ATTR A_BOLD - -/* curses attributes for normal (not selected) windows */ -#define NORMAL_ATTR (COLOR(BLACK) | A_BOLD) - -/* curses attributes for a window with pending urgent flag */ -#define URGENT_ATTR (COLOR(RED) | A_BOLD) - - -/* status bar ----------------------------------------------------------------*/ - -/* curses attributes for the status bar */ -#define BAR_ATTR (COLOR(DEFAULT) | A_NORMAL) - -/* status bar (command line option -s) position */ -#define BAR_POS BAR_TOP /* BAR_BOTTOM, BAR_OFF */ - -/* whether status bar should be hidden if only one client exists */ -#define BAR_AUTOHIDE true - -/* format strings for the tags */ -#define TAG_SYMBOL " %s " /* printf format string */ -#define TAG_BEGIN "" -#define TAG_END "" - -/* status for status line */ -#define BAR_BEGIN ' ' -#define BAR_END ' ' - - -/* tags ----------------------------------------------------------------------*/ - -const char tags[][8] = { "1", "2", "3", "4:irc", "5:mail", "6:doc", "7:music" }; - -/* curses attributes for the currently selected tags */ -#define TAG_SEL (COLOR(DEFAULT) | A_REVERSE) - -/* curses attributes for not selected tags which contain no windows */ -#define TAG_NORMAL (COLOR(BLACK) | A_BOLD) - -/* curses attributes for not selected tags which contain windows */ -#define TAG_OCCUPIED (COLOR(DEFAULT) | A_BOLD) - -/* curses attributes for not selected tags which with urgent windows */ -#define TAG_URGENT (COLOR(RED) | A_BOLD) - - -/* layouts -------------------------------------------------------------------*/ - -/* master width factor [0.1 .. 0.9] */ -#define MFACT 0.5 - -/* number of clients in master area */ -#define NMASTER 1 - -#include "tile.c" -#include "grid.c" -#include "bstack.c" -#include "tstack.c" -#include "vstack.c" -#include "fullscreen.c" -#include "fibonacci.c" - -/* by default the first layout entry is used */ -static Layout layouts[] = { - { "[f]", tile }, - { "[b]", bstack }, - { "[u]", tstack }, - { "[n]", vstack }, - { "[g]", grid }, - { "[o]", spiral }, - { "[w]", dwindle }, - { "[m]", fullscreen }, -}; - - -/* keybindings ---------------------------------------------------------------*/ - -#define MOD CTRL('@') - -#define TAGKEYS(KEY,TAG) \ - { { MOD, 'v', KEY, }, { view, { tags[TAG] } } }, \ - { { MOD, 't', KEY, }, { tag, { tags[TAG] } } }, \ - { { MOD, 'V', KEY, }, { toggleview, { tags[TAG] } } }, \ - { { MOD, 'T', KEY, }, { toggletag, { tags[TAG] } } }, \ - { { MOD, KEY_F(KEY), }, { view, { tags[TAG] } } }, - -/* you can specifiy at most 3 arguments */ -static KeyBinding bindings[] = { - { { MOD, 'c', }, { create, { NULL } } }, - { { MOD, 'C', }, { create, { NULL, NULL, "$CWD" } } }, - { { MOD, '?', }, { create, { "man dvtm", "dvtm help" } } }, - { { MOD, 'x', 'x', }, { killclient, { NULL } } }, - { { MOD, 'q', 'q', }, { quit, { NULL } } }, - - { { MOD, 'j', }, { focusnext, { NULL } } }, - { { MOD, 'k', }, { focusprev, { NULL } } }, - { { MOD, 'J', }, { focusdown, { NULL } } }, - { { MOD, 'K', }, { focusup, { NULL } } }, - { { MOD, 'H', }, { focusleft, { NULL } } }, - { { MOD, 'L', }, { focusright, { NULL } } }, - - { { MOD, 'f', }, { setlayout, { "[f]" } } }, - { { MOD, 'b', }, { setlayout, { "[b]" } } }, - { { MOD, 'u', }, { setlayout, { "[u]" } } }, - { { MOD, 'n', }, { setlayout, { "[n]" } } }, - { { MOD, 'g', }, { setlayout, { "[g]" } } }, - { { MOD, 'o', }, { setlayout, { "[o]" } } }, - { { MOD, 'w', }, { setlayout, { "[w]" } } }, - { { MOD, 'm', }, { setlayout, { "[m]" } } }, - { { MOD, ' ', }, { setlayout, { NULL } } }, - - { { MOD, 'i', }, { incnmaster, { "+1" } } }, - { { MOD, 'd', }, { incnmaster, { "-1" } } }, - { { MOD, 'h', }, { setmfact, { "-0.05" } } }, - { { MOD, 'l', }, { setmfact, { "+0.05" } } }, - - { { MOD, '.', }, { toggleminimize, { NULL } } }, - { { MOD, 's', }, { togglebar, { NULL } } }, - { { MOD, 'S', }, { togglebarpos, { NULL } } }, - { { MOD, 'M', }, { togglemouse, { NULL } } }, - - { { MOD, '\n', }, { zoom , { NULL } } }, - { { MOD, '\r', }, { zoom , { NULL } } }, - - { { MOD, '1', }, { focusn, { "1" } } }, - { { MOD, '2', }, { focusn, { "2" } } }, - { { MOD, '3', }, { focusn, { "3" } } }, - { { MOD, '4', }, { focusn, { "4" } } }, - { { MOD, '5', }, { focusn, { "5" } } }, - { { MOD, '6', }, { focusn, { "6" } } }, - { { MOD, '7', }, { focusn, { "7" } } }, - { { MOD, '8', }, { focusn, { "8" } } }, - { { MOD, '9', }, { focusn, { "9" } } }, - { { MOD, '\t', }, { focuslast, { NULL } } }, - { { MOD, 'a', }, { togglerunall, { NULL } } }, - - { { MOD, CTRL('L'), }, { redraw, { NULL } } }, - { { MOD, 'r', }, { redraw, { NULL } } }, - { { MOD, ' ', }, { send, { (const char []){MOD, 0} } } }, - - { { MOD, 'e', }, { copymode, { "dvtm-editor" } } }, - { { MOD, 'E', }, { copymode, { "dvtm-pager" } } }, - { { MOD, '/', }, { copymode, { "dvtm-pager", "/" } } }, - { { MOD, 'p', }, { paste, { NULL } } }, - { { MOD, KEY_PPAGE, }, { scrollback, { "-1" } } }, - { { MOD, KEY_NPAGE, }, { scrollback, { "1" } } }, - { { KEY_SPREVIOUS, }, { scrollback, { "-1" } } }, - { { KEY_SNEXT, }, { scrollback, { "1" } } }, - - { { MOD, '0', }, { view, { NULL } } }, - { { MOD, 'v', '0' }, { view, { NULL } } }, - { { MOD, 'v', '\t', }, { viewprevtag, { NULL } } }, - { { MOD, 't', '0' }, { tag, { NULL } } }, - TAGKEYS( '1', 0) - TAGKEYS( '2', 1) - TAGKEYS( '3', 2) - TAGKEYS( '4', 3) - TAGKEYS( '5', 4) - TAGKEYS( '6', 5) -}; - -static char const * const keytable[] = { - /* add your custom key escape sequences */ -}; - - -/* mouse ---------------------------------------------------------------------*/ - -/* possible values for the mouse buttons are listed below: - * - * BUTTON1_PRESSED mouse button 1 down - * BUTTON1_RELEASED mouse button 1 up - * BUTTON1_CLICKED mouse button 1 clicked - * BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked - * BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked - * BUTTON2_PRESSED mouse button 2 down - * BUTTON2_RELEASED mouse button 2 up - * BUTTON2_CLICKED mouse button 2 clicked - * BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked - * BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked - * BUTTON3_PRESSED mouse button 3 down - * BUTTON3_RELEASED mouse button 3 up - * BUTTON3_CLICKED mouse button 3 clicked - * BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked - * BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked - * BUTTON4_PRESSED mouse button 4 down - * BUTTON4_RELEASED mouse button 4 up - * BUTTON4_CLICKED mouse button 4 clicked - * BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked - * BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked - * BUTTON_SHIFT shift was down during button state change - * BUTTON_CTRL control was down during button state change - * BUTTON_ALT alt was down during button state change - * ALL_MOUSE_EVENTS report all button state changes - * REPORT_MOUSE_POSITION report mouse movement - */ - -#ifdef NCURSES_MOUSE_VERSION -# define CONFIG_MOUSE /* compile in mouse support if we build against ncurses */ -#endif - -#define ENABLE_MOUSE true /* whether to enable mouse events by default */ - -#ifdef CONFIG_MOUSE -static Button buttons[] = { - { BUTTON1_CLICKED, { mouse_focus, { NULL } } }, - { BUTTON1_DOUBLE_CLICKED, { mouse_fullscreen, { "[ ]" } } }, - { BUTTON2_CLICKED, { mouse_zoom, { NULL } } }, - { BUTTON3_CLICKED, { mouse_minimize, { NULL } } }, -}; -#endif /* CONFIG_MOUSE */ - - -/* commands ------------------------------------------------------------------*/ - -static Cmd commands[] = { - /* create [cmd]: create a new window, run `cmd` in the shell if specified */ - { "create", { create, { NULL } } }, - - /* focus <win_id>: focus the window whose `DVTM_WINDOW_ID` is `win_id` */ - { "focus", { focusid, { NULL } } }, - - /* tag <win_id> <tag> [tag ...]: add +tag, remove -tag or set tag of the window with the given identifier */ - { "tag", { tagid, { NULL } } }, -}; - -/* gets executed when dvtm is started */ -static Action actions[] = { - { create, { NULL } }, -}; diff --git a/dvtm/dvtm-focused-tags.diff.disabled b/dvtm/dvtm-focused-tags.diff.disabled @@ -1,37 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index 643a281..8e6a77a 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -45,6 +45,8 @@ static Color colors[] = { - #define SCROLL_HISTORY 500 - /* printf format string for the tag in the status bar */ - #define TAG_SYMBOL "[%s]" -+/* printf format string for the tags that current focused window */ -+#define TAG_SYMBOL_FOCUSED "[%s]" - /* curses attributes for the currently selected tags */ - #define TAG_SEL (COLOR(BLUE) | A_BOLD) - /* curses attributes for not selected tags which contain no windows */ -diff --git a/dvtm.c b/dvtm.c -index c6440ab..41df797 100644 ---- a/dvtm.c -+++ b/dvtm.c -@@ -339,7 +339,10 @@ drawbar(void) { - attrset(TAG_OCCUPIED); - else - attrset(TAG_NORMAL); -- printw(TAG_SYMBOL, tags[i]); -+ if (sel && sel->tags & (1 << i)) -+ printw(TAG_SYMBOL_FOCUSED , tags[i]); -+ else -+ printw(TAG_SYMBOL , tags[i]); - } - - attrset(TAG_NORMAL); -@@ -585,6 +588,7 @@ focus(Client *c) { - draw_border(c); - wnoutrefresh(c->window); - } -+ drawbar(); - } - curs_set(c && !c->minimized && vt_cursor_visible(c->term)); - } diff --git a/dvtm/dvtm-status b/dvtm/dvtm-status @@ -1,15 +0,0 @@ -export STATUS_FIFO="${TMPDIR:-/tmp}/dvtm-status-$$" -export CMD_FIFO="${TMPDIR:-/tmp}/dvtm-command-$$" - -mkfifo -m 600 "$STATUS_FIFO" || exit 1 -mkfifo -m 600 "$CMD_FIFO" || exit 1 - -while printf '%s\n' "$(status)" > "$STATUS_FIFO" -do : -done & pid="$!" - -dvtm -s "$STATUS_FIFO" -c "$CMD_FIFO" $@ - -kill "$pid" -wait "$pid" 2> /dev/null -rm -f "$STATUS_FIFO" "$CMD_FIFO" diff --git a/dvtm/profile b/dvtm/profile @@ -1 +0,0 @@ -export DVTM_PAGER='less -R' diff --git a/dvtm/url b/dvtm/url @@ -1 +0,0 @@ -http://github.com/martanne/dvtm/archive/master.tar.gz diff --git a/lib-tox/.build.swp b/lib-tox/.build.swp Binary files differ. diff --git a/lib-tox/build b/lib-tox/build @@ -1,5 +1,8 @@ -[ ! -f ./configure ] && ./autogen.sh +[ ! -f configure ] && ./autogen.sh ./configure \ - --with-nacl-headers=$OPT/lib-nacl/include/"$(uname -m)" \ - --with-nacl-libs=$OPT/lib-nacl/lib/"$(uname -m)" -make + --prefix="$PREFIX" \ + --enable-nacl \ + --with-nacl-headers="$OPT/lib-nacl/include/$(uname -m)" \ + --with-nacl-libs="$OPT/lib-nacl/lib/$(uname -m)" + +make install diff --git a/profile b/profile @@ -13,5 +13,5 @@ export LIBRARY_PATH="$ROOT/.local/lib" export LD_LIBRARY_PATH="$ROOT/lib:$LD_LIBRARY_PATH" for profile in "$ETC"/*/profile -do . "$profile" +do [ -f "$ETC"/*/profile ] && . "$profile" done diff --git a/ratox/build b/ratox/build @@ -0,0 +1,3 @@ +make \ + CFLAGS="-I$OPT/lib-tox/include" \ + LDFLAGS="-L$OPT/lib-tox/lib" diff --git a/tinc/url b/tinc/url @@ -1 +0,0 @@ -http://tinc-vpn.org/packages/tinc-1.0.31.tar.gz diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -1,105 +0,0 @@ -# --- keybindings -------------------------------------------------------------- - - -# leader - -set -g prefix C-Space -unbind C-b -bind C-Space send-key C-Space - - -# pane management - -bind -r k select-pane -U -bind -r j select-pane -D -bind -r h select-pane -L -bind -r l select-pane -R -bind -r o select-pane -t :.+ -bind -r C-k resize-pane -U 2 -bind -r C-j resize-pane -D 2 -bind -r C-h resize-pane -L 5 -bind -r C-l resize-pane -R 5 - - -# window management - -bind -r < swap-window -t - -bind -r > swap-window -t + -bind -r p previous-window -bind -r n next-window -bind -r Tab last-window -bind -r c new-window -c '#{pane_current_path}' -bind -r C new-window - - -# global tmux state - -bind -n C-z detach -bind r source ~/.tmux.conf\; display "Config loaded" - - -# --- options ------------------------------------------------------------------ - -set -g base-index 1 -set -g pane-base-index 1 -set -g renumber-windows on -set -g display-time 2000 -set -g repeat-time 500 -set -g detach-on-destroy off - - -# global appearance - -# messages -set -g message-style bold,fg=red -set -g message-command-style bold,fg=white - -# display-panes mode -set -g display-panes-colour white -set -g display-panes-active-colour red - -# clock mode -set -g clock-mode-colour white -set -g clock-mode-style 24 - -# menus -set -g mode-style bg=white,fg=black - - -# status - -set -g status-interval 5 - -# global -set -g status-position top -set -g status-justify left -set -g status-style bg=black,fg=white - -# left -set -g status-left-length 30 -set -g status-left-style fg=white -set -g status-left "#[fg=black,bg=white] #S #[default] " - -# right -set -g status-right-length 100 -set -g status-right-style fg=white -set -g status-right "#(status)" - -set -g window-status-separator " " - -# background windows -set -g window-status-style bold,fg=black -set -g window-status-format " #I #W " - -# foreground windows -set -g window-status-current-style bold,fg=white -set -g window-status-current-format " #I #W " - -# urgent windows -set -g window-status-bell-style fg=white,bg=red -set -g window-status-activity-style fg=white,bg=yellow - - -# borders - -set -g pane-border-style bold,fg=white diff --git a/tmux/build b/tmux/build @@ -1,6 +0,0 @@ -LIBEVENT_CFLAGS="-I$ROOT/include" -LIBEVENT_LIBS="-l$ROOT/lib" -export LIBEVENT_CFLAGS LIBEVENT_LIB - -./configure --prefix="$PREFIX" -make install diff --git a/tmux/url b/tmux/url @@ -1 +0,0 @@ -http://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz diff --git a/wily/url b/wily/url @@ -1 +0,0 @@ -https://github.com/knusbaum/wily/archive/master.tar.gz