dotfiles

dot files in ~
git clone git://git.unixkoans.com/dotfiles.git
Log | Files | Refs

commit 28f87a445031b2038b326fa2d3fd0c3affb9ba7e
parent 3a9559bbc1b5a1cbf1f308d7045e61b924a3c2b2
Author: Xiaodong Xu <xxdlhy@gmail.com>
Date:   Mon Feb 20 20:54:06 +0800

Update configs

Diffstat:
.Xdefaults | 63+++++++++++++++++++++++++++++++++++----------------------------
.Xdefaults.d/fonts/profont_wqy | 9+++++++++
.Xdefaults.d/fonts/tamzen_wqy | 9+++++++++
.Xdefaults.d/fonts/terminus_wqy | 6+++---
.bashrc | 6+++---
.gtkrc.mine | 6+++---
.irssi/neongold.theme | 3++-
.irssi/saved_nick_colors | 7+++++++
.irssi/scripts/ascii.pl | 405+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.irssi/scripts/autorun/nickcolor.pl | 55++++++++++++++++++++++---------------------------------
.irssi/scripts/autorun/splitlong.pl | 60------------------------------------------------------------
.irssi/scripts/autorun/wildpokemon.pl | 47-----------------------------------------------
.irssi/scripts/colorize_nicks.pl | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.irssi/scripts/splitlong.pl | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.irssi/scripts/wildpokemon.pl | 47+++++++++++++++++++++++++++++++++++++++++++++++
.pentadactylrc | 2+-
.tmux.conf | 94-------------------------------------------------------------------------------
.vimprobablerc | 19-------------------
.xinitrc | 36+++++++++++++++++++++---------------
.zathurarc | 10+++++-----
.zprofile | 15---------------
.zsh/alias.zsh | 41-----------------------------------------
.zsh/base.zsh | 8--------
.zsh/colorscheme.zsh | 28----------------------------
.zsh/export.zsh | 21---------------------
.zsh/history.zsh | 15---------------
.zsh/key.zsh | 14--------------
.zshrc | 16----------------
README.md | 19+------------------
dotman | 104-------------------------------------------------------------------------------
firefox/userChrome.css | 6+++---
rofi.conf | 4++--
settings.ini | 4++--
sxhkdrc | 39+++++++++++++++++++++++----------------
windowchefrc | 9+++++----
yabar.conf | 15++++++++++-----
36 files changed, 814 insertions(+), 624 deletions(-)
diff --git a/.Xdefaults b/.Xdefaults @@ -1,48 +1,55 @@ ! ! author : Xu Xiaodong <xxdlhy@gmail.com> -! modified : 2016 Nov 02 +! modified : 2016 Nov 17 ! !-- colorscheme & font --! #include ".Xdefaults.d/colors/gruvbox_urxvt256" #include ".Xdefaults.d/colors/gruvbox_dark" -#include ".Xdefaults.d/fonts/firacode_noto" +#include ".Xdefaults.d/fonts/profont_wqy" !-- xft --! ! hintstyle : hintnone | hintslight | hintmedium | hintfull ! lcdfilter : lcdnone | lcddefault | lcdlight | lcdlegacy -Xft.dpi : 96 -Xft.antialias : true -Xft.autohint : false -Xft.hinting : true -Xft.hintstyle : hintslight -Xft.rgba : rgb -Xft.lcdfilter : lcdlight +Xft.dpi: 96 +Xft.antialias: true +Xft.autohint: false +Xft.hinting: true +Xft.hintstyle: hintslight +Xft.rgba: rgb +Xft.lcdfilter: lcdlight !-- cursor theme --! -Xcursor.theme : Neutral_Plus -Xcursor.size : 10 +Xcursor.theme: Neutral_Plus +Xcursor.size: 10 !-- urxvt base --! -URxvt.title : URxvt -URxvt.geometry : 80x20 -URxvt.loginShell : true -URxvt.preeditType : Root -URxvt.saveLines : 65535 +URxvt.title: URxvt +URxvt.geometry: 100x27 +URxvt.loginShell: true +URxvt.preeditType: Root +URxvt.saveLines: 65535 !-- urxvt look --! -URxvt.transparent : false -URxvt.cursorBlink : false -URxvt.scrollBar : false +URxvt.transparent: false +URxvt.cursorBlink: false +URxvt.scrollBar: false URxvt.intensityStyles: false -URxvt.fading : 20 -URxvt.externalBorder : 0 -URxvt.internalBorder : 10 -! URxvt.letterSpace : -1 +URxvt.fading: 20 +URxvt.externalBorder: 0 +URxvt.internalBorder: 6 !-- urxvt extension --! -URxvt.perl-lib : /usr/lib/urxvt/perl/ -URxvt.perl-ext-common : default,matcher -URxvt.matcher.button : 1 -URxvt.matcher.pattern.1 : \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] -URxvt.url-launcher : firefox +URxvt.perl-lib: /usr/lib/urxvt/perl/ +URxvt.perl-ext-common: default,keyboard-select,url-select,clipboard +URxvt.keysym.M-Escape: perl:keyboard-select:activate +URxvt.keysym.M-s: perl:keyboard-select:search +URxvt.keysym.M-u: perl:url-select:select_next +URxvt.url-select.autocopy: true +URxvt.url-select.button: 1 +URxvt.url-select.launcher: firefox +URxvt.url-select.underline: true +URxvt.keysym.M-c: perl:clipboard:copy +URxvt.keysym.M-v: perl:clipboard:paste +URxvt.keysym.M-C-v: perl:clipboard:paste_escaped +URxvt.clipboard.autocopy: true diff --git a/.Xdefaults.d/fonts/profont_wqy b/.Xdefaults.d/fonts/profont_wqy @@ -0,0 +1,9 @@ +! +! author : Xu Xiaodong <xxdlhy@gmail.com> +! modified : 2017 Jan 08 +! + +URxvt.font : xft:profont:pixelsize=12,xft:wenquanyi wenquanyi bitmap song:pixelsize=9 +URxvt.boldFont : xft:profont:pixelsize=12,xft:wenquanyi wenquanyi bitmap song:pixelsize=9 + +! vim: ai:et:ts=2:sw=2:tw=78:ft=xdefaults diff --git a/.Xdefaults.d/fonts/tamzen_wqy b/.Xdefaults.d/fonts/tamzen_wqy @@ -0,0 +1,9 @@ +! +! author : Xu Xiaodong <xxdlhy@gmail.com> +! modified : 2016 Nov 11 +! + +URxvt.font : xft:tamzenforpowerline:pixelsize=13,xft:wenquanyi bitmap song:pixelsize=9 +URxvt.boldFont : xft:tamzenforpowerline:pixelsize=13:bold,xft:wenquanyi bitmap song:pixelsize=9:bold + +! vim: ai:et:ts=2:sw=2:tw=78:ft=xdefaults diff --git a/.Xdefaults.d/fonts/terminus_wqy b/.Xdefaults.d/fonts/terminus_wqy @@ -1,9 +1,9 @@ ! ! author : Xu Xiaodong <xxdlhy@gmail.com> -! modified : 2012 Jun 18 +! modified : 2016 Nov 10 ! -URxvt.font : xft:terminus:size=12,xft:wenquanyi bitmap song:size=10 -URxvt.boldFont : xft:terminus:size=12:bold,xft:wenquanyi bitmap song:size=10:bold +URxvt.font : xft:terminus:size=10,xft:wenquanyi bitmap song:size=9 +URxvt.boldFont : xft:terminus:size=10:bold,xft:wenquanyi bitmap song:size=9:bold ! vim: ai:et:ts=2:sw=2:tw=78:ft=xdefaults diff --git a/.bashrc b/.bashrc @@ -1,6 +1,6 @@ # # author : Xu Xiaodong <xxdlhy@gmail.com> -# modified : 2016 Oct 20 +# modified : 2016 Nov 12 # # prompt @@ -24,7 +24,7 @@ liWhite="\[\033[0;37m\]" boWhite="\[\033[1;37m\]" PS1=" $liGreen\w - $liYellow───╼ $liWhite" + $liYellow──── $liWhite" # alias if [ "$TERM" != "dumb" ]; then @@ -34,7 +34,7 @@ fi alias l='ls -lsh' alias ll='ls -lash' alias sd='shutdown -h now' -alias v='vim' +alias v='nvim' # completion if [ -f /etc/bash_completion ]; then diff --git a/.gtkrc.mine b/.gtkrc.mine @@ -1,6 +1,6 @@ # # author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2016 Oct 29 +# modified: 2017 Jan 11 # #-- xft --# @@ -16,9 +16,9 @@ include "/home/xiaodong/.themes/Fawn/gtk-2.0/gtkrc" gtk-icon-theme-name = "Numix" #-- font --# -gtk-font-name = "Monda 8" +gtk-font-name = "Source Sans Pro 8" style "user-font" { - font_name = "Monda 8" + font_name = "Source Sans Pro 8" } widget_class "*" style "user-font" diff --git a/.irssi/neongold.theme b/.irssi/neongold.theme @@ -122,7 +122,8 @@ abstracts = { sbstart = " %Y┌─┄┄─────┘ %w"; sbend = ""; - topicsbstart = "%w$C %Y┄─┄$*"; + #topicsbstart = "%w$C %Y┄─┄$*"; + topicsbstart = " %Y┄─┄$*"; topicsbend = "$*"; prompt = " %Y└──┄┄%n "; diff --git a/.irssi/saved_nick_colors b/.irssi/saved_nick_colors @@ -0,0 +1,7 @@ +[session] +/Casper:06 +/Stiffler:3A +/awal1:01 +/bezaban:0B +/kiuma:4N +fn/#gentoo/koldbrutality:09 diff --git a/.irssi/scripts/ascii.pl b/.irssi/scripts/ascii.pl @@ -0,0 +1,405 @@ +# +# Commands: /ASCII, /COLSAY, /COLME, /COLTOPIC, /COLKICK, /COLQUIT +# Usage: +# /ASCII [-c1234] [-f <fontname>] [-p <prefix>] [-l|-s|-m <where>] <text> +# /COLSAY [-1234] [-m <where>] <text> +# /COLME [-1234] <text> +# /COLTOPIC [-1234] <text> +# /COLKICK [-1234] [nick(,nick_1,...,nick_n)] <reason> +# /COLQUIT [-1234] <reason> +# Settings: +# /SET ascii_figlet_path [path] +# /SET ascii_default_font [fontname] +# /SET ascii_default_colormode [1-4] +# /SET ascii_default_prefix [prefix] +# /SET ascii_default_kickreason [reason] +# /SET ascii_default_quitreason [reason] +# +# Script is bassed on figlet. +# + +use strict; +use Irssi; +use Irssi::Irc; + +use vars qw($VERSION %IRSSI); + +$VERSION = "1.6.3"; +%IRSSI = ( + "authors" => "Marcin Rozycki", + "contact" => "derwan\@irssi.pl", + "name" => "ascii-art", + "description" => "Ascii-art bassed on figlet. Available commands: /ASCII, /COLSAY, /COLME, /COLTOPIC, /COLKICK, /COLQUIT.", + "url" => "http://derwan.irssi.pl", + "license" => "GNU GPL v2", + "changed" => "Fri Jun 21 17:17:53 CEST 2002" +); + +use IPC::Open3; + +# defaults +my $ascii_default_font = "small.flf"; +my $ascii_default_kickreason = "Irssi BaBy!"; +my $ascii_default_quitreason = "I Quit!"; +my $ascii_last_color = undef; +my @ascii_colors = (12, 12, 12, 9, 5, 4, 13, 8, 7, 3, 11, 10, 2, 6, 6, 6, 6, 10, 8, 7, 4, 3, 9, 11, 2, 12, 13, 5); + +# registering themes +Irssi::theme_register([ + 'ascii_not_connected', '%_$0:%_ You\'re not connected to server', + 'ascii_not_window', '%_$0:%_ Not joined to any channel or query window', + 'ascii_not_chanwindow', '%_$0:%_ Not joined to any channel', + 'ascii_not_chanop', '%_$0:%_ You\'re not channel operator in {hilight $1}', + 'ascii_figlet_notfound', '%_Ascii:%_ Cannot execute {hilight $0} - file not found or bad permissions', + 'ascii_figlet_notset', '%_Ascii:%_ Cannot find external program %_figlet%_, usign /SET ascii_figlet_path [path], to set it', + 'ascii_cmd_syntax', '%_$0:%_ $1, usage: $2', + 'ascii_figlet_error', '%_Ascii: Figlet returns error:%_ $0-', + 'ascii_fontlist', '%_Ascii:%_ Available fonts [in $0]: $1 ($2)', + 'ascii_empty_fontlist', '%_Ascii:%_ Cannot find figlet fonts in $0', + 'ascii_unknown_fontdir', '%_Ascii:%_ Cannot find figlet fontdir', + 'ascii_show_line', '$0-' + +]); + +# str find_figlet_path() +sub find_figlet_path { + foreach my $dir (split(/\:/, $ENV{'PATH'})) + { + return "$dir/figlet" if ($dir and -x "$dir/figlet"); + } +} + +# int randcolor() +sub randcolor { + return $ascii_colors[int(rand(12)+2)]; +} + +# str colorline($colormode, $text) +sub colorline { + my ($colormode, $text) = @_; + my $colortext = undef; + my $last = ($ascii_last_color) ? $ascii_last_color : randcolor(); + my $indx = $last; + + if ($colormode =~ /3/) { + $ascii_last_color = randcolor(); + }elsif ($colormode =~ /4/) { + $ascii_last_color = $ascii_colors[$last]; + }elsif ($colormode !~ /2/) { + $ascii_last_color = $ascii_colors[14+$last]; + } + + while ($text =~ /./g) + { + my $char = "$&"; + + if ($colormode =~ /3/) { + while ($indx == $last) { $indx = randcolor(); }; + $last = $indx; + }elsif ($colormode =~ /4/) { + $indx = $ascii_colors[$indx]; + }elsif ($last) { + $indx = $ascii_colors[$last]; + undef $last; + } else { + $indx = $ascii_colors[$indx]; + $last = $indx + 14; + }; + + $colortext .= $char, next if ($char eq " "); + $colortext .= "\003" . sprintf("%02d", $indx) . $char; + $colortext .= $char if ($char eq ","); + }; + + return $colortext; +}; + +# int colormode() +sub colormode { + my $mode = Irssi::settings_get_int("ascii_default_colormode"); + $mode =~ s/-//g; + return (!$mode or $mode > 4) ? 1 : $mode; +}; + +# bool ascii_test($command, $flags, $server, $window) +sub ascii_test { + my ($cmd, $test, $server, $window) = @_; + + if ($test =~ /s/ and !$server || !$server->{connected}) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_not_connected", $cmd); + return 0; + }; + if ($test =~ /W/ and !$window || $window->{type} !~ /(channel|query)/i) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_not_window", $cmd); + return 0; + }; + if ($test =~ /(w|o)/ and !$window || $window->{type} !~ /channel/i) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_not_chanwindow", $cmd); + return 0; + }; + if ($test =~ /o/ and !$window->{chanop}) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_not_chanop", $cmd, Irssi::active_win()->get_active_name()); + return 0; + }; + + return 1; +} + +# void cmd_ascii() +# handles /ascii +sub cmd_ascii +{ + my $usage = "/ASCII [-c1234] [-f <fontname>] [-p <prefix>] [-l|-s|-m <where>] <text>"; + my $font = Irssi::settings_get_str("ascii_default_font"); + my $prefix = Irssi::settings_get_str("ascii_default_prefix"); + my ($arguments, $server, $witem) = @_; + my ($text, $cmd, $mode); + + $font = $ascii_default_font unless ($font); + $ascii_last_color = randcolor(); + + my $figlet = Irssi::settings_get_str("ascii_figlet_path"); + if (!$figlet or !(-x $figlet)) { + my $theme = ($figlet) ? "ascii_figlet_notfound" : "ascii_figlet_notset"; + Irssi::printformat(MSGLEVEL_CRAP, $theme, $figlet); + return; + }; + + my @foo = split(/ +/, $arguments); + while ($_ = shift(@foo)) + { + /^-l$/ and show_figlet_fonts($figlet), return; + /^-c$/ and $mode = colormode(), next; + /^-(1|2|3|4)$/ and s/-//g, $mode = $_, next; + /^-f$/ and $font = shift(@foo), next; + /^-p$/ and $prefix = shift(@foo), next; + /^-m$/ and $cmd = shift(@foo), next; + /^-s$/ and $cmd = 0, next; + /^-/ and Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Ascii", "Unknown argument: $_", $usage), return; + $text = ($#foo < 0) ? $_ : $_ . " " . join(" ", @foo); + last; + } + + unless (length($text)) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Ascii", "Missing arguments", $usage); + return; + }; + + if ($cmd eq "") { + return unless (ascii_test("Ascii", "sW", $server, $witem)); + $cmd = Irssi::active_win()->get_active_name(); + } elsif ($cmd ne "0" and !ascii_test("Ascii", "s", $server, $witem)) { + return; + } + + my $pid = open3(*FIGIN, *FIGOUT, *FIGERR, $figlet, qw(-k -f), $font, $text); + + while (<FIGOUT>) + { + chomp; + next unless (/[^ ]/); + $_ = colorline($mode, $_) if ($mode); + Irssi::printformat(MSGLEVEL_CLIENTCRAP, "ascii_show_line", $prefix.$_), next if ($cmd eq "0"); + $server->command("msg $cmd $prefix$_"); + } + + while (<FIGERR>) + { + chomp; + Irssi::printformat(MSGLEVEL_CRAP, "ascii_figlet_error", $_); + }; + + close FIGIN; + close FIGOUT; + close FIGERR; + + waitpid $pid, 0; +} + +# void show_figlet_fonts(figlet path) +sub show_figlet_fonts { + my @fontlist; + if (my $fontdir = `"$_[0]" -I 2 2>/dev/null`) { + chomp $fontdir; + foreach my $font (glob $fontdir."/*.flf") + { + $font =~ s/^$fontdir\///; + $font =~ s/\.flf$//; + push @fontlist, $font; + } + if ($#fontlist < 0) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_fontlist_empty", $fontdir); + } else { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_fontlist", $fontdir, join(", ", @fontlist), scalar(@fontlist)); + } + } else { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_unknown_fontdir"); + } +} + +# void cmd_colsay() +# handles /colsay +sub cmd_colsay { + my $usage = "/COLSAY [-1234] [-m <where>] <text>"; + my ($arguments, $server, $witem) = @_; + my ($cmd, $text); + my $mode = colormode(); + + $ascii_last_color = randcolor(); + + my @foo = split(/ /, $arguments); + while ($_ = shift(@foo)) + { + /^-(1|2|3|4)$/ and $mode = $_, next; + /^-m$/i and $cmd = shift(@foo), next; + /^-/ and Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colsay", "Unknown argument: $_", $usage), return; + $text = ($#foo < 0) ? $_ : $_ . " " . join(" ", @foo); + last; + }; + + unless (length($text)) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colsay", "Missing arguments", $usage); + return; + }; + + if ($cmd) { + return unless (ascii_test("Colsay", "s", $server, $witem)); + } else { + return unless (ascii_test("Colsay", "sW", $server, $witem)); + $cmd = Irssi::active_win()->get_active_name(); + }; + + $server->command("msg $cmd ".colorline($mode, $text)); +} + + +sub cmd_colme { + my $usage = "/COLME [-1234] <text>"; + my ($arguments, $server, $witem) = @_; + my $mode = colormode(); + my $text; + + $ascii_last_color = randcolor(); + + my @foo = split(/ /, $arguments); + while ($_ = shift(@foo)) + { + /^-(1|2|3|4)$/ and $mode = $_, next; + /^-/ and Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colme", "Unknown argument: $_", $usage), return; + $text = ($#foo < 0) ? $_ : $_ . " " . join(" ", @foo); + last; + }; + + unless (length($text)) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colme", "Missing arguments", $usage); + return; + }; + + return unless (ascii_test("Colme", "sW", $server, $witem)); + $witem->command("me ".colorline($mode, $text)); +} + +# void cmd_coltopic() +# handles /coltopic +sub cmd_coltopic { + my $usage = "/COLTOPIC [-1234] <text>"; + my ($arguments, $server, $witem) = @_; + my $mode = colormode(); + my $text; + + $ascii_last_color = randcolor(); + + my @foo = split(/ /, $arguments); + while ($_ = shift(@foo)) + { + /^-(1|2|3|4)$/ and $mode = $_, next; + /^-/ and Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Coltopic", "Unknown argument: $_", $usage), return; + $text = ($#foo < 0) ? $_ : $_ . " " . join(" ", @foo); + last; + }; + + unless (length($text)) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Coltopic", "Missing arguments", $usage); + return; + }; + + return unless (ascii_test("Coltopic", "sw", $server, $witem)); + + $server->command("topic " . Irssi::active_win()->get_active_name() . " " . colorline($mode, $text)); +}; + +# void cmd_colkick() +# handles /colkick +sub cmd_colkick { + my $usage = "/COLKICK [-1234] [nick(,nick_1,...,nick_n)] <reason>"; + my ($arguments, $server, $witem) = @_; + my $kickreason = Irssi::settings_get_str("ascii_default_kickreason"); + my $mode = colormode(); + my $who = undef; + + $ascii_last_color = randcolor(); + $kickreason = $ascii_default_kickreason unless ($kickreason); + + my @foo = split(/ /, $arguments); + while ($_ = shift(@foo)) + { + /^-(1|2|3|4)$/ and $mode = $_, next; + /^-/ and Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colkick", "Unknown argument: $_", $usage), return; + $kickreason = join(" ", @foo) if ($#foo >= 0); + $who = $_; + last; + }; + + if (!$who or !length($kickreason)) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colkick", "Missing arguments", $usage); + return; + }; + + return unless (ascii_test("Colkick", "swo", $server, $witem)); + $witem->command("kick $who ".colorline($mode, $kickreason)); +}; + +# void cmd_colquit() +# handles /colquit +sub cmd_colquit { + my $usage = "/COLQUIT [-1234] <reason>"; + my ($arguments, $server, $witem) = @_; + my $quitreason = Irssi::settings_get_str("ascii_default_quitreason"); + my $mode = colormode(); + + $ascii_last_color = randcolor(); + $quitreason = $ascii_default_quitreason unless ($quitreason); + + my @foo = split(/ /, $arguments); + while ($_ = shift(@foo)) + { + /^-(1|2|3|4)$/ and $mode = $_, next; + /^-/ and Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colquit", "Unknown argument: $_", $usage), return; + $quitreason = ($#foo < 0) ? $_ : $_ . " " . join(" ", @foo); + last; + }; + + unless (length($quitreason)) { + Irssi::printformat(MSGLEVEL_CRAP, "ascii_cmd_syntax", "Colquit", "Missing arguments", $usage); + return; + }; + + return unless (ascii_test("Colquit", "s", $server, $witem)); + $server->command("quit " . colorline($mode, $quitreason)); +} + +# registering settings +Irssi::settings_add_str("misc", "ascii_default_font", $ascii_default_font); +Irssi::settings_add_str("misc", "ascii_default_kickreason", $ascii_default_kickreason); +Irssi::settings_add_str("misc", "ascii_default_quitreason", $ascii_default_quitreason); +Irssi::settings_add_str("misc", "ascii_default_prefix", ""); +Irssi::settings_add_int("misc", "ascii_default_colormode", 1); +Irssi::settings_add_str("misc", "ascii_figlet_path", find_figlet_path); + +# binding commands +Irssi::command_bind("ascii", "cmd_ascii"); +Irssi::command_bind("colsay", "cmd_colsay"); +Irssi::command_bind("colme", "cmd_colme"); +Irssi::command_bind("coltopic", "cmd_coltopic"); +Irssi::command_bind("colkick", "cmd_colkick"); +Irssi::command_bind("colquit", "cmd_colquit"); diff --git a/.irssi/scripts/autorun/nickcolor.pl b/.irssi/scripts/autorun/nickcolor.pl @@ -1,43 +1,36 @@ use strict; -use Irssi; -use vars qw($VERSION %IRSSI); -$VERSION = "1"; +use Irssi 20020101.0250 (); +use vars qw($VERSION %IRSSI); +$VERSION = "2"; %IRSSI = ( - authors => "Timo Sirainen, Ian Peters", - contact => "tss\@iki.fi", + authors => "Timo Sirainen, Ian Peters, David Leadbeater", + contact => "tss\@iki.fi", name => "Nick Color", description => "assign a different color for each nick", license => "Public Domain", url => "http://irssi.org/", - changed => "2002-03-04T22:47+0100" + changed => "Sun 15 Jun 19:10:44 BST 2014", ); -# hm.. i should make it possible to use the existing one.. -Irssi::theme_register([ - 'pubmsg_hilight', '{pubmsghinick $0 $3 $1}$2' -]); +# Settings: +# nickcolor_colors: List of color codes to use. +# e.g. /set nickcolor_colors 2 3 4 5 6 7 9 10 11 12 13 +# (avoid 8, as used for hilights in the default theme). my %saved_colors; my %session_colors = {}; -my @colors = qw/2 3 4 5 6 7 9 10 11 12 13/; sub load_colors { - open COLORS, "$ENV{HOME}/.irssi/saved_colors"; - - while (<COLORS>) { - # I don't know why this is necessary only inside of irssi - my @lines = split "\n"; - foreach my $line (@lines) { - my($nick, $color) = split ":", $line; - $saved_colors{$nick} = $color; - } + open my $color_fh, "<", "$ENV{HOME}/.irssi/saved_colors"; + while (<$color_fh>) { + chomp; + my($nick, $color) = split ":"; + $saved_colors{$nick} = $color; } - - close COLORS; } sub save_colors { - open COLORS, ">$ENV{HOME}/.irssi/saved_colors"; + open COLORS, ">", "$ENV{HOME}/.irssi/saved_colors"; foreach my $nick (keys %saved_colors) { print COLORS "$nick:$saved_colors{$nick}\n"; @@ -76,19 +69,14 @@ sub simple_hash { $counter += ord $char; } - $counter = $colors[$counter % 11]; + my @colors = split / /, Irssi::settings_get_str('nickcolor_colors'); + $counter = $colors[$counter % @colors]; return $counter; } -# FIXME: breaks /HILIGHT etc. sub sig_public { my ($server, $msg, $nick, $address, $target) = @_; - my $chanrec = $server->channel_find($target); - return if not $chanrec; - my $nickrec = $chanrec->nick_find($nick); - return if not $nickrec; - my $nickmode = $nickrec->{op} ? "@" : $nickrec->{voice} ? "+" : ""; # Has the user assigned this nick a color? my $color = $saved_colors{$nick}; @@ -104,8 +92,8 @@ sub sig_public { $session_colors{$nick} = $color; } - $color = "0".$color if ($color < 10); - $server->command('/^format pubmsg %b<%w$2'.chr(3).$color.'$[-11]0%b>%K | %n$1'); + $color = sprintf "\003%02d", $color; + $server->command('/^format pubmsg {pubmsgnick $2 {pubnick ' . $color . '$[-7]0}}$1'); } sub cmd_color { @@ -115,7 +103,7 @@ sub cmd_color { $op = lc $op; if (!$op) { - Irssi::print ("No operation given"); + Irssi::print ("No operation given (save/set/clear/list/preview)"); } elsif ($op eq "save") { save_colors; } elsif ($op eq "set") { @@ -150,6 +138,7 @@ sub cmd_color { load_colors; +Irssi::settings_add_str('misc', 'nickcolor_colors', '2 3 4 5 6 7 9 10 11 12 13'); Irssi::command_bind('color', 'cmd_color'); Irssi::signal_add('message public', 'sig_public'); diff --git a/.irssi/scripts/autorun/splitlong.pl b/.irssi/scripts/autorun/splitlong.pl @@ -1,60 +0,0 @@ -# /set splitlong_max_length -# specifies the maximum length of a msg, automatically chosen when set to "0" -# default: 0 -# -# /set splitlong_line_start -# /set splitlong_line_end -# self-explanatory -# defaults: "... ", " ..." -### -use strict; -use vars qw($VERSION %IRSSI); - -use Irssi 20011001; - -$VERSION = "0.20"; -%IRSSI = ( - authors => "Bjoern \'fuchs\' Krombholz", - contact => "bjkro\@gmx.de", - name => "splitlong", - license => "Public Domain", - description => "Split overlong PRIVMSGs to msgs with length allowed by ircd", - changed => "Wed Jun 25 00:17:00 CET 2003", - changes => "Actually the real 0.19 (now 0.20), but upload didn't work some month ago, target problem fixed..." -); - -sub sig_command_msg { - my ($cmd, $server, $winitem) = @_; - my ( $param, $target,$data) = $cmd =~ /^(-\S*\s)?(\S*)\s(.*)/; - - my $maxlength = Irssi::settings_get_int('splitlong_max_length'); - my $lstart = Irssi::settings_get_str('splitlong_line_start'); - my $lend = Irssi::settings_get_str('splitlong_line_end'); - - if ($maxlength == 0) { - # 497 = 510 - length(":" . "!" . " PRIVMSG " . " :"); - $maxlength = 497 - length($server->{nick} . $server->{userhost} . $target); - } - my $maxlength2 = $maxlength - length($lend); - - if (length($data) > ($maxlength)) { - my @spltarr; - - while (length($data) > ($maxlength2)) { - my $pos = rindex($data, " ", $maxlength2); - push @spltarr, substr($data, 0, ($pos < ($maxlength/10 + 4)) ? $maxlength2 : $pos) . $lend; - $data = $lstart . substr($data, ($pos < ($maxlength/10 + 4)) ? $maxlength2 : $pos+1); - } - - push @spltarr, $data; - foreach (@spltarr) { - Irssi::signal_emit("command msg", "$target $_", $server, $winitem); - } - Irssi::signal_stop(); - } -} - -Irssi::settings_add_int('misc', 'splitlong_max_length', 0); -Irssi::settings_add_str('misc', 'splitlong_line_start', "... "); -Irssi::settings_add_str('misc', 'splitlong_line_end', " ..."); -Irssi::command_bind('msg', 'sig_command_msg'); diff --git a/.irssi/scripts/autorun/wildpokemon.pl b/.irssi/scripts/autorun/wildpokemon.pl @@ -1,47 +0,0 @@ -# Put in ~/.irssi/scripts - -use Irssi; -use strict; -use vars qw($VERSION %IRSSI); -$VERSION = "0.1"; -%IRSSI = ( - authors => "Jari Vetoniemi", - name => "Wild Pokemon", - description => "Replace JOIN with 'Wild <username> appears!' and PART with 'Wild <username> fainted! - It's also possible to edit the theme style for QUITS/JOINS/PARTS, if you don't want script.", - license => "GPLv2 or later", - url => "http://irssi.org/", -); - -sub msg_join { - my ($server, $channel, $nick) = @_; - $server->print( $channel, " %m * %K|%W %B-%n!%B-%G Wild %Y$nick %Gappears!", MSGLEVEL_JOINS); - Irssi::signal_stop(); -} - -sub msg_part { - my ($server, $channel, $nick, $address, $reason) = @_; - if($reason) { - $server->print( $channel, " %m * %K|%W %B-%n!%B-%G Wild %Y$nick %Gfainted! %W[$reason]", MSGLEVEL_PARTS); - } else { - $server->print( $channel, " %m * %K|%W %B-%n!%B-%G Wild %Y$nick %Gfainted!", MSGLEVEL_PARTS); - } - Irssi::signal_stop(); -} - -sub msg_quit { - my ($server, $nick, $address, $reason) = @_; - foreach my $channel ($server->channels()) - { - if($channel->nick_find($nick)) - { - msg_part($server, $channel->{name}, $nick, $address, $reason); - } - } - Irssi::signal_stop(); -} - -Irssi::signal_add( { 'message join' => \&msg_join, - 'message part' => \&msg_part, - 'message quit' => \&msg_quit, - } ); diff --git a/.irssi/scripts/colorize_nicks.pl b/.irssi/scripts/colorize_nicks.pl @@ -0,0 +1,136 @@ +use strict; +use warnings; + +our $VERSION = '0.3.6'; # e54c56e8922561d +our %IRSSI = ( + authors => 'Nei', + contact => 'Nei @ anti@conference.jabber.teamidiot.de', + url => "http://anti.teamidiot.de/", + name => 'colorize_nicks', + description => 'Colourise mention of nicks in the message body.', + license => 'GNU GPLv2 or later', + ); + +# inspired by mrwright's nickcolor.pl and xt's colorize_nicks.pl +# +# you need nickcolor_expando or another nickcolor script providing the +# get_nick_color2 function + +# Usage +# ===== +# should start working once loaded + +# Options +# ======= +# /set colorize_nicks_skip_formats <num> +# * how many forms (blocks of irssi format codes or non-letters) to +# skip at the beginning of line before starting to colourise nicks +# (you usually want to skip the speaker's nick itself and the +# timestamp) +# +# /set colorize_nicks_ignore_list <words to ignore> +# * list of nicks (words) that should never be coloured +# +# /set colorize_nicks_repeat_formats <ON|OFF> +# * repeat the format stack from the beginning of line, enable when +# using per-line colours and colorize_nicks breaks it + +# Commands +# ======== +# you can use this alias: +# +# /alias nocolorize set colorize_nicks_ignore_list $colorize_nicks_ignore_list +# +# /nocolorize <nick> +# * quickly add nick to the bad word list of nicks that should not be +# colourised + +no warnings 'redefine'; +use Irssi; + +my $irssi_mumbo = qr/\cD[`-i]|\cD[&-@\xff]./; + +my $nickchar = qr/[][[:alnum:]\\|`^{}_-]/; +my $nick_pat = qr/($nickchar+)/; + +my @ignore_list; + +my $colourer_script; + +sub prt_text_issue { + my ( $dest, + $text, + $stripped + ) = @_; + my $colourer; + unless ($colourer_script + && ($colourer = "Irssi::Script::$colourer_script"->can('get_nick_color2'))) { + for my $script (sort map { s/::$//r } grep { /^nickcolor|nm/ } keys %Irssi::Script::) { + if ($colourer = "Irssi::Script::$script"->can('get_nick_color2')) { + $colourer_script = $script; + last; + } + } + } + return unless $colourer; + return unless $dest->{level} & MSGLEVEL_PUBLIC; + return unless defined $dest->{target}; + my $chanref = ref $dest->{server} && $dest->{server}->channel_find($dest->{target}); + return unless $chanref; + my %nicks = map { $_->[0] => $colourer->($dest->{server}{tag}, $chanref->{name}, $_->[1], 1) } + grep { defined } + map { if (my $nr = $chanref->nick_find($_)) { + [ $_ => $nr->{nick} ] + } } + keys %{ +{ map { $_ => undef } $stripped =~ /$nick_pat/g } }; + delete @nicks{ @ignore_list }; + my @forms = split /((?:$irssi_mumbo|\s|[.,*@%+&!#$()=~'";:?\/><]+(?=$irssi_mumbo|\s))+)/, $text, -1; + my $ret = ''; + my $fmtstack = ''; + my $nick_re = join '|', map { quotemeta } sort { length $b <=> length $a } grep { length $nicks{$_} } keys %nicks; + my $skip = Irssi::settings_get_int('colorize_nicks_skip_formats'); + return if $skip < 0; + while (@forms) { + my ($t, $form) = splice @forms, 0, 2; + if ($skip > 0) { + --$skip; + $ret .= $t; + $ret .= $form if defined $form; + if (Irssi::settings_get_bool('colorize_nicks_repeat_formats')) { + $fmtstack .= join '', $form =~ /$irssi_mumbo/g if defined $form; + $fmtstack =~ s/\cDe//g; + } + } + elsif (length $nick_re + && $t =~ s/((?:^|\s)\W{0,3}?)(?<!$nickchar|')($nick_re)(?!$nickchar)/$1$nicks{$2}$2\cDg$fmtstack/g) { + $ret .= "$t\cDg$fmtstack"; + $ret .= $form if defined $form; + $fmtstack .= join '', $form =~ /$irssi_mumbo/g if defined $form; + $fmtstack =~ s/\cDe//g; + } + else { + $ret .= $t; + $ret .= $form if defined $form; + } + } + Irssi::signal_continue($dest, $ret, $stripped); +} + +sub setup_changed { + @ignore_list = split /\s+|,/, Irssi::settings_get_str('colorize_nicks_ignore_list'); +} + +sub init { + setup_changed(); +} + +Irssi::signal_add({ + 'print text' => 'prt_text_issue', +}); +Irssi::signal_add_last('setup changed' => 'setup_changed'); + +Irssi::settings_add_int('colorize_nicks', 'colorize_nicks_skip_formats' => 2); +Irssi::settings_add_str('colorize_nicks', 'colorize_nicks_ignore_list' => ''); +Irssi::settings_add_bool('colorize_nicks', 'colorize_nicks_repeat_formats' => 0); + +init(); diff --git a/.irssi/scripts/splitlong.pl b/.irssi/scripts/splitlong.pl @@ -0,0 +1,60 @@ +# /set splitlong_max_length +# specifies the maximum length of a msg, automatically chosen when set to "0" +# default: 0 +# +# /set splitlong_line_start +# /set splitlong_line_end +# self-explanatory +# defaults: "... ", " ..." +### +use strict; +use vars qw($VERSION %IRSSI); + +use Irssi 20011001; + +$VERSION = "0.20"; +%IRSSI = ( + authors => "Bjoern \'fuchs\' Krombholz", + contact => "bjkro\@gmx.de", + name => "splitlong", + license => "Public Domain", + description => "Split overlong PRIVMSGs to msgs with length allowed by ircd", + changed => "Wed Jun 25 00:17:00 CET 2003", + changes => "Actually the real 0.19 (now 0.20), but upload didn't work some month ago, target problem fixed..." +); + +sub sig_command_msg { + my ($cmd, $server, $winitem) = @_; + my ( $param, $target,$data) = $cmd =~ /^(-\S*\s)?(\S*)\s(.*)/; + + my $maxlength = Irssi::settings_get_int('splitlong_max_length'); + my $lstart = Irssi::settings_get_str('splitlong_line_start'); + my $lend = Irssi::settings_get_str('splitlong_line_end'); + + if ($maxlength == 0) { + # 497 = 510 - length(":" . "!" . " PRIVMSG " . " :"); + $maxlength = 497 - length($server->{nick} . $server->{userhost} . $target); + } + my $maxlength2 = $maxlength - length($lend); + + if (length($data) > ($maxlength)) { + my @spltarr; + + while (length($data) > ($maxlength2)) { + my $pos = rindex($data, " ", $maxlength2); + push @spltarr, substr($data, 0, ($pos < ($maxlength/10 + 4)) ? $maxlength2 : $pos) . $lend; + $data = $lstart . substr($data, ($pos < ($maxlength/10 + 4)) ? $maxlength2 : $pos+1); + } + + push @spltarr, $data; + foreach (@spltarr) { + Irssi::signal_emit("command msg", "$target $_", $server, $winitem); + } + Irssi::signal_stop(); + } +} + +Irssi::settings_add_int('misc', 'splitlong_max_length', 0); +Irssi::settings_add_str('misc', 'splitlong_line_start', "... "); +Irssi::settings_add_str('misc', 'splitlong_line_end', " ..."); +Irssi::command_bind('msg', 'sig_command_msg'); diff --git a/.irssi/scripts/wildpokemon.pl b/.irssi/scripts/wildpokemon.pl @@ -0,0 +1,47 @@ +# Put in ~/.irssi/scripts + +use Irssi; +use strict; +use vars qw($VERSION %IRSSI); +$VERSION = "0.1"; +%IRSSI = ( + authors => "Jari Vetoniemi", + name => "Wild Pokemon", + description => "Replace JOIN with 'Wild <username> appears!' and PART with 'Wild <username> fainted! + It's also possible to edit the theme style for QUITS/JOINS/PARTS, if you don't want script.", + license => "GPLv2 or later", + url => "http://irssi.org/", +); + +sub msg_join { + my ($server, $channel, $nick) = @_; + $server->print( $channel, " %m * %K|%W %B-%n!%B-%G Wild %Y$nick %Gappears!", MSGLEVEL_JOINS); + Irssi::signal_stop(); +} + +sub msg_part { + my ($server, $channel, $nick, $address, $reason) = @_; + if($reason) { + $server->print( $channel, " %m * %K|%W %B-%n!%B-%G Wild %Y$nick %Gfainted! %W[$reason]", MSGLEVEL_PARTS); + } else { + $server->print( $channel, " %m * %K|%W %B-%n!%B-%G Wild %Y$nick %Gfainted!", MSGLEVEL_PARTS); + } + Irssi::signal_stop(); +} + +sub msg_quit { + my ($server, $nick, $address, $reason) = @_; + foreach my $channel ($server->channels()) + { + if($channel->nick_find($nick)) + { + msg_part($server, $channel->{name}, $nick, $address, $reason); + } + } + Irssi::signal_stop(); +} + +Irssi::signal_add( { 'message join' => \&msg_join, + 'message part' => \&msg_part, + 'message quit' => \&msg_quit, + } ); diff --git a/.pentadactylrc b/.pentadactylrc @@ -1,6 +1,6 @@ " " author: Xu Xiaodong <xxdlhy@gmail.com> -" modified: 2016 Nov 02 +" modified: 2016 Nov 12 " "-- look --" diff --git a/.tmux.conf b/.tmux.conf @@ -1,94 +0,0 @@ -# -# author : Xu Xiaodong <xxdlhy@gmail.com> -# modified : 2012 Jul 01 -# - -#-- base --# -set -g default-terminal "screen-256color" -set -g display-time 3000 -set -g history-limit 65535 -set -g base-index 1 -set -g pane-base-index 1 -set -s escape-time 0 - -#-- bindkeys --# -set -g prefix ^a -unbind ^b -bind a send-prefix - -unbind '"' -bind - splitw -v -unbind % -bind | splitw -h - -bind k selectp -U -bind j selectp -D -bind h selectp -L -bind l selectp -R - -bind -r ^k resizep -U 10 -bind -r ^j resizep -D 10 -bind -r ^h resizep -L 10 -bind -r ^l resizep -R 10 - -bind ^u swapp -U -bind ^d swapp -D - -bind ^e last -bind q killp - -bind ! splitw htop -bind m command-prompt "splitw 'exec man %%'" -bind @ command-prompt "splitw 'exec perldoc -t -f %%'" -bind * command-prompt "splitw 'exec perldoc -t -v %%'" -bind % command-prompt "splitw 'exec perldoc -t %%'" -bind / command-prompt "splitw 'exec ri %%'" - -#-- statusbar --# -set -g status-utf8 on -set -g status-interval 1 -set -g status-keys vi - -setw -g mode-keys vi -setw -g automatic-rename off - -#-- colorscheme --# -# see also: https://github.com/daethorian/conf-tmux/blob/master/colors/zenburn.conf - -# modes -setw -g clock-mode-colour colour223 -setw -g mode-attr bold -setw -g mode-fg colour223 -setw -g mode-bg colour235 - -# panes -set -g pane-border-bg colour234 -set -g pane-border-fg colour234 -set -g pane-active-border-bg colour232 -set -g pane-active-border-fg colour232 - -# statusbar -set -g status-justify centre -set -g status-bg colour235 -set -g status-fg colour248 -set -g status-attr dim -set -g status-left "#[default]» #[fg=colour187]#S #[default]• #[fg=colour187]w#I.p#P#[default]" -set -g status-left-attr bright -set -g status-left-length 20 -set -g status-right "#[fg=colour174]#(/home/xiaodong/bin/uptime) #[default]• #[fg=colour174]#(cut -d ' ' -f 1-3 /proc/loadavg)" -set -g status-right-attr bright -set -g status-right-length 80 - -setw -g window-status-current-fg colour223 -setw -g window-status-current-bg colour237 -setw -g window-status-current-attr bold -setw -g window-status-current-format '#I:#W#F' - -#setw -g window-status-alert-attr bold -#setw -g window-status-alert-fg colour255 -#setw -g window-status-alert-bg colour160 - -# messages -set -g message-attr bold -set -g message-fg colour223 -set -g message-bg colour235 diff --git a/.vimprobablerc b/.vimprobablerc @@ -1,19 +0,0 @@ -: -: author : Xu Xiaodong <xxdlhy@gmail.com> -: modified : 2012 Jun 01 -: - -set homepage=https://bbs.archlinux.org -set defaultcoding=uft-8 -set defaultfont="Droid Serif" -set seriffont="Droid Serif" -set sansfont="Droid Sans" -set monofont="Droid Sans Mono Slashed" -set fontsize=12 -set monofontsize=10 -set inputbox=false -set pagecache=true -set shrinkimages=false -set useragent="Vimprobable2 (X11; U; Unix; en-US) AppleWebKit/531.2+ Compatible (Safari)" - -map <M1-h>=:set inputbox=false diff --git a/.xinitrc b/.xinitrc @@ -1,22 +1,28 @@ #!/bin/sh # # author : Xu Xiaodong <xxdlhy@gmail.com> -# modified : 2016 Nov 05 +# modified : 2017 Jan 14 # #-- font --# -xset +fp /usr/share/fonts/local +xset +fp /usr/share/fonts/misc,/usr/share/fonts/local xset fp rehash #-- powersave --# xset +dpms xset dpms 0 0 300 +#-- browser --# +export BROWSER=dwb + #-- qt --# export QT_STYLE_OVERRIDE=gtk2 -#-- browser --# -export BROWSER=dwb +#-- neovim --# +export NVIM_TUI_ENABLE_TRUE_COLOR=1 + +#-- java --# +export _JAVA_AWT_WM_NONREPARENTING=1 #-- ime --# export GTK_IM_MODULE=fcitx @@ -25,17 +31,17 @@ export XMODIFIERS="@im=fcitx" fcitx & #-- app --# -xmodmap ~/.xmodmaprc & # swap Caps_Lock and Control_L -hsetroot -fill ~/usr/img/R3Plm6w.jpg & # set wallpaper -xsetroot -cursor_name left_ptr & # default cursor -sxhkd & # start hotkey daemon -yabar & # start bar -compton -cGb # add fancy shadows -unclutter -idle 5 & # hide mouse cursor -syndaemon -t -k -i 2 -d & # disable trackpad while typing -autocutsel -fork & # track cutbuffer -urxvtd -q -f -o # urxvt daemon -urxvtc -geometry 111x76+20+50 -e sh -c "tmuxen" & # start tmux +xmodmap ~/.xmodmaprc & # swap Caps_Lock and Control_L +hsetroot -fill ~/usr/img/mountain.jpg & # set wallpaper +xsetroot -cursor_name left_ptr & # default cursor +sxhkd & # start hotkey daemon +yabar & # start bar +compton -cGb # add fancy shadows +unclutter -idle 5 & # hide mouse cursor +syndaemon -t -k -i 2 -d & # disable trackpad while typing +autocutsel -fork & # track cutbuffer +urxvtd -q -f -o # urxvt daemon +urxvtc -geometry 100x27+20+722 -e sh -c "tmuxen" & # start tmux #-- wm --# exec windowchef diff --git a/.zathurarc b/.zathurarc @@ -1,12 +1,12 @@ # # author : Xu Xiaodong <xxdlhy@gmail.com> -# modified : 2016 Aug 28 +# modified : 2017 Jan 08 # -set font "source code pro 10" +set font "fira code 8" set guioptions "" -set window-width 1060 -set window-height 1010 +set window-width 1187 +set window-height 1007 set show-recent 5 set default-fg "#ebdbb2" @@ -26,6 +26,6 @@ set index-bg "#282828" set index-active-fg "#d79921" set index-active-bg "#282828" -set recolor true +set recolor false set recolor-lightcolor "#f4ecd8" set recolor-darkcolor "#3c3836" diff --git a/.zprofile b/.zprofile @@ -1,15 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2015 May 09 -# - -#-- source --# - -. $HOME/.zshrc - -#-- auto start x --# - -if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then - startx - logout -fi diff --git a/.zsh/alias.zsh b/.zsh/alias.zsh @@ -1,41 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2012 Mar 19 -# - -#-- base --# - -alias cp='cp -v' -alias mv='mv -v' -alias rm='rm -v' -alias ls='ls -F --color=auto' -alias lh='ls -lsh' -alias lo="ls -a | grep '^\.'" -alias df='df -h' -alias du='du -h' - -alias less=$PAGER -alias grep='grep --color=auto' -alias smtp='/usr/sbin/ssmtp -C.ssmtp/ssmtp.conf -oA.ssmtp/revaliases' - -#-- perl --# - -alias pd='perldoc -t' -alias pf='perldoc -t -f' -alias pv='perldoc -t -v' -alias pw="perl -le 'print map { chr rand(94) + 33 } 1..5'" - -#-- mplayer --# - -alias cam='mplayer tv:// -tv driver=v4l2:width=640:height=480:outfmt=rgb24:device=/dev/video0' -alias rca='mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -nosound -ovc lavc -o demo.avi' - -#-- vbox --# - -alias vu='VBoxManage startvm Ubuntu --type sdl' -alias vw='VBoxManage startvm WinXP --type sdl' - -#-- octopress --# -alias pn='new() { bundle exec rake new_post\["$1"\] }; new' -alias pc='commit() { git add .; git commit -m "$1"; git push origin source }; commit' -alias pg='bundle exec rake generate; bundle exec rake deploy' diff --git a/.zsh/base.zsh b/.zsh/base.zsh @@ -1,8 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2012 Jan 09 -# - -#-- base --# - -setopt nocorrectall diff --git a/.zsh/colorscheme.zsh b/.zsh/colorscheme.zsh @@ -1,28 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2011 Apr 13 -# - -#-- zenburn for the Linux console --# - -if [ "$TERM" = "linux" ]; then - #3f3f3f is problematic on a non-256color terminal - echo -en "\e]P01e2320" #zen-black (norm. black) - echo -en "\e]P8709080" #zen-bright-black (norm. darkgrey) - echo -en "\e]P1705050" #zen-red (norm. darkred) - echo -en "\e]P9dca3a3" #zen-bright-red (norm. red) - echo -en "\e]P260b48a" #zen-green (norm. darkgreen) - echo -en "\e]PAc3bf9f" #zen-bright-green (norm. green) - echo -en "\e]P3dfaf8f" #zen-yellow (norm. brown) - echo -en "\e]PBf0dfaf" #zen-bright-yellow (norm. yellow) - echo -en "\e]P4506070" #zen-blue (norm. darkblue) - echo -en "\e]PC94bff3" #zen-bright-blue (norm. blue) - echo -en "\e]P5dc8cc3" #zen-purple (norm. darkmagenta) - echo -en "\e]PDec93d3" #zen-bright-purple (norm. magenta) - echo -en "\e]P68cd0d3" #zen-cyan (norm. darkcyan) - echo -en "\e]PE93e0e3" #zen-bright-cyan (norm. cyan) - echo -en "\e]P7dcdccc" #zen-white (norm. lightgrey) - echo -en "\e]PFffffff" #zen-bright-white (norm. white) - # avoid artefacts - clear -fi diff --git a/.zsh/export.zsh b/.zsh/export.zsh @@ -1,21 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2011 Apr 18 -# - -#-- path --# - -export PATH=/usr/libexec/cw:$PATH:$HOME/bin:$HOME/.vim/bundle/perlomni/bin - -#-- pager --# - -export PAGER=vimpager - -#-- fx --# - -export MOZ_DISABLE_PANGO=1 - -#-- java --# - -export AWT_TOOLKIT=MToolkit -export LIBXCB_ALLOW_SLOPPY_LOCK=1 diff --git a/.zsh/history.zsh b/.zsh/history.zsh @@ -1,15 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2011 Apr 13 -# - -#-- export --# - -export HISTSIZE=10000 -export SAVEHIST=10000 -export HISTFILE=~/.zhistory - -#-- option --# - -setopt INC_APPEND_HISTORY -setopt hist_ignore_space diff --git a/.zsh/key.zsh b/.zsh/key.zsh @@ -1,14 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2011 Apr 13 -# - -#-- mode --# - -set -o emacs - -#-- bind --# - -bindkey "\e[3~" delete-char -bindkey '\C-w' kill-region -bindkey -s '\C-xp' 'mplayer ' diff --git a/.zshrc b/.zshrc @@ -1,16 +0,0 @@ -# -# author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2012 Jul 19 -# - -export ZSH=$HOME/code/oh-my-zsh -export ZSH_THEME="codefun" -export DISABLE_AUTO_TITLE="true" -export DISABLE_AUTO_UPDATE="true" - -plugins=(command-coloring gem git github perl ruby) - -source $ZSH/oh-my-zsh.sh - -# rbenv -eval "$(rbenv init -)" diff --git a/README.md b/README.md @@ -1,21 +1,4 @@ About ----- -![Screenshot](https://github.com/xuxiaodong/dotman/raw/master/screenshot.png "screenshot") - -A simple dotfile manager. - -Installation ------------- - - git clone git://github.com/xuxiaodong/dotman.git - -Usage ------ - - Usage: dotman -a [-s] [-h] - - Options: - -a, --add add dot files - -s, --setup setup dot files - -h, --help show help +dot files in ~. diff --git a/dotman b/dotman @@ -1,104 +0,0 @@ -#!/usr/bin/env perl -# -# name : dotman, a simple dotfile manager -# author : Xu Xiaodong <xxdlhy@gmail.com> -# license : GPL -# created : 2011 Apr 14 -# modified : 2012 May 19 -# - -use strict; -use warnings; -use feature qw(say); -use FindBin qw($Bin); -use File::Copy::Recursive qw(rmove); -use Getopt::Long; - -# Command line options -my ( $add, $setup, $help ) = (0) x 3; - -GetOptions( - 'a|add' => \$add, - 's|setup' => \$setup, - 'h|help' => \$help, -); - -# Dot files -my @dots = qw( - bashrc - conkyrc - dico - fonts.conf - gtkrc-2.0 - gtkrc.mine - irbrc - mplayer - mutt - muttrc - pentadactyl - pentadactylrc - perltidyrc - rtorrent.rc - themes - tmux.conf - xinitrc - xmodmaprc - zathurarc - zprofile - zshrc - Xdefaults - Xdefaults.d -); - -# Process options -if ($add) { - for my $dot (@dots) { - my $orig_file = "$ENV{HOME}/.$dot"; - add($orig_file) unless -l $orig_file; - } -} - -if ($setup) { - for my $dot (@dots) { - my $new_file = ".$dot"; - setup($new_file); - } -} - -if ( $help || @ARGV == 0 ) { - say <<"USAGE"; -Usage: $0 -a [-s] [-h] - -Options: - -a, --add add dot files - -s, --setup setup dot files - -h, --help show help -USAGE -} - -# Add dot files -sub add { - my ($file) = @_; - my $desc = $Bin; - - local $File::Copy::Recursive::CPRFComp = 1; - - say "Moving $file to $desc"; - rmove( $file, $desc ); -} - -# Setup dot files -sub setup { - my ($file) = @_; - my $path = "$Bin/$file"; - - chdir $ENV{HOME}; - - my $symlink_exist = eval { symlink $path, $file }; - - if ($symlink_exist) { - say "Symlinking $path to $file"; - } -} - -# vim: ai:et:ts=2:sw=2:tw=78:ft=perl diff --git a/firefox/userChrome.css b/firefox/userChrome.css @@ -1,7 +1,7 @@ /* * * author : Xu Xiaodong <xxdlhy@gmail.com> - * modified : 2016 Oct 29 + * modified : 2017 Jan 08 * */ @@ -14,8 +14,8 @@ tab { #TabsToolbar { background: #282828 !important; - font-family: 'monda' !important; - font-size: 13px !important; + font-family: 'American Typewriter' !important; + font-size: 12px !important; } #TabsToolbar toolbarbutton[class^="scrollbutton"] { diff --git a/rofi.conf b/rofi.conf @@ -1,6 +1,6 @@ ! ! author : Xu Xiaodong <xxdlhy@gmail.com> -! modified : 2016 Oct 29 +! modified : 2017 Jan 09 ! ! Enabled modi @@ -14,7 +14,7 @@ rofi.lines: 10 ! Number of columns rofi.columns: 1 ! Font to use -rofi.font: Monda 8 +rofi.font: American Typewriter 10 ! Color scheme for normal row rofi.color-normal: #282828,#ebdbb2,#282828,#ebdbb2,#282828 ! Color scheme for urgent row diff --git a/settings.ini b/settings.ini @@ -1,6 +1,6 @@ # # author: Xu Xiaodong <xxdlhy@gmail.com> -# modified: 2016 Oct 29 +# modified: 2017 Jan 11 # [Settings] @@ -15,7 +15,7 @@ gtk-icon-theme-name = Numix gtk-theme-name = Numix #-- font --# -gtk-font-name = Monda 8 +gtk-font-name = Source Sans Pro 8 #-- toolbar --# gtk-toolbar-style = GTK_TOOLBAR_ICONS diff --git a/sxhkdrc b/sxhkdrc @@ -1,6 +1,6 @@ # # author : Xu Xiaodong <xxdlhy@gmail.com> -# modified : 2016 Oct 22 +# modified : 2016 Dec 19 # #-- start programs --# @@ -15,20 +15,20 @@ super + w #-- windowchef --# -super + {h,j,k,l} +super + shift + {h,j,k,l} waitron window_move {-5 0, 0 5, 0 -5, 5 0} -super + shift + {h,j,k,l} - waitron window_move {-50 0, 0 50, 0 -50, 50 0} +super + {h,j,k,l} + waitron window_move {-20 0, 0 20, 0 -20, 20 0} super + {y,u,b,n,g} waitron window_snap {topleft,topright,bottomleft,bottomright,middle} -super + alt + {h,j,k,l} +super + shift + alt + {h,j,k,l} waitron window_resize {-5 0, 0 5, 0 -5, 5 0} -super + shift + alt + {h,j,k,l} - waitron window_resize {-50 0, 0 50, 0 -50, 50 0} +super + alt + {h,j,k,l} + waitron window_resize {-20 0, 0 20, 0 -20, 20 0} super + Tab waitron window_cycle @@ -43,13 +43,16 @@ super + shift + m waitron window_hor_maximize super + x - waitron window_maximize + waitron window_monocle super + q waitron window_close -super + {_,shift +}{1-4} - waitron {group_toggle,group_add_window} {1-4} +super + {_,shift +}{1-5} + waitron {group_toggle,group_add_window} {1-5} + +super + alt + {1-5} + waitron group_activate_specific {1-5} super + shift + r waitron group_remove_window @@ -59,29 +62,33 @@ super + shift + q #-- move to corner --# +# notify +super + s + xdotool mousemove 20 20 + # top left super + e - xdotool mousemove 20 50 + xdotool mousemove 20 50; movecursor.sh # top right super + r - xdotool mousemove 1895 55 + xdotool mousemove 1895 55; movecursor.sh # bottom left super + z - xdotool mousemove 25 1055 + xdotool mousemove 25 1055; movecursor.sh # bottom right super + d - xdotool mousemove 1895 1055 + xdotool mousemove 1895 1055; movecursor.sh # top center super + t - xdotool mousemove 955 55 + xdotool mousemove 955 55; movecursor.sh # bottom center super + f - xdotool mousemove 955 1055 + xdotool mousemove 955 1055; movecursor.sh # raise window super + a diff --git a/windowchefrc b/windowchefrc @@ -1,12 +1,13 @@ #!/bin/sh waitron wm_config border_width 1 -waitron wm_config color_focused 0xfabd2f -waitron wm_config color_unfocused 0x282828 +waitron wm_config color_focused 0xa89984 +waitron wm_config color_unfocused 0x504945 waitron wm_config gap_width all 20 waitron wm_config gap_width top 50 waitron wm_config grid_gap_width 20 -waitron wm_config cursor_position bottom_right -waitron wm_config groups_nr 4 +waitron wm_config cursor_position bottomright +waitron wm_config groups_nr 5 waitron wm_config enable_sloppy_focus true waitron wm_config sticky_windows false +waitron wm_config enable_borders true diff --git a/yabar.conf b/yabar.conf @@ -1,16 +1,16 @@ bar-list = ["topbar"]; topbar:{ - font: "Monda, FontAwesome 8"; + font: "American Typewriter, FontAwesome 9"; block-list: ["workspace", "wifi", "download", "battery", "ya_date"]; position: "top"; - gap-horizontal: 1380; + gap-horizontal: 1385; gap-vertical: 10; width: 520; - height: 30; + height: 20; background-color-argb: 0x0; - underline-size: 1; + underline-size: 0; overline-size: 0; - slack-size: 5; + slack-size: 0; workspace:{ exec: "2bwm-ws.sh"; align: "center"; @@ -19,6 +19,7 @@ topbar:{ type: "periodic"; interval: 2; foreground-color-rgb:0xbdae93; + background-color-rgb:0x282828; underline-color-rgb:0xb16286; } wifi:{ @@ -29,6 +30,7 @@ topbar:{ type: "periodic"; interval: 1800; foreground-color-rgb:0xbdae93; + background-color-rgb:0x282828; underline-color-rgb:0x689d6a; } download:{ @@ -39,6 +41,7 @@ topbar:{ type: "periodic"; interval: 5; foreground-color-rgb:0xbdae93; + background-color-rgb:0x282828; underline-color-rgb:0x458588; } battery:{ @@ -49,6 +52,7 @@ topbar:{ type: "periodic"; interval: 60; foreground-color-rgb:0xd5c4a1; + background-color-rgb:0x282828; underline-color-rgb:0x98971a; } ya_date:{ @@ -58,6 +62,7 @@ topbar:{ fixed-size: 190; interval: 1; foreground-color-rgb:0xfbf1c7; + background-color-rgb:0x282828; underline-color-rgb:0xf2e5bc; internal-prefix: " "; internal-option1: "%a %d %b %I:%M";