From dea55ad916ab564d7e123c2dab7bc8ac1739fb6a Mon Sep 17 00:00:00 2001 From: arrow_zhang Date: Sun, 12 Oct 2008 01:48:26 +0800 Subject: [PATCH] [UP] del tab module in ion, change status update interval. --- archlinux_conf/etc/ion3/cfg_defaults.lua | 2 +- archlinux_conf/etc/ion3/look_cool.lua | 4 +- archlinux_conf/etc/ion3/min_tabs.lua | 117 ---------------------------- archlinux_conf/etc/ion3/statusd_maildir.lua | 2 +- archlinux_conf/etc/ion3/statusd_volume.lua | 2 +- archlinux_conf/etc/ion3/tabmenu.lua | 64 --------------- 6 files changed, 4 insertions(+), 187 deletions(-) delete mode 100644 archlinux_conf/etc/ion3/min_tabs.lua delete mode 100644 archlinux_conf/etc/ion3/tabmenu.lua diff --git a/archlinux_conf/etc/ion3/cfg_defaults.lua b/archlinux_conf/etc/ion3/cfg_defaults.lua index 67e4998..329951a 100644 --- a/archlinux_conf/etc/ion3/cfg_defaults.lua +++ b/archlinux_conf/etc/ion3/cfg_defaults.lua @@ -3,7 +3,7 @@ -- --dopath("query_url") -dopath("min_tabs") +--dopath("min_tabs") dopath("cfg_ioncore") dopath("cfg_kludges") dopath("cfg_layouts") diff --git a/archlinux_conf/etc/ion3/look_cool.lua b/archlinux_conf/etc/ion3/look_cool.lua index b851f58..0decd69 100644 --- a/archlinux_conf/etc/ion3/look_cool.lua +++ b/archlinux_conf/etc/ion3/look_cool.lua @@ -20,8 +20,8 @@ de.defstyle("*", { padding_pixels = 0, spacing = 0, - font = "-xos4-terminus-medium-r-normal--14-*-*-*-*-*-*-*", text_align = "center", + font = "-*-fangsong ti-*-*-*-*-16-*-*-*-*-*-*-*", }) de.defstyle("frame", { @@ -134,7 +134,6 @@ de.defstyle("tab-menuentry", { padding_pixels = 6, spacing = 0, - font = "-xos4-terminus-medium-r-normal--16-*-*-*-*-*-*-*", text_align = "left", -- de.substyle("*-*-submenu", { @@ -146,7 +145,6 @@ de.defstyle("tab-menuentry-big", { padding_pixels = 8, - font = "-xos4-terminus-medium-r-normal--28-*-*-*-*-*-*-*", }) de.defstyle("tab-menuentry-pmenu", { diff --git a/archlinux_conf/etc/ion3/min_tabs.lua b/archlinux_conf/etc/ion3/min_tabs.lua deleted file mode 100644 index 949545a..0000000 --- a/archlinux_conf/etc/ion3/min_tabs.lua +++ /dev/null @@ -1,117 +0,0 @@ ---[[ - min_tabs.lua - - lua code to auto show/hide tabs as the number of windows in an ion frame - changes from/to 1 - this affects windows on WIonWS and WPaneWS workspaces but leave - windows on WFloatWS's alone - - Originally created by David Tweed - - 22 Feb 2007 John Schreiner: ignore transients to prevent empty frames - 14 Dec 2006 David Roundy: modified to work with latest ion3 - 11 Feb 2005 David Tweed: modified to work with ion3 svn versions - 15 Feb 2005 Cas Cremers: only frames with one window hide the tabbar - (as opposed to <= 2) - 01 Sep 2005 Cas Cremers: single client windows that are tagged still - show the tabbar. - - - Easier to work with using a style with slightly wider frame - borders and more vivid "active frame" colours. - - The keybinding META..T is defined at the end of the file: this - should override the normal binging, thus min_tabs should be - loaded *after* the normal definition of META..T. It is not - appropriate to have key bindings hard-coded in extensions, but I - don't currently know of a better way. - - Currently supports ion3 with old toggling as well as new - toggling function conventions; this can be removed later on. - - one way to enable this is by adding - dopath("min_tabs") - to cfg_ion.lua - -]] - -function show_only_necessary_tabs_in_frame(fp) - if WFrame.mode(fp) == 'floating' then - -- Escape: floatws thing should not be handled - return - end - - - -- First the logic, then the propagation back to ion - - -- It should *not* be shown if there is only one app - -- However, this (single) app should not be tagged, - -- because then we would want to show it. - - -- Assume the tabbar should be shown. - local show_bar = true - if WMPlex.mx_count(fp) == 1 then - local rg = fp:mx_nth(0) - if not rg:is_tagged() then - show_bar = false - end - end - - -- Propagate choice - ioncore.defer(function() - -- don't touch transient frames - if fp:mode() ~= "transient" then - if show_bar then - fp:set_mode("tiled") - else - fp:set_mode("tiled-alt") - end - end - end) -end - - - -function show_only_necessary_tabs_in_frame_wrapper(ftable) - show_only_necessary_tabs_in_frame(ftable.reg) -end - - - -function min_tabs_setup_hook() - local hk=ioncore.get_hook("frame_managed_changed_hook") - hk:add(show_only_necessary_tabs_in_frame_wrapper) -end - - - -function min_tabs_tag_wrapper(fr,reg) - - -- Note the ugly code: this actually caters for two versions of ion3 - -- I am only including this because I like Ubuntu [CC] - - local oldversion = (reg["toggle_tag"] ~= nil) - if oldversion then - - -- old version (for Ubuntu, can be removed later on) - reg:toggle_tag() - - else - - -- new version - reg:set_tagged("toggle") - - end - - -- recompute tabbar state - show_only_necessary_tabs_in_frame(fr) -end - - ---[[ - Special keybinding override for this extension -]] - -defbindings("WMPlex.toplevel", { - bdoc("Tag current object within the frame."), - kpress(META.."T", "min_tabs_tag_wrapper(_,_sub)", "_sub:non-nil"), -}) - -min_tabs_setup_hook() diff --git a/archlinux_conf/etc/ion3/statusd_maildir.lua b/archlinux_conf/etc/ion3/statusd_maildir.lua index 3e3456c..2de0706 100644 --- a/archlinux_conf/etc/ion3/statusd_maildir.lua +++ b/archlinux_conf/etc/ion3/statusd_maildir.lua @@ -28,7 +28,7 @@ if not statusd_maildir then statusd_maildir={ - interval=30000, + interval=20000, maildirs = {INBOX="~/Maildir/"}, } end diff --git a/archlinux_conf/etc/ion3/statusd_volume.lua b/archlinux_conf/etc/ion3/statusd_volume.lua index 53d515b..d168cd7 100644 --- a/archlinux_conf/etc/ion3/statusd_volume.lua +++ b/archlinux_conf/etc/ion3/statusd_volume.lua @@ -65,7 +65,7 @@ local function update_volume() inform_volume("volume_level", master_level) inform_volume("volume_state", sound_state) if statusd ~= nil then - volume_timer:set(500, update_volume) + volume_timer:set(10000, update_volume) end end diff --git a/archlinux_conf/etc/ion3/tabmenu.lua b/archlinux_conf/etc/ion3/tabmenu.lua deleted file mode 100644 index 133d01d..0000000 --- a/archlinux_conf/etc/ion3/tabmenu.lua +++ /dev/null @@ -1,64 +0,0 @@ --- --- tabmenu.lua --- --- By Tuomo Valkonen, 2007. --- --- This script introduces a tabmenu function that can be used to --- display a grabmenu corresponding to the tabs of a frame. It can --- be useful if you choose to disable the tab-bars of frames, to --- replace the META+K N/P bindings with the following: --- --- ioncore.defbindings("WFrame.toplevel", { --- submap(META.."K", { --- kpress("N", "tabmenu.tabmenu(_, _sub, 'next')"), --- kpress("P", "tabmenu.tabmenu(_, _sub, 'prev')"), --- }) --- }) --- --- - -tabmenu={} - --- WRegion.displayname isn't exported ATM, so here's a hacky --- implementation. -function tabmenu.hack_displayname(reg) - local name=reg:name() - if obj_is(reg, "WGroupCW") then - local b=reg:bottom() - if b then - name=b:name() - end - end - return name -end - - -function tabmenu.tabmenu(_, _sub, index) - local i=1 - local m={} - _:mx_i(function(r) - local e=menuentry(tabmenu.hack_displayname(r), - function() r:goto() end) - table.insert(m, e) - if r==_sub - then i=#m - end - return true - end) - - if #m==0 then - table.insert(m, menuentry("", function() end)) - i=nil - elseif index=='next' then - i=((i==#m and 1) or i+1) - elseif index=='prev' then - i=((i==1 and #m) or i-1) - elseif index=='first' then - i=1 - elseif index=='last' then - i=#m - end - - mod_menu.grabmenu(_, nil, m, {initial=i}) -end - -- 2.11.4.GIT