From: Leandro Lucarella Date: Mon, 29 Oct 2007 16:50:19 +0000 (-0300) Subject: Initial import of my ion3 configuration files. X-Git-Url: https://git.llucax.com/personal/ion3-config.git/commitdiff_plain/95055893030d872a0836efab8981ab50b5f4cf20 Initial import of my ion3 configuration files. --- 95055893030d872a0836efab8981ab50b5f4cf20 diff --git a/.welcome_msg_displayed b/.welcome_msg_displayed new file mode 100644 index 0000000..e69de29 diff --git a/default/.cfg_ioncore.lua.swp b/default/.cfg_ioncore.lua.swp new file mode 100644 index 0000000..c3794b1 Binary files /dev/null and b/default/.cfg_ioncore.lua.swp differ diff --git a/default/cfg_ion.lua b/default/cfg_ion.lua new file mode 100644 index 0000000..7090737 --- /dev/null +++ b/default/cfg_ion.lua @@ -0,0 +1,96 @@ +-- +-- Ion main configuration file +-- +-- This file only includes some settings that are rather frequently altered. +-- The rest of the settings are in cfg_ioncore.lua and individual modules' +-- configuration files (cfg_modulename.lua). +-- + +-- Set default modifiers. Alt should usually be mapped to Mod1 on +-- XFree86-based systems. The flying window keys are probably Mod3 +-- or Mod4; see the output of 'xmodmap'. +-- These may be defined in /etc/default/ion3, loaded as cfg_debian. +dopath("cfg_debian") +META="Mod4+" +--ALTMETA="" + +-- Terminal emulator +XTERM="x-terminal-emulator" + +-- Some basic settings +ioncore.set{ + -- Maximum delay between clicks in milliseconds to be considered a + -- double click. + --dblclick_delay=250, + + -- For keyboard resize, time (in milliseconds) to wait after latest + -- key press before automatically leaving resize mode (and doing + -- the resize in case of non-opaque move). + --kbresize_delay=1500, + + -- Opaque resize? + --opaque_resize=false, + + -- Movement commands warp the pointer to frames instead of just + -- changing focus. Enabled by default. + --warp=true, + + -- Switch frames to display newly mapped windows + --switchto=true, + + -- Default index for windows in frames: one of 'last', 'next' (for + -- after current), or 'next-act' (for after current and anything with + -- activity right after it). + --frame_default_index='next', + + -- Auto-unsqueeze transients/menus/queries. + --unsqueeze=true, + + -- Display notification tooltips for activity on hidden workspace. + --screen_notify=true, +} + + +-- Load default settings. The file cfg_defaults loads all the files +-- commented out below, except mod_dock. If you do not want to load +-- something, comment out this line, and uncomment the lines corresponding +-- the the modules or configuration files that you want, below. +-- The modules' configuration files correspond to the names of the +-- modules with 'mod' replaced by 'cfg'. +dopath("cfg_defaults") + +-- Load configuration of the Ion 'core' +--dopath("cfg_ioncore") + +-- Load some kludges to make apps behave better. +--dopath("cfg_kludges") + +-- Define some layouts. +--dopath("cfg_layouts") + +-- Load some modules. +--dopath("mod_query") +--dopath("mod_menu") +--dopath("mod_tiling") +--dopath("mod_statusbar") +--dopath("mod_dock") +--dopath("mod_sp") + + +-- +-- Common customisations +-- + +-- Uncommenting the following lines should get you plain-old-menus instead +-- of query-menus. + +defbindings("WScreen", { + kpress(ALTMETA.."F12", "mod_menu.menu(_, _sub, 'mainmenu', {big=true})"), +}) + +defbindings("WMPlex.toplevel", { + kpress(META.."M", "mod_menu.menu(_, _sub, 'ctxmenu')"), +}) + +-- Mis bindings +dopath("luca_key_bindings") diff --git a/default/cfg_ioncore.lua b/default/cfg_ioncore.lua new file mode 100644 index 0000000..e65b8bf --- /dev/null +++ b/default/cfg_ioncore.lua @@ -0,0 +1,380 @@ +-- +-- Ion core configuration file +-- + + +-- +-- Bindings. This includes global bindings and bindings common to +-- screens and all types of frames only. See modules' configuration +-- files for other bindings. +-- + + +-- WScreen context bindings +-- +-- The bindings in this context are available all the time. +-- +-- The variable META should contain a string of the form 'Mod1+' +-- where Mod1 maybe replaced with the modifier you want to use for most +-- of the bindings. Similarly ALTMETA may be redefined to add a +-- modifier to some of the F-key bindings. + +defbindings("WScreen", { + + submap(META.."K", { + bdoc("Go to first region demanding attention or previously active one."), + kpress("K", "mod_menu.grabmenu(_, _sub, 'focuslist')"), + -- Alternative without (cyclable) menu + --kpress("K", "ioncore.goto_activity() or ioncore.goto_previous()"), + + --bdoc("Go to previous active object."), + --kpress("K", "ioncore.goto_previous()"), + + --bdoc("Go to first object on activity/urgency list."), + --kpress("I", "ioncore.goto_activity()"), + }), + + --bdoc("Go to n:th screen on multihead setup."), + --kpress(META.."Shift+1", "ioncore.goto_nth_screen(0)"), + --kpress(META.."Shift+2", "ioncore.goto_nth_screen(1)"), + + --bdoc("Go to next/previous screen on multihead setup."), + --kpress(META.."Shift+comma", "ioncore.goto_prev_screen()"), + --kpress(META.."Shift+period", "ioncore.goto_next_screen()"), + + bdoc("Create a new workspace of chosen default type."), + kpress(META.."F9", "ioncore.create_ws(_)"), + + bdoc("Display the main menu."), + --kpress(ALTMETA.."F12", "mod_query.query_menu(_, _sub, 'mainmenu', 'Main menu:')"), + --kpress(ALTMETA.."F12", "mod_menu.menu(_, _sub, 'mainmenu', {big=true})"), + mpress("Button3", "mod_menu.pmenu(_, _sub, 'mainmenu')"), + + bdoc("Display the window list menu."), + mpress("Button2", "mod_menu.pmenu(_, _sub, 'windowlist')"), + + bdoc("Forward-circulate focus."), + -- '_chld' used here stands to for an actual child window that may not + -- be managed by the screen itself, unlike '_sub', that is likely to be + -- the managing group of that window. The right/left directions are + -- used instead of next/prev, because they work better in conjunction + -- with tilings. + kpress(META.."Tab", "ioncore.goto_next(_chld, 'right')", + "_chld:non-nil"), + submap(META.."K", { + bdoc("Backward-circulate focus."), + kpress("AnyModifier+Tab", "ioncore.goto_next(_chld, 'left')", + "_chld:non-nil"), + + bdoc("Raise focused object, if possible."), + kpress("AnyModifier+R", "WRegion.rqorder(_chld, 'front')", + "_chld:non-nil"), + }), + +}) + + +-- Client window bindings +-- +-- These bindings affect client windows directly. + +defbindings("WClientWin", { + bdoc("Nudge the client window. This might help with some ".. + "programs' resizing problems."), + kpress_wait(META.."L", "WClientWin.nudge(_)"), + + submap(META.."K", { + bdoc("Kill client owning the client window."), + kpress("C", "WClientWin.kill(_)"), + + bdoc("Send next key press to the client window. ".. + "Some programs may not allow this by default."), + kpress("Q", "WClientWin.quote_next(_)"), + }), +}) + + +-- Client window group bindings + +defbindings("WGroupCW", { + bdoc("Toggle client window group full-screen mode"), + kpress_wait(META.."Return", "WGroup.set_fullscreen(_, 'toggle')"), +}) + + +-- WMPlex context bindings +-- +-- These bindings work in frames and on screens. The innermost of such +-- contexts/objects always gets to handle the key press. + +defbindings("WMPlex", { + bdoc("Close current object."), + kpress_wait(META.."C", "WRegion.rqclose_propagate(_, _sub)"), + + submap(META.."K", { + bdoc("Detach (float) or reattach an object to its previous location."), + -- By using _chld instead of _sub, we can detach/reattach queries + -- attached to a group. The detach code checks if the parameter + -- (_chld) is a group 'bottom' and detaches the whole group in that + -- case. + kpress("D", "ioncore.detach(_chld, 'toggle')", "_chld:non-nil"), + }), +}) + +-- Frames for transient windows ignore this bindmap + +defbindings("WMPlex.toplevel", { + bdoc("Toggle tag of current object."), + kpress(META.."T", "WRegion.set_tagged(_sub, 'toggle')", "_sub:non-nil"), + + --bdoc("Query for manual page to be displayed."), + --kpress(ALTMETA.."F1", "mod_query.query_man(_, ':man')"), + + --bdoc("Show the Ion manual page."), + --kpress(META.."F1", "ioncore.exec_on(_, ':man ion3')"), + + --bdoc("Run a terminal emulator."), + --kpress(ALTMETA.."F2", "ioncore.exec_on(_, XTERM or 'x-terminal-emulator')"), + + --bdoc("Query for command line to execute."), + --kpress(ALTMETA.."F3", "mod_query.query_exec(_)"), + + --bdoc("Query for Lua code to execute."), + --kpress(META.."F3", "mod_query.query_lua(_)"), + + --bdoc("Query for host to connect to with SSH."), + --kpress(ALTMETA.."F4", "mod_query.query_ssh(_, ':ssh')"), + + --bdoc("Query for file to edit."), + --kpress(ALTMETA.."F5", "mod_query.query_editfile(_, 'run-mailcap --action=edit')"), + + --bdoc("Query for file to view."), + --kpress(ALTMETA.."F6", "mod_query.query_runfile(_, 'run-mailcap --action=view')"), + + --bdoc("Query for workspace to go to or create a new one."), + --kpress(ALTMETA.."F9", "mod_query.query_workspace(_)"), + + bdoc("Query for a client window to go to."), + kpress(META.."G", "mod_query.query_gotoclient(_)"), + + bdoc("Display context menu."), + kpress(META.."M", "mod_query.query_menu(_, _sub, 'ctxmenu', 'Context menu:')"), + kpress(META.."Shift+M", "mod_menu.menu(_, _sub, 'ctxmenu')"), +}) + + +-- WFrame context bindings +-- +-- These bindings are common to all types of frames. Some additional +-- frame bindings are found in some modules' configuration files. + +defbindings("WFrame", { + submap(META.."K", { + bdoc("Maximize the frame horizontally/vertically."), + kpress("H", "WFrame.maximize_horiz(_)"), + kpress("V", "WFrame.maximize_vert(_)"), + }), + + bdoc("Display context menu."), + mpress("Button3", "mod_menu.pmenu(_, _sub, 'ctxmenu')"), + + bdoc("Begin move/resize mode."), + kpress(META.."R", "WFrame.begin_kbresize(_)"), + + bdoc("Switch the frame to display the object indicated by the tab."), + mclick("Button1@tab", "WFrame.p_switch_tab(_)"), + mclick("Button2@tab", "WFrame.p_switch_tab(_)"), + + bdoc("Resize the frame."), + mdrag("Button1@border", "WFrame.p_resize(_)"), + mdrag(META.."Button3", "WFrame.p_resize(_)"), + + bdoc("Move the frame."), + mdrag(META.."Button1", "WFrame.p_move(_)"), + + bdoc("Move objects between frames by dragging and dropping the tab."), + mdrag("Button1@tab", "WFrame.p_tabdrag(_)"), + mdrag("Button2@tab", "WFrame.p_tabdrag(_)"), + +}) + +-- Frames for transient windows ignore this bindmap + +defbindings("WFrame.toplevel", { + bdoc("Query for a client window to attach."), + kpress(META.."A", "mod_query.query_attachclient(_)"), + + bdoc("Switch to next/previous object within the frame."), + kpress(META.."Right", "WFrame.switch_next(_)"), + kpress(META.."Left", "WFrame.switch_prev(_)"), + + bdoc("Move current object within the frame left/right."), + kpress(META.."Shift+Left", "WFrame.dec_index(_, _sub)", "_sub:non-nil"), + kpress(META.."Shift+Right", "WFrame.inc_index(_, _sub)", "_sub:non-nil"), + + submap(META.."K", { + -- Display tab numbers when modifiers are released + submap_wait("ioncore.tabnum.show(_)"), + + bdoc("Switch to n:th object within the frame."), + kpress("1", "WFrame.switch_nth(_, 0)"), + kpress("2", "WFrame.switch_nth(_, 1)"), + kpress("3", "WFrame.switch_nth(_, 2)"), + kpress("4", "WFrame.switch_nth(_, 3)"), + kpress("5", "WFrame.switch_nth(_, 4)"), + kpress("6", "WFrame.switch_nth(_, 5)"), + kpress("7", "WFrame.switch_nth(_, 6)"), + kpress("8", "WFrame.switch_nth(_, 7)"), + kpress("9", "WFrame.switch_nth(_, 8)"), + kpress("0", "WFrame.switch_nth(_, 9)"), + + --bdoc("Switch to next/previous object within the frame."), + --kpress("N", "WFrame.switch_next(_)"), + --kpress("P", "WFrame.switch_prev(_)"), + + --bdoc("Move current object within the frame left/right."), + --kpress("comma", "WFrame.dec_index(_, _sub)", "_sub:non-nil"), + --kpress("period", "WFrame.inc_index(_, _sub)", "_sub:non-nil"), + + bdoc("Maximize the frame horizontally/vertically."), + kpress("H", "WFrame.maximize_horiz(_)"), + kpress("V", "WFrame.maximize_vert(_)"), + + bdoc("Attach tagged objects to this frame."), + kpress("A", "ioncore.tagged_attach(_)"), + }), +}) + +-- Bindings for floating frames. + +defbindings("WFrame.floating", { + bdoc("Toggle shade mode"), + mdblclick("Button1@tab", "WFrame.set_shaded(_, 'toggle')"), + + bdoc("Raise the frame."), + mpress("Button1@tab", "WRegion.rqorder(_, 'front')"), + mpress("Button1@border", "WRegion.rqorder(_, 'front')"), + mclick(META.."Button1", "WRegion.rqorder(_, 'front')"), + + bdoc("Lower the frame."), + mclick(META.."Button3", "WRegion.rqorder(_, 'back')"), + + bdoc("Move the frame."), + mdrag("Button1@tab", "WFrame.p_move(_)"), +}) + + +-- WMoveresMode context bindings +-- +-- These bindings are available keyboard move/resize mode. The mode +-- is activated on frames with the command begin_kbresize (bound to +-- META.."R" above by default). + +defbindings("WMoveresMode", { + bdoc("Cancel the resize mode."), + kpress("AnyModifier+Escape","WMoveresMode.cancel(_)"), + + bdoc("End the resize mode."), + kpress("AnyModifier+Return","WMoveresMode.finish(_)"), + + bdoc("Grow in specified direction."), + kpress("Left", "WMoveresMode.resize(_, 1, 0, 0, 0)"), + kpress("Right", "WMoveresMode.resize(_, 0, 1, 0, 0)"), + kpress("Up", "WMoveresMode.resize(_, 0, 0, 1, 0)"), + kpress("Down", "WMoveresMode.resize(_, 0, 0, 0, 1)"), + kpress("F", "WMoveresMode.resize(_, 1, 0, 0, 0)"), + kpress("B", "WMoveresMode.resize(_, 0, 1, 0, 0)"), + kpress("P", "WMoveresMode.resize(_, 0, 0, 1, 0)"), + kpress("N", "WMoveresMode.resize(_, 0, 0, 0, 1)"), + + bdoc("Shrink in specified direction."), + kpress("Shift+Left", "WMoveresMode.resize(_,-1, 0, 0, 0)"), + kpress("Shift+Right", "WMoveresMode.resize(_, 0,-1, 0, 0)"), + kpress("Shift+Up", "WMoveresMode.resize(_, 0, 0,-1, 0)"), + kpress("Shift+Down", "WMoveresMode.resize(_, 0, 0, 0,-1)"), + kpress("Shift+F", "WMoveresMode.resize(_,-1, 0, 0, 0)"), + kpress("Shift+B", "WMoveresMode.resize(_, 0,-1, 0, 0)"), + kpress("Shift+P", "WMoveresMode.resize(_, 0, 0,-1, 0)"), + kpress("Shift+N", "WMoveresMode.resize(_, 0, 0, 0,-1)"), + + bdoc("Move in specified direction."), + kpress(META.."Left", "WMoveresMode.move(_,-1, 0)"), + kpress(META.."Right", "WMoveresMode.move(_, 1, 0)"), + kpress(META.."Up", "WMoveresMode.move(_, 0,-1)"), + kpress(META.."Down", "WMoveresMode.move(_, 0, 1)"), + kpress(META.."F", "WMoveresMode.move(_,-1, 0)"), + kpress(META.."B", "WMoveresMode.move(_, 1, 0)"), + kpress(META.."P", "WMoveresMode.move(_, 0,-1)"), + kpress(META.."N", "WMoveresMode.move(_, 0, 1)"), +}) + + +-- +-- Menu definitions +-- + + +-- Main menu +defmenu("mainmenu", { + menuentry("Run...", "mod_query.query_exec(_)"), + menuentry("Terminal", "ioncore.exec_on(_, XTERM or 'x-terminal-emulator')"), + menuentry("Lock screen", + "ioncore.exec_on(_, ioncore.lookup_script('ion-lock'))"), + menuentry("Help", "mod_query.query_man(_)"), + menuentry("About Ion", "mod_query.show_about_ion(_)"), + submenu("Styles", "stylemenu"), + submenu("Debian", "Debian"), + submenu("Session", "sessionmenu"), +}) + + +-- Session control menu +defmenu("sessionmenu", { + menuentry("Save", "ioncore.snapshot()"), + menuentry("Restart", "ioncore.restart()"), + menuentry("Restart TWM", "ioncore.restart_other('twm')"), + menuentry("Exit", "ioncore.shutdown()"), +}) + + +-- Context menu (frame actions etc.) +defctxmenu("WFrame", "Frame", { + -- Note: this propagates the close to any subwindows; it does not + -- destroy the frame itself, unless empty. An entry to destroy tiled + -- frames is configured in cfg_tiling.lua. + menuentry("Close", "WRegion.rqclose_propagate(_, _sub)"), + -- Low-priority entries + menuentry("Attach tagged", "ioncore.tagged_attach(_)", { priority = 0 }), + menuentry("Clear tags", "ioncore.tagged_clear()", { priority = 0 }), + menuentry("Window info", "mod_query.show_tree(_, _sub)", { priority = 0 }), +}) + + +-- Context menu for groups (workspaces, client windows) +defctxmenu("WGroup", "Group", { + menuentry("Toggle tag", "WRegion.set_tagged(_, 'toggle')"), + menuentry("De/reattach", "ioncore.detach(_, 'toggle')"), +}) + + +-- Context menu for workspaces +defctxmenu("WGroupWS", "Workspace", { + menuentry("Close", "WRegion.rqclose(_)"), + menuentry("Rename", "mod_query.query_renameworkspace(nil, _)"), + menuentry("Attach tagged", "ioncore.tagged_attach(_)"), +}) + + +-- Context menu for client windows +defctxmenu("WClientWin", "Client window", { + menuentry("Kill", "WClientWin.kill(_)"), +}) + +-- Auto-generated Debian menu definitions +if os and os.execute("test -x /usr/bin/update-menus") == 0 then + if ioncore.is_i18n() then + dopath("debian-menu-i18n") + else + dopath("debian-menu") + end +end diff --git a/default/cfg_statusbar.lua b/default/cfg_statusbar.lua new file mode 100644 index 0000000..5d39b43 --- /dev/null +++ b/default/cfg_statusbar.lua @@ -0,0 +1,145 @@ +-- +-- Ion statusbar module configuration file +-- + + +--defwinprop { +-- class = "Docker", +-- statusbar = "dock" +--} + +-- Create a statusbar +mod_statusbar.create{ + -- First screen, bottom left corner + screen = 0, + pos = 'bl', + -- Set this to true if you want a full-width statusbar + fullsize = false, + -- Swallow systray windows + systray = true, + + -- Template. Tokens %string are replaced with the value of the + -- corresponding meter. Currently supported meters are: + -- date date + -- load load average (1min, 5min, 15min) + -- load_Nmin N minute load average (N=1, 5, 15) + -- mail_new mail count (mbox format file $MAIL) + -- mail_unread mail count + -- mail_total mail count + -- mail_*_new mail count (from an alternate mail folder, see below) + -- mail_*_unread mail count + -- mail_*_total mail count + -- + -- Space preceded by % adds stretchable space for alignment of variable + -- meter value widths. > before meter name aligns right using this + -- stretchable space , < left, and | centers. + -- Meter values may be zero-padded to a width preceding the meter name. + -- These alignment and padding specifiers and the meter name may be + -- enclosed in braces {}. + -- + -- %filler causes things on the marker's sides to be aligned left and + -- right, respectively, and %systray is a placeholder for system tray + -- windows and icons. + -- + template = "%mpd %filler [mails: %exec_maildir | im: %exec_psi] " .. + "[mem: %mem_hused/%mem_cached/%mem_total | " .. + "swap: %mem_sw_used/%mem_sw_total | load: %load] %date %systray", + --template="[ %date || load: %05load_1min || mail: %02mail_new/%02mail_total ] %filler%systray", + --template="[ %date || load:% %>load ] %filler %systray_dock", +} + + +-- Launch ion-statusd. This must be done after creating any statusbars +-- for necessary statusd modules to be parsed from the templates. +mod_statusbar.launch_statusd{ + -- Date meter + date = { + -- ISO-8601 date format with additional abbreviated day name + date_format = '%a %d, %H:%M', + -- Finnish etc. date format + --date_format = '%a %d.%m.%Y %H:%M', + -- Locale date format (usually shows seconds, which would require + -- updating rather often and can be distracting) + --date_format = '%c', + + -- Additional date formats. + --[[ + formats = { + time = '%H:%M', -- %date_time + } + --]] + }, + + -- Load meter + load = { + --update_interval=10*1000, + --important_threshold=1.5, + --critical_threshold=4.0, + }, + + -- Mail meter + -- + -- To monitor more mbox files, add them to the files table. For + -- example, add mail_work_new and mail_junk_new to the template + -- above, and define them in the files table: + -- + -- files = { work = "/path/to/work_email", junk = "/path/to/junk" } + -- + -- Don't use the keyword 'spool' as it's reserved for mbox. + --mail = { + -- update_interval = 60*1000, + -- mbox = os.getenv("MAIL"), + -- files = {}, + --}, + + -- MPD + mpd = { + -- 500 or less makes seconds increment relatively smoothly while playing + update_interval = 1000, + + -- mpd server info (localhost:6600 are mpd defaults) + address = "localhost", + port = 6600, + + -- mpd password (if any) + password = nil, + + -- seconds to consider the mpd in 'important' hint (0 never, -1 always) + important_time = 15, -- seconds + + -- display template + -- --- + -- can use the following: + -- track metadata: %artist, %title, %num, %album, %year, %len + -- current track position: %pos + -- escape for the percent character: %% + template = "%title by %artist, track %num from %album, %year (%pos/%len) [%volume]", + }, + + -- Memory monitor + mem = { + used_alarm = 75, -- Limits percentaje + used_sw_alarm = 75, + units = "m", -- "g" , "m" or "k" + }, + + -- Scripts + exec = { + psi = { + program = '~/.ion3/psi_status.sh', + retry_delay = 1 * 1000, -- 1 segundo + hint_regexp = { + important = '^[0-9]', + }, + }, + maildir = { + program = '~/.ion3/maildir_status_server.sh 10', + retry_delay = 10 * 1000, + hint_regexp = { + important = '([0-9]+)', + }, + }, + }, +} + +-- vim: set et sw=4 sts=4 : diff --git a/default/cfg_statusd.lua b/default/cfg_statusd.lua new file mode 100644 index 0000000..e1492e2 --- /dev/null +++ b/default/cfg_statusd.lua @@ -0,0 +1,37 @@ +-- This file has been generated by Ion. Do not edit. +return { + ["mpd"] = { + ["port"] = 6600, + ["template"] = "%title by %artist, track %num from %album, %year (%pos/%len) [%volume]", + ["address"] = "localhost", + ["important_time"] = 15, + ["update_interval"] = 1000, + }, + ["date"] = { + ["date_format"] = "%a %d, %H:%M", + }, + ["exec"] = { + ["psi"] = { + ["hint_regexp"] = { + ["important"] = "^[0-9]", + }, + ["retry_delay"] = 1000, + ["program"] = "~/.ion3/psi_status.sh", + }, + ["maildir"] = { + ["hint_regexp"] = { + ["important"] = "([0-9]+)", + }, + ["retry_delay"] = 10000, + ["program"] = "~/.ion3/maildir_status_server.sh 10", + }, + }, + ["load"] = { + }, + ["mem"] = { + ["used_alarm"] = 75, + ["used_sw_alarm"] = 75, + ["units"] = "m", + }, +} + diff --git a/default/cfg_tiling.lua b/default/cfg_tiling.lua new file mode 100644 index 0000000..dd75441 --- /dev/null +++ b/default/cfg_tiling.lua @@ -0,0 +1,82 @@ +-- +-- Ion tiling module configuration file +-- + +-- Bindings for the tilings. + +defbindings("WTiling", { + bdoc("Split current frame vertically."), + kpress(META.."S", "WTiling.split_at(_, _sub, 'bottom', true)"), + + bdoc("Go to frame above/below/right/left of current frame."), + kpress(META.."Up", "ioncore.goto_next(_sub, 'up', {no_ascend=_})"), + kpress(META.."Down", "ioncore.goto_next(_sub, 'down', {no_ascend=_})"), + kpress(META.."Control+Right", "ioncore.goto_next(_sub, 'right')"), + kpress(META.."Control+Left", "ioncore.goto_next(_sub, 'left')"), + submap(META.."K", { + kpress("Tab", "ioncore.goto_next(_sub, 'left')"), + + bdoc("Split current frame horizontally."), + kpress("S", "WTiling.split_at(_, _sub, 'right', true)"), + + bdoc("Destroy current frame."), + kpress("X", "WTiling.unsplit_at(_, _sub)"), + }), +}) + + +-- Frame bindings + +defbindings("WFrame.floating", { + submap(META.."K", { + bdoc("Tile frame, if no tiling exists on the workspace"), + kpress("B", "mod_tiling.mkbottom(_)"), + }), +}) + + +-- Context menu for tiled workspaces. + +defctxmenu("WTiling", "Tiling", { + menuentry("Destroy frame", + "WTiling.unsplit_at(_, _sub)"), + + menuentry("Split vertically", + "WTiling.split_at(_, _sub, 'bottom', true)"), + menuentry("Split horizontally", + "WTiling.split_at(_, _sub, 'right', true)"), + + menuentry("Flip", "WTiling.flip_at(_, _sub)"), + menuentry("Transpose", "WTiling.transpose_at(_, _sub)"), + + menuentry("Untile", "mod_tiling.untile(_)"), + + submenu("Float split", { + menuentry("At left", + "WTiling.set_floating_at(_, _sub, 'toggle', 'left')"), + menuentry("At right", + "WTiling.set_floating_at(_, _sub, 'toggle', 'right')"), + menuentry("Above", + "WTiling.set_floating_at(_, _sub, 'toggle', 'up')"), + menuentry("Below", + "WTiling.set_floating_at(_, _sub, 'toggle', 'down')"), + }), + + submenu("At root", { + menuentry("Split vertically", + "WTiling.split_top(_, 'bottom')"), + menuentry("Split horizontally", + "WTiling.split_top(_, 'right')"), + menuentry("Flip", "WTiling.flip_at(_)"), + menuentry("Transpose", "WTiling.transpose_at(_)"), + }), +}) + + +-- Extra context menu extra entries for floatframes. + +defctxmenu("WFrame.floating", "Floating frame", { + append=true, + menuentry("New tiling", "mod_tiling.mkbottom(_)"), +}) + diff --git a/default/look.lua b/default/look.lua new file mode 100644 index 0000000..09795af --- /dev/null +++ b/default/look.lua @@ -0,0 +1 @@ +dopath("look_cleanios") diff --git a/default/luca_key_bindings.lua b/default/luca_key_bindings.lua new file mode 100644 index 0000000..880263c --- /dev/null +++ b/default/luca_key_bindings.lua @@ -0,0 +1,125 @@ + +-- WScreen context bindings +-- +-- The bindings in this context are available all the time. + +defbindings("WScreen", { + + bdoc("Switch to n:th object (workspace, full screen client window) ".. + "within current screen."), + kpress(META.."F1", "WScreen.switch_nth(_, 0)"), + kpress(META.."F2", "WScreen.switch_nth(_, 1)"), + kpress(META.."F3", "WScreen.switch_nth(_, 2)"), + kpress(META.."F4", "WScreen.switch_nth(_, 3)"), + kpress(META.."F5", "WScreen.switch_nth(_, 4)"), + kpress(META.."F6", "WScreen.switch_nth(_, 5)"), + kpress(META.."F7", "WScreen.switch_nth(_, 6)"), + kpress(META.."F8", "WScreen.switch_nth(_, 7)"), + --kpress(META.."F9", "WScreen.switch_nth(_, 8)"), + --kpress(META.."F10", "WScreen.switch_nth(_, 9)"), + --kpress(META.."F11", "WScreen.switch_nth(_, 10)"), + --kpress(META.."F12", "WScreen.switch_nth(_, 11)"), + + bdoc("Switch to next/previous object within current screen."), + kpress(META.."Mod1+Left", "WScreen.switch_prev(_)"), + kpress(META.."Mod1+Right", "WScreen.switch_next(_)"), + + bdoc("Go to first region demanding attention or previously active one."), + kpress(META.."Shift+space", "mod_menu.grabmenu(_, _sub, 'focuslist')"), + + bdoc("Go to first object on activity/urgency list."), + kpress(META.."n", "ioncore.goto_activity()"), + + bdoc("Go to previous active object."), + kpress(META.."Shift+n", "ioncore.goto_previous()"), + + + bdoc("Clear all tags."), + kpress(META.."Shift+T", "ioncore.tagged_clear()"), + + bdoc("Create a new workspace of chosen default type."), + kpress(META.."F9", "ioncore.create_ws(_)"), + + bdoc("Display the main menu."), + --kpress(ALTMETA.."F12", "mod_query.query_menu(_, _sub, 'mainmenu', 'Main menu:')"), + --kpress(ALTMETA.."F12", "mod_menu.menu(_, _sub, 'mainmenu', {big=true})"), + mpress("Button2", "mod_menu.menu(_, _sub, 'mainmenu')"), + + bdoc("Display the frame menu."), + mpress("Button3", "mod_menu.pmenu(_, _sub, 'mainmenu')"), + +}) + +-- Frames for transient windows ignore this bindmap + +defbindings("WMPlex.toplevel", { + + -- Programas + submap(META.."p", { + + bdoc("Run a terminal emulator."), + kpress("x", "ioncore.exec_on(_, 'x-terminal-emulator')"), + + bdoc("Run a web browser."), + kpress("n", "ioncore.exec_on(_, 'x-www-browser')"), + + bdoc("Run an IRC client."), + kpress("i", "ioncore.exec_on(_, 'xchat')"), + + bdoc("Run a mail user agent."), + kpress("m", "ioncore.exec_on(_, 'x-terminal-emulator -e muttng')"), + + bdoc("Run a jabber client."), + kpress("j", "ioncore.exec_on(_, 'x-terminal-emulator -e mcabber')"), + + }), + + -- Música + submap(META.."x", { + + bdoc("Go to the next song."), + kpress("Right", "ioncore.exec('mpc next')"), + + bdoc("Got to the previous song."), + kpress("Left", "ioncore.exec('mpc prev')"), + + bdoc("Stop playing."), + kpress("s", "ioncore.exec('mpc stop')"), + + bdoc("Togle play/pause."), + kpress("p", "ioncore.exec('mpc toggle')"), + + }), + + -- Volumen + bdoc("Raise the volume by 5."), + kpress(META.."Mod1+Up", "ioncore.exec('amixer -q sset PCM 5%+')"), + + bdoc("Lower the volume by 5."), + kpress(META.."Mod1+Down", "ioncore.exec('amixer -q sset PCM 5%-')"), + + bdoc("Raise the volume by 1."), + kpress(META.."Mod1+Shift+Up", "ioncore.exec('amixer -q sset PCM 1%+')"), + + bdoc("Lower the volume by 1."), + kpress(META.."Mod1+Shift+Down", "ioncore.exec('amixer -q sset PCM 1%-')"), + +}) + +defbindings("WFrame.toplevel", { + + bdoc("Switch to n:th object within the frame."), + kpress(META.."1", "WFrame.switch_nth(_, 0)"), + kpress(META.."2", "WFrame.switch_nth(_, 1)"), + kpress(META.."3", "WFrame.switch_nth(_, 2)"), + kpress(META.."4", "WFrame.switch_nth(_, 3)"), + kpress(META.."5", "WFrame.switch_nth(_, 4)"), + kpress(META.."6", "WFrame.switch_nth(_, 5)"), + kpress(META.."7", "WFrame.switch_nth(_, 6)"), + kpress(META.."8", "WFrame.switch_nth(_, 7)"), + kpress(META.."9", "WFrame.switch_nth(_, 8)"), + kpress(META.."0", "WFrame.switch_nth(_, 9)"), + +}) + +-- vim: set et sw=4 sts=4 : diff --git a/default/saved_layout.lua b/default/saved_layout.lua new file mode 100644 index 0000000..d6d8979 --- /dev/null +++ b/default/saved_layout.lua @@ -0,0 +1,1034 @@ +-- This file has been generated by Ion. Do not edit. +return { + [0] = { + ["type"] = "WRootWin", + ["name"] = "WRootWin", + ["managed"] = { + [1] = { + ["type"] = "WGroupWS", + ["name"] = "WGroupWS", + ["hidden"] = true, + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WTiling", + ["name"] = "WTiling", + ["bottom"] = true, + ["level"] = 0, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["split_tree"] = { + ["tls"] = 1035, + ["tl"] = { + ["tls"] = 840, + ["tl"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<4>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<3>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12582967, + ["checkcode"] = 1, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<2>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12582951, + ["checkcode"] = 2, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [3] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<15>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583294, + ["checkcode"] = 3, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [4] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<16>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583841, + ["checkcode"] = 4, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["dir"] = "horizontal", + ["brs"] = 840, + ["br"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<1>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<14>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583228, + ["checkcode"] = 5, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WClientWin", + ["level"] = 0, + ["windowid"] = 12582916, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 22, + ["x"] = 4, + ["w"] = 833, + ["h"] = 1008, + }, + ["checkcode"] = 6, + }, + [3] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<10>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583150, + ["checkcode"] = 7, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [4] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<11>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 838, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583167, + ["checkcode"] = 8, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 3, + ["w"] = 833, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["type"] = "WSplitSplit", + }, + ["dir"] = "vertical", + ["brs"] = 15, + ["br"] = { + ["type"] = "WSplitST", + }, + ["type"] = "WSplitSplit", + }, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WGroupWS", + ["name"] = "WGroupWS<1>", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WTiling", + ["name"] = "WTiling<1>", + ["bottom"] = true, + ["level"] = 0, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["split_tree"] = { + ["tls"] = 1024, + ["tl"] = { + ["tls"] = 1035, + ["tl"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<2>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 1022, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 18874371, + ["checkcode"] = 9, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1022, + ["h"] = 1016, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<1>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 1022, + ["h"] = 1016, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12584141, + ["checkcode"] = 10, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 0, + ["w"] = 1022, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [3] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<9>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 1022, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 14680144, + ["checkcode"] = 11, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1022, + ["h"] = 1016, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [4] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<19>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 1022, + ["h"] = 1016, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583875, + ["checkcode"] = 12, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 4, + ["x"] = 0, + ["w"] = 1022, + ["h"] = 1008, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["dir"] = "vertical", + ["brs"] = 15, + ["br"] = { + ["type"] = "WSplitST", + }, + ["type"] = "WSplitSplit", + }, + ["dir"] = "horizontal", + ["brs"] = 656, + ["br"] = { + ["tls"] = 525, + ["tl"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<4>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 654, + ["h"] = 506, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12582985, + ["checkcode"] = 13, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 1, + ["x"] = 2, + ["w"] = 651, + ["h"] = 504, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<17>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 654, + ["h"] = 506, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583807, + ["checkcode"] = 14, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 1, + ["x"] = 2, + ["w"] = 651, + ["h"] = 504, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [3] = { + ["type"] = "WClientWin", + ["level"] = 0, + ["windowid"] = 12584023, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 19, + ["x"] = 3, + ["w"] = 651, + ["h"] = 504, + }, + ["checkcode"] = 15, + }, + [4] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<22>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 654, + ["h"] = 506, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12584073, + ["checkcode"] = 16, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 1, + ["x"] = 2, + ["w"] = 651, + ["h"] = 504, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["dir"] = "vertical", + ["brs"] = 525, + ["br"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<5>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<21>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 654, + ["h"] = 506, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12584056, + ["checkcode"] = 17, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 1, + ["x"] = 2, + ["w"] = 651, + ["h"] = 504, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WClientWin", + ["hidden"] = true, + ["windowid"] = 12583002, + ["checkcode"] = 18, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 19, + ["x"] = 3, + ["w"] = 651, + ["h"] = 504, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["type"] = "WSplitSplit", + }, + ["type"] = "WSplitSplit", + }, + }, + }, + ["level"] = 0, + }, + [3] = { + ["type"] = "WGroupWS", + ["name"] = "WGroupWS<2>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WTiling", + ["name"] = "WTiling<2>", + ["bottom"] = true, + ["level"] = 0, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["split_tree"] = { + ["tls"] = 1068, + ["tl"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<3>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<6>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 1066, + ["h"] = 1031, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 16777219, + ["checkcode"] = 19, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1066, + ["h"] = 1031, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["dir"] = "horizontal", + ["brs"] = 612, + ["br"] = { + ["tls"] = 916, + ["tl"] = { + ["tls"] = 659, + ["tl"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<10>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<7>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 610, + ["h"] = 640, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 23068708, + ["checkcode"] = 20, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 610, + ["h"] = 640, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<20>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 610, + ["h"] = 640, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583909, + ["checkcode"] = 21, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 5, + ["x"] = 1, + ["w"] = 609, + ["h"] = 630, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [3] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<18>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 610, + ["h"] = 640, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583926, + ["checkcode"] = 22, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 5, + ["x"] = 1, + ["w"] = 609, + ["h"] = 630, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["dir"] = "vertical", + ["brs"] = 257, + ["br"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<11>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<12>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 610, + ["h"] = 238, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 23071375, + ["checkcode"] = 23, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 610, + ["h"] = 238, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["type"] = "WSplitSplit", + }, + ["dir"] = "vertical", + ["brs"] = 134, + ["br"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<12>", + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<8>", + ["geom"] = { + ["y"] = 18, + ["x"] = 1, + ["w"] = 610, + ["h"] = 115, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 23069783, + ["checkcode"] = 24, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 610, + ["h"] = 115, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + }, + ["type"] = "WSplitRegion", + }, + ["type"] = "WSplitSplit", + }, + ["type"] = "WSplitSplit", + }, + }, + }, + ["level"] = 0, + }, + [4] = { + ["type"] = "WGroupWS", + ["name"] = "WGroupWS<3>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WTiling", + ["name"] = "WTiling<3>", + ["bottom"] = true, + ["level"] = 0, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["split_tree"] = { + ["tls"] = 717, + ["tl"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<8>", + ["managed"] = { + }, + }, + ["type"] = "WSplitRegion", + }, + ["dir"] = "horizontal", + ["brs"] = 963, + ["br"] = { + ["regparams"] = { + ["mode"] = 1, + ["type"] = "WFrame", + ["name"] = "WFrame<7>", + ["managed"] = { + }, + }, + ["type"] = "WSplitRegion", + }, + ["type"] = "WSplitSplit", + }, + }, + }, + ["level"] = 0, + }, + [5] = { + ["type"] = "WGroupWS", + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["geom"] = { + ["y"] = 272, + ["x"] = 320, + ["w"] = 634, + ["h"] = 468, + }, + ["type"] = "WFrame", + ["name"] = "*scratchpad*", + ["bottom"] = true, + ["level"] = 1024, + ["mode"] = 0, + ["managed"] = { + [1] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<5>", + ["hidden"] = true, + ["geom"] = { + ["y"] = 18, + ["x"] = 2, + ["w"] = 630, + ["h"] = 448, + }, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 12583053, + ["checkcode"] = 25, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 630, + ["h"] = 448, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + [2] = { + ["type"] = "WGroupCW", + ["name"] = "WGroupCW<13>", + ["geom"] = { + ["y"] = 18, + ["x"] = 2, + ["w"] = 630, + ["h"] = 448, + }, + ["switchto"] = true, + ["sizepolicy"] = "full", + ["managed"] = { + [1] = { + ["type"] = "WClientWin", + ["bottom"] = true, + ["windowid"] = 25167302, + ["checkcode"] = 26, + ["sizepolicy"] = "full", + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 630, + ["h"] = 448, + }, + ["level"] = 0, + }, + }, + ["level"] = 0, + }, + }, + ["sizepolicy"] = "free_glue", + }, + }, + ["unnumbered"] = true, + ["name"] = "*scratchws*", + ["pseudomodal"] = true, + ["level"] = 1, + ["geom"] = { + ["y"] = 0, + ["x"] = 0, + ["w"] = 1680, + ["h"] = 1050, + }, + ["hidden"] = true, + }, + }, + }, +} + diff --git a/default/saved_queryhist.lua b/default/saved_queryhist.lua new file mode 100644 index 0000000..b9eaad9 --- /dev/null +++ b/default/saved_queryhist.lua @@ -0,0 +1,22 @@ +-- This file has been generated by Ion. Do not edit. +return { + [1] = "run:cdcat", + [2] = "run:k3b", + [3] = "run:gmpc", + [4] = "windowname:mca", + [5] = "run:rox", + [6] = "run:iceweasel", + [7] = "yesno:no", + [8] = "yesno:n", + [9] = "run:icedove", + [10] = "run:iced", + [11] = "run:xchat", + [12] = "run:", + [13] = "run:wmnd", + [14] = "run:bubblefishymon -n", + [15] = "run:wmix", + [16] = "run:wmclock", + [17] = "run:mcabber", + [18] = "run:psi", +} + diff --git a/default/saved_wd.lua b/default/saved_wd.lua new file mode 100644 index 0000000..54434f8 --- /dev/null +++ b/default/saved_wd.lua @@ -0,0 +1,4 @@ +-- This file has been generated by Ion. Do not edit. +return { +} + diff --git a/maildir_status_server.sh b/maildir_status_server.sh new file mode 100755 index 0000000..b831866 --- /dev/null +++ b/maildir_status_server.sh @@ -0,0 +1,41 @@ +#!/bin/sh +#set -x + +delay=30 +maildir=~/Maildir + +[ -n "$1" ] && delay="$1" +[ -n "$2" ] && maildir="$2" + +cd $maildir +maildirs=`find -type d -name new | grep -v historial` + +print_status() +{ + + messages= + for d in $maildirs + do + msgs=`ls $d | wc -l` + if [ $msgs -gt 0 ] + then + name=`dirname $d` + name=`basename $name | cut -b2-` + [ -z "$name" ] && name=Inbox + messages="$messages $name ($msgs)" + fi + done + if [ -n "$messages" ] + then + echo $messages + else + echo "nada nuevo" + fi +} + +print_status +while sleep $delay +do + print_status +done + diff --git a/mpd_status.sh b/mpd_status.sh new file mode 100755 index 0000000..8c329ba --- /dev/null +++ b/mpd_status.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +from socket import socket +from time import sleep + +s = socket() +s.connect(('localhost', 6600)) + +volume = state = pos = len = '' + +while True: + s.send('status\ncurrentsong\n') + sleep(1) + for line in s.recv(4096).split('\n'): + if line.startswith('volume: '): + volume = line[8:] + if line.startswith('state: '): + state = line[7:] + if line.startswith('time: '): + i = line.rindex(':') + len = line[i+1:] + pos = line[line.index(':')+2:i] + if line.startswith('Artist: '): + artist = line[8:] + if line.startswith('Title: '): + title = line[7:] + if line.startswith('Album: '): + album = line[7:] + if line.startswith('Track: '): + track = line[7:] + if line.startswith('Date: '): + date = line[6:] + if line.startswith('Genre: '): + genre = line[7:] + print volume, state, pos, len, artist, title, album, track, date, genre + diff --git a/psi_status.sh b/psi_status.sh new file mode 100755 index 0000000..f68de5b --- /dev/null +++ b/psi_status.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +psi_profile_dir=~/.psi/profiles/luca + +events_files="$psi_profile_dir"/events-*.xml +regex='^\s*\(.*\)<\/jid>.*/\1/' | sort -u` +if [ $msgs -eq 0 ] +then + echo "nada nuevo" +else + [ $msgs -gt 1 ] && pl=s + echo "$msgs mensaje$pl nuevo$pl (de $jids)" +fi diff --git a/statusd_mem.lua b/statusd_mem.lua new file mode 100644 index 0000000..a44f41c --- /dev/null +++ b/statusd_mem.lua @@ -0,0 +1,128 @@ +------------------------------------------------------------------------------------------- +-- +-- PURPOSE: +-- Shows system available memory catching [free] command outputs. +-- It is intended to make it simpler than statusd_meminfo, plus user configurable +-- measurement units and alarms for "all" available memory metters. +-- +-- USAGE: +-- Just set any of the following labels on cfg_statusbar.lua: %mem_hused, %mem_shared +-- %mem_free, %mem_hfree, %mem_swap, %mem_used, %mem_cached. Example: [MF: %mem_free] +-- +-- MEANINGS: +--> ** "mem_hfree" poses as "htop free memory" or "mem_free +cached +buffers", +-- in oposition, "mem_hused" is "mem_used -cached -buffers"; other labels have +-- transparent meanings. +-- +------- CONFIG EXAMPLE: ------------------------------------------------------------------ +-- +-- To modify settings is quite simple and flexible, write (on cfg_statusbar.lua) +-- something like this, without comments: +-- mem = { +-- update_interval = 15*1000, --> Milliseconds +-- free_alarm = 25, --> Limits percentaje ... +-- used_alarm = 65, +-- units = "m" --> "g" or "k" too +-- } +-- Write only the settings that do you want to change or leave this section as is... +--> ** "update_interval" means "time in milliseconds to update info (default = 15)" +-- "xx_alarm" means "do a color advise when memory *percentage* reaches this value". +-- (both defaults are 50). "units" means Gb "g", Mb "m" or Kb "k" (default = "m") +------------------------------------------------------------------------------------------ +-- +-- NOTES: +-- * Alarms for used memory are inverse to alarms for free memory (think about it...) +-- "mem_total" label is useless. If total memory varies, its time to open your +-- hardware and check this script from barebone. Seriously, may be your video or wifi +-- devices were claiming some free R.A.M. on your machine start-up. +-- However, I included "mem_total" just in case. +-- ** This script has non blocking I/O. +-- +-- LICENSE: +-- GPL2 Copyright(C)2006 Mario Garcia H. +-- (Please see http://www.gnu.org/licenses/gpl.html to read complete license) +-- +-- T.STAMP: Thu Dec 7 03:28:04 2006 +-- +-- DEPENDS: "free" command. Probably, all GNU/Linux distros have one. +-- +-- INSECTS: Not known. +-- +-- CONTACT: +-- G.H. +-- +------- DEFAULT SETTINGS :----------------------------------------------------------------- + +local mem_timer +local defaults = { + update_interval = 15*1000, + free_alarm = 50, + used_alarm = 50, + used_sw_alarm = 50, + free_sw_alarm = 50, + units = "m" +} +local settings = table.join(statusd.get_config("mem"), defaults) + +------- MEM MONITOR :---------------------------------------------------------------------- + +local function show_meminfo(status) + while status do + local ok, _, total, used, free, shared, buffers, cached = + string.find(status, "Mem:%s+(%d+)%s+(%d+)%s+" .. + "(%d+)%s+(%d+)%s+(%d+)%s+(%d+)") + local sw_ok, _, sw_total, sw_used, sw_free = + string.find(status, "Swap:%s+(%d+)%s+(%d+)%s+(%d+)") + -- + if not ok or not sw_ok + then + statusd.inform("mem_template", "--") + return + end + -- + local hused = tostring(used - cached - buffers) + local hfree = tostring(free + cached + buffers) + statusd.inform("mem_total", total) + statusd.inform("mem_used", used) + statusd.inform("mem_free", free) + statusd.inform("mem_shared", shared) + statusd.inform("mem_buffers", buffers) + statusd.inform("mem_cached", cached) + statusd.inform("mem_hused", hused) + statusd.inform("mem_hfree", hfree) + statusd.inform("mem_sw_total", sw_total) + statusd.inform("mem_sw_used", sw_used) + statusd.inform("mem_sw_free", sw_free) + -- + statusd.inform("mem_used_hint", + (used * 100 / total >= settings.used_alarm) and + "critical" or "normal") + statusd.inform("mem_hused_hint", + (hused * 100 / total >= settings.used_alarm) and + "critical" or "normal") + statusd.inform("mem_free_hint", + (free * 100 / total <= settings.free_alarm) and + "critical" or "normal") + statusd.inform("mem_hfree_hint", + (hfree * 100 / total <= settings.free_alarm) and + "critical" or "normal") + -- + statusd.inform("mem_sw_used_hint", + (sw_used * 100 / total >= settings.used_sw_alarm) and + "critical" or "normal") + statusd.inform("mem_sw_free_hint", + (sw_free * 100 / total <= settings.free_sw_alarm) and + "critical" or "normal") + -- + status = coroutine.yield() + end +end + +local function update_mem() + statusd.popen_bgread("free -"..settings.units.."o", coroutine.wrap(show_meminfo)) + mem_timer:set(settings.update_interval, update_mem) +end + +mem_timer = statusd.create_timer() +update_mem() + diff --git a/statusd_mpd.lua b/statusd_mpd.lua new file mode 100644 index 0000000..57a1103 --- /dev/null +++ b/statusd_mpd.lua @@ -0,0 +1,171 @@ +-- statusd for MPD (Music Player Daemon) +-- bugs/requests/comments: delirium@hackish.org + +-- requires that netcat is available in the path + +NETCAT='nc' + +local defaults={ + -- 500 or less makes seconds increment relatively smoothly while playing + update_interval=500, + + -- mpd server info (localhost:6600 are mpd defaults) + address="localhost", + port=6600, + + -- mpd password (if any) + password=nil, + + -- seconds to consider the mpd in 'important' hint (0 never, -1 always) + important_time = 10, -- seconds + + -- display template + -- --- + -- can use the following: + -- track metadata: %artist, %title, %num, %album, %year, %len + -- current track position: %pos + -- volume: %volume + -- escape for the percent character: %% + + -- a default template + template = "%artist - %num - %title (%pos / %len)" +} + +local settings=table.join(statusd.get_config("mpd"), defaults) + +local success +local last_success +local last_volume +local last_state + +local function get_mpd_status() + local cmd_string = "status\ncurrentsong\nclose\n" + if settings.password ~= nil then + cmd_string = "password " .. settings.password .. "\n" .. cmd_string + end + cmd_string = string.format('echo -n "%s" | '..NETCAT..' %s %d', + cmd_string, settings.address, settings.port) + + last_success = success + success = false + + local mpd = io.popen(cmd_string, "r") + + -- welcome msg + local data = mpd:read() + if data == nil or string.sub(data,1,6) ~= "OK MPD" then + mpd:close() + statusd.inform("mpd_hint", "critical") + return "mpd not running" + end + + -- 'password' response (if necessary) + if settings.password ~= nil then + repeat + data = mpd:read() + until data == nil or string.sub(data,1,2) == "OK" + or string.sub(data,1,3) == "ACK" + if data == nil or string.sub(data,1,2) ~= "OK" then + mpd:close() + statusd.inform("mpd_hint", "critical") + return "bad mpd password" + end + end + + local info = {} + local hint = "normal" + + -- 'status' response + repeat + data = mpd:read() + if data == nil then break end + + local _,_,attrib,val = string.find(data, "(.-): (.*)") + if attrib == "time" then + _,_,info.pos,info.len = string.find(val, "(%d+):(%d+)") + if settings.important_time == -1 + or info.pos+0 <= settings.important_time + and settings.important_time ~= 0 then + hint = "important" + end + info.pos = string.format("%d:%02d", math.floor(info.pos / 60), + math.mod(info.pos, 60)) + info.len = string.format("%d:%02d", math.floor(info.len / 60), + math.mod(info.len, 60)) + elseif attrib == "state" then + info.state = val + if info.state ~= last_state then + hint = "important" + end + last_state = info.state + elseif attrib == "volume" then + info.volume = val .. "%" + if info.volume ~= last_volume then + hint = "important" + end + last_volume = info.volume + end + until string.sub(data,1,2) == "OK" or string.sub(data,1,3) == "ACK" + if data == nil or string.sub(data,1,2) ~= "OK" then + mpd:close() + statusd.inform("mpd_hint", "critical") + return "error querying mpd status" + end + + -- 'currentsong' response + repeat + data = mpd:read() + if data == nil then break end + + local _,_,attrib,val = string.find(data, "(.-): (.*)") + if attrib == "Artist" then info.artist = val + elseif attrib == "Title" then info.title = val + elseif attrib == "Album" then info.album = val + elseif attrib == "Track" then info.num = val + elseif attrib == "Date" then info.year = val + end + until string.sub(data,1,2) == "OK" or string.sub(data,1,3) == "ACK" + if data == nil or string.sub(data,1,2) ~= "OK" then + mpd:close() + statusd.inform("mpd_hint", "critical") + return "error querying current song" + end + + mpd:close() + + success = true + + -- done querying; now build the string + statusd.inform("mpd_hint", hint) + if info.state == "play" then + local mpd_st = settings.template + -- fill in %values + mpd_st = string.gsub(mpd_st, "%%([%w%_]+)", + function (x) return(info[x] or "") end) + mpd_st = string.gsub(mpd_st, "%%%%", "%%") + return mpd_st + elseif info.state == "pause" then + return "Paused" + else + return "No song playing" + end +end + + +local mpd_timer + +local function update_mpd() + -- update unless there's an error that's not yet twice in a row, to allow + -- for transient errors due to load spikes + local mpd_st = get_mpd_status() + if success or not last_success then + statusd.inform("mpd", mpd_st) + end + mpd_timer:set(settings.update_interval, update_mpd) +end + +-- Init +mpd_timer=statusd.create_timer() +update_mpd() + +-- vim: set et sts=4 sw=4 : diff --git a/xosd_example.sh b/xosd_example.sh new file mode 100755 index 0000000..a2db661 --- /dev/null +++ b/xosd_example.sh @@ -0,0 +1,2 @@ +#!/bin/sh +osd_cat -b percentage -c green -s 3 -o 10 -A center -p bottom -T VOLUMEN -P 10 -d 2 -f -*-helvetica-*-r-*-*-*-180-*-*-*-*-*-1