Merge remote-tracking branch 'origin/master' into phoenix
Conflicts: .config/herbstluftwm/autostart .config/herbstluftwm/panel.sh
This commit is contained in:
commit
c4ea2643f6
29 changed files with 3083 additions and 780 deletions
75
.Xdefaults
Normal file
75
.Xdefaults
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
|
||||||
|
urxvt.internalBorder: 0
|
||||||
|
|
||||||
|
urxvt.loginShell: true
|
||||||
|
urxvt.scrollBar: false
|
||||||
|
urxvt.secondaryScroll: true
|
||||||
|
urxvt.saveLines: 65535
|
||||||
|
urxvt.cursorBlink: false
|
||||||
|
urxvt.cursorUnderline: true
|
||||||
|
urxvt.urgentOnBell: true
|
||||||
|
urxvt.termName: rxvt-256color
|
||||||
|
urxvt.visualBell: true
|
||||||
|
|
||||||
|
urxvt.perl-lib: /usr/lib/urxvt/perl/
|
||||||
|
urxvt.perl-ext-common: default,matcher,searchable-scrollback
|
||||||
|
urxvt.urlLauncher: firefox
|
||||||
|
urxvt.matcher.button: 1
|
||||||
|
|
||||||
|
urxvt.font: xft:osaka_unicode:weight=medium:pixelsize=18
|
||||||
|
urxvt.boldFont: xft:osaka_unicode:weight=black:pixelsize=18
|
||||||
|
urxvt.italicFont: xft:osaka_unicode:slant=italic:pixelsize=18
|
||||||
|
! urxvt.transparent: true
|
||||||
|
|
||||||
|
urxvt.background: #252a2b
|
||||||
|
urxvt.foreground: #eeeeec
|
||||||
|
|
||||||
|
urxvt.color0: #0c191c
|
||||||
|
urxvt.color8: #2e3436
|
||||||
|
|
||||||
|
urxvt.color1: #a40000
|
||||||
|
urxvt.color9: #ef2929
|
||||||
|
|
||||||
|
urxvt.color2: #4e9a06
|
||||||
|
urxvt.color10: #8ae234
|
||||||
|
|
||||||
|
urxvt.color3: #c4a000
|
||||||
|
urxvt.color11: #fce94f
|
||||||
|
|
||||||
|
urxvt.color4: #204a87
|
||||||
|
urxvt.color12: #729fcf
|
||||||
|
|
||||||
|
urxvt.color5: #5c3566
|
||||||
|
urxvt.color13: #ad7fa8
|
||||||
|
|
||||||
|
urxvt.color6: #9f5902
|
||||||
|
urxvt.color14: #e9b96e
|
||||||
|
|
||||||
|
urxvt.color7: #babdb6
|
||||||
|
urxvt.color15: #d3d7cf
|
||||||
|
|
||||||
|
Xft.antialias: true
|
||||||
|
Xft.rgba: rgb
|
||||||
|
Xft.hinting: true
|
||||||
|
Xft.hintstyle: hintslight
|
||||||
|
|
||||||
|
Emacs.font: DejaVu Sans Mono:weight=medium:pixelsize=18
|
||||||
|
Emacs.menuBar: off
|
||||||
|
Emacs.toolbar: off
|
||||||
|
Emacs.useXIM: off
|
||||||
|
Emacs.background: #252a2b
|
||||||
|
|
||||||
|
xfontsel.sampleText: \
|
||||||
|
static void print_sample_message(XWindow *win) {\n\
|
||||||
|
win.label->text = "Sample text 0123456789"\n\
|
||||||
|
}
|
||||||
|
|
||||||
|
xfontsel.sampleText16: \
|
||||||
|
static void print_sample_message(XWindow *win) {\n\
|
||||||
|
win.label->text = "Sample text 0123456789"\n\
|
||||||
|
}
|
||||||
|
|
||||||
|
xfontsel.sampleTextUCS: \
|
||||||
|
static void print_sample_message(XWindow *win) {\n\
|
||||||
|
win.label->text = "Sample text 0123456789"\n\
|
||||||
|
}
|
205
.config/awesome/bowl.lua
Normal file
205
.config/awesome/bowl.lua
Normal file
|
@ -0,0 +1,205 @@
|
||||||
|
-- -*- coding: utf-8 -*-
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- @author Nicolas Berthier <nberthier@gmail.com>
|
||||||
|
-- @copyright 2010 Nicolas Berthier
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
--
|
||||||
|
-- Bowls are kind of helpers that can be drawn (at the bottom --- for now) of an
|
||||||
|
-- area, and displaying the current key prefix. It is inspired by emacs'
|
||||||
|
-- behavior, that prints prefix keys in the minibuffer after a certain time.
|
||||||
|
--
|
||||||
|
-- I call it `bowl' as a reference to the bowl that one might have at home,
|
||||||
|
-- where one puts its actual keys... A more serious name would be `hint' or
|
||||||
|
-- `tooltip' (but they do not fit well for this usage).
|
||||||
|
--
|
||||||
|
-- Example usage: see `rc.lua' file.
|
||||||
|
--
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--{{{ Grab environment (mostly aliases)
|
||||||
|
local setmetatable = setmetatable
|
||||||
|
local ipairs = ipairs
|
||||||
|
local type = type
|
||||||
|
local pairs = pairs
|
||||||
|
local string = string
|
||||||
|
local print = print
|
||||||
|
local error = error
|
||||||
|
|
||||||
|
local capi = capi
|
||||||
|
local client = client
|
||||||
|
local awesome = awesome
|
||||||
|
local root = root
|
||||||
|
local timer = timer
|
||||||
|
|
||||||
|
local infoline = require ("infoline")
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
module ("bowl")
|
||||||
|
|
||||||
|
-- Privata data: we use weak keys in order to allow collection of private data
|
||||||
|
-- if keys (clients) are collected (i.e., no longer used, after having been
|
||||||
|
-- killed for instance)
|
||||||
|
local data = setmetatable ({}, { __mode = 'k' })
|
||||||
|
|
||||||
|
--{{{ Default values
|
||||||
|
|
||||||
|
--- Default modifier filter
|
||||||
|
local modfilter = {
|
||||||
|
["Mod1"] = "M",
|
||||||
|
["Mod4"] = "S",
|
||||||
|
["Control"] = "C",
|
||||||
|
["Shift"] = string.upper,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Timers configuration
|
||||||
|
local use_timers = true
|
||||||
|
local timeout = 2.0
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Keychain pretty-printing
|
||||||
|
|
||||||
|
function mod_to_string (mods, k)
|
||||||
|
local ret, k = "", k
|
||||||
|
for _, mod in ipairs (mods) do
|
||||||
|
if modfilter[mod] then
|
||||||
|
local t = type (modfilter[mod])
|
||||||
|
if t == "function" then
|
||||||
|
k = modfilter[mod](k)
|
||||||
|
elseif t == "string" then
|
||||||
|
ret = ret .. modfilter[mod] .. "-"
|
||||||
|
else
|
||||||
|
error ("Invalid modifier key filter: got a " .. t)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ret = ret .. mod .. "-"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ret, k
|
||||||
|
end
|
||||||
|
|
||||||
|
function ks_to_string (m, k)
|
||||||
|
local m, k = mod_to_string (m, k)
|
||||||
|
return m .. k
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Timer management
|
||||||
|
|
||||||
|
local function delete_timer_maybe (d)
|
||||||
|
if d.timer then -- stop and remove the timer
|
||||||
|
d.timer:remove_signal ("timeout", d.timer_function)
|
||||||
|
d.timer:stop ()
|
||||||
|
d.timer = nil
|
||||||
|
d.timer_expired = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function delayed_call_maybe (d, f)
|
||||||
|
if use_timers then
|
||||||
|
if not d.timer_expired and not d.timer then
|
||||||
|
-- create and start the timer
|
||||||
|
d.timer = timer ({ timeout = timeout })
|
||||||
|
d.timer_function = function () f (); delete_timer_maybe (d) end
|
||||||
|
d.timer:add_signal ("timeout", d.timer_function)
|
||||||
|
d.timer:start ()
|
||||||
|
d.timer_expired = false
|
||||||
|
elseif not d.timer_expired then
|
||||||
|
-- restart the timer...
|
||||||
|
|
||||||
|
-- XXX: What is the actual semantics of the call to `start' (ie,
|
||||||
|
-- does it restart the timer with the initial timeout)?
|
||||||
|
d.timer:stop ()
|
||||||
|
d.timer.timeout = timeout -- reset timeout
|
||||||
|
d.timer:start ()
|
||||||
|
end
|
||||||
|
else -- timers disabled
|
||||||
|
f () -- call the given function directly
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Infoline management
|
||||||
|
|
||||||
|
function dispose (w)
|
||||||
|
local d = data[w]
|
||||||
|
if d.bowl then -- if bowl was enabled... (should always be true...)
|
||||||
|
infoline.dispose (d.bowl)
|
||||||
|
d.bowl = nil
|
||||||
|
end
|
||||||
|
delete_timer_maybe (d)
|
||||||
|
data[w] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function append (w, m, k)
|
||||||
|
local d = data[w]
|
||||||
|
local pretty_ks = ks_to_string (m, k) .. " "
|
||||||
|
infoline.set_text (d.bowl, infoline.get_text (d.bowl) .. pretty_ks)
|
||||||
|
|
||||||
|
local function enable_bowl ()
|
||||||
|
-- XXX: is there a possible bad interleaving that could make
|
||||||
|
-- this function execute while the bowl has already been
|
||||||
|
-- disposed of? in which case the condition should be checked
|
||||||
|
-- first...
|
||||||
|
|
||||||
|
-- if d.bowl then
|
||||||
|
infoline.attach (d.bowl, w)
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
|
||||||
|
delayed_call_maybe (d, enable_bowl)
|
||||||
|
end
|
||||||
|
|
||||||
|
function create (w)
|
||||||
|
-- XXX: Note the prefix text could be customizable...
|
||||||
|
data[w] = { bowl = infoline.new (" ") }
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
|
||||||
|
--- Initializes the bowl module, with given properties; should be called before
|
||||||
|
--- ANY other function of this module.
|
||||||
|
-- Configurations fields include:
|
||||||
|
--
|
||||||
|
-- `use_timers', `timeout': A boolean defining whether bowls drawing should be
|
||||||
|
-- delayed, along with a number being this time shift, in seconds (Default
|
||||||
|
-- values are `true' and `2').
|
||||||
|
--
|
||||||
|
-- `modfilter': A table associating modifiers (Mod1, Mod4, Control, Shift, etc.)
|
||||||
|
-- with either a string (in this case it will replace the modifier when printed
|
||||||
|
-- in heplers) or functions (in this case the key string will be repaced by a
|
||||||
|
-- call to this function with the key string as parameter). Default value is:
|
||||||
|
-- { ["Mod1"] = "M", ["Mod4"] = "S", ["Control"] = "C", ["Shift"] =
|
||||||
|
-- string.upper }
|
||||||
|
--
|
||||||
|
-- @param c The table of properties.
|
||||||
|
function init (c)
|
||||||
|
local c = c or { }
|
||||||
|
modfilter = c.modfilter and c.modfilter or modfilter
|
||||||
|
if c.use_timers ~= nil then use_timers = c.use_timers end
|
||||||
|
if use_timers then
|
||||||
|
timeout = c.timeout ~= nil and c.timeout or timeout
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Setup signal listeners, that trigger appropriate functions for a default
|
||||||
|
--- behavior.
|
||||||
|
function default_setup ()
|
||||||
|
local function to_root (f) return function (...) f (root, ...) end end
|
||||||
|
client.add_signal ("keychain::enter", create)
|
||||||
|
client.add_signal ("keychain::append", append)
|
||||||
|
client.add_signal ("keychain::leave", dispose)
|
||||||
|
awesome.add_signal ("keychain::enter", to_root (create))
|
||||||
|
awesome.add_signal ("keychain::append", to_root (append))
|
||||||
|
awesome.add_signal ("keychain::leave", to_root (dispose))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Local variables:
|
||||||
|
-- indent-tabs-mode: nil
|
||||||
|
-- fill-column: 80
|
||||||
|
-- lua-indent-level: 4
|
||||||
|
-- End:
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
183
.config/awesome/infoline.lua
Normal file
183
.config/awesome/infoline.lua
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
-- -*- coding: utf-8 -*-
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- @author Nicolas Berthier <nberthier@gmail.com>
|
||||||
|
-- @copyright 2010 Nicolas Berthier
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
--
|
||||||
|
-- This is a module for defining infolines in awesome. An infoline is a wibox
|
||||||
|
-- attached to a region (typically, a client or the root window).
|
||||||
|
--
|
||||||
|
-- Remarks:
|
||||||
|
--
|
||||||
|
-- - It has not been tested with multiple screens yet.
|
||||||
|
--
|
||||||
|
-- Example usage: (TODO --- read the comments for now, there are not many
|
||||||
|
-- functions)
|
||||||
|
--
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--{{{ Grab environment (mostly aliases)
|
||||||
|
local setmetatable = setmetatable
|
||||||
|
local ipairs = ipairs
|
||||||
|
local type = type
|
||||||
|
local pairs = pairs
|
||||||
|
local string = string
|
||||||
|
local print = print
|
||||||
|
local error = error
|
||||||
|
local io = io
|
||||||
|
|
||||||
|
local client = client
|
||||||
|
local awesome = awesome
|
||||||
|
local wibox = wibox
|
||||||
|
local widget = widget
|
||||||
|
local root = root
|
||||||
|
local screen = screen
|
||||||
|
local mouse = mouse
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
module ("infoline")
|
||||||
|
|
||||||
|
-- Privata data: we use weak keys in order to allow collection of private data
|
||||||
|
-- if keys (clients) are collected (i.e., no longer used, after having been
|
||||||
|
-- killed for instance).
|
||||||
|
--
|
||||||
|
-- XXX: For now, we have at most one infoline per client, but it could be
|
||||||
|
-- interesting to create several types of infolines (identified by indexes to be
|
||||||
|
-- allocated by this module), and associated to, e.g., different configuration
|
||||||
|
-- flags and positioning routine...
|
||||||
|
local data = setmetatable ({}, { __mode = 'k' })
|
||||||
|
|
||||||
|
--{{{ Infoline positioning
|
||||||
|
|
||||||
|
-- XXX: this is a hack that positions an infoline at the bottom of a given area.
|
||||||
|
local function setup_position (wb, geom)
|
||||||
|
local b = wb:geometry ()
|
||||||
|
b.x = geom.x
|
||||||
|
b.width = geom.width
|
||||||
|
b.y = geom.y + geom.height - awesome.font_height
|
||||||
|
b.height = awesome.font_height
|
||||||
|
wb:geometry (b)
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Configurations:
|
||||||
|
|
||||||
|
-- When true, this flag indicates that an infoline is hidden if its attached
|
||||||
|
-- client loses its focus. Otherwise, it remains always visible.
|
||||||
|
follow_focus = true
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Infoline updates
|
||||||
|
|
||||||
|
function get_text (il) return il.wb.widgets[1].text end
|
||||||
|
function set_text (il, text) il.wb.widgets[1].text = text end
|
||||||
|
|
||||||
|
-- Forces a refresh of the given infoline.
|
||||||
|
function update (il)
|
||||||
|
local wb = il.wb
|
||||||
|
local c = il.cli
|
||||||
|
|
||||||
|
if il.enabled then
|
||||||
|
-- XXX: Note this could be much better if we had some sort of root and
|
||||||
|
-- client interface unification: the following involves a priori useless
|
||||||
|
-- code duplication...
|
||||||
|
if c == root then
|
||||||
|
wb.screen = mouse.screen -- XXX: is this the behavior we need?
|
||||||
|
wb.visible = true
|
||||||
|
setup_position (wb, screen[mouse.screen].workarea)
|
||||||
|
else
|
||||||
|
if c:isvisible () and (not follow_focus or client.focus == c) then
|
||||||
|
wb.screen = c.screen
|
||||||
|
wb.visible = true
|
||||||
|
setup_position (wb, c:geometry ())
|
||||||
|
else -- do we have to hide it?
|
||||||
|
wb.visible = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif wb.visible then --otherwise we need to hide it.
|
||||||
|
wb.visible = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function update_from_client (c)
|
||||||
|
-- Note that we may not have an infoline for this client, hence the
|
||||||
|
-- conditional...
|
||||||
|
if data[c] then update (data[c]) end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Force execution of the above function on client state modification.
|
||||||
|
client.add_signal ("focus", update_from_client)
|
||||||
|
client.add_signal ("unfocus", update_from_client)
|
||||||
|
client.add_signal ("unmanage", update_from_client)
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Infoline management
|
||||||
|
|
||||||
|
--- Creates a new infoline, with the given initial text. Note it is not visible
|
||||||
|
--- by default, and not attached to any client.
|
||||||
|
function new (text)
|
||||||
|
local il = {
|
||||||
|
wb = wibox ({
|
||||||
|
ontop = true, -- XXX: setting a depth when attaching to
|
||||||
|
--a client would be much better
|
||||||
|
widgets = {
|
||||||
|
widget ({ type = "textbox", align="left" })
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
-- these will remain false until the infoline is attached to a client.
|
||||||
|
il.wb.visible = false
|
||||||
|
il.enabled = false
|
||||||
|
set_text (il, text or "")
|
||||||
|
return il
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Attached infolines will react to the following client-related signals, and
|
||||||
|
-- automatically setup their position according to the client's geometry.
|
||||||
|
local csignals = { "property::geometry", "property::minimized",
|
||||||
|
"property::visible", "property::focus", "property::screen", }
|
||||||
|
|
||||||
|
-- Attaches an infoline to a client. Note the infoline becomes visible at that
|
||||||
|
-- time, if the client is currently visible (and if it has focus, when
|
||||||
|
-- `follow_focus' holds).
|
||||||
|
function attach (il, c)
|
||||||
|
data[c] = il
|
||||||
|
il.cli = c
|
||||||
|
il.enabled = true
|
||||||
|
update (il)
|
||||||
|
if c ~= root then
|
||||||
|
-- subscribe to client-related signals
|
||||||
|
for _, s in ipairs (csignals) do
|
||||||
|
c:add_signal (s, update_from_client)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Detach the given infoline from its client, if any.
|
||||||
|
function dispose (il)
|
||||||
|
local c = il.cli
|
||||||
|
if c then -- note c can be nil here, if the given infoline has not been
|
||||||
|
--attached to any client...
|
||||||
|
il.enabled = false
|
||||||
|
update (il) -- a shortcut here would be: `il.wb.visible = false'
|
||||||
|
data[c] = nil
|
||||||
|
if c ~= root then
|
||||||
|
-- unsubscribe from client-related signals
|
||||||
|
for _, s in ipairs (csignals) do
|
||||||
|
c:remove_signal (s, update_from_client)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
-- Local variables:
|
||||||
|
-- indent-tabs-mode: nil
|
||||||
|
-- fill-column: 80
|
||||||
|
-- lua-indent-level: 4
|
||||||
|
-- End:
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
334
.config/awesome/keychain.lua
Normal file
334
.config/awesome/keychain.lua
Normal file
|
@ -0,0 +1,334 @@
|
||||||
|
-- -*- coding: utf-8 -*-
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
-- @author Nicolas Berthier <nberthier@gmail.com>
|
||||||
|
-- @copyright 2010 Nicolas Berthier
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
--
|
||||||
|
-- This is a module for defining keychains à la emacs in awesome. I was also
|
||||||
|
-- inspired by ion3 behavior when designing it.
|
||||||
|
--
|
||||||
|
-- Remarks:
|
||||||
|
--
|
||||||
|
-- - This module does not handle `release' key bindings, but is it useful for
|
||||||
|
-- keychains?
|
||||||
|
--
|
||||||
|
-- - It has not been tested with multiple screens yet.
|
||||||
|
--
|
||||||
|
-- - There might (... must) be incompatibilities with the shifty module. Also,
|
||||||
|
-- defining global and per-client keychains with the same prefix is not
|
||||||
|
-- allowed (or leads to unspecified behaviors... --- in practice: the
|
||||||
|
-- per-client ones are ignored). However, I do think separation of per-client
|
||||||
|
-- and global keys is a bad idea if client keys do not have a higher priority
|
||||||
|
-- than the global ones...
|
||||||
|
--
|
||||||
|
-- Example usage: see `rc.lua' file.
|
||||||
|
--
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--{{{ Grab environment (mostly aliases)
|
||||||
|
local setmetatable = setmetatable
|
||||||
|
local ipairs = ipairs
|
||||||
|
local type = type
|
||||||
|
local pairs = pairs
|
||||||
|
local string = string
|
||||||
|
local print = print
|
||||||
|
local error = error
|
||||||
|
local io = io
|
||||||
|
|
||||||
|
local capi = capi
|
||||||
|
local client = client
|
||||||
|
local awesome = awesome
|
||||||
|
local root = root
|
||||||
|
|
||||||
|
local akey = require ("awful.key")
|
||||||
|
local join = awful.util.table.join
|
||||||
|
local clone = awful.util.table.clone
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
module ("keychain")
|
||||||
|
|
||||||
|
-- Privata data: we use weak keys in order to allow collection of private data
|
||||||
|
-- if keys (clients) are collected (i.e., no longer used, after having been
|
||||||
|
-- killed for instance)
|
||||||
|
local data = setmetatable ({}, { __mode = 'k' })
|
||||||
|
|
||||||
|
--{{{ Functional Tuples
|
||||||
|
-- see http://lua-users.org/wiki/FunctionalTuples for details
|
||||||
|
|
||||||
|
--- Creates a keystroke representation to fill the `escape' table configuration
|
||||||
|
--- property.
|
||||||
|
-- @param m Modifiers table.
|
||||||
|
-- @param k The key itself.
|
||||||
|
-- @return A keystroke representation (only for the escape sequence, for now?).
|
||||||
|
function keystroke (m, k)
|
||||||
|
if type (m) ~= "table" then
|
||||||
|
error ("Keystroke modifiers must be given a table (got a "..
|
||||||
|
type (m)..")")
|
||||||
|
end
|
||||||
|
if type (k) ~= "string" then
|
||||||
|
error ("Keystroke key must be given a string (got a "..
|
||||||
|
type (m)..")")
|
||||||
|
end
|
||||||
|
return function (fn) return fn (m, k) end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- keystroke accessors
|
||||||
|
local function ks_mod (_m, _k) return _m end
|
||||||
|
local function ks_key (_m, _k) return _k end
|
||||||
|
|
||||||
|
-- ---
|
||||||
|
|
||||||
|
--- Creates a final keychain binding to fill the keychain binding tables,
|
||||||
|
--- meaning that the given function will be executed at the end of the keychain.
|
||||||
|
-- @param m Modifiers table.
|
||||||
|
-- @param k The key.
|
||||||
|
-- @param cont The function to be bound to the given keys.
|
||||||
|
-- @return A "final" key binding.
|
||||||
|
function key (m, k, cont)
|
||||||
|
if type (cont) ~= "function" then
|
||||||
|
error ("Final binding must be given a function (got a "..
|
||||||
|
type (cont)..")")
|
||||||
|
end
|
||||||
|
return function (fn) return fn (keystroke (m, k), cont, true) end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Creates an intermediate (prefix) keychain binding.
|
||||||
|
-- @param m Modifiers table.
|
||||||
|
-- @param k The key.
|
||||||
|
-- @param sub The subchain description table to be bound to the given keys.
|
||||||
|
-- @return An "intermediate" key binding.
|
||||||
|
function subchain (m, k, sub)
|
||||||
|
if type (sub) ~= "table" then
|
||||||
|
error ("Subchain binding must be given a table (got a "..
|
||||||
|
type (sub)..")")
|
||||||
|
end
|
||||||
|
return function (fn) return fn (keystroke (m, k), sub, false) end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- key/subchain binding accessors
|
||||||
|
local function binding_ks (ks, cont, leaf) return ks end
|
||||||
|
local function binding_cont (ks, cont, leaf) return cont end
|
||||||
|
local function binding_leaf (ks, cont, leaf) return leaf end
|
||||||
|
|
||||||
|
--- Creates an intermediate keychain if sub is a table, or a final key binding
|
||||||
|
--- otherwise (and then sub must be a function).
|
||||||
|
-- @param m Modifiers table.
|
||||||
|
-- @param k The key.
|
||||||
|
-- @param sub Either the subchain description table, or the function, to be
|
||||||
|
-- bound to the given keys.
|
||||||
|
function sub (m, k, sub)
|
||||||
|
if type (sub) == "table" then
|
||||||
|
return subchain (m, k, sub)
|
||||||
|
else
|
||||||
|
return key (m, k, sub)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Default values
|
||||||
|
|
||||||
|
--- Default escape sequences (S-g is inspired by emacs...)
|
||||||
|
local escape_keystrokes = {
|
||||||
|
keystroke ( { }, "Escape" ),
|
||||||
|
keystroke ( { "Mod4" }, "g" ),
|
||||||
|
}
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Key table management facilities
|
||||||
|
|
||||||
|
local function set_keys (c, k)
|
||||||
|
if c == root then root.keys (k) else c:keys (k) end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function keys_of (c)
|
||||||
|
if c == root then return root.keys () else return c:keys () end
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Signal emission helper
|
||||||
|
|
||||||
|
local function notif (sig, w, ...)
|
||||||
|
if w ~= root then
|
||||||
|
client.emit_signal (sig, w, ...)
|
||||||
|
else -- we use global signals otherwise
|
||||||
|
awesome.emit_signal (sig, ...)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Client/Root-related state management
|
||||||
|
|
||||||
|
local function init_client_state_maybe (w)
|
||||||
|
if data[w] == nil then
|
||||||
|
local d = { }
|
||||||
|
d.keys = keys_of (w) -- save client keys
|
||||||
|
data[w] = d -- register client
|
||||||
|
notif ("keychain::enter", w)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function restore_client_state (c)
|
||||||
|
local w = c or root
|
||||||
|
local d = data[w]
|
||||||
|
-- XXX: Turns out that `d' can be nil already here, in case the keyboard has
|
||||||
|
-- been grabbed since the previous call to this funtion... (that also seems
|
||||||
|
-- to be called again upon release…)
|
||||||
|
if d then
|
||||||
|
set_keys (w, d.keys) -- restore client keys
|
||||||
|
data[w] = nil -- unregister client
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function leave (c)
|
||||||
|
local w = c or root
|
||||||
|
|
||||||
|
-- Destroy notifier structures if needed
|
||||||
|
if data[w] then -- XXX: necessary test?
|
||||||
|
notif ("keychain::leave", w)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- force disposal of resources when clients are killed
|
||||||
|
client.add_signal ("unmanage", leave)
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Key binding tree access helpers
|
||||||
|
|
||||||
|
local function make_on_entering (m, k, subchain) return
|
||||||
|
function (c)
|
||||||
|
local w = c or root
|
||||||
|
|
||||||
|
-- Register and initialize client state, if not already in a keychain
|
||||||
|
init_client_state_maybe (w)
|
||||||
|
|
||||||
|
-- Update notifier text, and trigger its drawing if necessary
|
||||||
|
notif ("keychain::append", w, m, k)
|
||||||
|
|
||||||
|
-- Setup subchain
|
||||||
|
set_keys (w, subchain)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_leaving (c)
|
||||||
|
-- Trigger disposal routine
|
||||||
|
leave (c)
|
||||||
|
|
||||||
|
-- Restore initial key mapping of client
|
||||||
|
restore_client_state (c)
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Configuration
|
||||||
|
|
||||||
|
-- Flag to detect late initialization error
|
||||||
|
local already_used = false
|
||||||
|
|
||||||
|
-- Escape binding table built once upon initialization
|
||||||
|
local escape_bindings = { }
|
||||||
|
|
||||||
|
--- Fills the escape bindings table with actual `awful.key' elements triggering
|
||||||
|
--- execution of `on_leaving'.
|
||||||
|
local function init_escape_bindings ()
|
||||||
|
escape_bindings = { }
|
||||||
|
for _, e in ipairs (escape_keystrokes) do
|
||||||
|
escape_bindings = join (escape_bindings,
|
||||||
|
akey (e (ks_mod), e (ks_key), on_leaving))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Call it once upon module loading to initialize escape_bindings (in case
|
||||||
|
-- `init' is not called).
|
||||||
|
init_escape_bindings ()
|
||||||
|
|
||||||
|
|
||||||
|
--- Initializes the keychain module, with given properties; to be called before
|
||||||
|
--- ANY other function of this module.
|
||||||
|
-- Configurations fields include:
|
||||||
|
--
|
||||||
|
-- `escapes': A table of keystrokes (@see keychain.keystroke) escaping keychains
|
||||||
|
-- (defaults are `Mod4-g' and `Escape').
|
||||||
|
--
|
||||||
|
-- @param c The table of properties.
|
||||||
|
function init (c)
|
||||||
|
local c = c or { }
|
||||||
|
|
||||||
|
if already_used then
|
||||||
|
-- heum... just signal the error: "print" or "error"?
|
||||||
|
return print ("E: keychain: Call to `init' AFTER having bound keys!")
|
||||||
|
end
|
||||||
|
|
||||||
|
escape_keystrokes = c.escapes and c.escapes or escape_keystrokes
|
||||||
|
|
||||||
|
-- Now, fill the escape bindings table again with actual `awful.key'
|
||||||
|
-- elements triggering `on_leaving' executions, in case escape keys has
|
||||||
|
-- changed.
|
||||||
|
init_escape_bindings ()
|
||||||
|
end
|
||||||
|
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
--{{{ Keychain creation
|
||||||
|
|
||||||
|
--- Creates a new keychain binding.
|
||||||
|
-- @param m Modifiers table.
|
||||||
|
-- @param k The key.
|
||||||
|
-- @param chains A table of keychains, describing either final bindings (see
|
||||||
|
-- key constructor) or subchains (see subchain constructor). If arg is not a
|
||||||
|
-- table, then `awful.key' is called directly with the arguments.
|
||||||
|
-- @return A key binding for the `awful.key' module.
|
||||||
|
-- @see awful.key
|
||||||
|
function new (m, k, chains)
|
||||||
|
|
||||||
|
-- If the argument is a function, then we need to return an actual awful.key
|
||||||
|
-- directly.
|
||||||
|
if type (chains) ~= "table" then
|
||||||
|
return akey (m, k, chains)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This table will contain the keys to be mapped upon <m, k> keystroke. It
|
||||||
|
-- initially contains the escape bindings, so that one can still rebind them
|
||||||
|
-- differently in `chains'.
|
||||||
|
local subchain = clone (escape_bindings)
|
||||||
|
|
||||||
|
already_used = true -- subsequent init avoidance flag...
|
||||||
|
|
||||||
|
-- For each entry of the given chains, add a corresponding `awful.key'
|
||||||
|
-- element in the subchain
|
||||||
|
for _, e in ipairs (chains) do
|
||||||
|
local ks = e (binding_ks)
|
||||||
|
if e (binding_leaf) then
|
||||||
|
-- We encountered a leaf in the chains.
|
||||||
|
local function on_leaf (c) on_leaving (c); e (binding_cont) (c) end
|
||||||
|
subchain = join (subchain, akey (ks (ks_mod), ks (ks_key), on_leaf))
|
||||||
|
else
|
||||||
|
-- Recursively call subchain creation. "Funny" detail: I think there
|
||||||
|
-- is no way of creating ill-structured keychain descriptors that
|
||||||
|
-- would produce infinite recursive calls here, since we control
|
||||||
|
-- their creation with functional tuples, that cannot lead to cyclic
|
||||||
|
-- structures...
|
||||||
|
local subch = new (ks (ks_mod), ks (ks_key), e (binding_cont))
|
||||||
|
subchain = join (subchain, subch)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Then return an actual `awful.key', triggering the `on_entering' routine
|
||||||
|
return akey (m, k, make_on_entering (m, k, subchain))
|
||||||
|
end
|
||||||
|
--}}}
|
||||||
|
|
||||||
|
-- Setup `__call' entry in module's metatable so that we can create new prefix
|
||||||
|
-- binding using `keychain (m, k, ...)' directly.
|
||||||
|
setmetatable (_M, { __call = function (_, ...) return new (...) end })
|
||||||
|
|
||||||
|
-- Local variables:
|
||||||
|
-- indent-tabs-mode: nil
|
||||||
|
-- fill-column: 80
|
||||||
|
-- lua-indent-level: 4
|
||||||
|
-- End:
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
533
.config/awesome/rc.lua
Normal file
533
.config/awesome/rc.lua
Normal file
|
@ -0,0 +1,533 @@
|
||||||
|
require("awful")
|
||||||
|
require("awful.autofocus")
|
||||||
|
require("awful.rules")
|
||||||
|
require("beautiful")
|
||||||
|
require("bowl")
|
||||||
|
require("keychain")
|
||||||
|
require("lfs")
|
||||||
|
require("naughty")
|
||||||
|
|
||||||
|
oni = { } -- Container for custom functions.
|
||||||
|
|
||||||
|
oni.maildirfmt = "/home/slash/documents/mail/%s/inbox/new/"
|
||||||
|
|
||||||
|
--- Error handling
|
||||||
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
|
-- another config (This code will only ever execute for the fallback config)
|
||||||
|
if awesome.startup_errors then
|
||||||
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
|
title = "Oops, there were errors during startup!",
|
||||||
|
text = awesome.startup_errors })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Handle runtime errors after startup
|
||||||
|
do
|
||||||
|
local in_error = false
|
||||||
|
awesome.add_signal("debug::error", function (err)
|
||||||
|
-- Make sure we don't go into an endless error loop
|
||||||
|
if in_error then return end
|
||||||
|
in_error = true
|
||||||
|
|
||||||
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
|
title = "Oops, an error happened!",
|
||||||
|
text = err })
|
||||||
|
in_error = false
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Functions
|
||||||
|
function oni.focus_raise(direction)
|
||||||
|
awful.client.focus.bydirection(direction)
|
||||||
|
if client.focus then client.focus:raise() end
|
||||||
|
end
|
||||||
|
|
||||||
|
function oni.mailcount(account)
|
||||||
|
local i = 0
|
||||||
|
local dir = string.format(oni.maildirfmt, account)
|
||||||
|
|
||||||
|
for file in lfs.dir(dir) do
|
||||||
|
if file ~= "." and file ~= ".." then
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
|
||||||
|
function oni.mailcount_text()
|
||||||
|
return string.format(" ryu: %d aet: %d gmail: %d 9f: %d --",
|
||||||
|
oni.mailcount("ryuslash.org"),
|
||||||
|
oni.mailcount("aethon"),
|
||||||
|
oni.mailcount("gmail"),
|
||||||
|
oni.mailcount("ninthfloor"))
|
||||||
|
end
|
||||||
|
|
||||||
|
function oni.mailcount_widgets(label, account, name)
|
||||||
|
widgets = {}
|
||||||
|
widgets.label = widget({ type = "textbox" })
|
||||||
|
widgets.label.text = string.format(" %s: ", label)
|
||||||
|
widgets.count = widget({ type = "textbox" })
|
||||||
|
widgets.count.text = string.format(" %d ", oni.mailcount(account))
|
||||||
|
widgets.count.bg = beautiful.bg_focus
|
||||||
|
widgets.count:buttons(
|
||||||
|
awful.util.table.join(
|
||||||
|
awful.button({ }, 1,
|
||||||
|
function (c)
|
||||||
|
awful.util.spawn("emacsclient -e '(oni:view-mail \"" .. name .. "\")'")
|
||||||
|
end)))
|
||||||
|
|
||||||
|
return widgets
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns true if all pairs in table1 are present in table2
|
||||||
|
function oni.match(table1, table2)
|
||||||
|
for k, v in pairs(table1) do
|
||||||
|
if table[k] ~= v and not table2[k]:find(v) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Spawns cmd if no client can be found matching properties
|
||||||
|
-- If such a client can be found, pop to first tag where it is
|
||||||
|
-- visible, and give it focus
|
||||||
|
function oni.run_or_raise(cmd, properties)
|
||||||
|
local clients = client.get()
|
||||||
|
local focused = awful.client.next(0)
|
||||||
|
local findex = 0
|
||||||
|
local matched_clients = { }
|
||||||
|
local n = 0
|
||||||
|
|
||||||
|
for i, c in pairs(clients) do
|
||||||
|
-- make an array of matched clients
|
||||||
|
if oni.match(properties, c) then
|
||||||
|
n = n + 1
|
||||||
|
matched_clients[n] = c
|
||||||
|
|
||||||
|
if n == focused then
|
||||||
|
findex = n
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if n > 0 then
|
||||||
|
local c = matched_clients[1]
|
||||||
|
|
||||||
|
-- if the focused window matched switch focus to next in list
|
||||||
|
if 0 < findex and findex < n then
|
||||||
|
c = matched_clients[findex + 1]
|
||||||
|
end
|
||||||
|
|
||||||
|
local ctags = c:tags()
|
||||||
|
|
||||||
|
if table.getn(ctags) == 0 then
|
||||||
|
-- ctags is empty, show client on current tag
|
||||||
|
local curtag = awful.tag.selected()
|
||||||
|
awful.client.movetotag(curtag, c)
|
||||||
|
else
|
||||||
|
-- Otherwise, pop to first tag client is visible on
|
||||||
|
awful.tag.viewonly(ctags[1])
|
||||||
|
end
|
||||||
|
|
||||||
|
-- And then focus the client
|
||||||
|
client.focus = c
|
||||||
|
c:raise()
|
||||||
|
awful.screen.focus(c.screen)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
awful.util.spawn(cmd)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- {{{ Variable definitions
|
||||||
|
-- Themes define colours, icons, and wallpapers
|
||||||
|
beautiful.init("/home/slash/.config/awesome/themes/custom/theme.lua")
|
||||||
|
|
||||||
|
bowl.init({ use_timers = true, timeout = 1 })
|
||||||
|
bowl.default_setup()
|
||||||
|
|
||||||
|
keychain.init({ escapes = {
|
||||||
|
keychain.keystroke ({ }, "Escape"),
|
||||||
|
keychain.keystroke ({ "Control", }, "g")
|
||||||
|
} })
|
||||||
|
|
||||||
|
-- This is used later as the default terminal and editor to run.
|
||||||
|
terminal = "urxvt"
|
||||||
|
editor = os.getenv("EDITOR") or "nano"
|
||||||
|
editor_cmd = terminal .. " -e " .. editor
|
||||||
|
|
||||||
|
-- Default modkey.
|
||||||
|
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
||||||
|
-- If you do not like this or do not have such a key,
|
||||||
|
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
||||||
|
-- However, you can use another modifier like Mod1, but it may interact with others.
|
||||||
|
modkey = "Mod4"
|
||||||
|
|
||||||
|
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||||
|
layouts =
|
||||||
|
{
|
||||||
|
awful.layout.suit.tile,
|
||||||
|
awful.layout.suit.tile.left,
|
||||||
|
awful.layout.suit.tile.bottom,
|
||||||
|
awful.layout.suit.tile.top,
|
||||||
|
awful.layout.suit.fair,
|
||||||
|
awful.layout.suit.fair.horizontal,
|
||||||
|
awful.layout.suit.max,
|
||||||
|
awful.layout.suit.max.fullscreen,
|
||||||
|
awful.layout.suit.magnifier,
|
||||||
|
awful.layout.suit.floating
|
||||||
|
}
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Tags
|
||||||
|
-- Define a tag table which hold all screen tags.
|
||||||
|
tags = {}
|
||||||
|
for s = 1, screen.count() do
|
||||||
|
-- Each screen has its own tag table.
|
||||||
|
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Menu
|
||||||
|
-- Create a laucher widget and a main menu
|
||||||
|
myawesomemenu = {
|
||||||
|
{ "manual", terminal .. " -e man awesome" },
|
||||||
|
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||||
|
{ "restart", awesome.restart },
|
||||||
|
{ "quit", awesome.quit }
|
||||||
|
}
|
||||||
|
|
||||||
|
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
|
||||||
|
{ "open terminal", terminal }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
|
||||||
|
menu = mymainmenu })
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Wibox
|
||||||
|
-- Create a textclock widget
|
||||||
|
mytextclock = awful.widget.textclock({ align = "right" })
|
||||||
|
|
||||||
|
-- Create a systray
|
||||||
|
mysystray = widget({ type = "systray" })
|
||||||
|
|
||||||
|
-- Create a mailbox widget
|
||||||
|
myryumailbox = oni.mailcount_widgets("ryu", "ryuslash.org", "ryuslash")
|
||||||
|
myaethonmailbox = oni.mailcount_widgets("aet", "aethon", "aethon")
|
||||||
|
mygmailmailbox = oni.mailcount_widgets("gmail", "gmail", "gmail")
|
||||||
|
my9fmailbox = oni.mailcount_widgets("9f", "ninthfloor", "ninthfloor")
|
||||||
|
|
||||||
|
mymailboxtimer = timer({ timeout = 60 })
|
||||||
|
mymailboxtimer:add_signal(
|
||||||
|
"timeout",
|
||||||
|
function ()
|
||||||
|
myryumailbox.count.text = string.format(" %d ", oni.mailcount("ryuslash.org"))
|
||||||
|
myaethonmailbox.count.text = string.format(" %d ", oni.mailcount("aethon"))
|
||||||
|
mygmailmailbox.count.text = string.format(" %d ", oni.mailcount("gmail"))
|
||||||
|
my9fmailbox.count.text = string.format(" %d ", oni.mailcount("ninthfloor"))
|
||||||
|
end)
|
||||||
|
mymailboxtimer:start()
|
||||||
|
|
||||||
|
-- Create a wibox for each screen and add it
|
||||||
|
mywibox = {}
|
||||||
|
mypromptbox = {}
|
||||||
|
mylayoutbox = {}
|
||||||
|
mytaglist = {}
|
||||||
|
mytaglist.buttons = awful.util.table.join(
|
||||||
|
awful.button({ }, 1, awful.tag.viewonly),
|
||||||
|
awful.button({ modkey }, 1, awful.client.movetotag),
|
||||||
|
awful.button({ }, 3, awful.tag.viewtoggle),
|
||||||
|
awful.button({ modkey }, 3, awful.client.toggletag),
|
||||||
|
awful.button({ }, 4, awful.tag.viewnext),
|
||||||
|
awful.button({ }, 5, awful.tag.viewprev)
|
||||||
|
)
|
||||||
|
mytasklist = {}
|
||||||
|
mytasklist.buttons = awful.util.table.join(
|
||||||
|
awful.button({ }, 1, function (c)
|
||||||
|
if c == client.focus then
|
||||||
|
c.minimized = true
|
||||||
|
else
|
||||||
|
if not c:isvisible() then
|
||||||
|
awful.tag.viewonly(c:tags()[1])
|
||||||
|
end
|
||||||
|
-- This will also un-minimize
|
||||||
|
-- the client, if needed
|
||||||
|
client.focus = c
|
||||||
|
c:raise()
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.button({ }, 3, function ()
|
||||||
|
if instance then
|
||||||
|
instance:hide()
|
||||||
|
instance = nil
|
||||||
|
else
|
||||||
|
instance = awful.menu.clients({ width=250 })
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.button({ }, 4, function ()
|
||||||
|
awful.client.focus.byidx(1)
|
||||||
|
if client.focus then client.focus:raise() end
|
||||||
|
end),
|
||||||
|
awful.button({ }, 5, function ()
|
||||||
|
awful.client.focus.byidx(-1)
|
||||||
|
if client.focus then client.focus:raise() end
|
||||||
|
end))
|
||||||
|
|
||||||
|
for s = 1, screen.count() do
|
||||||
|
-- Create a promptbox for each screen
|
||||||
|
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
|
||||||
|
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
||||||
|
-- We need one layoutbox per screen.
|
||||||
|
mylayoutbox[s] = awful.widget.layoutbox(s)
|
||||||
|
mylayoutbox[s]:buttons(awful.util.table.join(
|
||||||
|
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
|
||||||
|
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
|
||||||
|
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
|
||||||
|
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
|
||||||
|
-- Create a taglist widget
|
||||||
|
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
|
||||||
|
|
||||||
|
-- Create a tasklist widget
|
||||||
|
mytasklist[s] = awful.widget.tasklist(function(c)
|
||||||
|
return awful.widget.tasklist.label.currenttags(c, s)
|
||||||
|
end, mytasklist.buttons)
|
||||||
|
|
||||||
|
-- Create the wibox
|
||||||
|
mywibox[s] = awful.wibox({ position = "top", screen = s })
|
||||||
|
-- Add widgets to the wibox - order matters
|
||||||
|
mywibox[s].widgets = {
|
||||||
|
{
|
||||||
|
mylauncher,
|
||||||
|
mytaglist[s],
|
||||||
|
mypromptbox[s],
|
||||||
|
layout = awful.widget.layout.horizontal.leftright
|
||||||
|
},
|
||||||
|
mylayoutbox[s],
|
||||||
|
mytextclock,
|
||||||
|
s == 1 and mysystray or nil,
|
||||||
|
s == 1 and my9fmailbox.count or nil,
|
||||||
|
s == 1 and my9fmailbox.label or nil,
|
||||||
|
s == 1 and mygmailmailbox.count or nil,
|
||||||
|
s == 1 and mygmailmailbox.label or nil,
|
||||||
|
s == 1 and myaethonmailbox.count or nil,
|
||||||
|
s == 1 and myaethonmailbox.label or nil,
|
||||||
|
s == 1 and myryumailbox.count or nil,
|
||||||
|
s == 1 and myryumailbox.label or nil,
|
||||||
|
mytasklist[s],
|
||||||
|
layout = awful.widget.layout.horizontal.rightleft
|
||||||
|
}
|
||||||
|
end
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Mouse bindings
|
||||||
|
root.buttons(awful.util.table.join(
|
||||||
|
awful.button({ }, 3, function () mymainmenu:toggle() end),
|
||||||
|
awful.button({ }, 4, awful.tag.viewnext),
|
||||||
|
awful.button({ }, 5, awful.tag.viewprev)
|
||||||
|
))
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Key bindings
|
||||||
|
local bind = keychain
|
||||||
|
local sub = keychain.sub
|
||||||
|
globalkeys = awful.util.table.join(
|
||||||
|
bind({ "Control", }, "z",
|
||||||
|
{ sub({ }, "o",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.byidx(1)
|
||||||
|
if client.focus then client.focus:raise() end
|
||||||
|
end),
|
||||||
|
sub({ "Shift", }, "o",
|
||||||
|
function () awful.screen.focus_relative(1) end),
|
||||||
|
sub({ "Shift", }, "1",
|
||||||
|
function () mypromptbox[mouse.screen]:run() end),
|
||||||
|
sub({ }, "f", function () oni.focus_raise("right") end),
|
||||||
|
sub({ }, "b", function () oni.focus_raise("left") end),
|
||||||
|
sub({ }, "n", function () oni.focus_raise("down") end),
|
||||||
|
sub({ }, "p", function () oni.focus_raise("up") end),
|
||||||
|
sub({ }, "e",
|
||||||
|
function () oni.run_or_raise("emacsclient -c -a emacs",
|
||||||
|
{ class = "Emacs" }) end),
|
||||||
|
sub({ }, "c",
|
||||||
|
function () oni.run_or_raise("urxvt",
|
||||||
|
{ class = "URxvt" }) end),
|
||||||
|
sub({ }, "w",
|
||||||
|
function () oni.run_or_raise("conkeror",
|
||||||
|
{ class = "Conkeror" }) end) }),
|
||||||
|
awful.key({ "Control", "Mod1" }, "l",
|
||||||
|
function () awful.util.spawn("i3lock -c 000000") end),
|
||||||
|
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
||||||
|
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
||||||
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
||||||
|
|
||||||
|
awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end),
|
||||||
|
|
||||||
|
-- Layout manipulation
|
||||||
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
|
||||||
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
|
||||||
|
awful.key({ modkey, }, "Tab",
|
||||||
|
function ()
|
||||||
|
awful.client.focus.history.previous()
|
||||||
|
if client.focus then
|
||||||
|
client.focus:raise()
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
|
||||||
|
-- Standard program
|
||||||
|
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
||||||
|
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
||||||
|
awful.key({ modkey, "Shift" }, "q", awesome.quit),
|
||||||
|
|
||||||
|
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
||||||
|
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
|
||||||
|
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
|
||||||
|
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
|
||||||
|
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
|
||||||
|
|
||||||
|
awful.key({ modkey, "Control" }, "n", awful.client.restore),
|
||||||
|
|
||||||
|
-- Prompt
|
||||||
|
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "x",
|
||||||
|
function ()
|
||||||
|
awful.prompt.run({ prompt = "Run Lua code: " },
|
||||||
|
mypromptbox[mouse.screen].widget,
|
||||||
|
awful.util.eval, nil,
|
||||||
|
awful.util.getdir("cache") .. "/history_eval")
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
|
||||||
|
clientkeys = awful.util.table.join(
|
||||||
|
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
|
||||||
|
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
|
||||||
|
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
|
||||||
|
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
||||||
|
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
||||||
|
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
|
||||||
|
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
|
||||||
|
awful.key({ modkey, }, "n",
|
||||||
|
function (c)
|
||||||
|
-- The client currently has the input focus, so it cannot be
|
||||||
|
-- minimized, since minimized clients can't have the focus.
|
||||||
|
c.minimized = true
|
||||||
|
end),
|
||||||
|
awful.key({ modkey, }, "m",
|
||||||
|
function (c)
|
||||||
|
c.maximized_horizontal = not c.maximized_horizontal
|
||||||
|
c.maximized_vertical = not c.maximized_vertical
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Compute the maximum number of digit we need, limited to 9
|
||||||
|
keynumber = 0
|
||||||
|
for s = 1, screen.count() do
|
||||||
|
keynumber = math.min(9, math.max(#tags[s], keynumber));
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Bind all key numbers to tags.
|
||||||
|
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
||||||
|
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||||
|
for i = 1, keynumber do
|
||||||
|
globalkeys = awful.util.table.join(globalkeys,
|
||||||
|
awful.key({ modkey }, "#" .. i + 9,
|
||||||
|
function ()
|
||||||
|
local screen = mouse.screen
|
||||||
|
if tags[screen][i] then
|
||||||
|
awful.tag.viewonly(tags[screen][i])
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
||||||
|
function ()
|
||||||
|
local screen = mouse.screen
|
||||||
|
if tags[screen][i] then
|
||||||
|
awful.tag.viewtoggle(tags[screen][i])
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
||||||
|
function ()
|
||||||
|
if client.focus and tags[client.focus.screen][i] then
|
||||||
|
awful.client.movetotag(tags[client.focus.screen][i])
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||||
|
function ()
|
||||||
|
if client.focus and tags[client.focus.screen][i] then
|
||||||
|
awful.client.toggletag(tags[client.focus.screen][i])
|
||||||
|
end
|
||||||
|
end))
|
||||||
|
end
|
||||||
|
|
||||||
|
clientbuttons = awful.util.table.join(
|
||||||
|
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
||||||
|
awful.button({ modkey }, 1, awful.mouse.client.move),
|
||||||
|
awful.button({ modkey }, 3, awful.mouse.client.resize))
|
||||||
|
|
||||||
|
-- Set keys
|
||||||
|
root.keys(globalkeys)
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Rules
|
||||||
|
awful.rules.rules = {
|
||||||
|
-- All clients will match this rule.
|
||||||
|
{ rule = { },
|
||||||
|
properties = { border_width = beautiful.border_width,
|
||||||
|
border_color = beautiful.border_normal,
|
||||||
|
focus = true,
|
||||||
|
keys = clientkeys,
|
||||||
|
buttons = clientbuttons } },
|
||||||
|
{ rule = { class = "MPlayer" },
|
||||||
|
properties = { floating = true } },
|
||||||
|
{ rule = { class = "pinentry" },
|
||||||
|
properties = { floating = true } },
|
||||||
|
{ rule = { class = "gimp" },
|
||||||
|
properties = { floating = true } },
|
||||||
|
{ rule = { class = "Emacs" },
|
||||||
|
properties = { tag = tags[1][1] } },
|
||||||
|
-- Set Firefox to always map on tags number 2 of screen 1.
|
||||||
|
{ rule = { class = "Firefox" },
|
||||||
|
properties = { tag = tags[2][1] } },
|
||||||
|
{ rule = { class = "Conkeror" },
|
||||||
|
properties = { tag = tags[2][1] } },
|
||||||
|
{ rule = { class = "URxvt" },
|
||||||
|
properties = { tag = tags[2][1] } },
|
||||||
|
}
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Signals
|
||||||
|
-- Signal function to execute when a new client appears.
|
||||||
|
client.add_signal("manage", function (c, startup)
|
||||||
|
-- Add a titlebar
|
||||||
|
-- awful.titlebar.add(c, { modkey = modkey })
|
||||||
|
|
||||||
|
-- Enable sloppy focus
|
||||||
|
c:add_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.
|
||||||
|
-- awful.client.setslave(c)
|
||||||
|
|
||||||
|
-- Put windows in a smart way, only if they does not set an initial position.
|
||||||
|
if not c.size_hints.user_position and not c.size_hints.program_position then
|
||||||
|
awful.placement.no_overlap(c)
|
||||||
|
awful.placement.no_offscreen(c)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
|
client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
|
-- }}}
|
3
.config/awesome/themes/custom/README
Normal file
3
.config/awesome/themes/custom/README
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Background images:
|
||||||
|
Mikael Eriksson <mikael_eriksson@miffe.org>
|
||||||
|
Licensed under CC-BY-SA-3.0
|
96
.config/awesome/themes/custom/theme.lua
Normal file
96
.config/awesome/themes/custom/theme.lua
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
---------------------------
|
||||||
|
-- Default awesome theme --
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
theme = {}
|
||||||
|
|
||||||
|
theme.font = "osaka_unicode 10"
|
||||||
|
|
||||||
|
theme.bg_normal = "#222222"
|
||||||
|
theme.bg_focus = "#535d6c"
|
||||||
|
theme.bg_urgent = "#ff0000"
|
||||||
|
theme.bg_minimize = "#444444"
|
||||||
|
|
||||||
|
theme.fg_normal = "#aaaaaa"
|
||||||
|
theme.fg_focus = "#ffffff"
|
||||||
|
theme.fg_urgent = "#ffffff"
|
||||||
|
theme.fg_minimize = "#ffffff"
|
||||||
|
|
||||||
|
theme.border_width = "1"
|
||||||
|
theme.border_normal = "#000000"
|
||||||
|
theme.border_focus = "#535d6c"
|
||||||
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
|
-- There are other variable sets
|
||||||
|
-- overriding the default one when
|
||||||
|
-- defined, the sets are:
|
||||||
|
-- [taglist|tasklist]_[bg|fg]_[focus|urgent]
|
||||||
|
-- titlebar_[bg|fg]_[normal|focus]
|
||||||
|
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
|
||||||
|
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
|
||||||
|
-- Example:
|
||||||
|
--theme.taglist_bg_focus = "#ff0000"
|
||||||
|
|
||||||
|
-- Display the taglist squares
|
||||||
|
theme.taglist_squares_sel = "/home/slash/.config/awesome/themes/custom/taglist/squarefw.png"
|
||||||
|
theme.taglist_squares_unsel = "/home/slash/.config/awesome/themes/custom/taglist/squarew.png"
|
||||||
|
|
||||||
|
theme.tasklist_floating_icon = "/home/slash/.config/awesome/themes/custom/tasklist/floatingw.png"
|
||||||
|
|
||||||
|
-- Variables set for theming the menu:
|
||||||
|
-- menu_[bg|fg]_[normal|focus]
|
||||||
|
-- menu_[border_color|border_width]
|
||||||
|
theme.menu_submenu_icon = "/home/slash/.config/awesome/themes/custom/submenu.png"
|
||||||
|
theme.menu_height = "15"
|
||||||
|
theme.menu_width = "100"
|
||||||
|
|
||||||
|
-- You can add as many variables as
|
||||||
|
-- you wish and access them by using
|
||||||
|
-- beautiful.variable in your rc.lua
|
||||||
|
--theme.bg_widget = "#cc0000"
|
||||||
|
|
||||||
|
-- Define the image to load
|
||||||
|
theme.titlebar_close_button_normal = "/home/slash/.config/awesome/themes/custom/titlebar/close_normal.png"
|
||||||
|
theme.titlebar_close_button_focus = "/home/slash/.config/awesome/themes/custom/titlebar/close_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_ontop_button_normal_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/ontop_normal_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_focus_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/ontop_focus_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_normal_active = "/home/slash/.config/awesome/themes/custom/titlebar/ontop_normal_active.png"
|
||||||
|
theme.titlebar_ontop_button_focus_active = "/home/slash/.config/awesome/themes/custom/titlebar/ontop_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_sticky_button_normal_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/sticky_normal_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_focus_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/sticky_focus_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_normal_active = "/home/slash/.config/awesome/themes/custom/titlebar/sticky_normal_active.png"
|
||||||
|
theme.titlebar_sticky_button_focus_active = "/home/slash/.config/awesome/themes/custom/titlebar/sticky_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_floating_button_normal_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/floating_normal_inactive.png"
|
||||||
|
theme.titlebar_floating_button_focus_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/floating_focus_inactive.png"
|
||||||
|
theme.titlebar_floating_button_normal_active = "/home/slash/.config/awesome/themes/custom/titlebar/floating_normal_active.png"
|
||||||
|
theme.titlebar_floating_button_focus_active = "/home/slash/.config/awesome/themes/custom/titlebar/floating_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_maximized_button_normal_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/maximized_normal_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_focus_inactive = "/home/slash/.config/awesome/themes/custom/titlebar/maximized_focus_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_normal_active = "/home/slash/.config/awesome/themes/custom/titlebar/maximized_normal_active.png"
|
||||||
|
theme.titlebar_maximized_button_focus_active = "/home/slash/.config/awesome/themes/custom/titlebar/maximized_focus_active.png"
|
||||||
|
|
||||||
|
-- You can use your own command to set your wallpaper
|
||||||
|
theme.wallpaper_cmd = { "awsetbg -u hsetroot /home/slash/pictures/wallpapers/3600x1080/wallpaper-1085607.jpg" }
|
||||||
|
|
||||||
|
-- You can use your own layout icons like this:
|
||||||
|
theme.layout_fairh = "/home/slash/.config/awesome/themes/custom/layouts/fairhw.png"
|
||||||
|
theme.layout_fairv = "/home/slash/.config/awesome/themes/custom/layouts/fairvw.png"
|
||||||
|
theme.layout_floating = "/home/slash/.config/awesome/themes/custom/layouts/floatingw.png"
|
||||||
|
theme.layout_magnifier = "/home/slash/.config/awesome/themes/custom/layouts/magnifierw.png"
|
||||||
|
theme.layout_max = "/home/slash/.config/awesome/themes/custom/layouts/maxw.png"
|
||||||
|
theme.layout_fullscreen = "/home/slash/.config/awesome/themes/custom/layouts/fullscreenw.png"
|
||||||
|
theme.layout_tilebottom = "/home/slash/.config/awesome/themes/custom/layouts/tilebottomw.png"
|
||||||
|
theme.layout_tileleft = "/home/slash/.config/awesome/themes/custom/layouts/tileleftw.png"
|
||||||
|
theme.layout_tile = "/home/slash/.config/awesome/themes/custom/layouts/tilew.png"
|
||||||
|
theme.layout_tiletop = "/home/slash/.config/awesome/themes/custom/layouts/tiletopw.png"
|
||||||
|
theme.layout_spiral = "/home/slash/.config/awesome/themes/custom/layouts/spiralw.png"
|
||||||
|
theme.layout_dwindle = "/home/slash/.config/awesome/themes/custom/layouts/dwindlew.png"
|
||||||
|
|
||||||
|
theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png"
|
||||||
|
|
||||||
|
return theme
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
|
@ -1,49 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
function hc () {
|
|
||||||
herbstclient $@
|
|
||||||
}
|
|
||||||
|
|
||||||
modkey="Mod4"
|
|
||||||
|
|
||||||
# Looks
|
|
||||||
hc set frame_bg_normal_color "#0c191c"
|
|
||||||
hc set frame_bg_active_color "#000000"
|
|
||||||
hc set frame_border_width 0
|
|
||||||
hc set window_border_width 1
|
|
||||||
hc set window_border_normal_color "#15abc3"
|
|
||||||
hc set window_border_active_color "#e0c625"
|
|
||||||
hc set focus_stealing_prevention 0
|
|
||||||
hc set swap_monitors_to_get_tag 0
|
|
||||||
|
|
||||||
# Layout
|
|
||||||
hc set default_frame_layout 2
|
|
||||||
hc set_layout max
|
|
||||||
|
|
||||||
# Keys
|
|
||||||
#hc keybind $modkey-t spawn ~/bin/hlwm/capture-todo
|
|
||||||
#hc keybind $modkey-Shift-t spawn ~/bin/hlwm/show-todo
|
|
||||||
|
|
||||||
# Mouse
|
|
||||||
hc mousebind $modkey-Button1 move
|
|
||||||
hc mousebind $modkey-Button2 resize
|
|
||||||
hc mousebind $modkey-Button3 zoom
|
|
||||||
|
|
||||||
# Rules
|
|
||||||
hc unrule -F
|
|
||||||
hc rule focus=on
|
|
||||||
hc rule windowtype=_NET_WM_WINDOW_TYPE_DIALOG focus=on pseudotile=on
|
|
||||||
hc rule class=Xephyr pseudotile=on
|
|
||||||
hc rule instance=Xine\ Window pseudotile=on
|
|
||||||
|
|
||||||
xbindkeys
|
|
||||||
|
|
||||||
# Panel
|
|
||||||
~/.config/herbstluftwm/panel.sh &
|
|
||||||
|
|
||||||
# Prep default
|
|
||||||
hc load default "(split horizontal:0.550000:0 (split vertical:0.850000:0 (split horizontal:0.180000:1 (clients max:0) (clients max:0 0x140001a)) (clients max:0)) (clients max:0 0xc00077))"
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# eval: (git-auto-commit-mode 1)
|
|
||||||
# End:
|
|
|
@ -1,150 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
monitor=${1:-0}
|
|
||||||
monitor2=1
|
|
||||||
geometry=( $(herbstclient monitor_rect "$monitor") )
|
|
||||||
if [ -z "$geometry" ] ;then
|
|
||||||
echo "Invalid monitor $monitor"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# geometry has the format: WxH+X+Y
|
|
||||||
x=${geometry[0]}
|
|
||||||
width=${geometry[2]}
|
|
||||||
height=12
|
|
||||||
y=0 #$(expr ${geometry[3]} - $height)
|
|
||||||
tag_width=40
|
|
||||||
font="-misc-tamsyn-medium-r-normal-*-14-*-*-*-*-*-iso8859-*"
|
|
||||||
|
|
||||||
selcolor='#24c6e0'
|
|
||||||
locolor='#657b83'
|
|
||||||
bgcolor='#002b36'
|
|
||||||
hicolor="#808080"
|
|
||||||
urcolor="#e0c625"
|
|
||||||
|
|
||||||
function uniq_linebuffered() {
|
|
||||||
awk '$0 != l { print ; l=$0 ; fflush(); }' "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_tags() {
|
|
||||||
# draw tags
|
|
||||||
echo -n "$separator"
|
|
||||||
for i in "${TAGS[@]}" ; do
|
|
||||||
if [[ "${TAGS2[@]}" == *"#${i:1}"* ]]; then
|
|
||||||
echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()"
|
|
||||||
elif [[ "${TAGS2[@]}" == *"+${i:1}"* ]]; then
|
|
||||||
echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()"
|
|
||||||
else
|
|
||||||
case ${i:0:1} in
|
|
||||||
'#')
|
|
||||||
echo -n "^bg($selcolor)^fg(#000000) ${i:1} ^fg()^bg()"
|
|
||||||
;;
|
|
||||||
'+')
|
|
||||||
echo -n "^bg($locolor)^fg(#000000) ${i:1} ^fg()^bg()"
|
|
||||||
;;
|
|
||||||
':')
|
|
||||||
echo -n "^bg($hicolor)^fg(#000000) ${i:1} ^fg()^bg()"
|
|
||||||
;;
|
|
||||||
'!')
|
|
||||||
echo -n "^bg($urcolor)^fg(#000000) ${i:1} ^fg()^bg()"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo -n "^bg($bgcolor)^fg(#ffffff) ${i:1} ^fg()^bg()"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
echo -n "$separator"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_mailboxes() {
|
|
||||||
declare -A mailnames
|
|
||||||
mailboxes=(ninthfloor gmail aethon ryuslash.org)
|
|
||||||
mailnames=(
|
|
||||||
[ninthfloor]="9f"
|
|
||||||
[gmail]="gm"
|
|
||||||
[aethon]="aet"
|
|
||||||
[ryuslash.org]="ryu")
|
|
||||||
mailtxt=""
|
|
||||||
for j in "${mailboxes[@]}"; do
|
|
||||||
mailfile="$HOME/documents/mail/$j/inbox/new/"
|
|
||||||
mailcnt=$(ls $mailfile | wc -l)
|
|
||||||
|
|
||||||
if [ $mailcnt -gt 0 ]; then
|
|
||||||
mailsha1=$(echo $j | sha1sum)
|
|
||||||
mailcolor="#${mailsha1:0:6}"
|
|
||||||
else
|
|
||||||
mailcolor=$bgcolor
|
|
||||||
fi
|
|
||||||
|
|
||||||
mailtxt="$mailtxt${separator}^bg($mailcolor)^fg(#ffffff) ${mailnames[$j]} ^fg()^bg()"
|
|
||||||
done
|
|
||||||
mailtxt_only=$(echo -n "$mailtxt" | sed 's.\^[^(]*([^)]*)..g')
|
|
||||||
let mailtxt_width=$(textwidth "$font" "$mailtxt_only")+10
|
|
||||||
echo -n "^p(_RIGHT)^p(-$mailtxt_width)$mailtxt"
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_services() {
|
|
||||||
services=(emacs dunst xbindkeys sshd)
|
|
||||||
servicetxt=""
|
|
||||||
for j in "${services[@]}"; do
|
|
||||||
servicetxt="$servicetxt$separator$(status $j)"
|
|
||||||
done
|
|
||||||
servicetxt_only=$(echo -n "$servicetxt" | sed 's.\^[^(]*([^)]*)..g')
|
|
||||||
let servicetxt_width=($(textwidth "$font" "$servicetxt_only")+7)/2
|
|
||||||
|
|
||||||
echo -n "^p(_CENTER)^p(-$servicetxt_width)$servicetxt"
|
|
||||||
}
|
|
||||||
|
|
||||||
function status()
|
|
||||||
{
|
|
||||||
running=$(${1}_running 2>/dev/null || pidof $1)
|
|
||||||
|
|
||||||
if [ -n "$running" ]; then
|
|
||||||
color="darkgreen"
|
|
||||||
else
|
|
||||||
color="darkred"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "^bg($color)^fg(#ffffff) $1 ^fg()^bg()"
|
|
||||||
}
|
|
||||||
|
|
||||||
function emacs_running()
|
|
||||||
{
|
|
||||||
ps ax | awk '{ print $5 " " $6 }' | grep -E "^emacs --daemon"
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
childpid=$!
|
|
||||||
herbstclient --idle
|
|
||||||
kill $childpid
|
|
||||||
} 2> /dev/null | {
|
|
||||||
TAGS=( $(herbstclient tag_status $monitor) )
|
|
||||||
TAGS2=( $(herbstclient tag_status $monitor2) )
|
|
||||||
|
|
||||||
separator="^fg($bgcolor)^ro(1x$height)^fg()"
|
|
||||||
print_tags
|
|
||||||
print_services
|
|
||||||
print_mailboxes
|
|
||||||
|
|
||||||
echo
|
|
||||||
# wait for next event
|
|
||||||
read line || break
|
|
||||||
cmd=( $line )
|
|
||||||
# find out event origin
|
|
||||||
case "${cmd[0]}" in
|
|
||||||
tag*)
|
|
||||||
TAGS=( $(herbstclient tag_status $monitor) )
|
|
||||||
TAGS2=( $(herbstclient tag_status $monitor2) )
|
|
||||||
;;
|
|
||||||
quit_panel)
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sleep 1s
|
|
||||||
} 2> /dev/null | dzen2 -w $width -x $x -y $y -fn "$font" -h $height \
|
|
||||||
-ta l -bg "$bgcolor"
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# eval: (git-auto-commit-mode 1)
|
|
||||||
# End:
|
|
|
@ -1,28 +0,0 @@
|
||||||
# -*- eval: (git-auto-commit-mode 1) -*-
|
|
||||||
auto-reload yes
|
|
||||||
browser firefox
|
|
||||||
confirm-exit yes
|
|
||||||
feedlist-format "%-35t %?d?- %-35d&? %> %u"
|
|
||||||
max-items 500
|
|
||||||
notify-program notify-send
|
|
||||||
notify-beep yes
|
|
||||||
reload-threads 3
|
|
||||||
reload-time 60
|
|
||||||
show-read-feeds no
|
|
||||||
show-read-articles no
|
|
||||||
articlelist-format "%-4i %f %t"
|
|
||||||
feedlist-title-format "%N %V %> %u feeds with new articles"
|
|
||||||
articlelist-title-format "%T"
|
|
||||||
article-sort-order date-desc
|
|
||||||
html-renderer "w3m -dump -T text/HTML -cols 80"
|
|
||||||
text-width 80
|
|
||||||
|
|
||||||
# colors
|
|
||||||
color listfocus default color0 bold
|
|
||||||
color info color0 white
|
|
||||||
|
|
||||||
# highlight
|
|
||||||
highlight article "^(Feed|Title|Author|Link|Date):.*" green default bold
|
|
||||||
|
|
||||||
# keys
|
|
||||||
bind-key i prev-dialog
|
|
|
@ -1,88 +1,118 @@
|
||||||
# -*- mode: conf; eval: (git-auto-commit-mode 1) -*-
|
# -*- mode: conf; eval: (git-auto-commit-mode 1) -*-
|
||||||
http://ryuslash.ninth.su/blog/blog.xml
|
http://ryuslash.ninth.su/blog/blog.xml
|
||||||
#-----[ Followed projects ]-------------------------------------------
|
#-----[ Followed projects ]-------------------------------------------
|
||||||
https://github.com/ryuslash.private.atom?token=7362ca0604736cd92b5441949e8c9cd4
|
# https://github.com/ryuslash.private.atom?token=7362ca0604736cd92b5441949e8c9cd4
|
||||||
http://gitorious.org/~ryuslash/watchlist.atom
|
# http://gitorious.org/~ryuslash/watchlist.atom
|
||||||
http://www.reddit.com/new/.rss?feed=e0f54f127ad350b1793609fd9428d4b525818d15&user=ryuslash
|
|
||||||
|
|
||||||
#-----[ Blogs ]-------------------------------------------------------
|
#-----[ Blogs ]-------------------------------------------------------
|
||||||
http://julien.danjou.info/blog/index.xml blogs
|
# http://julien.danjou.info/blog/index.xml blogs
|
||||||
http://kakaroto.homelinux.net/feed/ blogs
|
# http://kakaroto.homelinux.net/feed/ blogs
|
||||||
http://awhan.wordpress.com/feed/ blogs
|
# http://awhan.wordpress.com/feed/ blogs
|
||||||
http://beej.us/blog/feed/ blogs
|
http://beej.us/blog/feed/ blogs
|
||||||
http://torvalds-family.blogspot.com/feeds/posts/default blogs
|
# http://torvalds-family.blogspot.com/feeds/posts/default blogs
|
||||||
http://emacs.wordpress.com/feed/ blogs
|
# http://emacs.wordpress.com/feed/ blogs
|
||||||
http://feedproxy.google.com/SaferCode blogs
|
http://feedproxy.google.com/SaferCode blogs
|
||||||
http://blog.gitorious.org/feed/ blogs
|
# http://blog.gitorious.org/feed/ blogs
|
||||||
http://dieter.plaetinck.be/index.rss blogs
|
# http://dieter.plaetinck.be/index.rss blogs
|
||||||
http://irreal.org/blog/?feed=rss2
|
http://irreal.org/blog/?feed=rss2
|
||||||
|
|
||||||
|
# Reddit
|
||||||
|
|
||||||
|
# http://www.reddit.com/r/announcements/new/.rss
|
||||||
|
# http://www.reddit.com/r/archlinux/new/.rss
|
||||||
|
# http://www.reddit.com/r/blog/new/.rss
|
||||||
|
# http://www.reddit.com/r/c_language/new/.rss
|
||||||
|
# http://www.reddit.com/r/C_Programming/new/.rss
|
||||||
|
# http://www.reddit.com/r/coding/new/.rss
|
||||||
|
# http://www.reddit.com/r/commandline/new/.rss
|
||||||
|
# http://www.reddit.com/r/cpp/new/.rss
|
||||||
|
# http://www.reddit.com/r/csharp/new/.rss
|
||||||
|
# http://www.reddit.com/r/django/new/.rss
|
||||||
|
# http://www.reddit.com/r/emacs/new/.rss
|
||||||
|
# http://www.reddit.com/r/ExpertProgramming/new/.rss
|
||||||
|
# http://www.reddit.com/r/Fedora/new/.rss
|
||||||
|
# http://www.reddit.com/r/git/new/.rss
|
||||||
|
# http://www.reddit.com/r/golang/new/.rss
|
||||||
|
# http://www.reddit.com/r/javascript/new/.rss
|
||||||
|
# http://www.reddit.com/r/linux/new/.rss
|
||||||
|
# http://www.reddit.com/r/linux_gaming/new/.rss
|
||||||
|
# http://www.reddit.com/r/LinuxHacking/new/.rss
|
||||||
|
# http://www.reddit.com/r/maemo/new/.rss
|
||||||
|
# http://www.reddit.com/r/n900/new/.rss
|
||||||
|
# http://www.reddit.com/r/opensource/new/.rss
|
||||||
|
# http://www.reddit.com/r/PHP/new/.rss
|
||||||
|
# http://www.reddit.com/r/programming/new/.rss
|
||||||
|
# http://www.reddit.com/r/Python/new/.rss
|
||||||
|
# http://www.reddit.com/r/scheme/new/.rss
|
||||||
|
# http://www.reddit.com/r/systems/new/.rss
|
||||||
|
# http://www.reddit.com/r/wayland/new/.rss
|
||||||
|
|
||||||
#-----[ CVS Changes ]-------------------------------------------------
|
#-----[ CVS Changes ]-------------------------------------------------
|
||||||
http://git.naquadah.org/?p=naquadah-theme.git;a=rss cvs
|
# http://git.naquadah.org/?p=naquadah-theme.git;a=rss cvs
|
||||||
#http://git.naquadah.org/?p=rainbow.git;a=rss cvs
|
#http://git.naquadah.org/?p=rainbow.git;a=rss cvs
|
||||||
http://code.google.com/feeds/p/autopair/svnchanges/basic cvs
|
# http://code.google.com/feeds/p/autopair/svnchanges/basic cvs
|
||||||
http://git.cs.fau.de/?p=re06huxa/herbstluftwm;a=atom cvs
|
# http://git.cs.fau.de/?p=re06huxa/herbstluftwm;a=atom cvs
|
||||||
https://github.com/knopwob/dunst/commits/master.atom cvs
|
# https://github.com/knopwob/dunst/commits/master.atom cvs
|
||||||
https://github.com/akrennmair/newsbeuter/commits/master.atom
|
# https://github.com/akrennmair/newsbeuter/commits/master.atom
|
||||||
http://repo.or.cz/w/conkeror.git/atom
|
# http://repo.or.cz/w/conkeror.git/atom
|
||||||
https://github.com/mooz/keysnail/commits/master.atom
|
# https://github.com/mooz/keysnail/commits/master.atom
|
||||||
|
|
||||||
#-----[ Programming ]-------------------------------------------------
|
#-----[ Programming ]-------------------------------------------------
|
||||||
# http://www.reddit.com/r/cpp/.rss devel
|
# http://www.reddit.com/r/cpp/.rss devel
|
||||||
http://services.devx.com/outgoing/devxfeed.xml devel
|
# http://services.devx.com/outgoing/devxfeed.xml devel
|
||||||
#http://www.dzone.com/feed/frontpage/rss.xml devel
|
#http://www.dzone.com/feed/frontpage/rss.xml devel
|
||||||
# http://www.reddit.com/r/ExpertProgramming/.rss devel
|
# http://www.reddit.com/r/ExpertProgramming/.rss devel
|
||||||
# http://www.reddit.com/r/programming/.rss devel
|
# http://www.reddit.com/r/programming/.rss devel
|
||||||
http://steve-yegge.blogspot.com/feeds/posts/default devel
|
# http://steve-yegge.blogspot.com/feeds/posts/default devel
|
||||||
# http://www.reddit.com/r/systems/.rss devel
|
# http://www.reddit.com/r/systems/.rss devel
|
||||||
# http://www.reddit.com/r/coding/.rss devel
|
# http://www.reddit.com/r/coding/.rss devel
|
||||||
# http://www.reddit.com/r/git/.rss devel
|
# http://www.reddit.com/r/git/.rss devel
|
||||||
# http://www.reddit.com/r/C_Programming/.rss devel
|
# http://www.reddit.com/r/C_Programming/.rss devel
|
||||||
http://feeds.feedburner.com/FalloutTutorials devel
|
# http://feeds.feedburner.com/FalloutTutorials devel
|
||||||
http://www.devarticles.com/rss.xml devel
|
# http://www.devarticles.com/rss.xml devel
|
||||||
http://www.script-tutorials.com/feed/rss/
|
# http://www.script-tutorials.com/feed/rss/
|
||||||
http://news.ycombinator.com/rss
|
# http://news.ycombinator.com/rss
|
||||||
https://www.djangoproject.com/rss/community/q-and-a/
|
# https://www.djangoproject.com/rss/community/q-and-a/
|
||||||
|
|
||||||
#-----[ Linux and FLOSS ]---------------------------------------------
|
#-----[ Linux and FLOSS ]---------------------------------------------
|
||||||
# http://www.reddit.com/r/commandline/.rss linux
|
# http://www.reddit.com/r/commandline/.rss linux
|
||||||
http://www.desktoplinux.com/backend/headlines.rss linux
|
# http://www.desktoplinux.com/backend/headlines.rss linux
|
||||||
http://distrowatch.com/news/dw.xml linux
|
# http://distrowatch.com/news/dw.xml linux
|
||||||
http://www.howtoforge.com/node/feed linux
|
# http://www.howtoforge.com/node/feed linux
|
||||||
http://www.ibm.com/developerworks/views/linux/rss/libraryview.jsp?type_by=Articles linux
|
# http://www.ibm.com/developerworks/views/linux/rss/libraryview.jsp?type_by=Articles linux
|
||||||
http://www.ibm.com/developerworks/views/linux/rss/libraryview.jsp?type_by=Tutorials linux
|
# http://www.ibm.com/developerworks/views/linux/rss/libraryview.jsp?type_by=Tutorials linux
|
||||||
http://feeds.feedburner.com/LinuxMagazine linux
|
# http://feeds.feedburner.com/LinuxMagazine linux
|
||||||
http://www.linuxprogrammingblog.com/rss.xml linux
|
# http://www.linuxprogrammingblog.com/rss.xml linux
|
||||||
http://linuxtoday.com/backend/biglt.rss linux
|
# http://linuxtoday.com/backend/biglt.rss linux
|
||||||
http://www.linux.com/rss/feeds.php linux
|
# http://www.linux.com/rss/feeds.php linux
|
||||||
http://www.linuxinsider.com/perl/syndication/rssfull.pl linux
|
# http://www.linuxinsider.com/perl/syndication/rssfull.pl linux
|
||||||
http://lwn.net/headlines/newrss linux
|
# http://lwn.net/headlines/newrss linux
|
||||||
http://blogs.zdnet.com/open-source/wp-rss2.php linux
|
# http://blogs.zdnet.com/open-source/wp-rss2.php linux
|
||||||
http://ostatic.com/blog/feed linux
|
# http://ostatic.com/blog/feed linux
|
||||||
# http://www.reddit.com/r/linux/.rss linux
|
# http://www.reddit.com/r/linux/.rss linux
|
||||||
http://www.theopenforce.com/atom.xml linux
|
# http://www.theopenforce.com/atom.xml linux
|
||||||
http://www.ubuntugeek.com/feed/ linux
|
# http://www.ubuntugeek.com/feed/ linux
|
||||||
http://www.warpedsystems.sk.ca/backend/index.xml linux
|
# http://www.warpedsystems.sk.ca/backend/index.xml linux
|
||||||
# http://www.reddit.com/r/archlinux/.rss linux
|
# http://www.reddit.com/r/archlinux/.rss linux
|
||||||
# http://www.reddit.com/r/linuxquestions/.rss linux
|
# http://www.reddit.com/r/linuxquestions/.rss linux
|
||||||
http://www.echolinux.com/rss
|
http://www.echolinux.com/rss
|
||||||
http://www.tuxradar.com/rss
|
# http://www.tuxradar.com/rss
|
||||||
|
|
||||||
#-----[ Emacs ]-------------------------------------------------------
|
#-----[ Emacs ]-------------------------------------------------------
|
||||||
http://wordpress.com/tag/emacs/feed/ emacs
|
# http://wordpress.com/tag/emacs/feed/ emacs
|
||||||
# http://www.reddit.com/r/emacs/.rss emacs
|
# http://www.reddit.com/r/emacs/.rss emacs
|
||||||
http://planet.emacsen.org/atom.xml emacs
|
# http://planet.emacsen.org/atom.xml emacs
|
||||||
http://emacsblog.org/feed/ emacs
|
# http://emacsblog.org/feed/ emacs
|
||||||
http://www.emacswiki.org/emacs?action=rss emacs
|
# http://www.emacswiki.org/emacs?action=rss emacs
|
||||||
http://feeds.feedburner.com/XahsEmacsBlog
|
# http://feeds.feedburner.com/XahsEmacsBlog
|
||||||
http://www.masteringemacs.org/feed/
|
# http://www.masteringemacs.org/feed/
|
||||||
http://wikemacs.org/wiki/index.php?title=Special:RecentChanges&feed=atom
|
# http://wikemacs.org/wiki/index.php?title=Special:RecentChanges&feed=atom
|
||||||
http://stackoverflow.com/feeds/tag?tagnames=emacs&sort=newest
|
# http://stackoverflow.com/feeds/tag?tagnames=emacs&sort=newest
|
||||||
http://stackoverflow.com/feeds/tag?tagnames=elisp&sort=newest
|
# http://stackoverflow.com/feeds/tag?tagnames=elisp&sort=newest
|
||||||
|
|
||||||
#-----[ N900 ]--------------------------------------------------------
|
#-----[ N900 ]--------------------------------------------------------
|
||||||
# http://www.reddit.com/r/n900/.rss n900
|
# http://www.reddit.com/r/n900/.rss n900
|
||||||
http://maemo.org/news/planet-maemo/rss.xml n900
|
# http://maemo.org/news/planet-maemo/rss.xml n900
|
||||||
# http://www.reddit.com/r/maemo/.rss n900
|
# http://www.reddit.com/r/maemo/.rss n900
|
||||||
|
|
||||||
#-----[ iPhone ]------------------------------------------------------
|
#-----[ iPhone ]------------------------------------------------------
|
||||||
|
@ -91,46 +121,46 @@ http://iphonesdkdev.blogspot.com/feeds/posts/default iphone
|
||||||
http://iphonedevelopertips.com/feed iphone
|
http://iphonedevelopertips.com/feed iphone
|
||||||
|
|
||||||
#-----[ Other Software ]----------------------------------------------
|
#-----[ Other Software ]----------------------------------------------
|
||||||
http://www.archlinux.org/feeds/news/ software
|
# http://www.archlinux.org/feeds/news/ software
|
||||||
http://gitlog.wordpress.com/feed/ software
|
# http://gitlog.wordpress.com/feed/ software
|
||||||
http://rollingrelease.com/?feed=rss software
|
# http://rollingrelease.com/?feed=rss software
|
||||||
http://sourceforge.net/export/rss2_keepsake.php?group_id=134378 software
|
# http://sourceforge.net/export/rss2_keepsake.php?group_id=134378 software
|
||||||
http://valajournal.blogspot.com/feeds/posts/default software
|
# http://valajournal.blogspot.com/feeds/posts/default software
|
||||||
http://www.gimp.org/news.rdf
|
# http://www.gimp.org/news.rdf
|
||||||
http://stackoverflow.com/feeds/tag?tagnames=git&sort=newest
|
http://stackoverflow.com/feeds/tag?tagnames=git&sort=newest
|
||||||
http://git.savannah.gnu.org/cgit/identica-mode.git/atom/?h=master
|
# http://git.savannah.gnu.org/cgit/identica-mode.git/atom/?h=master
|
||||||
|
|
||||||
#-----[ Games ]-------------------------------------------------------
|
#-----[ Games ]-------------------------------------------------------
|
||||||
http://feeds.feedburner.com/qj/qjnet game
|
# http://feeds.feedburner.com/qj/qjnet game
|
||||||
http://www.swtor.com/feed/news/all
|
# http://www.swtor.com/feed/news/all
|
||||||
|
|
||||||
#-----[ Funny ]-------------------------------------------------------
|
#-----[ Funny ]-------------------------------------------------------
|
||||||
http://feeds.feedburner.com/ClientsFromHell funny
|
# http://feeds.feedburner.com/ClientsFromHell funny
|
||||||
#http://feeds.feedburner.com/VeryDemotivational funny
|
#http://feeds.feedburner.com/VeryDemotivational funny
|
||||||
|
|
||||||
#-----[ Comics ]------------------------------------------------------
|
#-----[ Comics ]------------------------------------------------------
|
||||||
http://feeds.feedburner.com/AbstruseGoose comics
|
# http://feeds.feedburner.com/AbstruseGoose comics
|
||||||
http://www.cad-comic.com/rss/rss.xml comics
|
# http://www.cad-comic.com/rss/rss.xml comics
|
||||||
http://feeds.dilbert.com/DilbertDailyStrip comics
|
# http://feeds.dilbert.com/DilbertDailyStrip comics
|
||||||
http://feedproxy.google.com/uclick/garfield comics
|
# http://feedproxy.google.com/uclick/garfield comics
|
||||||
http://feeds.feedburner.com/GeekAndPoke comics
|
# http://feeds.feedburner.com/GeekAndPoke comics
|
||||||
http://feeds.feedburner.com/NotInventedHere comics
|
# http://feeds.feedburner.com/NotInventedHere comics
|
||||||
http://syndicated.livejournal.com/oglaf/data/rss comics
|
# http://syndicated.livejournal.com/oglaf/data/rss comics
|
||||||
http://feeds.feedburner.com/omaketheater comics
|
# http://feeds.feedburner.com/omaketheater comics
|
||||||
http://www.penny-arcade.com/rss.xml comics
|
# http://www.penny-arcade.com/rss.xml comics
|
||||||
http://www.pvponline.com/rss/?section=article comics
|
# http://www.pvponline.com/rss/?section=article comics
|
||||||
http://www.questionablecontent.net/QCRSS.xml comics
|
# http://www.questionablecontent.net/QCRSS.xml comics
|
||||||
http://feeds.feedburner.com/ScenesFromAMultiverse comics
|
# http://feeds.feedburner.com/ScenesFromAMultiverse comics
|
||||||
http://www.vgcats.com/vgcats.rdf.xml comics
|
# http://www.vgcats.com/vgcats.rdf.xml comics
|
||||||
http://feeds2.feedburner.com/virtualshackles comics
|
# http://feeds2.feedburner.com/virtualshackles comics
|
||||||
http://xkcd.com/rss.xml comics
|
# http://xkcd.com/rss.xml comics
|
||||||
http://feeds.feedburner.com/maximumble?format=xml comics
|
# http://feeds.feedburner.com/maximumble?format=xml comics
|
||||||
http://feeds.feedburner.com/ProgsLife comics
|
http://feeds.feedburner.com/ProgsLife comics
|
||||||
http://www.rsspect.com/rss/asw.xml
|
# http://www.rsspect.com/rss/asw.xml
|
||||||
http://pbfcomics.com/feed/feed.xml
|
# http://pbfcomics.com/feed/feed.xml
|
||||||
http://feeds.feedburner.com/MinionComics
|
http://feeds.feedburner.com/MinionComics
|
||||||
http://www.savagechickens.com/feed
|
# http://www.savagechickens.com/feed
|
||||||
http://feeds.feedburner.com/basiccomic
|
# http://feeds.feedburner.com/basiccomic
|
||||||
|
|
||||||
#-----[ Misc ]--------------------------------------------------------
|
#-----[ Misc ]--------------------------------------------------------
|
||||||
http://wallbase.cc/rss misc
|
http://wallbase.cc/rss misc
|
||||||
|
@ -139,8 +169,8 @@ http://www.mailinator.com/rss.jsp?email=ryuslash misc
|
||||||
|
|
||||||
|
|
||||||
#-----[ New ]----------------------------------------------------------
|
#-----[ New ]----------------------------------------------------------
|
||||||
http://rss.feedsportal.com/c/32569/f/491734/index.rss
|
# http://rss.feedsportal.com/c/32569/f/491734/index.rss
|
||||||
http://feeds.feedburner.com/TheGeekStuff
|
# http://feeds.feedburner.com/TheGeekStuff
|
||||||
http://feeds2.feedburner.com/Command-line-fu
|
# http://feeds2.feedburner.com/Command-line-fu
|
||||||
http://feeds.feedburner.com/GoDjango
|
# http://feeds.feedburner.com/GoDjango
|
||||||
http://identity.mozilla.com/rss
|
# http://identity.mozilla.com/rss
|
||||||
|
|
166
.conkerorrc/init.js
Normal file
166
.conkerorrc/init.js
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
require("content-policy.js");
|
||||||
|
require("favicon");
|
||||||
|
|
||||||
|
theme_load_paths.push("/home/slash/.conkerorrc/themes/");
|
||||||
|
|
||||||
|
define_browser_object_class(
|
||||||
|
"history-url", null,
|
||||||
|
function (I, prompt) {
|
||||||
|
check_buffer(I.buffer, content_buffer);
|
||||||
|
var result = yield I.buffer.window.minibuffer.read_url(
|
||||||
|
$prompt = prompt, $use_webjumps = false, $use_history = true,
|
||||||
|
$use_bookmarks = false, $sort_order = 'date_descending'
|
||||||
|
);
|
||||||
|
yield co_return(result);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
function oni_before_quit_func() {
|
||||||
|
var w = get_recent_conkeror_window();
|
||||||
|
var result = (w == null) ||
|
||||||
|
"y" == (yield w.minibuffer.read_single_character_option(
|
||||||
|
$prompt="Quit Conkeror? (y/n)",
|
||||||
|
$options=["y", "n"]));
|
||||||
|
yield co_return(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
function oni_block_flash(content_type, content_location) {
|
||||||
|
var Y = content_policy_accept, N = content_policy_reject;
|
||||||
|
var action = ({ "youtube.com": Y }
|
||||||
|
[content_location.host] || N);
|
||||||
|
|
||||||
|
if (action == N)
|
||||||
|
dumpln("blocked flash: " + content_location.spec);
|
||||||
|
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
function oni_escape(str) {
|
||||||
|
return str.replace(/(["$`])/g, '\\$1');
|
||||||
|
}
|
||||||
|
|
||||||
|
function oni_linkwave_add(I) {
|
||||||
|
check_buffer(I.buffer, content_buffer);
|
||||||
|
let url =
|
||||||
|
load_spec_uri_string(load_spec(I.buffer.top_frame));
|
||||||
|
let title = escape(yield I.minibuffer.read(
|
||||||
|
$prompt = "name (required): ",
|
||||||
|
$initial_value = I.buffer.title));
|
||||||
|
let tags = escape(yield I.minibuffer.read(
|
||||||
|
$prompt = "tags (space delimited): "));
|
||||||
|
let description = escape(yield I.minibuffer.read(
|
||||||
|
$prompt = "extended description: "));
|
||||||
|
let command =
|
||||||
|
'/home/slash/development/projects/linkwave/src/linkwave "'
|
||||||
|
+ url + '" "' + title + '" "' + description + '"';
|
||||||
|
I.window.minibuffer.message(command);
|
||||||
|
}
|
||||||
|
interactive("linkwave-add", "Bookmark the page in linkwave",
|
||||||
|
oni_linkwave_add);
|
||||||
|
|
||||||
|
function oni_linkwave_add_link(I) {
|
||||||
|
bo = yield read_browser_object(I);
|
||||||
|
let url = load_spec_uri_string(
|
||||||
|
load_spec(encodeURIComponent(bo)));
|
||||||
|
check_buffer(I.buffer, content_buffer);
|
||||||
|
let title = escape(yield I.minibuffer.read(
|
||||||
|
$prompt = "name (required): ",
|
||||||
|
$initial_value = bo.textContent));
|
||||||
|
let tags = escape(yield I.minibuffer.read(
|
||||||
|
$prompt = "tags (space delimited): "));
|
||||||
|
let description = escape(yield I.minibuffer.read(
|
||||||
|
$prompt = "extended description: "));
|
||||||
|
let command =
|
||||||
|
'/home/slash/development/projects/linkwave/src/linkwave "'
|
||||||
|
+ url + '" "' + title + '" "' + description + '"';
|
||||||
|
let result = yield shell_command(command);
|
||||||
|
|
||||||
|
if (!result)
|
||||||
|
I.window.minibuffer.message('Added to linkwave');
|
||||||
|
else
|
||||||
|
I.window.minibuffer.message('Couldn\'t add to linkwave');
|
||||||
|
}
|
||||||
|
interactive("linkwave-add-link", "Bookmark the a link in linkwave",
|
||||||
|
oni_linkwave_add_link);
|
||||||
|
|
||||||
|
function oni_org_store_link(I) {
|
||||||
|
var cmd_str = 'emacsclient \"org-protocol://store-link://'
|
||||||
|
+ encodeURIComponent(I.buffer.display_uri_string) + '/'
|
||||||
|
+ encodeURIComponent(I.buffer.document.title) + '\"';
|
||||||
|
|
||||||
|
if (I.window != null) {
|
||||||
|
window.minibuffer.message('Issuing ' + cmd_str);
|
||||||
|
}
|
||||||
|
|
||||||
|
shell_command_blind(cmd_str);
|
||||||
|
}
|
||||||
|
interactive("org-store-link",
|
||||||
|
"Stores [[url][title]] as org link and copies url to emacs "
|
||||||
|
+ "kill ring",
|
||||||
|
oni_org_store_link);
|
||||||
|
|
||||||
|
interactive("find-url-from-history",
|
||||||
|
"Find a page from history in the current buffer",
|
||||||
|
"find-url",
|
||||||
|
$browser_object = browser_object_history_url);
|
||||||
|
interactive("find-url-from-history-new-buffer",
|
||||||
|
"Find a page from history in a new buffer",
|
||||||
|
"find-url-new-buffer",
|
||||||
|
$browser_object = browser_object_history_url);
|
||||||
|
|
||||||
|
define_webjump("emacswiki",
|
||||||
|
"http://www.google.com/cse?cx=004774160799092323420%3A6-ff2s0o6yi&q=%s",
|
||||||
|
$alternative="http://www.emacswiki.org");
|
||||||
|
define_webjump("php",
|
||||||
|
"http://www.php.net/manual-lookup.php?pattern=%s&scope=quickref",
|
||||||
|
$alternative="http://www.php.net");
|
||||||
|
define_webjump("python",
|
||||||
|
"http://docs.python.org/search.html?q=%s&check_keywords=yes&area=default",
|
||||||
|
$alternative="http://www.python.org");
|
||||||
|
define_webjump("ddg",
|
||||||
|
"https://duckduckgo.com/?q=%s",
|
||||||
|
$alternative="https://duckduckgo.com");
|
||||||
|
define_webjump("metal-archives",
|
||||||
|
"http://www.metal-archives.com/search?searchString=%s&type=band_name",
|
||||||
|
$alternative="http://www.metal-arhives.com");
|
||||||
|
define_webjump("djangodocs",
|
||||||
|
"https://docs.djangoproject.com/search/?q=%s&release=5",
|
||||||
|
$alternative="https://docs.djangoproject.com/");
|
||||||
|
define_webjump("google",
|
||||||
|
"https://duckduckgo.com?q=!google%%20%s");
|
||||||
|
define_webjump("github",
|
||||||
|
"https://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1",
|
||||||
|
$alternative="https://github.com");
|
||||||
|
// Archlinux
|
||||||
|
define_webjump("arch/wiki",
|
||||||
|
"https://wiki.archlinux.org/index.php?search=%s",
|
||||||
|
$alternative="https://wiki.archlinux.org");
|
||||||
|
define_webjump("arch/aur",
|
||||||
|
"https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go",
|
||||||
|
$alternative="https://aur.archlinux.org");
|
||||||
|
define_webjump("arch/packages",
|
||||||
|
"https://www.archlinux.org/packages/?sort=&q=%s&limit=50",
|
||||||
|
$alternative="https://packages.archlinux.org");
|
||||||
|
|
||||||
|
content_policy_bytype_table.object = oni_block_flash;
|
||||||
|
cwd = make_file("/home/slash/downloads/");
|
||||||
|
hint_digits = "arstdhneio";
|
||||||
|
read_buffer_show_icons = true;
|
||||||
|
url_remoting_fn = load_url_in_new_buffer;
|
||||||
|
|
||||||
|
define_key(content_buffer_normal_keymap, "h",
|
||||||
|
"find-url-from-history-new-buffer");
|
||||||
|
define_key(content_buffer_normal_keymap, "H",
|
||||||
|
"find-url-from-history");
|
||||||
|
define_key(default_base_keymap, "C-x f", "follow-new-buffer");
|
||||||
|
|
||||||
|
add_hook("before_quit_hook", oni_before_quit_func);
|
||||||
|
add_hook("content_policy_hook", content_policy_bytype);
|
||||||
|
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget, true));
|
||||||
|
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget, true));
|
||||||
|
add_hook("mode_line_hook", mode_line_adder(downloads_status_widget));
|
||||||
|
|
||||||
|
remove_hook("download_added_hook", open_download_buffer_automatically);
|
||||||
|
|
||||||
|
hints_minibuffer_annotation_mode(true);
|
||||||
|
theme_load("naquadah");
|
|
@ -1 +0,0 @@
|
||||||
define_key(default_base_keymap, "C-x f", "follow-new-buffer");
|
|
|
@ -1,6 +0,0 @@
|
||||||
// -*- eval: (git-auto-commit-mode 1) -*-
|
|
||||||
require("favicon");
|
|
||||||
|
|
||||||
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget, true));
|
|
||||||
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget, true));
|
|
||||||
add_hook("mode_line_hook", mode_line_adder(downloads_status_widget));
|
|
|
@ -1,19 +0,0 @@
|
||||||
// -*- eval: (git-auto-commit-mode 1) -*-
|
|
||||||
cwd = make_file("/home/slash/downloads/");
|
|
||||||
url_remoting_fn = load_url_in_new_buffer;
|
|
||||||
read_buffer_show_icons = true;
|
|
||||||
hint_digits = ";ASDFGHJKL";
|
|
||||||
|
|
||||||
hints_minibuffer_annotation_mode(true);
|
|
||||||
|
|
||||||
add_hook("before_quit_hook",
|
|
||||||
function () {
|
|
||||||
var w = get_recent_conkeror_window();
|
|
||||||
var result = (w == null) ||
|
|
||||||
"y" == (yield w.minibuffer.read_single_character_option(
|
|
||||||
$prompt = "Quit Conkeror? (y/n)",
|
|
||||||
$options = ["y", "n"]));
|
|
||||||
yield co_return(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
remove_hook("download_added_hook", open_download_buffer_automatically);
|
|
|
@ -1,2 +0,0 @@
|
||||||
theme_load_paths.push("/home/slash/.conkerorrc/themes/");
|
|
||||||
theme_load("naquadah");
|
|
|
@ -1,33 +0,0 @@
|
||||||
// -*- eval: (git-auto-commit-mode 1) -*-
|
|
||||||
|
|
||||||
define_webjump("emacswiki",
|
|
||||||
"http://www.google.com/cse?cx=004774160799092323420%3A6-ff2s0o6yi&q=%s",
|
|
||||||
$alternative="http://www.emacswiki.org");
|
|
||||||
define_webjump("php",
|
|
||||||
"http://www.php.net/manual-lookup.php?pattern=%s&scope=quickref",
|
|
||||||
$alternative="http://www.php.net");
|
|
||||||
define_webjump("python",
|
|
||||||
"http://docs.python.org/search.html?q=%s&check_keywords=yes&area=default",
|
|
||||||
$alternative="http://www.python.org");
|
|
||||||
define_webjump("ddg",
|
|
||||||
"https://duckduckgo.com/?q=%s",
|
|
||||||
$alternative="https://duckduckgo.com");
|
|
||||||
define_webjump("metal-archives",
|
|
||||||
"http://www.metal-archives.com/search?searchString=%s&type=band_name",
|
|
||||||
$alternative="http://www.metal-arhives.com");
|
|
||||||
define_webjump("djangodocs",
|
|
||||||
"https://docs.djangoproject.com/search/?q=%s&release=5",
|
|
||||||
$alternative="https://docs.djangoproject.com/");
|
|
||||||
define_webjump("google",
|
|
||||||
"https://duckduckgo.com?q=!google%%20%s");
|
|
||||||
|
|
||||||
// Archlinux
|
|
||||||
define_webjump("arch/wiki",
|
|
||||||
"https://wiki.archlinux.org/index.php?search=%s",
|
|
||||||
$alternative="https://wiki.archlinux.org");
|
|
||||||
define_webjump("arch/aur",
|
|
||||||
"https://aur.archlinux.org/packages.php?O=0&K=%s&do_Search=Go",
|
|
||||||
$alternative="https://aur.archlinux.org");
|
|
||||||
define_webjump("arch/packages",
|
|
||||||
"https://www.archlinux.org/packages/?sort=&q=%s&limit=50",
|
|
||||||
$alternative="https://packages.archlinux.org");
|
|
311
.conky_box.lua
311
.conky_box.lua
|
@ -1,311 +0,0 @@
|
||||||
--[[BOX WIDGET v1.1 by Wlourf 27/01/2011
|
|
||||||
This widget can drawn some boxes, even circles in your conky window
|
|
||||||
http://u-scripts.blogspot.com/2011/01/box-widget.html)
|
|
||||||
|
|
||||||
Inspired by Background by londonali1010 (2009), thanks ;-)
|
|
||||||
|
|
||||||
The parameters (all optionals) are :
|
|
||||||
x - x coordinate of top-left corner of the box, default = 0 = (top-left corner of conky window)
|
|
||||||
y - y coordinate of top-left corner of the box, default = 0 = (top-left corner of conky window)
|
|
||||||
w - width of the box, default = width of the conky window
|
|
||||||
h - height of the box, default = height of the conky window
|
|
||||||
corners - corners is a table for the four corners in this order : top-left, top-right,bottom-right, bottom-left
|
|
||||||
each corner is defined in a table with a shape and a radius, available shapes are : "curve","circle","line"
|
|
||||||
example for the same shapes for all corners:
|
|
||||||
{ {"circle",10} }
|
|
||||||
example for first corner different from the three others
|
|
||||||
{ {"circle",10}, {"circle",5} }
|
|
||||||
example for top corners differents from bottom corners
|
|
||||||
{ {"circle",10}, {"circle",10}, {"line",0} }
|
|
||||||
default = { {"line",0} } i.e=no corner
|
|
||||||
operator - set the compositing operator (needs in the conkyrc : own_window_argb_visual yes)
|
|
||||||
see http://cairographics.org/operators/
|
|
||||||
available operators are :
|
|
||||||
"clear","source","over","in","out","atop","dest","dest_over","dest_in","dest_out","dest_atop","xor","add","saturate"
|
|
||||||
default = "over"
|
|
||||||
border - if border>0, the script draws only the border, like a frame, default=0
|
|
||||||
dash - if border>0 and dash>0, the border is draw with dashes, default=0
|
|
||||||
skew_x - skew box around x axis, default = 0
|
|
||||||
skew_y - skew box around y axis, default = 0
|
|
||||||
scale_x - rescale the x axis, default=1, useful for drawing elipses ...
|
|
||||||
scale_y - rescale the x axis, default=1
|
|
||||||
angle - angle of rotation of the box in degrees, default = 0
|
|
||||||
i.e. a horizontal graph
|
|
||||||
rot_x - x point of rotation's axis, default = 0,
|
|
||||||
relative to top-left corner of the box, (not the conky window)
|
|
||||||
rot_y - y point of rotation's axis, default = 0
|
|
||||||
relative to top-left corner of the box, (not the conky window)
|
|
||||||
draw_me - if set to false, box is not drawn (default = true or 1)
|
|
||||||
it can be used with a conky string, if the string returns 1, the box is drawn :
|
|
||||||
example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
|
|
||||||
|
|
||||||
linear_gradient - table with the coordinates of two points to define a linear gradient,
|
|
||||||
points are relative to top-left corner of the box, (not the conky window)
|
|
||||||
{x1,y1,x2,y2}
|
|
||||||
radial_gradient - table with the coordinates of two circle to define a radial gradient,
|
|
||||||
points are relative to top-left corner of the box, (not the conky window)
|
|
||||||
{x1,y1,r1,x2,y2,r2} (r=radius)
|
|
||||||
colour - table of colours, default = plain white {{1,0xFFFFFF,0.5}}
|
|
||||||
this table contains one or more tables with format {P,C,A}
|
|
||||||
P=position of gradient (0 = start of the gradient, 1= end of the gradient)
|
|
||||||
C=hexadecimal colour
|
|
||||||
A=alpha (opacity) of color (0=invisible,1=opacity 100%)
|
|
||||||
Examples :
|
|
||||||
for a plain color {{1,0x00FF00,0.5}}
|
|
||||||
for a gradient with two colours {{0,0x00FF00,0.5},{1,0x000033,1}} {x=80,y=150,w=20,h=20,
|
|
||||||
radial_gradient={20,20,0,20,20,20},
|
|
||||||
colour={{0.5,0xFFFFFF,1},{1,0x000000,0}},
|
|
||||||
or {{0.5,0x00FF00,1},{1,0x000033,1}} -with this one, gradient will start in the middle
|
|
||||||
for a gradient with three colours {{0,0x00FF00,0.5},{0.5,0x000033,1},{1,0x440033,1}}
|
|
||||||
and so on ...
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
|
|
||||||
lua_load ~/scripts/box.lua
|
|
||||||
lua_draw_hook_pre main_box
|
|
||||||
|
|
||||||
And leave one line blank or not after TEXT
|
|
||||||
|
|
||||||
Changelog:
|
|
||||||
+ v1.0 -- Original release (19.12.2010)
|
|
||||||
+ v1.1 -- Adding parameters: operator, dash, angle, skew_x, skew_y, draw_me
|
|
||||||
corners are described in a table
|
|
||||||
|
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
|
||||||
-- it under the terms of the GNU General Public License as published by
|
|
||||||
-- the Free Software Foundation version 3 (GPLv3)
|
|
||||||
--
|
|
||||||
-- This program is distributed in the hope that it will be useful,
|
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
-- GNU General Public License for more details.
|
|
||||||
--
|
|
||||||
-- You should have received a copy of the GNU General Public License
|
|
||||||
-- along with this program; if not, write to the Free Software
|
|
||||||
-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
||||||
-- MA 02110-1301, USA.
|
|
||||||
|
|
||||||
|
|
||||||
]]
|
|
||||||
|
|
||||||
|
|
||||||
require 'cairo'
|
|
||||||
|
|
||||||
function conky_main_box()
|
|
||||||
|
|
||||||
if conky_window==nil then return end
|
|
||||||
|
|
||||||
---------------------- PARAMETERS BEGIN HERE
|
|
||||||
local boxes_settings={
|
|
||||||
{
|
|
||||||
x = conky_window.text_start_x - 10,
|
|
||||||
y = conky_window.text_start_y - 10,
|
|
||||||
w = conky_window.text_width + 20,
|
|
||||||
h = conky_window.text_height + 20,
|
|
||||||
colour = {{1,0x000000,0.4}},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------- PARAMETERS END HERE
|
|
||||||
|
|
||||||
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
|
|
||||||
local cr=cairo_create(cs)
|
|
||||||
|
|
||||||
if tonumber(conky_parse("$updates"))<5 then return end
|
|
||||||
for i in pairs(boxes_settings) do
|
|
||||||
draw_box (cr,boxes_settings[i])
|
|
||||||
end
|
|
||||||
cairo_destroy(cr)
|
|
||||||
cairo_surface_destroy(cs)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function draw_box(cr,t)
|
|
||||||
|
|
||||||
if t.draw_me == true then t.draw_me = nil end
|
|
||||||
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
|
|
||||||
|
|
||||||
local table_corners={"circle","curve","line"}
|
|
||||||
|
|
||||||
local t_operators={
|
|
||||||
clear = CAIRO_OPERATOR_CLEAR,
|
|
||||||
source = CAIRO_OPERATOR_SOURCE,
|
|
||||||
over = CAIRO_OPERATOR_OVER,
|
|
||||||
["in"] = CAIRO_OPERATOR_IN,
|
|
||||||
out = CAIRO_OPERATOR_OUT,
|
|
||||||
atop = CAIRO_OPERATOR_ATOP,
|
|
||||||
dest = CAIRO_OPERATOR_DEST,
|
|
||||||
dest_over = CAIRO_OPERATOR_DEST_OVER,
|
|
||||||
dest_in = CAIRO_OPERATOR_DEST_IN,
|
|
||||||
dest_out = CAIRO_OPERATOR_DEST_OUT,
|
|
||||||
dest_atop = CAIRO_OPERATOR_DEST_ATOP,
|
|
||||||
xor = CAIRO_OPERATOR_XOR,
|
|
||||||
add = CAIRO_OPERATOR_ADD,
|
|
||||||
saturate = CAIRO_OPERATOR_SATURATE,
|
|
||||||
}
|
|
||||||
|
|
||||||
function rgba_to_r_g_b_a(tc)
|
|
||||||
--tc={position,colour,alpha}
|
|
||||||
local colour = tc[2]
|
|
||||||
local alpha = tc[3]
|
|
||||||
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
|
|
||||||
end
|
|
||||||
|
|
||||||
function table.copy(t)
|
|
||||||
local t2 = {}
|
|
||||||
for k,v in pairs(t) do
|
|
||||||
t2[k] = {v[1],v[2]}
|
|
||||||
end
|
|
||||||
return t2
|
|
||||||
end
|
|
||||||
|
|
||||||
function draw_corner(num,t)
|
|
||||||
local shape=t[1]
|
|
||||||
local radius=t[2]
|
|
||||||
local x,y = t[3],t[4]
|
|
||||||
if shape=="line" then
|
|
||||||
if num == 1 then cairo_line_to(cr,radius,0)
|
|
||||||
elseif num == 2 then cairo_line_to(cr,x,radius)
|
|
||||||
elseif num == 3 then cairo_line_to(cr,x-radius,y)
|
|
||||||
elseif num == 4 then cairo_line_to(cr,0,y-radius)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if shape=="circle" then
|
|
||||||
local PI = math.pi
|
|
||||||
if num == 1 then cairo_arc(cr,radius,radius,radius,-PI,-PI/2)
|
|
||||||
elseif num == 2 then cairo_arc(cr,x-radius,y+radius,radius,-PI/2,0)
|
|
||||||
elseif num == 3 then cairo_arc(cr,x-radius,y-radius,radius,0,PI/2)
|
|
||||||
elseif num == 4 then cairo_arc(cr,radius,y-radius,radius,PI/2,-PI)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if shape=="curve" then
|
|
||||||
if num == 1 then cairo_curve_to(cr,0,radius ,0,0 ,radius,0)
|
|
||||||
elseif num == 2 then cairo_curve_to(cr,x-radius,0, x,y, x,radius)
|
|
||||||
elseif num == 3 then cairo_curve_to(cr,x,y-radius, x,y, x-radius,y)
|
|
||||||
elseif num == 4 then cairo_curve_to(cr,radius,y, x,y, 0,y-radius)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--check values and set default values
|
|
||||||
if t.x == nil then t.x = 0 end
|
|
||||||
if t.y == nil then t.y = 0 end
|
|
||||||
if t.w == nil then t.w = conky_window.width end
|
|
||||||
if t.h == nil then t.h = conky_window.height end
|
|
||||||
if t.radius == nil then t.radius = 0 end
|
|
||||||
if t.border == nil then t.border = 0 end
|
|
||||||
if t.colour==nil then t.colour={{1,0xFFFFFF,0.5}} end
|
|
||||||
if t.linear_gradient ~= nil then
|
|
||||||
if #t.linear_gradient ~= 4 then
|
|
||||||
t.linear_gradient = {t.x,t.y,t.width,t.height}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if t.angle==nil then t.angle = 0 end
|
|
||||||
|
|
||||||
if t.skew_x == nil then t.skew_x=0 end
|
|
||||||
if t.skew_y == nil then t.skew_y=0 end
|
|
||||||
if t.scale_x==nil then t.scale_x=1 end
|
|
||||||
if t.scale_y==nil then t.scale_y=1 end
|
|
||||||
if t.rot_x == nil then t.rot_x=0 end
|
|
||||||
if t.rot_y == nil then t.rot_y=0 end
|
|
||||||
|
|
||||||
if t.operator == nil then t.operator = "over" end
|
|
||||||
if (t_operators[t.operator]) == nil then
|
|
||||||
print ("wrong operator :",t.operator)
|
|
||||||
t.operator = "over"
|
|
||||||
end
|
|
||||||
|
|
||||||
if t.radial_gradient ~= nil then
|
|
||||||
if #t.radial_gradient ~= 6 then
|
|
||||||
t.radial_gradient = {t.x,t.y,0, t.x,t.y, t.width}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
for i=1, #t.colour do
|
|
||||||
if #t.colour[i]~=3 then
|
|
||||||
print ("error in color table")
|
|
||||||
t.colour[i]={1,0xFFFFFF,1}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if t.corners == nil then t.corners={ {"line",0} } end
|
|
||||||
local t_corners = {}
|
|
||||||
local t_corners = table.copy(t.corners)
|
|
||||||
--don't use t_corners=t.corners otherwise t.corners is altered
|
|
||||||
|
|
||||||
--complete the t_corners table if needed
|
|
||||||
for i=#t_corners+1,4 do
|
|
||||||
t_corners[i]=t_corners[#t_corners]
|
|
||||||
local flag=false
|
|
||||||
for j,v in pairs(table_corners) do flag=flag or (t_corners[i][1]==v) end
|
|
||||||
if not flag then print ("error in corners table :",t_corners[i][1]);t_corners[i][1]="curve" end
|
|
||||||
end
|
|
||||||
|
|
||||||
--this way :
|
|
||||||
-- t_corners[1][4]=x
|
|
||||||
-- t_corners[2][3]=y
|
|
||||||
--doesn't work
|
|
||||||
t_corners[1]={t_corners[1][1],t_corners[1][2],0,0}
|
|
||||||
t_corners[2]={t_corners[2][1],t_corners[2][2],t.w,0}
|
|
||||||
t_corners[3]={t_corners[3][1],t_corners[3][2],t.w,t.h}
|
|
||||||
t_corners[4]={t_corners[4][1],t_corners[4][2],0,t.h}
|
|
||||||
|
|
||||||
t.no_gradient = (t.linear_gradient == nil ) and (t.radial_gradient == nil )
|
|
||||||
|
|
||||||
cairo_save(cr)
|
|
||||||
cairo_translate(cr, t.x, t.y)
|
|
||||||
if t.rot_x~=0 or t.rot_y~=0 or t.angle~=0 then
|
|
||||||
cairo_translate(cr,t.rot_x,t.rot_y)
|
|
||||||
cairo_rotate(cr,t.angle*math.pi/180)
|
|
||||||
cairo_translate(cr,-t.rot_x,-t.rot_y)
|
|
||||||
end
|
|
||||||
if t.scale_x~=1 or t.scale_y~=1 or t.skew_x~=0 or t.skew_y~=0 then
|
|
||||||
local matrix0 = cairo_matrix_t:create()
|
|
||||||
tolua.takeownership(matrix0)
|
|
||||||
cairo_matrix_init (matrix0, t.scale_x,math.pi*t.skew_y/180 , math.pi*t.skew_x/180 ,t.scale_y,0,0)
|
|
||||||
cairo_transform(cr,matrix0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local tc=t_corners
|
|
||||||
cairo_move_to(cr,tc[1][2],0)
|
|
||||||
cairo_line_to(cr,t.w-tc[2][2],0)
|
|
||||||
draw_corner(2,tc[2])
|
|
||||||
cairo_line_to(cr,t.w,t.h-tc[3][2])
|
|
||||||
draw_corner(3,tc[3])
|
|
||||||
cairo_line_to(cr,tc[4][2],t.h)
|
|
||||||
draw_corner(4,tc[4])
|
|
||||||
cairo_line_to(cr,0,tc[1][2])
|
|
||||||
draw_corner(1,tc[1])
|
|
||||||
|
|
||||||
if t.no_gradient then
|
|
||||||
cairo_set_source_rgba(cr,rgba_to_r_g_b_a(t.colour[1]))
|
|
||||||
else
|
|
||||||
if t.linear_gradient ~= nil then
|
|
||||||
pat = cairo_pattern_create_linear (t.linear_gradient[1],t.linear_gradient[2],t.linear_gradient[3],t.linear_gradient[4])
|
|
||||||
elseif t.radial_gradient ~= nil then
|
|
||||||
pat = cairo_pattern_create_radial (t.radial_gradient[1],t.radial_gradient[2],t.radial_gradient[3],
|
|
||||||
t.radial_gradient[4],t.radial_gradient[5],t.radial_gradient[6])
|
|
||||||
end
|
|
||||||
for i=1, #t.colour do
|
|
||||||
cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgba_to_r_g_b_a(t.colour[i]))
|
|
||||||
end
|
|
||||||
cairo_set_source (cr, pat)
|
|
||||||
cairo_pattern_destroy(pat)
|
|
||||||
end
|
|
||||||
|
|
||||||
cairo_set_operator(cr,t_operators[t.operator])
|
|
||||||
|
|
||||||
if t.border>0 then
|
|
||||||
cairo_close_path(cr)
|
|
||||||
if t.dash ~= nil then cairo_set_dash(cr, t.dash, 1, 0.0) end
|
|
||||||
cairo_set_line_width(cr,t.border)
|
|
||||||
cairo_stroke(cr)
|
|
||||||
else
|
|
||||||
cairo_fill(cr)
|
|
||||||
end
|
|
||||||
|
|
||||||
cairo_restore(cr)
|
|
||||||
end
|
|
||||||
|
|
53
.conkyrc
53
.conkyrc
|
@ -1,53 +0,0 @@
|
||||||
# -*- eval: (git-auto-commit-mode 1) -*-
|
|
||||||
background yes
|
|
||||||
use_xft yes
|
|
||||||
xftfont tamsyn:pixelsize=14
|
|
||||||
!xftalpha 0.1
|
|
||||||
update_interval 2.0
|
|
||||||
total_run_times 0
|
|
||||||
double_buffer yes
|
|
||||||
minimum_size 250 5
|
|
||||||
maximum_width 400
|
|
||||||
draw_shades no
|
|
||||||
draw_outline no
|
|
||||||
draw_borders no
|
|
||||||
draw_graph_borders no
|
|
||||||
default_color gray
|
|
||||||
default_shade_color red
|
|
||||||
default_outline_color green
|
|
||||||
alignment top_right
|
|
||||||
gap_x 10
|
|
||||||
gap_y 42
|
|
||||||
no_buffers yes
|
|
||||||
uppercase no
|
|
||||||
cpu_avg_samples 2
|
|
||||||
net_avg_samples 1
|
|
||||||
override_utf8_locale no
|
|
||||||
use_spacer yes
|
|
||||||
lua_load ~/.conkybox.lua
|
|
||||||
lua_draw_hook_pre conky_main_box
|
|
||||||
|
|
||||||
TEXT
|
|
||||||
${font Arial:bold:size=10}${color Tan1}TODO ${color RoyalBlue}${voffset -2}${hr 2}
|
|
||||||
$font${color SlateGray}${exec /home/slash/development/projects/ntd/src/ntd list short}
|
|
||||||
|
|
||||||
$if_mpd_playing${font Arial:bold:size=10}${color Tan1}MUSIC ${color RoyalBlue}${voffset -2}${hr 2}
|
|
||||||
$font$alignc${color SlateGray}$mpd_title
|
|
||||||
$alignc$mpd_artist
|
|
||||||
$alignc$mpd_album
|
|
||||||
$mpd_bar
|
|
||||||
|
|
||||||
$endif${font Arial:bold:size=10}${color Tan1}USAGE ${color RoyalBlue}${voffset -2}${hr 2}
|
|
||||||
$font${color SlateGray}CPU1 $alignr${cpu cpu1}% ${cpubar cpu1 7,170}
|
|
||||||
$font${color SlateGray}CPU2 $alignr${cpu cpu2}% ${cpubar cpu2 7,170}
|
|
||||||
$font${color SlateGray}MEM $alignr${memperc}% ${membar 7,170}
|
|
||||||
$font${color SlateGray}SWAP $alignr${swapperc}% ${swapbar 7, 170}
|
|
||||||
|
|
||||||
${font Arial:bold:size=10}${color Tan1}HDD ${color RoyalBlue}${voffset -2}${hr 2}
|
|
||||||
${font}${color SlateGray}Write: $alignr$diskio_write
|
|
||||||
Read: $alignr$diskio_read
|
|
||||||
|
|
||||||
${font Arial:bold:size=10}${color Tan1}TOP PROCESS ${color RoyalBlue}${voffset -2}${hr 2}
|
|
||||||
${color SlateGray}${font}CPU: ${top name 1}${alignr}${top cpu 1}%
|
|
||||||
MEM: ${top_mem name 1}${alignr}${top_mem mem 1}%
|
|
||||||
IO: ${top_io name 1}${alignr}${top_io io_perc 1}%
|
|
8
.emacs.d/eshell/alias
Normal file
8
.emacs.d/eshell/alias
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
alias git git --no-pager $*
|
||||||
|
alias rm rm -v $*
|
||||||
|
alias sudo *sudo $*
|
||||||
|
alias ncmpcpp ansi-term ncmpcpp ncmpcpp
|
||||||
|
alias listen eshell-exec-visual mplayer http://usa7-vn.mixstream.net/listen/8248.pls
|
||||||
|
alias o find-file $1
|
||||||
|
alias d dired $1
|
||||||
|
alias newsbeuter ansi-term newsbeuter newsbeuter
|
70
.emacs.d/gnus.el
Normal file
70
.emacs.d/gnus.el
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
;; -*- eval: (git-auto-commit-mode 1) -*-
|
||||||
|
(setq gnus-select-method '(nntp "news.eternal-september.org"))
|
||||||
|
(setq gnus-secondary-select-methods
|
||||||
|
'((nnmaildir "gmail"
|
||||||
|
(directory "~/documents/mail/gmail/"))
|
||||||
|
(nnmaildir "ninthfloor"
|
||||||
|
(directory "~/documents/mail/ninthfloor/"))
|
||||||
|
(nnmaildir "arch"
|
||||||
|
(directory "~/documents/mail/arch/"))
|
||||||
|
(nnmaildir "aethon"
|
||||||
|
(directory "~/documents/mail/aethon/"))
|
||||||
|
(nnmaildir "ryuslash"
|
||||||
|
(directory "~/documents/mail/ryuslash.org/"))
|
||||||
|
(nntp "news.gmane.org")))
|
||||||
|
|
||||||
|
(setq gnus-auto-subscribed-groups nil)
|
||||||
|
(setq gnus-save-newsrc-file nil)
|
||||||
|
(setq gnus-read-newsrc-file nil)
|
||||||
|
(setq gnus-novice-user t)
|
||||||
|
(setq gnus-article-truncate-lines nil)
|
||||||
|
|
||||||
|
(setq message-send-mail-function 'message-send-mail-with-sendmail)
|
||||||
|
(setq sendmail-program "/usr/bin/msmtp")
|
||||||
|
(setq message-sendmail-extra-arguments '("-a" "gmail"))
|
||||||
|
|
||||||
|
;; (setq gnus-parameters
|
||||||
|
;; '(("gmail"
|
||||||
|
;; (display . all))
|
||||||
|
;; ("aethon"
|
||||||
|
;; (display . all)
|
||||||
|
;; ("arch"
|
||||||
|
;; (display . all)))))
|
||||||
|
|
||||||
|
(setq gnus-permanently-visible-groups
|
||||||
|
"\\(gmail\\|aethon\\|arch\\|ninthfloor\\|ryuslash\\):INBOX")
|
||||||
|
|
||||||
|
(setq nntp-marks-is-evil t)
|
||||||
|
|
||||||
|
(setq gnus-check-new-newsgroups nil)
|
||||||
|
|
||||||
|
(setq gnus-posting-styles
|
||||||
|
'((".*"
|
||||||
|
(address "ryuslash@gmail.com")
|
||||||
|
(eval (setq message-sendmail-extra-arguments '("-a" "gmail"))))
|
||||||
|
("ninthfloor:"
|
||||||
|
(address "ryuslash@ninthfloor.org")
|
||||||
|
(eval (setq message-sendmail-extra-arguments '("-a" "ninthfloor"))))
|
||||||
|
("arch:"
|
||||||
|
(address "tom.willemsen@archlinux.us")
|
||||||
|
(eval (setq message-sendmail-extra-arguments '("-a" "arch"))))
|
||||||
|
("aethon:"
|
||||||
|
(address "thomas@aethon.nl")
|
||||||
|
(signature-file "~/documents/work/aethon/signature.txt")
|
||||||
|
(eval (setq message-sendmail-extra-arguments '("-a" "aethon"))))
|
||||||
|
("ryuslash:"
|
||||||
|
(address "tom@ryuslash.org")
|
||||||
|
(eval (setq message-sendmail-extra-arguments '("-a" "ryuslash"))))))
|
||||||
|
|
||||||
|
(setq user-mail-address "ryuslash@gmail.com")
|
||||||
|
(setq user-full-name "Tom Willemsen")
|
||||||
|
|
||||||
|
(add-hook 'gnus-summary-mode-hook '(lambda () (linum-mode -1)))
|
||||||
|
(add-hook 'gnus-article-mode-hook '(lambda () (linum-mode -1)))
|
||||||
|
(add-hook 'gnus-group-mode-hook '(lambda () (linum-mode -1)))
|
||||||
|
|
||||||
|
;-----[ BBDB ]--------------------------------------------------------
|
||||||
|
(require 'bbdb)
|
||||||
|
(bbdb-initialize 'gnus 'message)
|
||||||
|
(bbdb-insinuate-gnus)
|
||||||
|
(setq bbdb-north-american-phone-numbers-p nil)
|
1108
.emacs.d/init.el
Normal file
1108
.emacs.d/init.el
Normal file
File diff suppressed because it is too large
Load diff
34
.fonts.conf
34
.fonts.conf
|
@ -1,34 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
|
||||||
<fontconfig>
|
|
||||||
|
|
||||||
<!-- settings go here -->
|
|
||||||
<match target="pattern">
|
|
||||||
<edit name="antialias" mode="assign">
|
|
||||||
<bool>true</bool>
|
|
||||||
</edit>
|
|
||||||
|
|
||||||
<edit name="hinting" mode="assign">
|
|
||||||
<bool>true</bool>
|
|
||||||
</edit>
|
|
||||||
|
|
||||||
<edit name="hintstyle" mode="assign">
|
|
||||||
<const>hintslight</const>
|
|
||||||
</edit>
|
|
||||||
|
|
||||||
<edit name="rgba" mode="assign">
|
|
||||||
<const>rgb</const>
|
|
||||||
</edit>
|
|
||||||
|
|
||||||
<edit name="autohint" mode="assign">
|
|
||||||
<bool>true</bool>
|
|
||||||
</edit>
|
|
||||||
</match>
|
|
||||||
|
|
||||||
<match target="font">
|
|
||||||
<edit name="lcdfilter" mode="assign">
|
|
||||||
<const>lcddefault</const>
|
|
||||||
</edit>
|
|
||||||
</match>
|
|
||||||
|
|
||||||
</fontconfig>
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -28,7 +28,6 @@
|
||||||
.dmenu_cache
|
.dmenu_cache
|
||||||
.dvdcss/
|
.dvdcss/
|
||||||
.easytag/
|
.easytag/
|
||||||
.emass.d/
|
|
||||||
.emacs-jabber/
|
.emacs-jabber/
|
||||||
.face
|
.face
|
||||||
.filezilla/
|
.filezilla/
|
||||||
|
@ -101,7 +100,6 @@ var/
|
||||||
xhtml-loader.rnc
|
xhtml-loader.rnc
|
||||||
.unison/
|
.unison/
|
||||||
.pencil/
|
.pencil/
|
||||||
.emacs.d/
|
|
||||||
.cuyo
|
.cuyo
|
||||||
.lgames
|
.lgames
|
||||||
.beetsmusic.blb
|
.beetsmusic.blb
|
||||||
|
|
|
@ -17,3 +17,6 @@ User ryuslash
|
||||||
|
|
||||||
Host my.aethon.nl
|
Host my.aethon.nl
|
||||||
User tom
|
User tom
|
||||||
|
|
||||||
|
Host ryuslash.org
|
||||||
|
Port 4511
|
||||||
|
|
165
.stumpwmrc
Normal file
165
.stumpwmrc
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
;; -*- mode: lisp; -*-
|
||||||
|
(require 'swank)
|
||||||
|
|
||||||
|
(in-package :stumpwm)
|
||||||
|
|
||||||
|
;; Naquadah
|
||||||
|
(defun colour (key)
|
||||||
|
(let ((colours (list :aluminium-1 #xeeeeec
|
||||||
|
:aluminium-2 #xd3d7cf
|
||||||
|
:aluminium-3 #xbabdb6
|
||||||
|
:aluminium-4 #x888a85
|
||||||
|
:aluminium-5 #x555753
|
||||||
|
:aluminium-6 #x2e3436
|
||||||
|
:butter-1 #xfce94f
|
||||||
|
:butter-2 #xedd400
|
||||||
|
:butter-3 #xc4a000
|
||||||
|
:orange-1 #xfcaf3e
|
||||||
|
:orange-2 #xf57900
|
||||||
|
:orange-3 #xce5c00
|
||||||
|
:chocolate-1 #xe9b96e
|
||||||
|
:chocolate-2 #xc17d11
|
||||||
|
:chocolate-3 #x9f5902
|
||||||
|
:chameleon-1 #x8ae234
|
||||||
|
:chameleon-2 #x73d216
|
||||||
|
:chameleon-3 #x4e9a06
|
||||||
|
:sky-blue-1 #x729fcf
|
||||||
|
:sky-blue-2 #x3465a4
|
||||||
|
:sky-blue-3 #x204a87
|
||||||
|
:plum-1 #xad7fa8
|
||||||
|
:plum-2 #x75507b
|
||||||
|
:plum-3 #x5c3566
|
||||||
|
:scarlet-red-1 #xef2929
|
||||||
|
:scarlet-red-2 #xcc0000
|
||||||
|
:scarlet-red-3 #xa40000
|
||||||
|
:background #x252a2b
|
||||||
|
:black #x0c191c
|
||||||
|
:cyan "cyan3")))
|
||||||
|
(getf colours key)))
|
||||||
|
|
||||||
|
(defvar *conkeror-program* "conkeror"
|
||||||
|
"The executable to run to start Conkeror.")
|
||||||
|
(defvar *emacs-program* "emacsclient -c -a emacs"
|
||||||
|
"The executable to run to start Emacs.")
|
||||||
|
(defvar *firefox-program* "firefox"
|
||||||
|
"The executable to run to start Firefox.")
|
||||||
|
(defvar *i3lock-program* "i3lock -c 000000"
|
||||||
|
"The executable to run to start i3lock.")
|
||||||
|
(defvar *urxvt-program* "urxvt"
|
||||||
|
"The executable to run to start URxvt.")
|
||||||
|
|
||||||
|
(defun get-mail-count (mailbox &optional (inbox "inbox"))
|
||||||
|
"Check how many new messages there are in MAILBOX."
|
||||||
|
(length
|
||||||
|
(directory
|
||||||
|
(format nil "/home/slash/documents/mail/~A/~A/new/*.*"
|
||||||
|
mailbox inbox))))
|
||||||
|
|
||||||
|
(defcommand run-emacs () ()
|
||||||
|
"Open Emacs"
|
||||||
|
(run-shell-command *emacs-program*))
|
||||||
|
|
||||||
|
(defcommand raise-emacs () ()
|
||||||
|
"Open or show Emacs"
|
||||||
|
(run-or-raise *emacs-program* '(:class "Emacs")))
|
||||||
|
|
||||||
|
(defcommand run-firefox () ()
|
||||||
|
"Open Firefox"
|
||||||
|
(run-shell-command *firefox-program*))
|
||||||
|
|
||||||
|
(defcommand raise-firefox () ()
|
||||||
|
"Open or show Firefox"
|
||||||
|
(run-or-raise *firefox-program* '(:class "Firefox")))
|
||||||
|
|
||||||
|
(defcommand run-conkeror () ()
|
||||||
|
"Open Conkeror"
|
||||||
|
(run-shell-command *conkeror-program*))
|
||||||
|
|
||||||
|
(defcommand raise-conkeror () ()
|
||||||
|
"Open or show Conkeror"
|
||||||
|
(run-or-raise *conkeror-program* '(:class "Conkeror")))
|
||||||
|
|
||||||
|
(defcommand run-urxvt () ()
|
||||||
|
"Open URxvt"
|
||||||
|
(run-shell-command *urxvt-program*))
|
||||||
|
|
||||||
|
(defcommand raise-urxvt () ()
|
||||||
|
"Open URxvt"
|
||||||
|
(run-or-raise *urxvt-program* '(:class "URxvt")))
|
||||||
|
|
||||||
|
(defcommand run-i3lock () ()
|
||||||
|
"Lock screen"
|
||||||
|
(run-shell-command *i3lock-program*))
|
||||||
|
|
||||||
|
(set-bg-color (colour :background))
|
||||||
|
(set-border-color (colour :aluminium-6))
|
||||||
|
(set-fg-color (colour :aluminium-1))
|
||||||
|
(set-float-focus-color (colour :black))
|
||||||
|
(set-float-unfocus-color (colour :aluminium-6))
|
||||||
|
(set-focus-color (colour :black))
|
||||||
|
(set-font "-*-dejavu sans mono-medium-r-*-*-15-*-*-*-*-*-iso10646-*")
|
||||||
|
(set-unfocus-color (colour :aluminium-6))
|
||||||
|
(set-win-bg-color (colour :background))
|
||||||
|
|
||||||
|
(setf *colors* (mapcar #'colour '(:black :scarlet-red-1 :chameleon-1
|
||||||
|
:butter-1 :sky-blue-1 :plum-1 :cyan
|
||||||
|
:aluminium-1)))
|
||||||
|
(setf *input-window-gravity* :bottom-left)
|
||||||
|
(setf *maxsize-border-width* 1)
|
||||||
|
(setf *message-window-gravity* :top-right)
|
||||||
|
(setf *mode-line-background-color* (colour :background))
|
||||||
|
(setf *mode-line-border-color* (colour :aluminium-6))
|
||||||
|
(setf *mode-line-foreground-color* (colour :aluminium-1))
|
||||||
|
(setf *normal-border-width* 1)
|
||||||
|
(setf *shell-program* (getenv "SHELL"))
|
||||||
|
(setf *transient-border-width* 1)
|
||||||
|
(setf *window-border-style* :tight)
|
||||||
|
(setf *window-format* "%m%50t")
|
||||||
|
(setf *screen-mode-line-format*
|
||||||
|
(list "[%n]"
|
||||||
|
'(:eval
|
||||||
|
(format nil " | ryu: ~D | gmail: ~D | aethon: ~D | 9f: ~D | "
|
||||||
|
(get-mail-count "ryuslash.org")
|
||||||
|
(get-mail-count "gmail")
|
||||||
|
(get-mail-count "aethon")
|
||||||
|
(get-mail-count "ninthfloor")))
|
||||||
|
'(:eval
|
||||||
|
(format-expand *window-formatters* *window-format*
|
||||||
|
(current-window)))))
|
||||||
|
|
||||||
|
(set-prefix-key (kbd "C-z"))
|
||||||
|
|
||||||
|
(define-key *top-map* (kbd "C-M-l") "run-i3lock")
|
||||||
|
|
||||||
|
(define-key *root-map* (kbd "c") "raise-urxvt")
|
||||||
|
(define-key *root-map* (kbd "C") "run-urxvt")
|
||||||
|
(define-key *root-map* (kbd "e") "raise-emacs")
|
||||||
|
(define-key *root-map* (kbd "E") "run-emacs")
|
||||||
|
(define-key *root-map* (kbd "w") "raise-conkeror")
|
||||||
|
(define-key *root-map* (kbd "W") "run-conkeror")
|
||||||
|
|
||||||
|
(define-key *root-map* (kbd "C-b") "windowlist")
|
||||||
|
(define-key *root-map* (kbd "M-b") "move-window left")
|
||||||
|
(define-key *root-map* (kbd "M-f") "move-window right")
|
||||||
|
(define-key *root-map* (kbd "M-n") "move-window down")
|
||||||
|
(define-key *root-map* (kbd "M-p") "move-window up")
|
||||||
|
(define-key *root-map* (kbd "b") "move-focus left")
|
||||||
|
(define-key *root-map* (kbd "f") "move-focus right")
|
||||||
|
(define-key *root-map* (kbd "n") "move-focus down")
|
||||||
|
(define-key *root-map* (kbd "p") "move-focus up")
|
||||||
|
|
||||||
|
(undefine-key *root-map* (kbd "C-a"))
|
||||||
|
(undefine-key *root-map* (kbd "C-c"))
|
||||||
|
(undefine-key *root-map* (kbd "C-e"))
|
||||||
|
(undefine-key *root-map* (kbd "C-m"))
|
||||||
|
|
||||||
|
(define-frame-preference "Default"
|
||||||
|
(0 t nil :class "Emacs")
|
||||||
|
(1 t nil :class "Firefox")
|
||||||
|
(1 t nil :class "URxvt")
|
||||||
|
(1 t nil :class "Conkeror"))
|
||||||
|
|
||||||
|
(if (not (head-mode-line (current-head)))
|
||||||
|
(toggle-mode-line (current-screen) (current-head)))
|
||||||
|
|
||||||
|
(swank:create-server)
|
12
.zprofile
12
.zprofile
|
@ -1,8 +1,8 @@
|
||||||
# -*- eval: (git-auto-commit-mode 1) -*-
|
export BROWSER=conkeror
|
||||||
export BROWSER=firefox
|
|
||||||
export EDITOR="emacsclient -c -a emacs"
|
export EDITOR="emacsclient -c -a emacs"
|
||||||
export INFOPATH="${HOME}/documents/info:${INFOPATH}"
|
export INFOPATH="${HOME}/documents/info:/usr/local/emacs/share/info:/usr/share/info:/usr/local/stumpwm/share/info"
|
||||||
|
|
||||||
PATH="${HOME}/bin:${PATH}:/usr/local/bin:/usr/local/stumpwm/bin"
|
PATH="${HOME}/usr/bin:${PATH}:/usr/local/bin:/usr/local/stumpwm/bin"
|
||||||
PATH="$HOME/code/ext/emacs/trunk/lib-src:$PATH"
|
PATH="/usr/local/scwm/bin:$PATH"
|
||||||
export PATH="$HOME/code/ext/emacs/trunk/src:$PATH"
|
PATH="/usr/local/clfswm/bin:$PATH"
|
||||||
|
export PATH="/usr/local/emacs/bin:$PATH"
|
||||||
|
|
9
cower/Makefile
Normal file
9
cower/Makefile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
files = config
|
||||||
|
install-files = $(addprefix install-,$(files))
|
||||||
|
|
||||||
|
.PHONY: all install $(install-files)
|
||||||
|
all:
|
||||||
|
install: $(install-files)
|
||||||
|
|
||||||
|
$(install-files): install-%:
|
||||||
|
install -Dm 444 $* ${XDG_CONFIG_HOME}/cower/$*
|
3
cower/config
Normal file
3
cower/config
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Color = always
|
||||||
|
TargetDir = /home/slash/var/aur/
|
||||||
|
IgnoreRepo = pegas
|
Loading…
Reference in a new issue