Skip to content
Browse files

Remove unused rcfiles

  • Loading branch information...
1 parent 436d341 commit 2b6b161862f1d4efe3abfd6e6d23e636df85988b @kanru committed Aug 8, 2012
View
0 README
No changes.
View
115 awesome/mywidgets.lua
@@ -1,115 +0,0 @@
-local widget = widget
-local button = button
-local keybinding = keybinding
-local io = io
-local awful = require("awful")
-local wicked = require("wicked")
-local beautiful = require("beautiful")
-local theme = beautiful.get()
-
--- My widgets module
-module("mywidgets")
-
--- Create a alsamixer widget
-volumewidget = widget({
- type = 'progressbar',
- name = 'volumewidget',
- align = 'right'
-})
-volumewidget.width = 10
-volumewidget.vertical = true
-volumewidget.ticks_count = 6
-volumewidget.ticks_gap = 1
-volumewidget.border_width = 0
-volumewidget:bar_properties_set('volume', {
- min_value = 0,
- max_value = 100,
- fg = theme.fg_normal,
- bg = theme.bg_normal,
-})
-volumewidget:bar_data_add('volume', 100)
-local function update_volumewidget()
- local f = io.popen('amixer get Master')
- local l = f:lines()
- local v = ''
-
- for line in l do
- if line:find('Mono:') ~= nil then
- pend = line:find('%]', 0, true)
- pstart = line:find('[', 0, true)
- v = line:sub(pstart+1, pend-1)
- if line:find('[off]', 1, true) ~= nil then
- volumewidget:bar_properties_set('volume', {fg = '#666666'})
- else
- volumewidget:bar_properties_set('volume', {fg = theme.fg_normal})
- end
- end
- end
-
- f:close()
- volumewidget:bar_data_add('volume', v)
-end
-wicked.register(volumewidget, 'function', function (widget, args)
- update_volumewidget()
-end, 4)
-local function amixer_mute()
- awful.spawn('amixer -q set Master toggle')
- update_volumewidget()
-end
-local function amixer_inc()
- awful.spawn('amixer -q set Master 10%+')
- update_volumewidget()
-end
-local function amixer_dec()
- awful.spawn('amixer -q set Master 10%-')
- update_volumewidget()
-end
-volumewidget:buttons({
- button({ }, 1, amixer_mute),
- button({ }, 4, amixer_inc),
- button({ }, 5, amixer_dec),
-})
-keybinding({}, "XF86AudioMute", amixer_mute):add()
-keybinding({}, "XF86AudioRaiseVolume", amixer_inc):add()
-keybinding({}, "XF86AudioLowerVolume", amixer_dec):add()
--- Create a CPU usage graph widget
-cpugraphwidget = widget({
- type = 'graph',
- name = 'cpugraphwidget',
- align = 'right'
-})
-cpugraphwidget.height = 0.85
-cpugraphwidget.width = 40
-cpugraphwidget.bg = '#333333'
-cpugraphwidget.border_color = '#0a0a0a'
-cpugraphwidget.grow = 'right'
-cpugraphwidget:plot_properties_set('cpu', {
- fg = '#AEC6D8',
- fg_center = '#285577',
- fg_end = '#285577',
- vertical_gradient = false,
-})
-wicked.register(cpugraphwidget, 'cpu', '$1', 1, 'cpu')
--- Network
-netwidget = widget({
- type = 'textbox',
- name = 'netwidget',
- align = 'right'
-})
-netwidget.height = 0.85
-netwidget.width = 60
-wicked.register(netwidget, 'net', "<text align='right'/><span color='"..theme.fg_normal.."'>${wlan0 down}</span>", 1)
--- Temp
-tempwidget = widget({
- type = 'textbox',
- name = 'tempwidget',
- align = 'right',
-})
-tempwidget.height = 0.85
-tempwidget.width = 30
-wicked.register(tempwidget, 'function', function (widget, args)
- local f = io.open('/sys/class/thermal/thermal_zone0/temp')
- local temp = f:read('*n') / 1000.0
- f:close()
- return "<text align='right'/><span color='"..theme.fg_normal.."'>"..temp.."℃</span>"
-end, 4)
View
566 awesome/rc.lua
@@ -1,566 +0,0 @@
--- awesome 3 configuration file
-
--- Include awesome library, with lots of useful function!
-require("awful")
-require("tabulous")
-require("wicked")
-require("beautiful")
-
--- {{{ Variable definitions
--- This is a file path to a theme file which will defines colors.
-theme_path = "/home/kanru/.config/awesome/themes/default"
-
--- This is used later as the default terminal to run.
-terminal = "/home/kanru/bin/myterm.sh"
-
--- 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"
-alt = "Mod1"
-
--- Table of layouts to cover with awful.layout.inc, order matters.
-layouts =
-{
- "tile",
- "tileleft",
- "tilebottom",
- "tiletop",
- "fairh",
- "fairv",
- "magnifier",
- "max",
- "spiral",
- "dwindle",
- "floating"
-}
-
--- Table of clients that should be set floating. The index may be either
--- the application class or instance. The instance is useful when running
--- a console app in a terminal like (Music on Console)
--- xterm -name mocp -e mocp
-floatapps_cls =
-{
- -- by class
- ["MPlayer"] = true,
- ["pinentry"] = true
-}
-floatapps_ins =
-{
- -- by instance
- ["mocp"] = true,
- ["emesene"] = true
-}
-
--- Applications to be moved to a pre-defined tag by class or instance.
--- Use the screen and tags indices.
-apptags =
-{
- ["Minefield"] = { screen = screen.count(), tag = 3 },
- ["xchat"] = { screen = screen.count(), tag = 2 },
- -- ["mocp"] = { screen = 2, tag = 4 },
-}
-
--- Define if we want to use titlebar on all applications.
-use_titlebar = false
--- }}}
-
--- {{{ Initialization
--- Initialize theme (colors).
-beautiful.init(theme_path)
-
--- Register theme in awful.
--- This allows to not pass plenty of arguments to each function
--- to inform it about colors we want it to draw.
-awful.beautiful.register(beautiful)
-
--- Uncomment this to activate autotabbing
--- tabulous.autotab_start()
--- }}}
-
--- {{{ Tags
--- Define tags table.
-tags = {}
-for s = 1, screen.count() do
- -- Each screen has its own tag table.
- tags[s] = {}
- -- Create 9 tags per screen.
- for tagnumber = 1, 9 do
- tags[s][tagnumber] = tag({ name = tagnumber, layout = layouts[1] })
- -- Add tags to screen one by one
- tags[s][tagnumber].mwfact = 0.618033988769
- tags[s][tagnumber].screen = s
- end
- -- I'm sure you want to see at least one tag.
- tags[s][1].selected = true
-end
--- }}}
-
--- {{{ Statusbar
--- Create a alsamixer widget
-volumewidget = widget({
- type = 'progressbar',
- name = 'volumewidget',
- align = 'right'
-})
-volumewidget.width = 10
-volumewidget.vertical = true
-volumewidget.ticks_count = 6
-volumewidget.ticks_gap = 1
-volumewidget.border_width = 0
-volumewidget:bar_properties_set('volume', {
- min_value = 0,
- max_value = 100,
- fg = beautiful.fg_normal,
- bg = beautiful.bg_normal,
-})
-volumewidget:bar_data_add('volume', 100)
-local function update_volumewidget()
- local f = io.popen('amixer get Master')
- local l = f:lines()
- local v = ''
-
- for line in l do
- if line:find('Mono:') ~= nil then
- pend = line:find('%]', 0, true)
- pstart = line:find('[', 0, true)
- v = line:sub(pstart+1, pend-1)
- if line:find('[off]', 1, true) ~= nil then
- volumewidget:bar_properties_set('volume', {fg = '#666666'})
- else
- volumewidget:bar_properties_set('volume', {fg = beautiful.fg_normal})
- end
- end
- end
-
- f:close()
- volumewidget:bar_data_add('volume', v)
-end
-wicked.register(volumewidget, 'function', function (widget, args)
- update_volumewidget()
-end, 4)
-function amixer_mute()
- awful.spawn('amixer -q set Master toggle')
- update_volumewidget()
-end
-function amixer_inc()
- awful.spawn('amixer -q set Master 10%+')
- update_volumewidget()
-end
-function amixer_dec()
- awful.spawn('amixer -q set Master 10%-')
- update_volumewidget()
-end
-volumewidget:buttons({
- button({ }, 1, amixer_mute),
- button({ }, 4, amixer_inc),
- button({ }, 5, amixer_dec),
-})
-keybinding({}, "XF86AudioMute", amixer_mute):add()
-keybinding({}, "XF86AudioRaiseVolume", amixer_inc):add()
-keybinding({}, "XF86AudioLowerVolume", amixer_dec):add()
--- Create a CPU usage graph widget
-cpugraphwidget = widget({
- type = 'graph',
- name = 'cpugraphwidget',
- align = 'right'
-})
-cpugraphwidget.height = 0.85
-cpugraphwidget.width = 40
-cpugraphwidget.bg = '#333333'
-cpugraphwidget.border_color = '#0a0a0a'
-cpugraphwidget.grow = 'right'
-cpugraphwidget:plot_properties_set('cpu', {
- fg = '#AEC6D8',
- fg_center = '#285577',
- fg_end = '#285577',
- vertical_gradient = false,
-})
-wicked.register(cpugraphwidget, 'cpu', '$1', 1, 'cpu')
--- Network
-netwidget = widget({
- type = 'textbox',
- name = 'netwidget',
- align = 'right'
-})
-netwidget.height = 0.85
-netwidget.width = 60
-wicked.register(netwidget, 'net', "<text align='right'/><span color='"..beautiful.fg_normal.."'>${eth2 down}</span>", 1)
--- Create a taglist widget
-mytaglist = widget({ type = "taglist", name = "mytaglist" })
-mytaglist:buttons({
- button({ }, 1, function (object, tag) awful.tag.viewonly(tag) end),
- button({ modkey }, 1, function (object, tag) awful.client.movetotag(tag) end),
- button({ }, 3, function (object, tag) tag.selected = not tag.selected end),
- button({ modkey }, 3, function (object, tag) awful.client.toggletag(tag) end),
- button({ }, 4, awful.tag.viewnext),
- button({ }, 5, awful.tag.viewprev)
-})
-mytaglist.label = awful.widget.taglist.label.all
-
--- Create a tasklist widget
-mytasklist = widget({ type = "tasklist", name = "mytasklist" })
-mytasklist:buttons({
- button({ }, 1, function (object, c) client.focus = c; c:raise() end),
- button({ }, 4, function () awful.client.focusbyidx(1) end),
- button({ }, 5, function () awful.client.focusbyidx(-1) end)
-})
-mytasklist.label = awful.widget.tasklist.label.currenttags
-
--- Create a textbox widget
-mytextbox = widget({ type = "textbox", name = "mytextbox", align = "right" })
--- Set the default text in textbox
-mytextbox.text = "<b><small> " .. AWESOME_RELEASE .. " </small></b>"
-mypromptbox = widget({ type = "textbox", name = "mypromptbox", align = "left" })
-
--- Create a laucher widget
-mylauncher = awful.widget.launcher({ name = "mylauncher",
- image = "/usr/local/share/awesome/icons/awesome16.png",
- command = terminal .. " -e man awesome"})
-
--- Create a systray
-mysystray = widget({ type = "systray", name = "mysystray", align = "right" })
-
--- Create an iconbox widget which will contains an icon indicating which layout we're using.
--- We need one layoutbox per screen.
-mylayoutbox = {}
-for s = 1, screen.count() do
- mylayoutbox[s] = widget({ type = "imagebox", name = "mylayoutbox", align = "right" })
- mylayoutbox[s]:buttons({
- button({ }, 1, function () awful.layout.inc(layouts, 1) end),
- button({ }, 3, function () awful.layout.inc(layouts, -1) end),
- button({ }, 4, function () awful.layout.inc(layouts, 1) end),
- button({ }, 5, function () awful.layout.inc(layouts, -1) end)
- })
- mylayoutbox[s].image = image("/usr/local/share/awesome/icons/layouts/tilew.png")
-end
-
--- Create a wibox for each screen and add it
-mywibox = {}
-for s = 1, screen.count() do
- mywibox[s] = wibox({ position = "top", name = "mywibox" .. s,
- fg = beautiful.fg_normal, bg = beautiful.bg_normal })
- -- Add widgets to the wibox - order matters
- mywibox[s]:widgets({
- mytaglist,
- mytasklist,
- mylauncher,
- mypromptbox,
- netwidget,
- cpugraphwidget,
- volumewidget,
- mytextbox,
- s == screen.count() and mysystray or nil,
- mylayoutbox[s]
- })
- mywibox[s].screen = s
-end
--- }}}
-
--- {{{ Mouse bindings
-awesome.buttons({
- button({ }, 3, function () awful.spawn(terminal) end),
- button({ }, 4, awful.tag.viewnext),
- button({ }, 5, awful.tag.viewprev)
-})
--- }}}
-
--- {{{ Key bindings
-
--- Bind keyboard digits
--- 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
-
-for i = 1, keynumber do
- keybinding({ modkey }, i,
- function ()
- local screen = mouse.screen
- if tags[screen][i] then
- awful.tag.viewonly(tags[screen][i])
- end
- end):add()
- keybinding({ modkey, "Control" }, i,
- function ()
- local screen = mouse.screen
- if tags[screen][i] then
- tags[screen][i].selected = not tags[screen][i].selected
- end
- end):add()
- keybinding({ modkey, "Shift" }, i,
- function ()
- if client.focus then
- if tags[client.focus.screen][i] then
- awful.client.movetotag(tags[client.focus.screen][i])
- end
- end
- end):add()
- keybinding({ modkey, "Control", "Shift" }, i,
- function ()
- if client.focus then
- if tags[client.focus.screen][i] then
- awful.client.toggletag(tags[client.focus.screen][i])
- end
- end
- end):add()
-end
-
-keybinding({ modkey }, "Left", awful.tag.viewprev):add()
-keybinding({ modkey }, "Right", awful.tag.viewnext):add()
-keybinding({ modkey }, "Escape", awful.tag.history.restore):add()
-
--- Standard program
-keybinding({ modkey }, "Return", function () awful.spawn(terminal) end):add()
-
-keybinding({ modkey, "Control" }, "r", awesome.restart):add()
-keybinding({ modkey, "Shift" }, "q", awesome.quit):add()
-
--- Client manipulation
-keybinding({ modkey }, "m", awful.client.maximize):add()
-keybinding({ modkey }, "f", function () client.focus.fullscreen = not client.focus.fullscreen end):add()
-keybinding({ modkey, "Shift" }, "c", function () client.focus:kill() end):add()
-keybinding({ modkey }, "j", function () awful.client.focusbyidx(1); client.focus:raise() end):add()
-keybinding({ modkey }, "k", function () awful.client.focusbyidx(-1); client.focus:raise() end):add()
-keybinding({ modkey, "Shift" }, "j", function () awful.client.swap(1) end):add()
-keybinding({ modkey, "Shift" }, "k", function () awful.client.swap(-1) end):add()
-keybinding({ modkey, "Control" }, "j", function () awful.screen.focus(1) end):add()
-keybinding({ modkey, "Control" }, "k", function () awful.screen.focus(-1) end):add()
-keybinding({ modkey, "Control" }, "space", awful.client.togglefloating):add()
-keybinding({ modkey, "Control" }, "Return", function () client.focus:swap(awful.client.master()) end):add()
-keybinding({ modkey }, "o", awful.client.movetoscreen):add()
-keybinding({ modkey }, "Tab", awful.client.focus.history.previous):add()
-keybinding({ modkey }, "u", awful.client.urgent.jumpto):add()
-keybinding({ modkey, "Shift" }, "r", function () client.focus:redraw() end):add()
-keybinding({ alt }, "F4", function () client.focus:kill() end):add()
-
--- Layout manipulation
-keybinding({ modkey }, "l", function () awful.tag.incmwfact(0.05) end):add()
-keybinding({ modkey }, "h", function () awful.tag.incmwfact(-0.05) end):add()
-keybinding({ modkey, "Shift" }, "h", function () awful.tag.incnmaster(1) end):add()
-keybinding({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end):add()
-keybinding({ modkey, "Control" }, "h", function () awful.tag.incncol(1) end):add()
-keybinding({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end):add()
-keybinding({ modkey }, "space", function () awful.layout.inc(layouts, 1) end):add()
-keybinding({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end):add()
-
--- Prompt
-keybinding({ modkey }, "F1", function ()
- awful.prompt.run({ prompt = "Run: " }, mypromptbox, awful.spawn, awful.completion.bash,
-os.getenv("HOME") .. "/.cache/awesome/history") end):add()
-keybinding({ modkey }, "F4", function ()
- awful.prompt.run({ prompt = "Run Lua code: " }, mypromptbox, awful.eval, awful.prompt.bash,
-os.getenv("HOME") .. "/.cache/awesome/history_eval") end):add()
-keybinding({ modkey, "Ctrl" }, "i", function ()
- if mypromptbox.text then
- mypromptbox.text = nil
- else
- mypromptbox.text = nil
- if client.focus.class then
- mypromptbox.text = "Class: " .. client.focus.class .. " "
- end
- if client.focus.instance then
- mypromptbox.text = mypromptbox.text .. "Instance: ".. client.focus.instance .. " "
- end
- if client.focus.role then
- mypromptbox.text = mypromptbox.text .. "Role: ".. client.focus.role
- end
- end
- end):add()
-
---- Tabulous, tab manipulation
-keybinding({ modkey, "Control" }, "y", function ()
- local tabbedview = tabulous.tabindex_get()
- local nextclient = awful.client.next(1)
-
- if not tabbedview then
- tabbedview = tabulous.tabindex_get(nextclient)
-
- if not tabbedview then
- tabbedview = tabulous.tab_create()
- tabulous.tab(tabbedview, nextclient)
- else
- tabulous.tab(tabbedview, client.focus)
- end
- else
- tabulous.tab(tabbedview, nextclient)
- end
-end):add()
-
-keybinding({ modkey, "Shift" }, "y", tabulous.untab):add()
-
-keybinding({ modkey }, "y", function ()
- local tabbedview = tabulous.tabindex_get()
-
- if tabbedview then
- local n = tabulous.next(tabbedview)
- tabulous.display(tabbedview, n)
- end
-end):add()
-
--- Client awful tagging: this is useful to tag some clients and then do stuff like move to tag on them
-keybinding({ modkey }, "t", awful.client.togglemarked):add()
-keybinding({ modkey, 'Shift' }, "t", function ()
- local tabbedview = tabulous.tabindex_get()
- local clients = awful.client.getmarked()
-
- if not tabbedview then
- tabbedview = tabulous.tab_create(clients[1])
- table.remove(clients, 1)
- end
-
- for k,c in pairs(clients) do
- tabulous.tab(tabbedview, c)
- end
-
-end):add()
-
-for i = 1, keynumber do
- keybinding({ modkey, "Shift" }, "F" .. i,
- function ()
- local screen = mouse.screen
- if tags[screen][i] then
- for k, c in pairs(awful.client.getmarked()) do
- awful.client.movetotag(tags[screen][i], c)
- end
- end
- end):add()
-end
-
-keybinding({ modkey }, "b",
- function ()
- local screen = mouse.screen
- if mystatusbar[screen].position == "top" then
- mystatusbar[screen].position = "off"
- else
- mystatusbar[screen].position = "top"
- end
- end):add()
--- }}}
-
--- {{{ Hooks
--- Hook function to execute when focusing a client.
-awful.hooks.focus.register(function (c)
- if not awful.client.ismarked(c) then
- c.border_color = beautiful.border_focus
- end
-end)
-
--- Hook function to execute when unfocusing a client.
-awful.hooks.unfocus.register(function (c)
- if not awful.client.ismarked(c) then
- c.border_color = beautiful.border_normal
- end
-end)
-
--- Hook function to execute when marking a client
-awful.hooks.marked.register(function (c)
- c.border_color = beautiful.border_marked
-end)
-
--- Hook function to execute when unmarking a client
-awful.hooks.unmarked.register(function (c)
- c.border_color = beautiful.border_focus
-end)
-
--- Hook function to execute when the mouse is over a client.
-awful.hooks.mouse_enter.register(function (c)
- -- Sloppy focus, but disabled for magnifier layout
- if awful.layout.get(c.screen) ~= "magnifier"
- and awful.client.focus.filter(c) then
- client.focus = c
- end
-end)
-
--- Hook function to execute when a new client appears.
-awful.hooks.manage.register(function (c)
- if use_titlebar then
- -- Add a titlebar
- awful.titlebar.add(c, { modkey = modkey })
- end
- -- Add mouse bindings
- c:buttons({
- button({ }, 1, function (c) client.focus = c; c:raise() end),
- button({ modkey }, 1, function (c) c:mouse_move() end),
- button({ modkey }, 3, function (c) c:mouse_resize() end)
- })
- -- New client may not receive focus
- -- if they're not focusable, so set border anyway.
- c.border_width = beautiful.border_width
- c.border_color = beautiful.border_normal
- client.focus = c
-
- -- Check if the application should be floating.
- local cls = c.class
- local inst = c.instance
- if floatapps_cls[cls] then
- c.floating = floatapps_cls[cls]
- elseif floatapps_ins[inst] then
- c.floating = floatapps_ins[inst]
- end
-
- -- Check application->screen/tag mappings.
- local target
- if apptags[cls] then
- target = apptags[cls]
- elseif apptags[inst] then
- target = apptags[inst]
- end
- if target then
- c.screen = target.screen
- awful.client.movetotag(tags[target.screen][target.tag], c)
- end
-
- -- Set the windows at the slave,
- -- i.e. put it at the end of others instead of setting it master.
- -- awful.client.setslave(c)
-
- -- Honor size hints: if you want to drop the gaps between windows, set this to false.
- -- c.honorsizehints = false
- -- awful.placement.no_overlap(c)
-end)
-
--- Hook function to execute when arranging the screen
--- (tag switch, new client, etc)
-awful.hooks.arrange.register(function (screen)
- local layout = awful.layout.get(screen)
- if layout then
- mylayoutbox[screen].image = image("/usr/local/share/awesome/icons/layouts/" .. layout .. "w.png")
- else
- mylayoutbox[screen].image = nil
- end
-
- -- Give focus to the latest client in history if no window has focus
- -- or if the current window is a desktop or a dock one.
- if not client.focus then
- local c = awful.client.focus.history.get(screen, 0)
- if c then client.focus = c end
- end
-
- -- Uncomment if you want mouse warping
- --[[
- if client.focus then
- local c_c = client.focus:coords()
- local m_c = mouse.coords()
-
- if m_c.x < c_c.x or m_c.x >= c_c.x + c_c.width or
- m_c.y < c_c.y or m_c.y >= c_c.y + c_c.height then
- if table.maxn(m_c.buttons) == 0 then
- mouse.coords({ x = c_c.x + 5, y = c_c.y + 5})
- end
- end
- end
- ]]
-end)
-
--- Hook called every second
-awful.hooks.timer.register(1, function ()
- -- For unix time_t lovers
- -- mytextbox.text = " " .. os.time() .. " time_t "
- -- Otherwise use:
- mytextbox.text = ' ' .. os.date('%a %d %b - %H:%M') .. ' '
-end)
--- }}}
View
19 awesome/themes/blue
@@ -1,19 +0,0 @@
----------------------------------
--- cool blue theme
----------------------------------
-font = Sans 8
-
-bg_normal = #272C30
-bg_focus = #7985A3
-bg_urgent = #A36666
-
-fg_normal = #707678
-fg_focus = #D7DFE5
-fg_urgent = #A36666
-
-border_width = 1
-border_normal = #272C30
-border_focus = #7985A3
-border_marked = #A3BA8C
-
-#wallpaper_cmd = nitrogen --restore
View
74 awesome/themes/default
@@ -1,74 +0,0 @@
----------------------------
--- Default awesome theme --
----------------------------
-
-font = sans 8
-
-bg_normal = #222222
-bg_focus = #535d6c
-bg_urgent = #ff0000
-
-fg_normal = #aaaaaa
-fg_focus = #ffffff
-fg_urgent = #ffffff
-
-border_width = 1
-border_normal = #000000
-border_focus = #535d6c
-border_marked = #91231c
-
-# There are another variables sets
-# overriding the default one when
-# defined, the sets are:
-# [taglist|tasklist]_[bg|fg]_[focus|urgent]
-# titlebar_[bg|fg]_[normal|focus]
-# Example:
-#taglist_bg_focus = #ff0000
-
-# Display the taglist squares
-taglist_squares_sel = /usr/local/share/awesome/themes/default/taglist/squarefw.png
-taglist_squares_unsel = /usr/local/share/awesome/themes/default/taglist/squarew.png
-
-tasklist_floating_icon = /usr/local/share/awesome/themes/default/tasklist/floatingw.png
-
-# Variables set for theming menu
-# menu_[bg|fg]_[normal|focus]
-# menu_[border_color|border_width]
-menu_submenu_icon = /usr/local/share/awesome/themes/default/submenu.png
-menu_height = 15
-menu_width = 100
-
-# You can add as many variables as
-# you wish and access them by using
-# beautiful.variable in your rc.lua
-#bg_widget = #cc0000
-
-# Display close button inside titlebar
-titlebar_close_button = true
-
-# Define the image to load
-@ (if titlebar_close_button_[normal|focus] these values are ignored)
-#titlebar_close_button_img_normal = /usr/local/share/awesome/themes/default/titlebar/closea.png
-#titlebar_close_button_img_focus = /usr/local/share/awesome/themes/default/titlebar/closera.png
-# Or create your own close button
-#titlebar_close_button_normal = <span>...</span>
-#titlebar_close_button_focus = <span>...</span>
-
-# You can use your own command to set your wallpaper
-wallpaper_cmd = awsetbg /usr/local/share/awesome/themes/default/background.png
-wallpaper_cmd = nitrogen --restore
-
-# You can use your own layout icons like this:
-layout_dwindle = /usr/local/share/awesome/themes/default/layouts/dwindlew.png
-layout_fairh = /usr/local/share/awesome/themes/default/layouts/fairhw.png
-layout_fairv = /usr/local/share/awesome/themes/default/layouts/fairvw.png
-layout_floating = /usr/local/share/awesome/themes/default/layouts/floatingw.png
-layout_magnifier = /usr/local/share/awesome/themes/default/layouts/magnifierw.png
-layout_max = /usr/local/share/awesome/themes/default/layouts/maxw.png
-layout_spiral = /usr/local/share/awesome/themes/default/layouts/spiralw.png
-layout_tilebottom = /usr/local/share/awesome/themes/default/layouts/tilebottomw.png
-layout_tileleft = /usr/local/share/awesome/themes/default/layouts/tileleftw.png
-layout_tile = /usr/local/share/awesome/themes/default/layouts/tilew.png
-layout_tiletop = /usr/local/share/awesome/themes/default/layouts/tiletopw.png
-
-awesome_icon = /usr/local/share/awesome/icons/awesome16.png
View
27 awesome/themes/hacker
@@ -1,27 +0,0 @@
----------------------------------
--- subtle hacker awesome theme --
----------------------------------
-
-font = terminus 8
-
-bg_normal = #000000
-bg_focus = #2f4f4f
-bg_urgent = #8b0000
-
-fg_normal = #f5deb3
-fg_focus = #ffa500
-fg_urgent = #ffff00
-
-border_width = 1
-border_normal = #2f4f4f
-border_focus = #ffa500
-border_marked = #8b0000
-
-# You can use your own command to
-# set your wallpaper
-wallpaper_cmd=nitrogen --restore
-
-# You can add as many variables as
-# you wish and access them by using
-# beautiful.variable in your rc.lua
-#bg_widget = #cc0000
View
1 awesome/themes/theme
View
693 awesome/wicked.lua
@@ -1,693 +0,0 @@
----------------------------------------------------------------------------
--- Wicked widgets for the awesome window manager
----------------------------------------------------------------------------
--- Lucas de Vries <lucas@glacicle.com>
--- Licensed under the WTFPL
--- Version: v1.0pre-awe3.0rc4
----------------------------------------------------------------------------
-
--- Require libs
-require("awful")
-
----- {{{ Grab environment
-local ipairs = ipairs
-local pairs = pairs
-local print = print
-local type = type
-local tonumber = tonumber
-local tostring = tostring
-local math = math
-local table = table
-local awful = awful
-local os = os
-local io = io
-local string = string
-
--- Grab C API
-local capi =
-{
- awesome = awesome,
- screen = screen,
- client = client,
- mouse = mouse,
- button = button,
- titlebar = titlebar,
- widget = widget,
- hooks = hooks,
- keygrabber = keygrabber
-}
-
--- }}}
-
--- Wicked: Widgets for the awesome window manager
-module("wicked")
-
----- {{{ Initialise variables
-local registered = {}
-local widget_cache = {}
-
--- Initialise function tables
-widgets = {}
-helper = {}
-
-local nets = {}
-local cpu_total = {}
-local cpu_active = {}
-local cpu_usage = {}
-
--- }}}
-
----- {{{ Helper functions
-
-----{{{ Log
-function helper.log(var)
- local log = io.open("/home/fhuizing/rc.log", "a")
- log:write(os.date("%c\t")..tostring(var).."\n")
- log:close()
-end
-----}}}
-
-----{{{ Max width
-function helper.max_width(str, width)
- l = str:len()
-
- if l > width then
- r = math.floor(width/2)
- a = str:sub(1,r)
- b = str:sub(l-r, l)
- str = a .. "..." .. b
- end
-
- return str
-end
-----}}}
-
-----{{{ Force a fixed width on a string with spaces
-function helper.fixed_width(str, width)
- l = str:len()
- n = width-l
- if n >= 0 then
- for i = 1, n do
- str = str.." "
- end
- else
- str = str:sub(0, l+n)
- end
- return str
-end
-----}}}
-
----- {{{ Format a string with args
-function helper.format(format, args)
- -- TODO: Find a more efficient way to do this
-
- -- Format a string
- for var,val in pairs(args) do
- format = string.gsub(format, '$'..var, val)
- end
-
- -- Return formatted string
- return format
-end
--- }}}
-
----- {{{ Padd a number to a minimum amount of digits
-function helper.padd(number, padding)
- s = tostring(number)
-
- if padding == nil then
- return s
- end
-
- for i=1,padding do
- if math.floor(number/math.pow(10,(i-1))) == 0 then
- s = "0"..s
- end
- end
-
- if number == 0 then
- s = s:sub(2)
- end
-
- return s
-end
--- }}}
-
----- {{{ Convert amount of bytes to string
-function helper.bytes_to_string(bytes, sec, padding)
- if bytes == nil or tonumber(bytes) == nil then
- return ''
- end
-
- bytes = tonumber(bytes)
-
- signs = {}
- signs[1] = ' b'
- signs[2] = 'KiB'
- signs[3] = 'MiB'
- signs[4] = 'GiB'
- signs[5] = 'TiB'
-
- sign = 1
-
- while bytes/1024 > 1 and signs[sign+1] ~= nil do
- bytes = bytes/1024
- sign = sign+1
- end
-
- bytes = bytes*10
- bytes = math.floor(bytes)/10
-
- if padding then
- bytes = helper.padd(bytes*10, padding+1)
- bytes = bytes:sub(1, bytes:len()-1).."."..bytes:sub(bytes:len())
- end
-
- if sec then
- return tostring(bytes)..signs[sign]..'ps'
- else
- return tostring(bytes)..signs[sign]
- end
-end
--- }}}
-
----- {{{ Split by whitespace
-function helper.splitbywhitespace(str)
- values = {}
- start = 1
- splitstart, splitend = string.find(str, ' ', start)
-
- while splitstart do
- m = string.sub(str, start, splitstart-1)
- if m:gsub(' ','') ~= '' then
- table.insert(values, m)
- end
-
- start = splitend+1
- splitstart, splitend = string.find(str, ' ', start)
- end
-
- m = string.sub(str, start)
- if m:gsub(' ','') ~= '' then
- table.insert(values, m)
- end
-
- return values
-end
--- }}}
-
---{{{ Escape a string
-function helper.escape(text)
- if text then
- text = text:gsub("&", "&amp;")
- text = text:gsub("<", "&lt;")
- text = text:gsub(">", "&gt;")
- text = text:gsub("'", "&apos;")
- text = text:gsub("\"", "&quot;")
- end
- return text
-end
-
--- }}}
-
--- }}}
-
----- {{{ Widget types
-
----- {{{ MPD widget type
-function widgets.mpd()
- ---- Get data from mpc
- local nowplaying_file = io.popen('mpc')
- local nowplaying = nowplaying_file:read()
-
- -- Check that it's not nil
- if nowplaying == nil then
- return {''}
- end
-
- -- Close the command
- nowplaying_file:close()
-
- -- Escape
- nowplaying = helper.escape(nowplaying)
-
- -- Return it
- return {nowplaying}
-end
-
-widget_cache[widgets.mpd] = {}
--- }}}
-
----- {{{ MOCP widget type
-function widgets.mocp(format, max_width)
- local playing = ''
-
- ---- Get data from mocp
- local info = io.popen('mocp -i')
- local state = info:read()
- state = state.gsub(state, 'State: ', '')
-
- if (state == "PLAY") then
- local file = info:read()
- file = file.gsub(file, 'File: ', '')
- local title = info:read()
- title = title.gsub(title, 'Title: ', '')
- local artist = info:read()
- artist = artist.gsub(artist, 'Artist: ', '')
- local songtitle = info:read()
- songtitle = songtitle.gsub(songtitle, 'SongTitle: ', '')
- local album = info:read()
- album = album.gsub(album, 'Album: ', '')
-
- if (artist:len() == 0) then
- file = string.reverse(file)
- i = string.find(file, '/')
- if (i ~= nil) then
- file = string.sub(file, 0, i-1)
- end
- playing = string.reverse(file)
- elseif (songtitle:len() == 0) then
- playing = artist .. ' - ' .. title
- else
- playing = artist .. ' - ' .. songtitle
- end
- else
- playing = state
- end
-
- -- Close file
- info:close()
-
- -- Apply maximum width
- if (max_width ~= nil) then
- playing = helper.max_width(playing, max_width)
- end
-
- playing = helper.escape(playing)
-
- -- Return it
- return {playing}
-end
-
-widget_cache[widgets.mocp] = {}
--- }}}
-
----- {{{ CPU widget type
-function widgets.cpu(format, padding)
- -- Calculate CPU usage for all available CPUs / cores and return the
- -- usage
-
- -- Perform a new measurement
- ---- Get /proc/stat
- local cpu_lines = {}
- local cpu_usage_file = io.open('/proc/stat')
- for line in cpu_usage_file:lines() do
- if string.sub(line, 1, 3) == 'cpu' then
- table.insert(cpu_lines, helper.splitbywhitespace(line))
- end
- end
- cpu_usage_file:close()
-
- ---- Ensure tables are initialized correctly
- while #cpu_total < #cpu_lines do
- table.insert(cpu_total, 0)
- end
- while #cpu_active < #cpu_lines do
- table.insert(cpu_active, 0)
- end
- while #cpu_usage < #cpu_lines do
- table.insert(cpu_usage, 0)
- end
-
- ---- Setup tables
- total_new = {}
- active_new = {}
- diff_total = {}
- diff_active = {}
-
- for i,v in ipairs(cpu_lines) do
- ---- Calculate totals
- total_new[i] = v[2] + v[3] + v[4] + v[5]
- active_new[i] = v[2] + v[3] + v[4]
-
- ---- Calculate percentage
- diff_total[i] = total_new[i] - cpu_total[i]
- diff_active[i] = active_new[i] - cpu_active[i]
- cpu_usage[i] = math.floor(diff_active[i] / diff_total[i] * 100)
-
- ---- Store totals
- cpu_total[i] = total_new[i]
- cpu_active[i] = active_new[i]
- end
-
- if padding ~= nil then
- for k,v in pairs(cpu_usage) do
- if type(padding) == "table" then
- p = padding[k]
- else
- p = padding
- end
-
- cpu_usage[k] = helper.padd(cpu_usage[k], p)
- end
- end
-
- return cpu_usage
-end
-
-widget_cache[widgets.cpu] = {}
--- }}}
-
----- {{{ Memory widget type
-function widgets.mem(format, padding)
- -- Return MEM usage values
- local f = io.open('/proc/meminfo')
-
- ---- Get data
- for line in f:lines() do
- line = helper.splitbywhitespace(line)
-
- if line[1] == 'MemTotal:' then
- mem_total = math.floor(line[2]/1024)
- elseif line[1] == 'MemFree:' then
- free = math.floor(line[2]/1024)
- elseif line[1] == 'Buffers:' then
- buffers = math.floor(line[2]/1024)
- elseif line[1] == 'Cached:' then
- cached = math.floor(line[2]/1024)
- end
- end
- f:close()
-
- ---- Calculate percentage
- mem_free=free+buffers+cached
- mem_inuse=mem_total-mem_free
- mem_usepercent = math.floor(mem_inuse/mem_total*100)
-
- if padding then
- if type(padding) == "table" then
- mem_usepercent = helper.padd(mem_usepercent, padding[1])
- mem_inuse = helper.padd(mem_inuse, padding[2])
- mem_total = helper.padd(mem_total, padding[3])
- mem_free = helper.padd(mem_free, padding[4])
- else
- mem_usepercent = helper.padd(mem_usepercent, padding)
- mem_inuse = helper.padd(mem_inuse, padding)
- mem_total = helper.padd(mem_total, padding)
- mem_free = helper.padd(mem_free, padding)
- end
- end
-
- return {mem_usepercent, mem_inuse, mem_total, mem_free}
-end
-
-widget_cache[widgets.mem] = {}
--- }}}
-
----- {{{ Swap widget type
-function widgets.swap(format, padding)
- -- Return SWAP usage values
- local f = io.open('/proc/meminfo')
-
- ---- Get data
- for line in f:lines() do
- line = helper.splitbywhitespace(line)
-
- if line[1] == 'SwapTotal:' then
- swap_total = math.floor(line[2]/1024)
- elseif line[1] == 'SwapFree:' then
- free = math.floor(line[2]/1024)
- elseif line[1] == 'SwapCached:' then
- cached = math.floor(line[2]/1024)
- end
- end
- f:close()
-
- ---- Calculate percentage
- swap_free=free+cached
- swap_inuse=swap_total-swap_free
- swap_usepercent = math.floor(swap_inuse/swap_total*100)
-
- if padding then
- if type(padding) == "table" then
- swap_usepercent = helper.padd(swap_usepercent, padding[1])
- swap_inuse = helper.padd(swap_inuse, padding[2])
- swap_total = helper.padd(swap_total, padding[3])
- swap_free = helper.padd(swap_free, padding[4])
- else
- swap_usepercent = helper.padd(swap_usepercent, padding)
- swap_inuse = helper.padd(swap_inuse, padding)
- swap_total = helper.padd(swap_total, padding)
- swap_free = helper.padd(swap_free, padding)
- end
- end
-
- return {swap_usepercent, swap_inuse, swap_total, swap_free}
-end
-
-widget_cache[widgets.swap] = {}
--- }}}
-
----- {{{ Date widget type
-function widgets.date(format)
- -- Get format
- if format == nil then
- return os.date()
- else
- return os.date(format)
- end
-end
--- }}}
-
----- {{{ Filesystem widget type
-function widgets.fs(format, padding)
- local f = io.popen('df -h')
- local args = {}
-
- for line in f:lines() do
- vars = helper.splitbywhitespace(line)
-
- if vars[1] ~= 'Filesystem' and #vars == 6 then
- vars[5] = vars[5]:gsub('%%','')
-
- if padding then
- if type(padding) == "table" then
- vars[2] = helper.padd(vars[2], padding[1])
- vars[3] = helper.padd(vars[3], padding[2])
- vars[4] = helper.padd(vars[4], padding[3])
- vars[5] = helper.padd(vars[5], padding[4])
- else
- vars[2] = helper.padd(vars[2], padding)
- vars[3] = helper.padd(vars[3], padding)
- vars[4] = helper.padd(vars[4], padding)
- vars[5] = helper.padd(vars[5], padding)
- end
- end
-
- args['{'..vars[6]..' size}'] = vars[2]
- args['{'..vars[6]..' used}'] = vars[3]
- args['{'..vars[6]..' avail}'] = vars[4]
- args['{'..vars[6]..' usep}'] = vars[5]
- end
- end
-
- f:close()
- return args
-end
--- }}}
-
----- {{{ Net widget type
-function widgets.net(format, padding)
- local f = io.open('/proc/net/dev')
- args = {}
-
- for line in f:lines() do
- line = helper.splitbywhitespace(line)
-
- local p = line[1]:find(':')
- if p ~= nil then
- name = line[1]:sub(0,p-1)
- line[1] = line[1]:sub(p+1)
-
- if tonumber(line[1]) == nil then
- line[1] = line[2]
- line[9] = line[10]
- end
-
- if padding then
- args['{'..name..' rx}'] = helper.bytes_to_string(line[1], nil, padding)
- args['{'..name..' tx}'] = helper.bytes_to_string(line[9], nil, padding)
- else
- args['{'..name..' rx}'] = helper.bytes_to_string(line[1])
- args['{'..name..' tx}'] = helper.bytes_to_string(line[9])
- end
-
- args['{'..name..' rx_b}'] = math.floor(line[1]*10)/10
- args['{'..name..' tx_b}'] = math.floor(line[9]*10)/10
-
- args['{'..name..' rx_kb}'] = math.floor(line[1]/1024*10)/10
- args['{'..name..' tx_kb}'] = math.floor(line[9]/1024*10)/10
-
- args['{'..name..' rx_mb}'] = math.floor(line[1]/1024/1024*10)/10
- args['{'..name..' tx_mb}'] = math.floor(line[9]/1024/1024*10)/10
-
- args['{'..name..' rx_gb}'] = math.floor(line[1]/1024/1024/1024*10)/10
- args['{'..name..' tx_gb}'] = math.floor(line[9]/1024/1024/1024*10)/10
-
- if nets[name] == nil then
- nets[name] = {}
- args['{'..name..' down}'] = 'n/a'
- args['{'..name..' up}'] = 'n/a'
-
- args['{'..name..' down_b}'] = 0
- args['{'..name..' up_b}'] = 0
-
- args['{'..name..' down_kb}'] = 0
- args['{'..name..' up_kb}'] = 0
-
- args['{'..name..' down_mb}'] = 0
- args['{'..name..' up_mb}'] = 0
-
- args['{'..name..' down_gb}'] = 0
- args['{'..name..' up_gb}'] = 0
-
- nets[name].time = os.time()
- else
- interval = os.time()-nets[name].time
- nets[name].time = os.time()
-
- down = (line[1]-nets[name][1])/interval
- up = (line[9]-nets[name][2])/interval
-
- if padding then
- args['{'..name..' down}'] = helper.bytes_to_string(down, true, padding)
- args['{'..name..' up}'] = helper.bytes_to_string(up, true, padding)
- else
- args['{'..name..' down}'] = helper.bytes_to_string(down, true)
- args['{'..name..' up}'] = helper.bytes_to_string(up, true)
- end
-
- args['{'..name..' down_b}'] = math.floor(down*10)/10
- args['{'..name..' up_b}'] = math.floor(up*10)/10
-
- args['{'..name..' down_kb}'] = math.floor(down/1024*10)/10
- args['{'..name..' up_kb}'] = math.floor(up/1024*10)/10
-
- args['{'..name..' down_mb}'] = math.floor(down/1024/1024*10)/10
- args['{'..name..' up_mb}'] = math.floor(up/1024/1024*10)/10
-
- args['{'..name..' down_gb}'] = math.floor(down/1024/1024/1024*10)/10
- args['{'..name..' up_gb}'] = math.floor(up/1024/1024/1024*10)/10
- end
-
- nets[name][1] = line[1]
- nets[name][2] = line[9]
- end
- end
-
- f:close()
- return args
-end
-widget_cache[widgets.net] = {}
--- }}}
-
--- For backwards compatibility: custom function
-widgets["function"] = function ()
- return {}
-end
-
--- }}}
-
----- {{{ Main functions
----- {{{ Register widget
-function register(widget, wtype, format, timer, field, padd)
- local reg = {}
- local widget = widget
-
- -- Set properties
- reg.type = wtype
- reg.format = format
- reg.timer = timer
- reg.field = field
- reg.padd = padd
-
- -- Default to timer=1
- if reg.timer == nil then
- reg.timer = 1
- end
-
- -- Allow using a string widget type
- if type(reg.type) == "string" then
- reg.type = widgets[reg.type]
- end
-
- -- Put widget in table
- if registered[widget] == nil then
- registered[widget] = {}
- end
-
- table.insert(registered[widget], reg)
-
- -- Start timer
- awful.hooks.timer.register(reg.timer, function ()
- update(widget, reg)
- end)
-end
--- }}}
-
----- {{{ Update widget
-function update(widget, reg)
- -- Check if there are any equal widgets
- if reg == nil then
- for w, i in pairs(registered) do
- if w == widget then
- for k,v in pairs(i) do
- update(w, v)
- end
- end
- end
-
- return
- end
-
- local t = os.time()
- local data = {}
-
- -- Check if we have output chached for this widget,
- -- newer than last widget update.
- if widget_cache[reg.type] ~= nil then
- local c = widget_cache[reg.type]
-
- if c.time == nil or c.time <= t-reg.timer then
- c.time = t
- c.data = reg.type(reg.format, reg.padd)
- end
-
- data = c.data
- else
- data = reg.type(reg.format, reg.padd)
- end
-
- if type(data) == "table" then
- if type(reg.format) == "string" then
- data = helper.format(reg.format, data)
- elseif type(reg.format) == "function" then
- data = reg.format(widget, data)
- end
- end
-
- if reg.field == nil then
- widget.text = data
- elseif widget.plot_data_add ~= nil then
- widget:plot_data_add(reg.field, tonumber(data))
- elseif widget.bar_data_add ~= nil then
- widget:bar_data_add(reg.field, tonumber(data))
- end
- return data
-end
-
--- }}}
-
--- }}}
-
--- vim: set filetype=lua fdm=marker tabstop=4 shiftwidth=4 nu:
View
4 bin/myfx.sh
@@ -1,4 +0,0 @@
-#!/bin/sh
-#unset XMODIFIERS
-#firefox $1
-/home/kanru/Desktop/firefox/firefox $1
View
5 bin/myterm.sh
@@ -1,5 +0,0 @@
-#!/bin/sh
-#urxvt -fn "xft:Monaco:pixelsize=15,xft:DFLiHei Std W5:pixelsize=17,xft:Microsoft YaHei:pixelsize=20" +sb -cr red -pt Root -rv $@
-#gnome-terminal $@
-export TERM=gnome
-exec roxterm $@
View
1 gtkrc.mine
@@ -1 +0,0 @@
-gtk-icon-theme-name="Tango"
View
72 mutt/muttrc
@@ -1,72 +0,0 @@
-# pager
-unignore date
-ignore X-Bogosity List- X-
-set implicit_autoview=yes
-
-# index
-set index_format="%4C %Z %{%b %d} %-15.15L %s"
-
-# sending
-set sendmail_wait=-1
-
-# editing
-set edit_headers=yes
-
-# accounts
-set reverse_name = yes
-set from = koster@debian.org.tw
-set realname = "Kanru Chen"
-alternates kanru.96@stu.csie.ncnu.edu.tw
-alternates koster@debian.org.tw
-alternates s2321016@ncnu.edu.tw
-alternates s96321525@ncnu.edu.tw
-alternates kanru@csie.us
-alternates ckanru@gmail.com
-alternates kanru@atom.kanru.info
-
-set move=ask-yes
-
-# mailbox
-set mbox_type=MH
-set header_cache= ~/Mail/.hcache
-account-hook . 'unset preconnect imap_user imap_pass imap_authenticators; set ssl_starttls=ask-yes'
-folder-hook . "set folder=~/Mail;set mbox=+inbox;set postponed=+postponed;set record=+sent"
-account-hook imaps://stu.csie.ncnu.edu.tw/ 'set imap_user=kanru.96 imap_pass=xxxxx'
-folder-hook imaps://stu.csie.ncnu.edu.tw/ 'set folder=imaps://stu.csie.ncnu.edu.tw record=+Sent postponed=+Drafts'
-mailboxes ~/Mail/inbox imaps://stu.csie.ncnu.edu.tw /var/mail/kanru
-
-# charset
-set assumed_charset="big5:gb2312:utf-8"
-set charset="utf-8"
-set send_charset="utf-8:big5:gb2312:us-ascii:iso-8859-1:x-unknown"
-charset-hook !utf-8 big5
-charset-hook big5 BIG5-CP950
-set locale="en_US.UTF-8"
-set allow_8bit=yes
-set use_8bitmime=yes
-
-# contacts
-set query_command = "abook --mutt-query %s"
-set alias_file=~/.mutt/aliases
-set sort_alias=alias
-set reverse_alias=yes
-source $alias_file
-
-#set envelope_from=yes
-
-# gpg
-open-hook \\.gpg$ "gpg --decrypt < %f > %t"
-close-hook \\.gpg$ "gpg --encrypt --recipient 365CC7A2 < %t > %f"
-set pgp_timeout = 0
-set pgp_auto_decode = yes
-set crypt_autosign = yes
-
-# lists
-subscribe members@debian.org.tw Newsteam@tossug.org hojia@tossug.org
-subscribe chewing-devel
-
-# key bindings
-bind index d delete-message
-bind pager d delete-message
-
-source /home/kanru/.mutt/colors.d/rosenfeldstheme
View
19 roxterm.sourceforge.net/Colours/Default
@@ -1,19 +0,0 @@
-
-[roxterm colour scheme]
-0=#2c2c2c2c2c2c
-1=#c0c000000000
-2=#0000c0c00000
-3=#c0c0c0c00000
-4=#55555555ffff
-5=#aaaa0000aaaa
-6=#0000aaaaaaaa
-7=#e8e8e8e8e8e8
-palette_size=8
-8=#000000000000
-9=#ffff00000000
-10=#0000ffff0000
-11=#ffffffff0000
-12=#26266666ffff
-13=#ffff0000ffff
-14=#0000ffffffff
-15=#ffffffffffff
View
22 roxterm.sourceforge.net/Colours/GTK
@@ -1,22 +0,0 @@
-
-[roxterm colour scheme]
-foreground=
-background=
-palette_size=16
-0=#000000
-1=#960000
-2=#009600
-3=#AA5500
-4=#0000AA
-5=#A000A0
-6=#009696
-7=#F0F0F0
-8=#646464
-9=#F05050
-10=#49DC49
-11=#B8B81E
-12=#5555FF
-13=#E64CE6
-14=#00C8C8
-15=#FFFFFF
-cursor=#939309b609b6
View
22 roxterm.sourceforge.net/Colours/Tango
@@ -1,22 +0,0 @@
-
-[roxterm colour scheme]
-foreground=#fffff54df54d
-background=#000000000000
-palette_size=16
-0=#000000000000
-1=#CCCC00000000
-2=#4E4E9A9A0606
-3=#C4C4A0A00000
-4=#34346565A4A4
-5=#757550507B7B
-6=#060698209A9A
-7=#D3D3D7D7CFCF
-8=#555557575353
-9=#EFEF29292929
-10=#8A8AE2E23434
-11=#FCFCE9E94F4F
-12=#72729F9FCFCF
-13=#ADAD7F7FA8A8
-14=#3434E2E2E2E2
-15=#EEEEEEEEECEC
-cursor=#ffffffffffff
View
6 roxterm.sourceforge.net/Encodings
@@ -1,6 +0,0 @@
-
-[roxterm encodings]
-n=3
-e0=UTF-8
-e1=ISO-8859-1
-e2=Big5
View
3 roxterm.sourceforge.net/Global
@@ -1,3 +0,0 @@
-
-[roxterm options]
-colour_scheme=Tango
View
12 roxterm.sourceforge.net/Profiles/Default
@@ -1,12 +0,0 @@
-
-[roxterm profile]
-font=Bitstream Vera Sans Mono 9
-hide_menubar=1
-background_type=0
-saturation=0.000000
-scrollbar_pos=0
-scroll_on_keystroke=1
-mailer_spawn_type=2
-browser=xdg-open
-mailer=mutt
-wrap_switch_tab=1
View
257 vimrc
@@ -1,257 +0,0 @@
-" Prevent modelines in files from being evaluated (avoids a potential
-" " security problem wherein a malicious user could write a hazardous
-" " modeline into a file) (override default value of 5)
-set modeline
-
-" Performance
-set nofsync
-set sws=""
-"set nu
-let &guicursor = &guicursor . ",a:blinkon0"
-set guioptions-=T
-set guioptions-=m
-set guioptions-=e
-set guioptions-=r
-" Tab
-set showtabline=1
-set expandtab
-set smarttab
-set smartcase
-set shiftwidth=4
-set softtabstop=4
-set tabstop=4
-set ignorecase
-set nobackup
-set writebackup
-set nocompatible " We're running Vim, not Vi!
-set backspace=indent,eol,start " more powerful backspacing
-set autoindent " always set autoindenting on
-set smartindent
-set lz
-set sj=-50
-set viminfo='20,\"50 " read/write a .viminfo file, don't store more than
- " 50 lines of registers
-set history=50 " keep 50 lines of command line history
-set ruler " show the cursor position all the time
-"set hls
-set incsearch
-"set wildmenu
-"set wim=longest:full
-set gfn=Bitstream\ Vera\ Sans\ Mono\ 10,DFLiHeiStd\ W5\ 13
-set makeprg=g++\ -o\ %<\ %
-set showcmd
-set showmatch
-set fileencodings=utf-8,iso8859-1,utf16le,gb2312,big5,latin1,gbk,euc-jp,euc-kr,utf32,utf-bom
-set encoding=utf8
-set tenc=utf8
-syntax on " Enable syntax highlighting
-if $COLORTERM == 'roxterm'
- set term=gnome-256color
- colorscheme railscasts
-elseif has("gui_running")
- colorscheme railscasts
-else
- colorscheme default
-endif
-"set t_Co=256
-"colorscheme desert256
-"if has("gui_running")
-" set bg=light
-"else
-" set bg=dark
-"endif
-"hi LineNr guibg=lightgray
-
-let g:tex_flavor = "latex"
-
-" set commandline
-cnoremap <C-A> <Home>
-cnoremap <C-F> <Right>
-cnoremap <C-B> <Left>
-
-" Suffixes that get lower priority when doing tab completion for filenames.
-" These are files we are not likely to want to edit or read.
-set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
-filetype on " Enable fieltype detection
-if has("autocmd")
- " Enabled file type detection
- " Use the default filetype settings. If you also want to load indent files
- " to automatically do language-dependent indenting add 'indent' as well.
- filetype plugin on
- filetype indent on " Enable filetype-specific indentin
-endif " has("autocmd")
-" Make p in Visual mode replace the selected text with the "" register.
-vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
-" Some Debian-specific things
-augroup filetype
- au BufRead reportbug.* set ft=mail
- au BufRead reportbug-* set ft=mail
- au BufRead *.p6 set ft=perl6
-augroup END
-
-"colorscheme tango
-"colorscheme vibrant-ink
-"使用 :update 代替 :w,以便在有修改時才會存檔,注意,這和 vi 不相容。
-map tn gt
-map tp gT
-map <F2> :up<CR>
-"map <F2> :set fileencoding=big5<CR>
-"map <F3> :up<CR>:q<CR> " 存檔後離開
-"map <F3> :set fileencoding=utf8<CR>
-map <F3> <ESC>:up<CR>:silent !xelatex -interaction=batchmode main.tex &<CR>:redraw!<CR>
-"map <F4> :q!<CR> " 不存檔離開
-"map <F5> :bp<CR> " 前一個 buffer 檔案
-"map <F6> :bn<CR> " 下一個 buffer 檔案
-
-map <F5> <ESC>:tabnew<CR>
-
-map <F4> <ESC>:call OpenFileFromClipboard()<CR>
-imap <F4> <ESC>:call OpenFileFromClipboard()<CR>
-
-"" 單鍵 <F7> 控制 syntax on/off。倒斜線是 Vim script 的折行標誌
-" 按一次 <F7> 是 on 的話,再按一次則是 off,再按一次又是 on。
-" " 原因是有時候顏色太多會妨礙閱讀。
-map <F7> :if exists("syntax_on") <BAR>
- \ syntax off <BAR><CR>
- \ else <BAR>
- \ syntax enable <BAR>
- \ endif <CR>
-" " 按 F8 會在 searching highlight 及非 highlight 間切換
-map <F8> :set hls!<BAR>set hls?<CR>
-" " Toggle on/off paste mode
-map <F9> :set paste!<BAr>set paste?<CR>
-set pastetoggle=<F9>
-
-map <F10> <ESC>:read !date<CR> " 插入日期
-"map <F11> :%!xxd<CR> " 呼叫 xxd 做 16 進位顯示
-"map <F12> :%!xxd -r<CR> " 回復正常顯示
-map <F11> <ESC>gT
-imap <F11> <ESC>gT
-map <F12> <ESC>gt
-imap <F12> <ESC>gt
-
-map \v <ESC>:!make > /dev/null<CR><CR>
-
-nnoremap ; :
-
-nmap <tab> V>
-nmap <s-tab> V<
-xmap <tab> >gv
-xmap <s-tab> <gv
-
-"set grepprg=global\ -t
-"set grepformat=%m%\\s%\\+%l%\\s%f%.%#
-
-" Transparent editing of gpg encrypted files.
-" Placed Public Domain by Wouter Hanegraaff <wouter@blub.net>
-" (asc support and sh -c"..." added by Osamu Aoki)
-augroup aencrypted
- au!
-
- " First make sure nothing is written to ~/.viminfo while editing
- " an encrypted file.
- autocmd BufReadPre,FileReadPre *.asc set viminfo=
- " We don't want a swap file, as it writes unencrypted data to disk
- autocmd BufReadPre,FileReadPre *.asc set noswapfile
- " Switch to binary mode to read the encrypted file
- autocmd BufReadPre,FileReadPre *.asc set bin
- autocmd BufReadPre,FileReadPre *.asc let ch_save = &ch|set ch=2
- autocmd BufReadPost,FileReadPost *.asc '[,']!sh -c "gpg --decrypt 2> /dev/null"
- " Switch to normal mode for editing
- autocmd BufReadPost,FileReadPost *.asc set nobin
- autocmd BufReadPost,FileReadPost *.asc let &ch = ch_save|unlet ch_save
- autocmd BufReadPost,FileReadPost *.asc execute ":doautocmd BufReadPost " . expand("%:r")
-
- " Convert all text to encrypted text before writing
- autocmd BufWritePre,FileWritePre *.asc '[,']!sh -c "gpg --default-recipient-self -ae 2>/dev/null"
- " Undo the encryption so we are back in the normal text, directly
- " after the file has been written.
- autocmd BufWritePost,FileWritePost *.asc u
-augroup END
-augroup bencrypted
- au!
-
- " First make sure nothing is written to ~/.viminfo while editing
- " an encrypted file.
- autocmd BufReadPre,FileReadPre *.gpg set viminfo=
- " We don't want a swap file, as it writes unencrypted data to disk
- autocmd BufReadPre,FileReadPre *.gpg set noswapfile
- " Switch to binary mode to read the encrypted file
- autocmd BufReadPre,FileReadPre *.gpg set bin
- autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2
- autocmd BufReadPost,FileReadPost *.gpg '[,']!sh -c "gpg --decrypt 2> /dev/null"
- " Switch to normal mode for editing
- autocmd BufReadPost,FileReadPost *.gpg set nobin
- autocmd BufReadPost,FileReadPost *.gpg let &ch = ch_save|unlet ch_save
- autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r")
-
- " Convert all text to encrypted text before writing
- autocmd BufWritePre,FileWritePre *.gpg '[,']!sh -c "gpg --default-recipient-self -e 2>/dev/null"
- " Undo the encryption so we are back in the normal text, directly
- " after the file has been written.
- autocmd BufWritePost,FileWritePost *.gpg u
-augroup END
-
-
-"------------------------------------------------------------------------------
-" my settings
-"------------------------------------------------------------------------------
-augroup ShellScript
- autocmd!
- autocmd BufWritePost,FileWritePost *.sh !chmod 755 %
- autocmd BufWritePost,FileWritePost *.pl !chmod a+x %
- autocmd BufWritePost,FileWritePost *.rb !chmod a+x %
-augroup END
-"-----------
-" linux kernel coding style
-"-----------
-"set ts=8
-"if !exists("autocommands_loaded")
-" let autocommands_loaded = 1
-" augroup C
-" autocmd BufRead *.c set cindent
-" augroup END
-"endif
-
-"-----
-" gnu c coding style
-"-----
-"augroup C
-" autocmd BufRead *.c set cinoptions={.5s,:.5s,+.5s,t0,g0,^-2,e-2,n-2,p2s,(0,=.5s formatoptions=croql cindent shiftwidth=4 tabstop=8
-"augroup END
-
-let Tlist_Ctags_Cmd="/usr/bin/ctags"
-
-au BufNewFile,BufRead svn-commit.* setf svn
-
-
-"let c_syntax_for_h = 1
-"let c_C94 = 1
-"let c_C99_warn = 0
-"let c_cpp_warn = 0
-"let c_warn_8bitchars = 0
-"let c_warn_multichar = 0
-"let c_warn_digraph = 1
-"let c_warn_trigraph = 1
-"let c_no_octal = 1
-"let c_comment_strings = 1
-"let c_comment_numbers = 1
-"let c_comment_types = 1
-"let c_comment_date_time = 1
-
-"source ~/.vim/syntax/debug.vim
-"let g:snip_set_textmate_cp = 1
-"source ~/.vim/plugin/snippetsEmu.vim
-"imap <Right> <Plug>Jumper
-map <F10> :Tlist <CR>
-if has("autocmd") && exists("+omnifunc")
- autocmd Filetype *
- \ if &omnifunc == "" |
- \ setlocal omnifunc=syntaxcomplete#Complete |
- \ endif
-endif
-if version >= 603
- set helplang=cn
-endif
-let python_highlight_all = 1
-let changelog_username = "Kanru Chen <koster@debian.org.tw>"
View
1 wgetrc
@@ -1 +0,0 @@
-http_proxy=proxy.hinet.net:80
View
44 x11/10-x11-input.fdi
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<deviceinfo version="0.2">
- <device>
- <match key="info.capabilities" contains="input.mouse">
- <merge key="input.x11_driver" type="string">mouse</merge>
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
- <merge key="input.x11_driver" type="string">evdev</merge>
- </match>
- </match>
-
- <match key="info.capabilities" contains="input.keys">
- <merge key="input.x11_options.XkbRules" type="string">base</merge>
- <!-- If we're using Linux, we use evdev by default (falling back to
- keyboard otherwise). -->
- <merge key="input.x11_driver" type="string">keyboard</merge>
- <merge key="input.x11_options.XkbModel" type="string">pc105</merge>
- <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
- string="Linux">
- <merge key="input.x11_driver" type="string">evdev</merge>
- <merge key="input.x11_options.XkbModel" type="string">evdev</merge>
- </match>
- <merge key="input.x11_options.XkbVariant" type="string" />
- <merge key="input.x11_options.XkbLayout" type="string">dvorak</merge>
- <merge key="input.x11_options.XkbOptions" type="string">ctrl:nocaps</merge>
- </match>
- <match key="info.capabilities" contains="input.touchpad">
- <merge key="input.x11_driver" type="string">synaptics</merge>
- <merge key="input.x11_options.Protocol" type="string">auto-dev</merge>
- <merge key="input.x11_options.SHMConfig" type="string">on</merge>
- <!--
- <merge key="input.x11_options.LeftEdge" type="string">1100</merge>
- <merge key="input.x11_options.RightEdge" type="string">5800</merge>
- <merge key="input.x11_options.TopEdge" type="string">1600</merge>
- <merge key="input.x11_options.BottomEdge" type="string">4200</merge>
- -->
- <merge key="input.x11_options.TapButton1" type="string">1</merge>
- <merge key="input.x11_options.TapButton2" type="string">2</merge>
- <merge key="input.x11_options.TapButton3" type="string">3</merge>
- <merge key="input.x11_options.RTCornerButton" type="string">2</merge>
- <merge key="input.x11_options.HorizEdgeScroll" type="string">on</merge>
- </match>
- </device>
-</deviceinfo>
View
30 x11/xorg.conf
@@ -1,30 +0,0 @@
-# (xorg X Window System server configuration file)
-#
-# This file was generated by dexconf, the Debian X Configuration tool, using
-# values from the debconf database.
-#
-# Edit this file with caution, and see the manual page.
-# (Type "man " at the shell prompt.)
-#
-# This file is automatically updated on package upgrades *only*
-# if it has not been modified since the last upgrade of the
-# package.
-#
-# If you have edited this file but would like it to be automatically updated
-# again, run the following command:
-# sudo dpkg-reconfigure -phigh
-
-Section "Device"
- Identifier "i915gm"
- Driver "intel"
-EndSection
-
-Section "Screen"
- Identifier "Default Screen"
- Device "i915gm"
- DefaultDepth 24
- SubSection "Display"
- Modes "1280x768"
- Virtual 1280 1792
- EndSubSection
-EndSection

0 comments on commit 2b6b161

Please sign in to comment.
Something went wrong with that request. Please try again.