dot

packages and services management
Log | Files | Refs | README

commit 234a7bd26c1870912d2468624dd5e0958e43af7c
parent 1384f3a43511937051ed044cc4f8696103d84c52
Author: sshbio <josuah.demangeon@gmail.com>
Date:   Thu, 31 Mar 2016 02:39:09 +0200

Added a marvellous irc client!

Diffstat:
Dbin/irc | 114-------------------------------------------------------------------------------
Dbin/sick | 8--------
Mbin/src | 16++++++++--------
Mbin/www | 40----------------------------------------
Metc/bash_profile | 7++++++-
Metc/bashrc | 8+-------
Metc/bookmarks | 4++++
Msrc/dwm/config.h | 14+++++++-------
Asrc/dwm/dwm-6.1-uselessgap.diff | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
9 files changed, 80 insertions(+), 185 deletions(-)

diff --git a/bin/irc b/bin/irc @@ -1,114 +0,0 @@ -#!/bin/sh - -# ▘ -# ▌▛▘▛▘ -# ▌▌ ▙▖ - Simple yet usable IRC front-end for ii -# ============================================================================== - -# Author: sshbio <josuah.demangeon> and still have Gmail for now -# Licence: Do whatever you want with it -# Url: http://tools.suckless.org/ii - -nick='sshbio' -name='Josuah Demangeon' - -IRC="${IRC-$HOME/irc}" -HIGHLIGHT_SCRIPT='irc.sed' - -mkdir -p "$IRC" -cd "$IRC" - -# Kill background process while exiting -trap 'kill $(jobs -p)' EXIT - -view() -{ - path="$IRC/$1/out" - - printf 'Waiting for %s... ' "$1" - - delay='10' - while [ ! -f "$path" ] && [ "$delay" -gt 0 ] - do - delay=$(($delay - 1)) - printf '\b%s' "$delay" - sleep 1 - done - - printf '\n\n\n' - - if [ "$delay" -gt 0 ] - then - printf '%s\n\n' "$1" - - # Pipe the channel output through sed for formatting - tail -f "$path" | $HIGHLIGHT_SCRIPT & tail_pid="$!" - fi -} - -close_channel() -{ - printf '%s' "$tail_pid" - [ -z "$tail_pid" ] || kill -9 "$tail_pid" - - tail_pid='' -} - -prompt() -{ - message="$1" - - printf '\033[0;1m\n%s> \033[0m' "$message" - - close_channel - - stty echo - read input - stty -echo - - #[ -z "$input" ] && return 1 -} - -# INPUT ------------------------------------------------------------------------ - -read_char() { - stty -icanon -echo - eval "$1=\$(dd bs=1 count=1 2>/dev/null)" - stty icanon echo -} - -while read_char char -do - case "$char" in - l) # List - printf '\033[0;31m' - ps ax | sed -n ' $ d; /ii/ p' - printf '\033[0m' - ;; - - c) # Connect - prompt 'connect' - ii -s $input -n $nick -f $name & - server="$input" - - view "$server" - ;; - - j) # Join - prompt 'join' - - printf '/j %s\n' "$input" > "$IRC/$server/in" - channel="$input" - - view "$server/$channel" - ;; - - [[:space:]]) # Message - prompt 'message' - - printf '%s\n' "$input" > "$IRC/$server/$channel/in" - - view "$server/$channel" - ;; - esac -done diff --git a/bin/sick b/bin/sick @@ -1,8 +0,0 @@ -#!/bin/awk -f - -# ▘ ▌ -# ▛▘▌▛▘▙▘ -# ▄▌▌▙▖▛▖ - An overlay to SIC in awK -# ============================================================================== - -# http://tools.suckless.org/sic diff --git a/bin/src b/bin/src @@ -6,23 +6,22 @@ # List of _git_ repositories that will get downloaded or updated repos=' -http://github.com/cmus/cmus -http://github.com/kieselsteini/cgo -http://github.com/universal-ctags/ctags http://github.com/atextor/icat http://github.com/Gottox/smu +http://github.com/rcr/rirc http://git.suckless.org/dwm http://git.suckless.org/dmenu http://git.suckless.org/st http://git.suckless.org/surf -http://git.suckless.org/sic git://git.2f30.org/stagit.git ' -# http://github.com/martanne/abduco -# http://github.com/martanne/dvtm -# git://git.codemadness.org/sfeed +#http://github.com/universal-ctags/ctags +#http://github.com/cmus/cmus +#http://github.com/kieselsteini/cgo +#http://github.com/martanne/abduco +#http://github.com/martanne/dvtm +#git://git.codemadness.org/sfeed -# The r archives=' https://github.com/tmux/tmux/releases/download/2.1/tmux-2.1.tar.gz ' @@ -90,6 +89,7 @@ build() { # Aditionnal steps after make [ "$1" = "dvtm" ] && tic -s dvtm.info [ "$1" = "icat" ] && cp icat "$PREFIX/bin" + [ "$1" = "rirc" ] && make clean rirc && cp rirc "$PREFIX/bin" } diff --git a/bin/www b/bin/www @@ -76,7 +76,6 @@ do <title>${site_title} - ${page_title}</title> <link rel="stylesheet" href="style.css" type="text/css"> <link rel="alternate" href="rss.xml" type="application/rss+xml" title="${site_title} RSS" /> - <link rel="alternate" href="atom.xml" type="application/atom+xml" title="${site_title} Atom"/> <link rel="icon" href="favicon.png" type="image/png" /> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <meta content="${site_lang}" http-equiv="Content-Language" /> @@ -93,7 +92,6 @@ do | <a href="http://twitter.com/sshbio">Twitter</a> | <a href="http://github.com/sshbio">Github</a> | <a href="rss.xml" title="RSS">RSS</a> - | <a href="atom.xml" title="Atom">Atom</a> | <a href="mailto:${site_mail}">Mail</a> </nav> </header> @@ -144,44 +142,6 @@ ${rss} EOF -# ATOM ------------------------------------------------------------------------- - -for page in $(ls "$pages") -do - read page_title < $pages/$page - page_url="$site_url/${page%.md}.html" - - atom="${atom} - <entry> - <title type=\"html\"><![CDATA[${page_title}]]></title> - <link rel=\"alternate\" type=\"text/html\" href=\"$site_url\" /> - <id>${page_url}</id> - <updated>${site_update}</updated> - <published>${site_update}</published> - <author> - <name>${site_author}</name> - <uri>${site_url}</uri> - </author> - <summary type=\"html\"><![CDATA[${site_description}]]></summary> - </entry> - " -done - -cat <<EOF > "$WWW/atom.xml" -<?xml version="1.0" encoding="UTF-8"?> - <title type="text">${site_title}</title> - <subtitle type="text">${site_description}</subtitle> - <updated>${site_updated}</updated> - <link rel="alternate" type="text/html" href="${site_url}" /> - <id>${site_url}/atom.xml</id> - <link rel="self" type="application/atom+xml" href="${site_url}/atom.xml" /> - -${atom} - -</feed> -EOF - - # SITEMAP ---------------------------------------------------------------------- for page in $(ls "$pages") diff --git a/etc/bash_profile b/etc/bash_profile @@ -25,7 +25,12 @@ theme_solarized_light=' theme_ghost_in_the_shell=' \e]P0000000 \e]P191265C \e]P2439a64 \e]P3c9dd79 \e]P45fb3b3 \e]P5516583 \e]P64a8f86 \e]P7bbccee -\e]P8081010 \e]P9E71E5B \e]PA72f4a0 \e]PBf5ff8B \e]PC29a5ff \e]PD676cb0 \e]PE00ffff \e]PFffffff' +\e]P8182020 \e]P9E71E5B \e]PA72f4a0 \e]PBf5ff8B \e]PC29a5ff \e]PD676cb0 \e]PE00ffff \e]PFffffff' + +theme_coal=' +\e]P0000000 \e]P191265C \e]P2439a64 \e]P3c9dd79 \e]P45fb3b3 \e]P5516583 \e]P64a8f86 \e]P7bbccee +\e]P8222222 \e]P9E71E5B \e]PA72f4a0 \e]PBf5ff8B \e]PC29a5ff \e]PD676cb0 \e]PE00ffff \e]PFffffff' + printf "$theme_ghost_in_the_shell" diff --git a/etc/bashrc b/etc/bashrc @@ -31,13 +31,7 @@ alias k='kill' alias weather='curl -4 wttr.in' # Thanks @biochemistries alias fg="figlet -f $DOT/etc/figlet/miniwi.flf" alias b='bookmark' - -# Set window name -alias alsa='printf "\e]0; volume\007" && alsamixer -c 1' -alias cgo='printf "\e]0; cgo\007" && cgo' -alias cmus='printf "\e]0; cmus\007" && cmus' -alias mutt='printf "\e]0; mutt\007" && mutt' -alias vim='printf "\e]0; vim\007" && vim' +alias am='alsamixer -c 1' # FUNCTIONS -------------------------------------------------------------------- diff --git a/etc/bookmarks b/etc/bookmarks @@ -237,3 +237,7 @@ http://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html #WEBSERVICES git, irc, pastebin, mail... https://teknik.io/ + +#FOLKS +rcr - rirc author +http://rcr.io/ diff --git a/src/dwm/config.h b/src/dwm/config.h @@ -5,13 +5,13 @@ static const char *fonts[] = { "tewi:pixelsize=11" }; static const char dmenufont[] = "tewi:pixelsize=11"; -static const char normbordercolor[] = "#144D54"; -static const char normbgcolor[] = "#000000"; -static const char normfgcolor[] = "#ffffff"; -static const char selbordercolor[] = "#ce578a"; -static const char selbgcolor[] = "#000000"; -static const char selfgcolor[] = "#00ffff"; -static const unsigned int borderpx = 2; /* border pixel of windows */ +static const char normbordercolor[] = "#222222"; +static const char normbgcolor[] = "#222222"; +static const char normfgcolor[] = "#cccccc"; +static const char selbordercolor[] = "#ffffff"; +static const char selbgcolor[] = "#222222"; +static const char selfgcolor[] = "#ffffff"; +static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int gappx = 10; /* gap pixel between windows */ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ diff --git a/src/dwm/dwm-6.1-uselessgap.diff b/src/dwm/dwm-6.1-uselessgap.diff @@ -0,0 +1,54 @@ +--- dwm/dwm.c.orig 2015-11-22 13:26:16.664650238 -0700 ++++ dwm/dwm.c 2015-11-22 13:25:57.407984351 -0700 +@@ -52,8 +52,8 @@ + #define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) + #define LENGTH(X) (sizeof X / sizeof X[0]) + #define MOUSEMASK (BUTTONMASK|PointerMotionMask) +-#define WIDTH(X) ((X)->w + 2 * (X)->bw) +-#define HEIGHT(X) ((X)->h + 2 * (X)->bw) ++#define WIDTH(X) ((X)->w + 2 * (X)->bw + gappx) ++#define HEIGHT(X) ((X)->h + 2 * (X)->bw + gappx) + #define TAGMASK ((1 << LENGTH(tags)) - 1) + #define TEXTW(X) (drw_text(drw, 0, 0, 0, 0, (X), 0) + drw->fonts[0]->h) + +@@ -1293,12 +1293,36 @@ void + resizeclient(Client *c, int x, int y, int w, int h) + { + XWindowChanges wc; ++ unsigned int n; ++ unsigned int gapoffset; ++ unsigned int gapincr; ++ Client *nbc; + +- c->oldx = c->x; c->x = wc.x = x; +- c->oldy = c->y; c->y = wc.y = y; +- c->oldw = c->w; c->w = wc.width = w; +- c->oldh = c->h; c->h = wc.height = h; + wc.border_width = c->bw; ++ ++ /* Get number of clients for the selected monitor */ ++ for (n = 0, nbc = nexttiled(selmon->clients); nbc; nbc = nexttiled(nbc->next), n++); ++ ++ /* Do nothing if layout is floating */ ++ if (c->isfloating || selmon->lt[selmon->sellt]->arrange == NULL) { ++ gapincr = gapoffset = 0; ++ } else { ++ /* Remove border and gap if layout is monocle or only one client */ ++ if (selmon->lt[selmon->sellt]->arrange == monocle || n == 1) { ++ gapoffset = 0; ++ gapincr = -2 * borderpx; ++ wc.border_width = 0; ++ } else { ++ gapoffset = gappx; ++ gapincr = 2 * gappx; ++ } ++ } ++ ++ c->oldx = c->x; c->x = wc.x = x + gapoffset; ++ c->oldy = c->y; c->y = wc.y = y + gapoffset; ++ c->oldw = c->w; c->w = wc.width = w - gapincr; ++ c->oldh = c->h; c->h = wc.height = h - gapincr; ++ + XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); + configure(c); + XSync(dpy, False);