From 37d35eddaed9f149f1e93fbfdcab27d5fca1bf40 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 17:59:58 +0000 Subject: [PATCH 01/16] mutt: add qutebrowser to subscribed lists --- mutt/muttrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index 0f6cc34..f9c841a 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -26,12 +26,13 @@ set duplicate_threads = yes set collapse_unread = no # lists -subscribe -group chakra ^chakra-.*@googlegroups.com -subscribe -group clementine clementine-player@googlegroups.com -subscribe -group ros @lists.ros.org$ -subscribe -group sailfish @lists.sailfishos.org -subscribe -group neovim ^neovim.*github.com -subscribe -group mutt mutt-users@mutt.org +subscribe -group chakra ^chakra-.*@googlegroups.com +subscribe -group clementine clementine-player@googlegroups.com +subscribe -group ros @lists.ros.org$ +subscribe -group sailfish @lists.sailfishos.org +subscribe -group neovim ^neovim.*github.com +subscribe -group mutt mutt-users@mutt.org +subscribe -group qutebrowser ^qutebrowser.* # performance tuning set read_inc = 1000 # nb of messages read before printing status -- 2.49.0 From a4a3f56a05d7f2ac495a56a6edaebf41befc25dc Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:08:45 +0000 Subject: [PATCH 02/16] awesome: add kinesis bindings --- awesome/bindings.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/awesome/bindings.lua b/awesome/bindings.lua index 5ff504e..ddade27 100644 --- a/awesome/bindings.lua +++ b/awesome/bindings.lua @@ -15,9 +15,6 @@ clientbuttons = awful.util.table.join( -- Global Keys {{{1 globalkeys = awful.util.table.join(globalkeys, -- Awesome Keys {{{2 - awful.key({ modkey, }, "Left", awful.tag.viewprev ), - awful.key({ modkey, }, "Right", awful.tag.viewnext ), - awful.key({ modkey, }, "j", function () awful.client.focus.byidx( 1) @@ -65,6 +62,11 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey }, "p", function() menubar.show() end), -- My Keys {{{2 + awful.key({ modkey, }, "Left", awful.tag.viewprev ), + awful.key({ modkey, }, "Down", awful.tag.viewprev ), + awful.key({ modkey, }, "Right", awful.tag.viewnext ), + awful.key({ modkey, }, "Up", awful.tag.viewnext ), + -- Menu awful.key({ modkey }, "w", function () mymainmenu:show({ coords = { x = 0, y = 0}}) end), -- Prompt @@ -84,6 +86,7 @@ globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey, }, "Escape", awful.tag.history.restore), awful.key({ modkey, }, "#49", function () awful.screen.focus_relative( 1) end), -- that's the key left of 1 (chronos) awful.key({ modkey, }, "#94", function () awful.screen.focus_relative( 1) end), -- that's the key left of 1 (shada) + awful.key({ modkey, }, "=", function () awful.screen.focus_relative( 1) end), -- that's the key left of 1 (kinesis) awful.key({ modkey, "Control" }, "Left", function () awful.screen.focus_relative( 1) end), awful.key({ modkey, "Control" }, "Right", function () awful.screen.focus_relative(-1) end), -- Volume @@ -115,6 +118,7 @@ clientkeys = awful.util.table.join( -- Move client to screen awful.key({ modkey, "Shift" }, "#94", awful.client.movetoscreen ), awful.key({ modkey, "Shift" }, "#49", awful.client.movetoscreen ), + awful.key({ modkey, "Shift" }, "=", awful.client.movetoscreen ), -- kinesis -- ontop and below awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), awful.key({ modkey, }, "b", function (c) c.below = not c.below end) -- 2.49.0 From 2ecdfec76dd889aaa1bd6a850603ffada26ce2b9 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:13:05 +0000 Subject: [PATCH 03/16] awesome: add multimedia bindings --- awesome/bindings.lua | 7 +++++-- awesome/rc.lua | 2 +- awesome/widgets/awesompd.lua | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/awesome/bindings.lua b/awesome/bindings.lua index ddade27..6e06e67 100644 --- a/awesome/bindings.lua +++ b/awesome/bindings.lua @@ -59,7 +59,7 @@ globalkeys = awful.util.table.join(globalkeys, awful.util.getdir("cache") .. "/history_eval") end), -- Menubar - awful.key({ modkey }, "p", function() menubar.show() end), + -- awful.key({ modkey }, "p", function() menubar.show() end), -- My Keys {{{2 awful.key({ modkey, }, "Left", awful.tag.viewprev ), @@ -92,7 +92,10 @@ globalkeys = awful.util.table.join(globalkeys, -- Volume awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("ponymix increase 5") end), awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("ponymix decrease 5") end), - awful.key({ }, "XF86AudioMute", function () awful.util.spawn("ponymix toggle") end) + awful.key({ }, "XF86AudioMute", function () awful.util.spawn("ponymix toggle") end), + awful.key({ modkey }, "F10", function () awful.util.spawn("ponymix toggle") end), + awful.key({ modkey }, "F11", function () awful.util.spawn("ponymix decrease 5") end), + awful.key({ modkey }, "F12", function () awful.util.spawn("ponymix increase 5") end) ) -- Client keys {{{1 diff --git a/awesome/rc.lua b/awesome/rc.lua index 9d8a7d3..d7d3a43 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -50,10 +50,10 @@ if beautiful.wallpaper then end -- Require files {{{1 +require("bindings") require("tags") require("menu") require("topbar") -require("bindings") require("rules") require("conky") require("autostart") diff --git a/awesome/widgets/awesompd.lua b/awesome/widgets/awesompd.lua index 6ac8964..d697be1 100644 --- a/awesome/widgets/awesompd.lua +++ b/awesome/widgets/awesompd.lua @@ -43,6 +43,11 @@ musicwidget:register_buttons({ { "", awesompd.MOUSE_SCROLL_UP, musicwidget:command_volume_up() }, { "", awesompd.MOUSE_SCROLL_DOWN, musicwidget:command_volume_down() }, { "", awesompd.MOUSE_RIGHT, musicwidget:command_show_menu() }, + { modkey, "p", musicwidget:command_playpause() }, + { modkey, ",", musicwidget:command_prev_track() }, + { modkey, ".", musicwidget:command_next_track() }, + { { modkey, "Shift" }, ",", musicwidget:command_previous_server() }, + { { modkey, "Shift" }, ".", musicwidget:command_next_server() }, { "", "XF86AudioPlay", musicwidget:command_playpause() }, { "", "XF86AudioPrev", musicwidget:command_prev_track() }, { "", "XF86AudioNext", musicwidget:command_next_track() }, -- 2.49.0 From a4f0a6afcaeb0f54376aab7d5fde286227e6406c Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:15:09 +0000 Subject: [PATCH 04/16] awesome: disable conky --- awesome/rc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awesome/rc.lua b/awesome/rc.lua index d7d3a43..af38777 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -55,7 +55,7 @@ require("tags") require("menu") require("topbar") require("rules") -require("conky") +-- require("conky") require("autostart") require("signals") -- 2.49.0 From 430ecb048d35373d587928fad406520cba1fee7f Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:18:44 +0000 Subject: [PATCH 05/16] awesome: restore previous tag when pressing tag number again --- awesome/bindings.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/awesome/bindings.lua b/awesome/bindings.lua index 6e06e67..d8e1531 100644 --- a/awesome/bindings.lua +++ b/awesome/bindings.lua @@ -136,11 +136,15 @@ for i = 1, 9 do globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey }, "#" .. i + 9, function () - local screen = mouse.screen - local tag = awful.tag.gettags(screen)[i] - if tag then - awful.tag.viewonly(tag) - end + local screen = mouse.screen + local tag = awful.tag.gettags(screen)[i] + if tag then + if tag == awful.tag.selected(screen) then + awful.tag.history.restore(screen) + else + awful.tag.viewonly(tag) + end + end end), awful.key({ modkey, "Control" }, "#" .. i + 9, function () -- 2.49.0 From 30d9d8d4b5c8060f705cdbcfbd719461858a22ef Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:21:23 +0000 Subject: [PATCH 06/16] compton: set transparency rules in WM --- awesome/rules.lua | 2 ++ compton.conf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/awesome/rules.lua b/awesome/rules.lua index 2d07e9d..2bdd306 100644 --- a/awesome/rules.lua +++ b/awesome/rules.lua @@ -37,6 +37,8 @@ awful.rules.rules = { ontop = true, x = 1920 - 310, y = mywibox[mouse.screen].height, width = 100, height = 100 } }, + { rule = { class = "URxvt"}, + properties = { opacity = 0.8 } }, { rule = { class = "URxvt", instance = "mutt" }, properties = { tag = wwwtag, function (c) awful.client.setslave(c) end } }, diff --git a/compton.conf b/compton.conf index c4a1bd6..d77d215 100644 --- a/compton.conf +++ b/compton.conf @@ -28,7 +28,7 @@ blur-background-frame = true; #blur-background-fixed = false; blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ]; # transaprent urxvt -opacity-rule = ["80:class_g = 'URxvt'"]; +# opacity-rule = ["80:class_g = 'URxvt'"]; # Fading #fading = true; -- 2.49.0 From b94b411a4c9546cc0135fe1cb68611c2a431d160 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:26:04 +0000 Subject: [PATCH 07/16] awesome: update signal callbacks --- awesome/signals.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/awesome/signals.lua b/awesome/signals.lua index 748b09e..a918571 100644 --- a/awesome/signals.lua +++ b/awesome/signals.lua @@ -1,13 +1,5 @@ -- Signal function to execute when a new client appears. client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - if not startup then -- Set the windows at the slave, -- i.e. put it at the end of others instead of setting it master. @@ -18,6 +10,17 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + elseif not c.size_hints.user_position and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count change + awful.placement.no_offscreen(c) + end +end) + +-- Enable sloppy focus +client.connect_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c end end) -- 2.49.0 From a29e6d7c07f30a3f70396399901c1fcc5593c090 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 18:32:13 +0000 Subject: [PATCH 08/16] zsh: use dircolors for LSCOLORS --- dircolors | 289 +++++++++++++++++++++++++++++++ zsh/lib/theme-and-appearance.zsh | 3 +- 2 files changed, 290 insertions(+), 2 deletions(-) create mode 100644 dircolors diff --git a/dircolors b/dircolors new file mode 100644 index 0000000..834eeca --- /dev/null +++ b/dircolors @@ -0,0 +1,289 @@ + +# Dark 256 color solarized theme for the color GNU ls utility. +# Used and tested with dircolors (GNU coreutils) 8.5 +# +# @author {@link http://sebastian.tramp.name Sebastian Tramp} +# @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL) +# +# More Information at +# https://github.com/seebi/dircolors-solarized + +# Term Section +TERM Eterm +TERM ansi +TERM color-xterm +TERM con132x25 +TERM con132x30 +TERM con132x43 +TERM con132x60 +TERM con80x25 +TERM con80x28 +TERM con80x30 +TERM con80x43 +TERM con80x50 +TERM con80x60 +TERM cons25 +TERM console +TERM cygwin +TERM dtterm +TERM dvtm +TERM dvtm-256color +TERM eterm-color +TERM fbterm +TERM gnome +TERM gnome-256color +TERM jfbterm +TERM konsole +TERM konsole-256color +TERM kterm +TERM linux +TERM linux-c +TERM mach-color +TERM mlterm +TERM putty +TERM putty-256color +TERM rxvt +TERM rxvt-256color +TERM rxvt-cygwin +TERM rxvt-cygwin-native +TERM rxvt-unicode +TERM rxvt-unicode256 +TERM rxvt-unicode-256color +TERM screen +TERM screen-16color +TERM screen-16color-bce +TERM screen-16color-s +TERM screen-16color-bce-s +TERM screen-256color +TERM screen-256color-bce +TERM screen-256color-s +TERM screen-256color-bce-s +TERM screen-bce +TERM screen-w +TERM screen.linux +TERM st +TERM st-meta +TERM st-256color +TERM st-meta-256color +TERM vt100 +TERM xterm +TERM xterm-16color +TERM xterm-256color +TERM xterm-88color +TERM xterm-color +TERM xterm-debian +TERM xterm-termite + +## Documentation +# +# standard colors +# +# Below are the color init strings for the basic file types. A color init +# string consists of one or more of the following numeric codes: +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white +# +# +# 256 color support +# see here: http://www.mail-archive.com/bug-coreutils@gnu.org/msg11030.html) +# +# Text 256 color coding: +# 38;5;COLOR_NUMBER +# Background 256 color coding: +# 48;5;COLOR_NUMBER + +## Special files + +NORMAL 00;38;5;244 # no color code at all +FILE 00 # regular file: use no color at all +RESET 0 # reset to "normal" color +DIR 00;38;5;33 # directory 01;34 +LINK 00;38;5;37 # symbolic link. (If you set this to 'target' instead of a + # numerical value, the color is as for the file pointed to.) +MULTIHARDLINK 00 # regular file with more than one link +FIFO 48;5;230;38;5;136;01 # pipe +SOCK 48;5;230;38;5;136;01 # socket +DOOR 48;5;230;38;5;136;01 # door +BLK 48;5;230;38;5;244;01 # block device driver +CHR 48;5;230;38;5;244;01 # character device driver +ORPHAN 48;5;235;38;5;160 # symlink to nonexistent file, or non-stat'able file +SETUID 48;5;160;38;5;230 # file that is setuid (u+s) +SETGID 48;5;136;38;5;230 # file that is setgid (g+s) +CAPABILITY 30;41 # file with capability +STICKY_OTHER_WRITABLE 48;5;64;38;5;230 # dir that is sticky and other-writable (+t,o+w) +OTHER_WRITABLE 48;5;235;38;5;33 # dir that is other-writable (o+w) and not sticky +STICKY 48;5;33;38;5;230 # dir with the sticky bit set (+t) and not other-writable +# This is for files with execute permission: +EXEC 00;38;5;64 + +## Archives or compressed (violet + bold for compression) +.tar 00;38;5;61 +.tgz 00;38;5;61 +.arj 00;38;5;61 +.taz 00;38;5;61 +.lzh 00;38;5;61 +.lzma 00;38;5;61 +.tlz 00;38;5;61 +.txz 00;38;5;61 +.zip 00;38;5;61 +.z 00;38;5;61 +.Z 00;38;5;61 +.dz 00;38;5;61 +.gz 00;38;5;61 +.lz 00;38;5;61 +.xz 00;38;5;61 +.bz2 00;38;5;61 +.bz 00;38;5;61 +.tbz 00;38;5;61 +.tbz2 00;38;5;61 +.tz 00;38;5;61 +.deb 00;38;5;61 +.rpm 00;38;5;61 +.jar 00;38;5;61 +.rar 00;38;5;61 +.ace 00;38;5;61 +.zoo 00;38;5;61 +.cpio 00;38;5;61 +.7z 00;38;5;61 +.rz 00;38;5;61 +.apk 00;38;5;61 +.gem 00;38;5;61 + +# Image formats (yellow) +.jpg 00;38;5;136 +.JPG 00;38;5;136 #stupid but needed +.jpeg 00;38;5;136 +.gif 00;38;5;136 +.bmp 00;38;5;136 +.pbm 00;38;5;136 +.pgm 00;38;5;136 +.ppm 00;38;5;136 +.tga 00;38;5;136 +.xbm 00;38;5;136 +.xpm 00;38;5;136 +.tif 00;38;5;136 +.tiff 00;38;5;136 +.png 00;38;5;136 +.PNG 00;38;5;136 +.svg 00;38;5;136 +.svgz 00;38;5;136 +.mng 00;38;5;136 +.pcx 00;38;5;136 +.dl 00;38;5;136 +.xcf 00;38;5;136 +.xwd 00;38;5;136 +.yuv 00;38;5;136 +.cgm 00;38;5;136 +.emf 00;38;5;136 +.eps 00;38;5;136 +.CR2 00;38;5;136 +.ico 00;38;5;136 + +# Files of special interest (base1) +.tex 00;38;5;245 +.rdf 00;38;5;245 +.owl 00;38;5;245 +.n3 00;38;5;245 +.ttl 00;38;5;245 +.nt 00;38;5;245 +.torrent 00;38;5;245 +.xml 00;38;5;245 +*Makefile 00;38;5;245 +*Rakefile 00;38;5;245 +*build.xml 00;38;5;245 +*rc 00;38;5;245 +*1 00;38;5;245 +.nfo 00;38;5;245 +*README 00;38;5;245 +*README.txt 00;38;5;245 +*readme.txt 00;38;5;245 +.md 00;38;5;245 +*README.markdown 00;38;5;245 +.ini 00;38;5;245 +.yml 00;38;5;245 +.cfg 00;38;5;245 +.conf 00;38;5;245 +.c 00;38;5;245 +.cpp 00;38;5;245 +.cc 00;38;5;245 +.sqlite 00;38;5;245 + +# "unimportant" files as logs and backups (base01) +.log 00;38;5;240 +.bak 00;38;5;240 +.aux 00;38;5;240 +.lof 00;38;5;240 +.lol 00;38;5;240 +.lot 00;38;5;240 +.out 00;38;5;240 +.toc 00;38;5;240 +.bbl 00;38;5;240 +.blg 00;38;5;240 +*~ 00;38;5;240 +*# 00;38;5;240 +.part 00;38;5;240 +.incomplete 00;38;5;240 +.swp 00;38;5;240 +.tmp 00;38;5;240 +.temp 00;38;5;240 +.o 00;38;5;240 +.pyc 00;38;5;240 +.class 00;38;5;240 +.cache 00;38;5;240 + +# Audio formats (orange) +.aac 00;38;5;166 +.au 00;38;5;166 +.flac 00;38;5;166 +.mid 00;38;5;166 +.midi 00;38;5;166 +.mka 00;38;5;166 +.mp3 00;38;5;166 +.mpc 00;38;5;166 +.ogg 00;38;5;166 +.ra 00;38;5;166 +.wav 00;38;5;166 +.m4a 00;38;5;166 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axa 00;38;5;166 +.oga 00;38;5;166 +.spx 00;38;5;166 +.xspf 00;38;5;166 + +# Video formats (as audio + bold) +.mov 00;38;5;166 +.MOV 00;38;5;166 +.mpg 00;38;5;166 +.mpeg 00;38;5;166 +.m2v 00;38;5;166 +.mkv 00;38;5;166 +.ogm 00;38;5;166 +.mp4 00;38;5;166 +.m4v 00;38;5;166 +.mp4v 00;38;5;166 +.vob 00;38;5;166 +.qt 00;38;5;166 +.nuv 00;38;5;166 +.wmv 00;38;5;166 +.asf 00;38;5;166 +.rm 00;38;5;166 +.rmvb 00;38;5;166 +.flc 00;38;5;166 +.avi 00;38;5;166 +.fli 00;38;5;166 +.flv 00;38;5;166 +.gl 00;38;5;166 +.m2ts 00;38;5;166 +.divx 00;38;5;166 +.webm 00;38;5;166 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.axv 00;38;5;166 +.anx 00;38;5;166 +.ogv 00;38;5;166 +.ogx 00;38;5;166 + + diff --git a/zsh/lib/theme-and-appearance.zsh b/zsh/lib/theme-and-appearance.zsh index e26c502..4900895 100644 --- a/zsh/lib/theme-and-appearance.zsh +++ b/zsh/lib/theme-and-appearance.zsh @@ -1,7 +1,6 @@ # ls colors autoload colors; colors; -export LSCOLORS="Gxfxcxdxbxegedabagacad" -#export LS_COLORS +eval $(dircolors $XDG_CONFIG_HOME/dircolors) # Enable ls colors ls='ls --color=auto' -- 2.49.0 From 430f4e8aee8c473becee195ec94c489f51905edb Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 Jan 2015 19:06:46 +0000 Subject: [PATCH 09/16] vim: promote some plugins --- vim/vimrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index fcc4ff9..ab8b569 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -14,15 +14,18 @@ call vundle#rc('$XDG_DATA_HOME/vim') Plugin 'gmarik/vundle' +Plugin 'airblade/vim-gitgutter' Plugin 'bling/vim-airline' Plugin 'elzr/vim-json' -Plugin 'rking/ag.vim' Plugin 'http://git.code.sf.net/p/vim-latex/vim-latex' +Plugin 'junegunn/vim-easy-align' Plugin 'kien/ctrlp.vim' Plugin 'kshenoy/vim-signature' Plugin 'majutsushi/tagbar' +Plugin 'rking/ag.vim' Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/syntastic' +Plugin 'sirver/ultisnips' Plugin 'sjl/gundo.vim' Plugin 'tomtom/tcomment_vim' Plugin 'tpope/vim-endwise' @@ -41,11 +44,8 @@ Plugin 'derekwyatt/vim-fswitch' " Plugin 'jalcine/cmake.vim' " Plugin 'powerman/vim-plugin-viewdoc' -Plugin 'airblade/vim-gitgutter' Plugin 'raimondi/delimitmate' -Plugin 'sirver/ultisnips' Plugin 'lokaltog/vim-easymotion' -Plugin 'junegunn/vim-easy-align' Plugin 'chrisbra/checkattach' " remove entries first -- 2.49.0 From 6d93937e28fefc34082d657a4e23b686406d7d46 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 18:38:58 +0000 Subject: [PATCH 10/16] dwb: add wikipedia userstyle --- dwb/userscripts/extension_loader.js | 1 + dwb/userstyles/wikipedia.org.css | 194 ++++++++++++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100644 dwb/userstyles/wikipedia.org.css diff --git a/dwb/userscripts/extension_loader.js b/dwb/userscripts/extension_loader.js index f00518d..47942bd 100644 --- a/dwb/userscripts/extension_loader.js +++ b/dwb/userscripts/extension_loader.js @@ -121,6 +121,7 @@ domains : { "tardis.uni.cx" : { "user-stylesheet-uri" : "" }, "thetvdb.com" : { "user-stylesheet-uri" : "" }, "usenet-crawler.com" : { "user-stylesheet-uri" : "" }, + "wikipedia.org" : { "user-stylesheet-uri" : "file:///home/ramsi/.config/dwb/userstyles/wikipedia.org.css" }, }, //Settings applied based on the hostname hosts : { diff --git a/dwb/userstyles/wikipedia.org.css b/dwb/userstyles/wikipedia.org.css new file mode 100644 index 0000000..f50c494 --- /dev/null +++ b/dwb/userstyles/wikipedia.org.css @@ -0,0 +1,194 @@ +/* Wikipedia Dark Theme v1.0.4 (12/22/2014) + * https://github.com/StylishThemes/Wikipedia-Dark + * http://userstyles.org/styles/ + * Modified from https://userstyles.org/styles/47161/dark-wikipedia-rounded + */ + + /* transparent background */ + div, span:not(.legend-color), .MainPageBG, .navbox-list, div#mw-head, .mw-wsmfinal-content, #bodyContent, + .referencetooltip > li + li, div.vectorTabs ul li, tr[style*="background:#F5FFFA"], + th[style*="background-color: #fff"] { + background-color: transparent !important; + } + + /*** Overall ***/ + * { + color: #9a9a9a !important; + } + + a, .CategoryTreeToggle { + color: /*[[base-color]]*/ #4183C4 !important; + } + + a:visited { + color: #ccc !important; + } + + a:hover, a:hover span { + color: #fff !important; + text-decoration: underline !important; + } + + /*** Red links (non-existant pages) ***/ + a.new { + color: #980000 !important; + } + + /*** Background ***/ + html, body { + background-color: #222 !important; + background-image: /*[[bg-choice]]*/ url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAgMAAAANjH3HAAAACVBMVEUaGhohISElJSUh9lebAAAB20lEQVRIx4XWuZXDMAwE0C0SAQtggIIYoAAEU+aKOHhYojTrYP2+QfOW/5QIJOih/q8HwF/pb3EX+UPIveYcQGgEHiu9hI+ihEc5Jz5KBIlRRRaJ1JtoSAl5Hw96hLB1/up1tnIXOck5jZQy+3iU2hAOKSH1JvwxHsp+5TLF5MOl1/MQXsVs1miXc+KDbYydyMeUgpPQreZ7fWidbNhkXNJSeAhc6qHmHD8AYovunYyEACWEbyIhNeB9fRrH3hFi0bGPLuEW7xCNaohw1vAlS805nfsrTspclB/hVdoqusg53eH7FWot+wjYpOViX8KbFFKTwlnzvj65P9H/vD0/hibYBGhPwlPO8TmxRsaxsNnrUmUXpNhirlJMPr6Hqq9k5Xn/8iYQHYIuQsWFC6Z87IOxLxHphSY4SpuiU87xJnJr5axfeRd+lnMExXpEWPpuZ1v7qZdNBOjiHzDREHX5fs5Zz9p6X0vVKbKKchlSl5rv+3p//FJ/PYvoKryI8vs+2G9lzRmnEKkh+BU8yDk515jDj/HAswu7CCz6U/Mxb/PnC9N41ndpU4hUU7JGk/C9PmP/M2xZYdvBW2PObyf1IUiIzoHmHW9yTncliYs9A9tVNppdShfgQaTLMf+j3X723tLeHgAAAABJRU5ErkJggg==) !important; + background-clip: border-box !important; + background-origin: padding-box !important; + /*[[bg-options]]*/ + /*[[bg-options2]]*/ + } + + .mw-ui-button, .mw-ui-button * { + background-color: /*[[base-color]]*/ #4183C4 !important; + color: #fff !important; + } + + #mw-page-base, div.vectorTabs, div.vectorTabs * { + background-image: none !important; + } + + #bodyContent pre, #bodyContent code, span.plainlinks * { + background-color: #111 !important; + } + + table, input, button, select, + tr[style*="background: antiquewhite;"], #toc, td[style*="background-color"], td[style*="background:#F5FAFF"], + #mw-content-text div[style*="background: #"], .vevent td, .referencetooltip li, .suggestions, + .mw-ui-button[style*="background"], .mw-ui-button[style*="background"] * { + background-color: #222 !important; + } + + table[style*="background-color:#fff;"], .search-form fieldset, table.ambox, tr[style*="background-color: #fff;"], + .mw-ui-button[style*="background-color:#008B6D"], tr[style*="background-color: #f5faff;"] { + background-color: #282828 !important; + } + + table.wikitable > tr > th, table.wikitable > * > tr > th { + background-color: #333; /* don't include !important flag */ + } + + td[style*="background: #ececec;"], th[style*="background:#eee"], th[style*="background-color: #eee"], + tr[style*="background-color: #f7f7f7;"], th[style*="background:#F2F2F2"], #filetoc, .toccolours, + th[style*="background:#F9F9F9"], table.plainlinks, th[style*="background-color: lightgrey"], + th[style*="background:#ddd"], .infobox th[style*="background"], .infobox td[style*="background"] { + background-color: #333 !important; + } + + hr { + background-color: #555 !important; + } + + /*** Background Color Styles ***/ + /* Red */ + td[style*="background: #FDD;"] { + background: #722 !important; + } + + /* Green */ + #mp-left h2, #mp-left h2 span, td[style*="background: #99FF99;"] { + background: #244024 !important; + } + + /* Blue */ + div[style*="background"] h2, div[style*="background"] h2 *, #mp-right h2, #mp-right h2 span, .navbox th, + .navbox-title, .navbox-title *, tr[style*="background-color:tan;"], + div[style*="background: #444444;"], div[style*="background: #444444;"] *, + ol.references li:target, sup.reference:target, span.citation:target, + ol.references li:target *, sup.reference:target *, span.citation:target *, + td[style*="background:#CEDFF2"], tr[bgcolor="#CEDFF2"], table[style*="background-color:#cef2e0"] * { + background-color: #182030 !important; + } + + .navbox-abovebelow, th.navbox-group, .navbox-subgroup .navbox-title, + .navbox-abovebelow *, th.navbox-group *, .navbox-subgroup .navbox-title * { + background-color: #212C43 !important; + } + + /* Purple */ + #mp-bottom h2, #mp-bottom h2 span { + background-color: #382B4A !important; + } + + /* Brown */ + #mp-center h2, #mp-center h2 span { + background-color: #383812 !important; + } + + /*** Border ***/ + div, span, table, tr:not([style*="border-bottom"]), th, td:not([style*="border-bottom"]), + h1, h2, h3, h4, h5, h6, ul, li, input, select { + border-color: #555 !important; + } + + td[style*="border-bottom"] { + border-right-color: #555 !important; + border-left-color: #555 !important; + border-top-color: #555 !important; + } + + #content, #toc { + -moz-border-radius: 10px !important; + -webkit-border-radius: 10px !important; + border-radius: 10px !important; + } + + div.vectorTabs li:not(.selected) { + border-bottom: #555 1px solid !important; + } + + /* arrow down */ + .referencetooltip > li + li, .referencetooltip > li + li::after { + border-top-color: #555 !important; + border-right-color: transparent !important; + border-left-color: transparent !important; + } + + /* Orange */ + #centralNotice > div { + border-color: #e08b26 !important; + } + + table.ambox-content, table.ambox-style { + border-left-color: #e08b26 !important; + } + + /* add border */ + div.vectorTabs li.selected { + border-bottom: #e08b26 1px solid !important; + } + + /*** Text ***/ + .wikitable th { + color: #fff !important; + } + + .CategoryTreeEmptyBullet { + color: #ccc !important; + } + + /*** Misc ***/ + #p-cactions li.selected a, #p-cactions li a, #p-cactions li a:hover { + padding: 0 1em 0.1em !important; + } + + ul, .portlet li { + list-style-image: none !important; + } + + table[style*="border:4px ridge"] { + border: none !important; + } + + /*** invert images ***/ + img[title="Wikipedia"], .bookshelf-container .bookend, img.mwe-math-fallback-image-inline, + #mw-wsmfinal-close, img[src*="Speaker_Icon"], .infobox img[src*=".svg"], img[src*=".png"]:active { + filter: url("data:image/svg+xml;utf8, #i"); + -webkit-filter: invert(100%) !important; + background-color: transparent !important; + } -- 2.49.0 From 55101fe7c8f1d640f1369eafef8d31770424c8a7 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 18:39:53 +0000 Subject: [PATCH 11/16] dwb: include !important --- dwb/userstyles/wikipedia.org.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwb/userstyles/wikipedia.org.css b/dwb/userstyles/wikipedia.org.css index f50c494..249c9fc 100644 --- a/dwb/userstyles/wikipedia.org.css +++ b/dwb/userstyles/wikipedia.org.css @@ -70,7 +70,7 @@ } table.wikitable > tr > th, table.wikitable > * > tr > th { - background-color: #333; /* don't include !important flag */ + background-color: #333 !important; /* don't include !important flag */ } td[style*="background: #ececec;"], th[style*="background:#eee"], th[style*="background-color: #eee"], -- 2.49.0 From bc2d1837a7cce665b59d64fa5e2e218dfaee3e85 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 21:59:22 +0000 Subject: [PATCH 12/16] zsh: disable flowcontrol --- zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zshrc b/zshrc index a25e6fb..e6126f2 100644 --- a/zshrc +++ b/zshrc @@ -31,6 +31,10 @@ setopt notify setopt rcquotes # echo 'don''t'; prints don't setopt dvorak # correct_all uses dvorak +# disable flow control +setopt noflowcontrol +stty -ixon + # populate path typeset -U path # make path a unique array [[ -d ~/.local/bin ]] && path=(~/.local/bin $path) -- 2.49.0 From ab8c26d5c44a29f0419ade2c64fdfac49c43bf7b Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 22:02:06 +0000 Subject: [PATCH 13/16] xprofile: add unclutter --- xprofile | 1 + 1 file changed, 1 insertion(+) diff --git a/xprofile b/xprofile index 41e3ea3..eedbcc4 100644 --- a/xprofile +++ b/xprofile @@ -5,6 +5,7 @@ xautolock -detectsleep \ -time 20 -locker "i3lock -nc 000000" \ -killtime 70 -killer "systemctl suspend" & xkbcomp -I$HOME/.config/xkb $HOME/.config/xkb/$(hostname).xkb $DISPLAY +unclutter -idle 1 -root & [[ -x /usr/bin/xbindkeys ]] && xbindkeys xcape -e "Control_L=Escape;Control_R=Escape" urxvtd -q -f -o -- 2.49.0 From 26b14fa985d5aad61ea0adfd0ab4f2837a39808f Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 22:04:40 +0000 Subject: [PATCH 14/16] dwb: forms --- dwb/forms | Bin 3050 -> 3100 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/dwb/forms b/dwb/forms index 14baaba2290c975c5144d00548d55f5ed7b409dc..fb86f01492e06ad6e11a491d0d34a9d77823c529 100644 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a&wUG6b?&cAcJppVUyPL*ud1C#h}Y`9$Fmtvou|K*p@<%Hg2 z$BU+>ygAWi%5P$+bK=X6hk?Hjsn$Nq-h3x1+U@7es0;nif(kD$_e=NcerxS}S0nV5 zozCwEw{IPKs2jtjdMx>0&WRpd?|+)Tj+IAi60}~1-F9QT%%D=XJil}S!~f{j7n#iy zv$Xh%ue55;;R@LJ`DowgKb%h@OfDVQTeNq}?Yzq^=VBi(DA+co&m>%0_+R!wV_4Wb9}DiO7FyHYH+eJenetruqQU+zkL9nGtBw5(QEo{m>JJ}p@7>?{?bMaKVjCkiP&nSO&a zUZJ2}ZdJ7X88v5ygW~;3r_wfT*zx-IW#e_mmG>Sk-n;KbA!~xK;vC+OU-o{vHDlXm z1x@!OQ^lk{gvSP$tA}pjV@p<(Ub^SsQJo&mhd#S`XN8ER9f%oY%~YwWC;OJ=A_Aj$GTv^+(Bk+NhT=y)g z1HP?wcb4o@pX0f_@p5|nIl~3Bqt~jeS$*l)v-6=RBM)9RW)HpSsxbB3s#~)!nWyux yylD=S^7q#8N)J=!mMeU>jM;5X%+1EL-{Rg+I`!*dpMAUCx=nHdtF>4c6#xJvq2CMu -- 2.49.0 From 0a4619f34e852e70aabf7c024271d5d5076ded2c Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 22:05:29 +0000 Subject: [PATCH 15/16] mpd: bind to any address allows clients in the network to connect --- mpd/mpd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpd/mpd.conf b/mpd/mpd.conf index fa0126b..7973ac7 100644 --- a/mpd/mpd.conf +++ b/mpd/mpd.conf @@ -1,7 +1,7 @@ # An example configuration file for MPD can be found at: # /usr/share/doc/mpd/ -bind_to_address "localhost" +bind_to_address "any" bind_to_address "/var/run/user/1000/mpd.socket" music_directory "~/music" playlist_directory "~/.local/share/mpd/playlists" -- 2.49.0 From f4d96d6cecf87e4e26234f32e897959480b2b732 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 27 Jan 2015 22:10:24 +0000 Subject: [PATCH 16/16] vim: add pkgver to PKGBUILD snippets --- vim/ultisnips/PKGBUILD.snippets | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/vim/ultisnips/PKGBUILD.snippets b/vim/ultisnips/PKGBUILD.snippets index ef52592..b18ae81 100644 --- a/vim/ultisnips/PKGBUILD.snippets +++ b/vim/ultisnips/PKGBUILD.snippets @@ -1,23 +1,33 @@ +snippet pkgver "pkgver() function" b +pkgver() { + cd ${1:$pkgname-$pkgver} + ( set -o pipefail + git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} +endsnippet + snippet prep "prepare() function" b prepare() { - cd ${1:$pkgname-$pkgver} - $0 + cd ${1:$pkgname-$pkgver} + $0 } endsnippet snippet build "build() function" b build() { - cd ${1:$pkgname-$pkgver} - ./configure \ - --prefix=/usr $2 - $0 + cd ${1:$pkgname-$pkgver} + ./configure \ + --prefix=/usr $2 + $0 } endsnippet snippet pack "package() function" b package() { - cd ${1:$pkgname-$pkgver} - make DESTDIR="$pkgdir" install - $0 + cd ${1:$pkgname-$pkgver} + make DESTDIR="$pkgdir" install + $0 } endsnippet -- 2.49.0