Update 2022-12-04 23:38 OpenBSD/amd64

This commit is contained in:
c0dev0id 2022-12-04 23:38:54 +01:00
parent b0cd2fe369
commit 83b82ffc4b
20 changed files with 1796 additions and 0 deletions

35
.notion/cfg_dock.lua Normal file
View File

@ -0,0 +1,35 @@
--
-- Notion dock module configuration
--
-- Create a dock
mod_dock.create{
-- Dock mode: embedded|floating
mode="floating",
-- The screen to create the dock on
screen=0,
-- Corner or side of the screen to place the dock on.
-- For embedded dock the valid values are: tl|tr|bl|br
-- For floating dock the following are also valid: tc|bc|ml|mc|mr
pos="mr",
-- Growth direction: left|right|up|down
grow="down",
-- Whether new dockapps should be added automatically to this dock
is_auto=false,
-- Show floating dock initially?
floating_hidden=false,
-- Name of the dock
name="*dock*",
}
-- For floating docks, you may want the following toggle binding.
defbindings("WScreen", {
bdoc("Toggle floating dock."),
kpress(META.."c", "mod_dock.set_floating_shown_on(_, 'toggle')"),
})

47
.notion/cfg_kludges.lua Normal file
View File

@ -0,0 +1,47 @@
--
-- Options to get some programs work more nicely (or at all)
--
defwinprop{
class = "mpv",
instance = "selfcam",
target = "*dock*",
-- float = true,
ignore_cfgrq = false,
ignore_min_size = false,
min_size = { w = 640, h = 480 }
}
defwinprop{
name = "Crack Attack!",
float = true,
ignore_cfgrq = true,
transient_mode = true
}
defwinprop{
class = "RawTherapee",
name = "RawTherapee",
float = false,
}
defwinprop{
class = "Xpdf",
instance = "openDialog_popup",
ignore_cfgrq = true
}
defwinprop {
class = "stalonetray",
instance = "stalonetray",
statusbar = "systray",
}
-- Define some additional title shortening rules to use when the full
-- title doesn't fit in the available space. The first-defined matching
-- rule that succeeds in making the title short enough is used.
-- ioncore.defshortening("(.*) - Mozilla(<[0-9]+>)", "$1$2$|$1$<...$2")
-- ioncore.defshortening("(.*) - Mozilla", "$1$|$1$<...")
-- ioncore.defshortening("[^:]+: (.*)(<[0-9]+>)", "$1$2$|$1$<...$2")
-- ioncore.defshortening("[^:]+: (.*)", "$1$|$1$<...")
-- ioncore.defshortening("(.*)(<[0-9]+>)", "$1$2$|$1$<...$2")
ioncore.defshortening("(.*)", "$1$|$1$<...")

136
.notion/cfg_layout_dev.lua Normal file
View File

@ -0,0 +1,136 @@
return {
[0] = {
["name"] = "WScreen",
["managed"] = {
[1] = {
["geom"] = {
["x"] = 0.0,
["y"] = 0.0,
["h"] = 1080.0,
["w"] = 1920.0,
},
["switchto"] = true,
["managed"] = {
[1] = {
["bottom"] = true,
["geom"] = {
["x"] = 0.0,
["y"] = 0.0,
["h"] = 1080.0,
["w"] = 1920.0,
},
["sizepolicy"] = "full",
["split_tree"] = {
["tls"] = 1062.0,
["tl"] = {
["tls"] = 1286.0,
["tl"] = {
["regparams"] = {
["mode"] = 1.0,
["name"] = "Tiling Frame<1>",
["managed"] = {
[1] = {
["geom"] = {
["x"] = 1.0,
["y"] = 18.0,
["h"] = 1043.0,
["w"] = 1284.0,
},
["managed"] = {
[1] = {
["bottom"] = true,
["checkcode"] = 1.0,
["sizepolicy"] = "full",
["windowid"] = 25165827.0,
["geom"] = {
["x"] = 0.0,
["y"] = 5.0,
["h"] = 1033.0,
["w"] = 1284.0,
},
["level"] = 0.0,
["type"] = "WClientWin",
},
},
["sizepolicy"] = "full",
["switchto"] = true,
["name"] = "WGroupCW",
["level"] = 0.0,
["type"] = "WGroupCW",
},
},
["type"] = "WFrame",
},
["type"] = "WSplitRegion",
},
["br"] = {
["tls"] = 673.0,
["tl"] = {
["tls"] = 353.0,
["tl"] = {
["regparams"] = {
["mode"] = 1.0,
["name"] = "Tiling Frame",
["managed"] = {
},
["type"] = "WFrame",
},
["type"] = "WSplitRegion",
},
["br"] = {
["regparams"] = {
["mode"] = 1.0,
["name"] = "Tiling Frame<3>",
["managed"] = {
},
["type"] = "WFrame",
},
["type"] = "WSplitRegion",
},
["dir"] = "vertical",
["brs"] = 320.0,
["type"] = "WSplitSplit",
},
["br"] = {
["regparams"] = {
["mode"] = 1.0,
["name"] = "Tiling Frame<2>",
["managed"] = {
},
["type"] = "WFrame",
},
["type"] = "WSplitRegion",
},
["dir"] = "vertical",
["brs"] = 389.0,
["type"] = "WSplitSplit",
},
["dir"] = "horizontal",
["brs"] = 634.0,
["type"] = "WSplitSplit",
},
["br"] = {
["type"] = "WSplitST",
},
["dir"] = "vertical",
["brs"] = 18.0,
["type"] = "WSplitSplit",
},
["name"] = "WTiling",
["level"] = 0.0,
["type"] = "WTiling",
},
},
["initial_outputs"] = {
[1] = "eDP",
},
["sizepolicy"] = "full",
["name"] = "WGroupWS",
["level"] = 0.0,
["type"] = "WGroupWS",
},
},
["type"] = "WScreen",
},
}

78
.notion/cfg_layouts.lua Normal file
View File

@ -0,0 +1,78 @@
--
-- Layouts for Ion
--
--
-- Helper routines and structures
--
-- Tiled frame template for the layouts below
local a_frame = {
type="WSplitRegion",
regparams = {
type = "WFrame",
frame_style = "frame-tiled"
}
}
-- Helper function for generating splits for layouts
local function mksplit(dir, tl, br, float)
return {
type = (float and "WSplitFloat" or "WSplitSplit"),
dir = dir,
tls = 1,
brs = 1,
tl = tl,
br = br,
}
end
local function mktiling(split_tree)
return {
managed = {
{
type = "WTiling",
bottom = true, -- Make it the bottom of the group
split_tree = split_tree,
}
}
}
end
--
-- The layouts
--
ioncore.deflayout("default", full)
-- Tiling with single 1:1 horizontal split
ioncore.deflayout("hsplit",
mksplit("horizontal", a_frame, a_frame)
)
-- Tiling with single 1:1 vertical split
ioncore.deflayout("vsplit",
mktiling(mksplit("vertical", a_frame, a_frame))
)
-- Tiling with single 1:1 floating horizontal split
ioncore.deflayout("hfloat",
mktiling(mksplit("horizontal", a_frame, a_frame, true))
)
-- Tiling with single 1:1 floating vertical split
ioncore.deflayout("vfloat",
mktiling(mksplit("vertical", a_frame, a_frame, true))
)
-- Tiling with horizontal and then vertical splits
ioncore.deflayout("2x2",
mktiling(mksplit("horizontal",
mksplit("vertical", a_frame, a_frame),
mksplit("vertical", a_frame, a_frame))
)
)
-- Tiling with single full screen frame
ioncore.deflayout("full", mktiling(a_frame))

32
.notion/cfg_menu.lua Normal file
View File

@ -0,0 +1,32 @@
--
-- Menu module configuration.
--
-- Only bindings that are effect in menus are configured here.
-- See ion-menus.lua for menu definitions and ion-bindings.lua
-- for bindings to display menus.
--
defbindings("WMenu", {
bdoc("Close the menu."),
kpress("Escape", "WMenu.cancel(_)"),
kpress("Control+G", "WMenu.cancel(_)"),
kpress("Control+C", "WMenu.cancel(_)"),
kpress("Left", "WMenu.cancel(_)"),
bdoc("Activate current menu entry."),
kpress("Return", "WMenu.finish(_)"),
kpress("KP_Enter", "WMenu.finish(_)"),
kpress("Control+M", "WMenu.finish(_)"),
kpress("Right", "WMenu.finish(_)"),
bdoc("Select next/previous menu entry."),
kpress("Control+N", "WMenu.select_next(_)"),
kpress("Control+P", "WMenu.select_prev(_)"),
kpress("Up", "WMenu.select_prev(_)"),
kpress("Down", "WMenu.select_next(_)"),
bdoc("Clear the menu's typeahead find buffer."),
kpress("BackSpace", "WMenu.typeahead_clear(_)"),
})

75
.notion/cfg_notion.lua Normal file
View File

@ -0,0 +1,75 @@
--
-- Ion main configuration file
--
-- Meta key that can be use in key bindings (xmodmap)
META="Mod1+"
-- Editor command
EDIT_COMMAND="bterm -e vim"
-- Display command (used to display keyboard layout reference)
VIEW_COMMAND="firefox"
-- Configure global notion core settings
ioncore.set{
-- Fast clicks are considered double-clicks (default: 250)
--dblclick_delay=250,
-- Quit resize mode timeout (default: 1500)
--kbresize_delay=1500,
-- Display frame content while resizing (default: false)
opaque_resize=false,
-- float dialog type windows
window_dialog_float=true,
-- Mouse cursor moves with focus changes (default: true)
warp=true,
-- Switch frames to display newly mapped windows (default: true)
--switchto=true,
-- On frame close, switch to this frame (default: next)
-- Possible values: next, last
--frame_default_index='next',
-- Auto-unsqueeze transients/menus/queries (default: true)
-- unsqueeze=false,
-- Display tooltips for activity on hidden workspace (default: true)
--screen_notify=true,
--
-- Show Workspace after switch
--workspace_indicator_timeout=1000,
--
--
framed_transients=true,
window_stacking_request="activate",
}
-- Load configuration of the Ion 'core'. Most bindings are here.
dopath("cfg_notioncore")
-- Load some kludges to make apps behave better.
dopath("cfg_kludges")
-- Define some layouts.
dopath("cfg_layouts")
dopath("cfg_layout_dev")
-- Load modules
-- Module mod_$module loads cfg_$module
dopath("mod_query")
dopath("mod_menu")
dopath("mod_tiling")
dopath("mod_statusbar")
dopath("mod_dock")
dopath("mod_sp")
dopath("mod_float-sb")
-- dopath("min_tabs")
-- dopath("net_client_list")
dopath("mod_xrandr")

321
.notion/cfg_notioncore.lua Normal file
View File

@ -0,0 +1,321 @@
-- 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.."1", "WScreen.switch_nth(_, 0)"),
kpress(META.."2", "WScreen.switch_nth(_, 1)"),
kpress(META.."3", "WScreen.switch_nth(_, 2)"),
kpress(META.."4", "WScreen.switch_nth(_, 3)"),
kpress(META.."5", "WScreen.switch_nth(_, 4)"),
kpress(META.."6", "WScreen.switch_nth(_, 5)"),
kpress(META.."7", "WScreen.switch_nth(_, 6)"),
kpress(META.."8", "WScreen.switch_nth(_, 7)"),
kpress(META.."9", "WScreen.switch_nth(_, 8)"),
kpress(META.."0", "WScreen.switch_nth(_, 9)"),
bdoc("Switch to last active object within current screen."),
kpress(META.."Tab", "ioncore.goto_previous_workspace()"),
submap(META.."K", {
bdoc("Go to first region demanding attention or previously active one."),
kpress("K", "mod_menu.grabmenu(_, _sub, 'focuslist')"),
bdoc("Go to first object on activity/urgency list."),
kpress("A", "ioncore.goto_activity()"),
}),
bdoc("Switch to next/previous object within current screen."),
kpress(META.."Shift+Next", "WScreen.switch_next(_)"),
kpress(META.."Shift+Prior", "WScreen.switch_prev(_)"),
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)"),
kpress(META.."Shift+3", "ioncore.goto_nth_screen(2)"),
kpress(META.."Shift+Left", "ioncore.goto_prev_screen()"),
kpress(META.."Shift+Right", "ioncore.goto_next_screen()"),
bdoc("Create a new workspace of chosen default type."),
kpress(META.."F12", "ioncore.create_ws(_)"),
kpress(META.."Shift+F12", "mod_query.query_workspace(_)"),
bdoc("Display the main menu."),
--kpress(ALTMETA.."F12", "mod_query.query_menu(_, _sub, 'mainmenu', 'Main menu:')"),
kpress("Super_L", "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')"),
})
-- Client window bindings
--
-- These bindings affect client windows directly.
defbindings("WClientWin", {
bdoc("Kill client owning the client window."),
kpress(META.."Q", "WRegion.rqclose(_)"),
submap(META.."K", {
kpress("Q", "WClientWin.kill(_)"),
}),
})
-- Client window group bindings
defbindings("WGroupCW", {
bdoc("Toggle client window group full-screen mode"),
kpress(META.."F", "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(META.."Shift+Q", "WRegion.rqclose(_)"),
})
-- 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(META.."M", "mod_query.query_man(_, '::man')"),
bdoc("Run a small terminal emulator."),
kpress(META.."Return", "ioncore.exec_on(_, 'sterm')"),
bdoc("Run a big terminal emulator."),
kpress(META.."Shift+Return", "ioncore.exec_on(_, 'bterm')"),
bdoc("Run a huge terminal emulator."),
kpress(META.."Control+Return", "ioncore.exec_on(_, 'hterm')"),
bdoc("Screenshot."),
kpress(META.."Print", "ioncore.exec_on(_, 'sshot')"),
bdoc("Screenshot selection."),
kpress(META.."Shift+Print", "ioncore.exec_on(_, 'xpick_copy')"),
bdoc("Query for command line to execute."),
kpress(META.."D", "ioncore.exec_on(_, 'dexec')"),
bdoc("Port list viewer"),
kpress(META.."S", "ioncore.exec_on(_, 'bterm goport')"),
bdoc("cscope /usr/src/sys"),
kpress(META.."Shift+L", "ioncore.exec_on(_, 'dsys')"),
bdoc("dcont"),
kpress(META.."Shift+D", "ioncore.exec_on(_, 'sterm dev-continue')"),
bdoc("Show SSH Menu"),
kpress(META.."plus", "ioncore.exec_on(_, 'dexec_ssh_favs')"),
bdoc("Show APPS Menu"),
kpress(META.."A", "ioncore.exec_on(_, 'dexec_apps')"),
bdoc("Start Browser"),
kpress(META.."Shift+F", "ioncore.exec_on(_, 'dexec_browser')"),
kpress(META.."Shift+M", "ioncore.exec_on(_, 'dexec_man')"),
bdoc("Start Passmenu"),
kpress(META.."Shift+P", "ioncore.exec_on(_, 'dexec_pass')"),
bdoc("Start personal information menu"),
kpress(META.."P", "ioncore.exec_on(_, 'dexec_pim')"),
bdoc("Query for Lua code to execute."),
kpress(META.."L", "mod_query.query_lua(_)"),
bdoc("Query for a client window to go to."),
kpress(META.."G", "mod_query.query_gotoclient(_)"),
bdoc("Detach (float) or reattach an object to its previous location."),
kpress(META.."space", "ioncore.detach(_chld, 'toggle')", "_chld:non-nil"),
bdoc("Show Notion 'live docs'.", "help"),
kpress(META.."ssharp", "notioncore.show_live_docs(_)"),
})
-- 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", {
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.."Next", "WFrame.switch_next(_)"),
kpress(META.."Prior", "WFrame.switch_prev(_)"),
kpress(META.."XF86Forward", "WFrame.switch_next(_)"),
kpress(META.."XF86Back", "WFrame.switch_prev(_)"),
bdoc("Rename Workspace"),
kpress(META.."Shift+R", "mod_query.query_renameworkspace(nil, _)"),
submap(META.."K", {
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("Attach tagged objects to this frame."),
kpress("T", "ioncore.tagged_attach(_)"),
bdoc("Rename Workspace"),
kpress("R", "mod_query.query_renameframe(_)"),
}),
})
-- 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)"),
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)"),
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)"),
})
--
-- Menu definitions
--
-- Main menu
defmenu("mainmenu", {
menuentry("Lock screen", "ioncore.exec_on(_, 'slock')"),
menuentry("Run...", "mod_query.query_exec(_)"),
submenu("Session", "sessionmenu"),
menuentry("Restart", "ioncore.restart()"),
})
-- Session control menu
defmenu("sessionmenu", {
menuentry("Save", "ioncore.snapshot()"),
submenu("Styles", "stylemenu"),
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(_)"),
})

102
.notion/cfg_query.lua Normal file
View File

@ -0,0 +1,102 @@
--
-- Query module configuration.
--
-- Only bindings that are in effect in queries and message displays are
-- configured here. Actions to display queries are configured in
-- ion-bindings.lua
--
defbindings("WEdln", {
bdoc("Move one character forward/backward."),
kpress("Control+F", "WEdln.forward(_)"),
kpress("Control+B", "WEdln.back(_)"),
kpress("Right", "WEdln.forward(_)"),
kpress("Left", "WEdln.back(_)"),
bdoc("Go to end/beginning."),
kpress("Control+E", "WEdln.eol(_)"),
kpress("Control+A", "WEdln.bol(_)"),
kpress("End", "WEdln.eol(_)"),
kpress("Home", "WEdln.bol(_)"),
bdoc("Skip one word forward/backward."),
kpress("Control+X", "WEdln.skip_word(_)"),
kpress("Control+Z", "WEdln.bskip_word(_)"),
bdoc("Delete next character."),
kpress("Control+D", "WEdln.delete(_)"),
kpress("Delete", "WEdln.delete(_)"),
bdoc("Delete previous character."),
kpress("BackSpace", "WEdln.backspace(_)"),
kpress("Control+H", "WEdln.backspace(_)"),
bdoc("Delete one word forward/backward."),
kpress("Control+W", "WEdln.kill_word(_)"),
kpress("Control+O", "WEdln.bkill_word(_)"),
bdoc("Delete to end of line."),
kpress("Control+J", "WEdln.kill_to_eol(_)"),
bdoc("Delete the whole line."),
kpress("Control+Y", "WEdln.kill_line(_)"),
bdoc("Transpose characters."),
kpress("Control+T", "WEdln.transpose_chars(_)"),
bdoc("Select next/previous (matching) history entry."),
kpress("Control+P", "WEdln.history_prev(_)"),
kpress("Control+N", "WEdln.history_next(_)"),
kpress("Up", "WEdln.history_prev(_)"),
kpress("Down", "WEdln.history_next(_)"),
kpress("Control+Up", "WEdln.history_prev(_, true)"),
kpress("Control+Down", "WEdln.history_next(_, true)"),
bdoc("Paste from the clipboard."),
mclick("Button2", "WEdln.paste(_)"),
submap("Control+K", {
kpress("C", "WEdln.paste(_)"),
bdoc("Set mark/begin selection."),
kpress("B", "WEdln.set_mark(_)"),
bdoc("Cut selection."),
kpress("Y", "WEdln.cut(_)"),
bdoc("Copy selection."),
kpress("K", "WEdln.copy(_)"),
bdoc("Clear mark/cancel selection."),
kpress("G", "WEdln.clear_mark(_)"),
}),
bdoc("Try to complete the entered text or cycle through completions."),
kpress("Tab", "WEdln.complete(_, 'next', 'normal')"),
kpress("Shift+Tab", "WEdln.complete(_, 'prev', 'normal')"),
-- Do not cycle; only force evaluation of new completions
kpress("Control+Tab", "WEdln.complete(_, nil, 'normal')"),
bdoc("Complete from history"),
kpress("Control+R", "WEdln.complete(_, 'next', 'history')"),
kpress("Control+S", "WEdln.complete(_, 'prev', 'history')"),
bdoc("Close the query and execute bound action."),
kpress("Control+M", "WEdln.finish(_)"),
kpress("Return", "WEdln.finish(_)"),
kpress("KP_Enter", "WEdln.finish(_)"),
})
defbindings("WInput", {
bdoc("Close the query/message box, not executing bound actions."),
kpress("Escape", "WInput.cancel(_)"),
kpress("Control+G", "WInput.cancel(_)"),
kpress("Control+C", "WInput.cancel(_)"),
bdoc("Scroll the message or completions up/down."),
kpress("Control+U", "WInput.scrollup(_)"),
kpress("Control+V", "WInput.scrolldown(_)"),
kpress("Page_Up", "WInput.scrollup(_)"),
kpress("Page_Down", "WInput.scrolldown(_)"),
})

11
.notion/cfg_sp.lua Normal file
View File

@ -0,0 +1,11 @@
--
-- Ion mod_sp configuration file
--
mod_sp.set_size(1600, 800);
defbindings("WScreen", {
bdoc("Toggle scratchpad."),
kpress(META.."minus", "mod_sp.set_shown_on(_, 'toggle')"),
})

32
.notion/cfg_statusbar.lua Normal file
View File

@ -0,0 +1,32 @@
--
-- Notion statusbar module configuration file
--
-- Create a statusbar
mod_statusbar.create {
-- First screen, tl left corner
screen=0,
pos='br',
-- Set this to true if you want a full-width statusbar
fullsize=true,
-- Swallow systray windows
systray=true,
-- %workspace_name
-- %workspace_frame
-- %workspace_pager
-- %workspace_name_pager
-- %workspace_num_name_pager
template="%workspace_pager %filler %systray %shellbar %date",
}
-- 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 {
-- shellbar,
-- date={ date_format='%a %Y-%m-%d %H:%M', },
-- }

84
.notion/cfg_tiling.lua Normal file
View File

@ -0,0 +1,84 @@
--
-- Ion tiling module configuration file
--
-- Bindings for the tilings.
defbindings("WTiling", {
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.."Right", "ioncore.goto_next(_sub, 'right')"),
kpress(META.."Left", "ioncore.goto_next(_sub, 'left')"),
submap(META.."K", {
bdoc("Split current frame horizontally."),
kpress("Right", "WTiling.split_at(_, _sub, 'right', false)"),
kpress("Left", "WTiling.split_at(_, _sub, 'left', false)"),
kpress("l", "WTiling.split_at(_, _sub, 'right', false)"),
kpress("j", "WTiling.split_at(_, _sub, 'left', false)"),
bdoc("Split current frame vertically."),
kpress("Down", "WTiling.split_at(_, _sub, 'bottom', false)"),
kpress("Up", "WTiling.split_at(_, _sub, 'top', false)"),
kpress("comma", "WTiling.split_at(_, _sub, 'bottom', false)"),
kpress("i", "WTiling.split_at(_, _sub, 'top', false)"),
}),
})
-- 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(_)"),
})

262
.notion/cfg_xrandr.lua Normal file
View File

@ -0,0 +1,262 @@
-- For honest workspaces, the initial outputs information, which determines the
-- physical screen that a workspace wants to be on, is part of the C class
-- WGroupWS. For "full screen workspaces" and scratchpads, we only keep this
-- information in a temporary list.
InitialOutputs={}
function getInitialOutputs(ws)
if obj_is(ws, "WGroupCW") or is_scratchpad(ws) then
return InitialOutputs[ws:name()]
elseif obj_is(ws, "WGroupWS") then
return WGroupWS.get_initial_outputs(ws)
else
return nil
end
end
function setInitialOutputs(ws, outputs)
if obj_is(ws, "WGroupCW") or is_scratchpad(ws) then
InitialOutputs[ws:name()] = outputs
elseif obj_is(ws, "WGroupWS") then
WGroupWS.set_initial_outputs(ws, outputs)
end
end
function nilOrEmpty(t)
return not t or empty(t)
end
function mod_xrandr.workspace_added(ws)
if nilOrEmpty(getInitialOutputs(ws)) then
outputs = mod_xrandr.get_outputs(ws:screen_of(ws))
outputKeys = {}
for k,v in pairs(outputs) do
table.insert(outputKeys, k)
end
setInitialOutputs(ws, outputKeys)
end
return true
end
function for_all_workspaces_do(fn)
local workspaces={}
notioncore.region_i(function(scr)
scr:managed_i(function(ws)
table.insert(workspaces, ws)
return true
end)
return true
end, "WScreen")
for _,ws in ipairs(workspaces) do
fn(ws)
end
end
function mod_xrandr.workspaces_added()
for_all_workspaces_do(mod_xrandr.workspace_added)
end
function mod_xrandr.screenmanagedchanged(tab)
if tab.mode == 'add' then
mod_xrandr.workspace_added(tab.sub);
end
end
screen_managed_changed_hook = notioncore.get_hook('screen_managed_changed_hook')
if screen_managed_changed_hook then
screen_managed_changed_hook:add(mod_xrandr.screenmanagedchanged)
end
post_layout_setup_hook = notioncore.get_hook('ioncore_post_layout_setup_hook')
post_layout_setup_hook:add(mod_xrandr.workspaces_added)
function add_safe(t, key, value)
if t[key] == nil then
t[key] = {}
end
table.insert(t[key], value)
end
-- parameter: list of output names
-- returns: map from screen name to screen
function candidate_screens_for_output(max_screen_id, all_outputs, outputname)
local retval = {}
function addIfContainsOutput(screen)
local outputs_within_screen = mod_xrandr.get_outputs_within(all_outputs, screen)
if screen:id() <= max_screen_id and outputs_within_screen[outputname] ~= nil then
retval[screen:name()] = screen
end
return true
end
notioncore.region_i(addIfContainsOutput, "WScreen")
return retval
end
-- parameter: maximum screen id, list of all output names, list of output names for which we want the screens
-- returns: map from screen name to screen
function candidate_screens_for_outputs(max_screen_id, all_outputs, outputnames)
local result = {}
if outputnames == nil then return result end
for i,outputname in pairs(outputnames) do
local screens = candidate_screens_for_output(max_screen_id, all_outputs, outputname)
for k,screen in pairs(screens) do
result[k] = screen;
end
end
return result;
end
function firstValue(t)
local key, value = next(t)
return value
end
function firstKey(t)
local key, value = next(t)
return key
end
function empty(t)
return not next(t)
end
function singleton(t)
local first = next(t)
return first and not next(t, first)
end
function is_scratchpad(ws)
return package.loaded["mod_sp"] and mod_sp.is_scratchpad(ws)
end
function find_scratchpad(screen)
local sp
screen:managed_i(function(ws)
if is_scratchpad(ws) then
sp=ws
return false
else
return true
end
end)
return sp
end
function move_if_needed(workspace, screen_id)
local screen = notioncore.find_screen_id(screen_id)
if workspace:screen_of() ~= screen then
if is_scratchpad(workspace) then
-- Moving a scratchpad to another screen is not meaningful, so instead we move
-- its content
local content={}
workspace:bottom():managed_i(function(reg)
table.insert(content, reg)
return true
end)
local sp=find_scratchpad(screen)
for _,reg in ipairs(content) do
sp:bottom():attach(reg)
end
return
end
screen:attach(workspace)
end
end
-- Arrange the workspaces over the first number_of_screens screens
function mod_xrandr.rearrangeworkspaces(max_screen_id)
-- for each screen id, which workspaces should be on that screen
new_mapping = {}
-- workspaces that want to be on an output that's currently not on any screen
orphans = {}
-- workspaces that want to be on multiple available outputs
wanderers = {}
local all_outputs = mod_xrandr.get_all_outputs()
-- When moving a "full screen workspace" to another screen, we seem to lose
-- its placeholder and thereby the possibility to return it from full
-- screen later. Let's therefore try to close any full screen workspace
-- before rearranging.
full_screen_workspaces={}
for_all_workspaces_do(function(ws)
if obj_is(ws, "WGroupCW") then table.insert(full_screen_workspaces, ws)
end
return true
end)
for _,ws in ipairs(full_screen_workspaces) do
ws:set_fullscreen("false")
end
-- round one: divide workspaces in directly assignable,
-- orphans and wanderers
function roundone(workspace)
local screens = candidate_screens_for_outputs(max_screen_id, all_outputs, getInitialOutputs(workspace))
if nilOrEmpty(screens) then
table.insert(orphans, workspace)
elseif singleton(screens) then
add_safe(new_mapping, firstValue(screens):id(), workspace)
else
wanderers[workspace] = screens
end
return true
end
for_all_workspaces_do(roundone)
for workspace,screens in pairs(wanderers) do
-- TODO add to screen with least # of workspaces instead of just the
-- first one that applies
if screens[workspace:screen_of():name()] then
add_safe(new_mapping, workspace:screen_of():id(), workspace)
else
add_safe(new_mapping, firstValue(screens):id(), workspace)
end
end
for i,workspace in pairs(orphans) do
-- TODO add to screen with least # of workspaces instead of just the first one
add_safe(new_mapping, 0, workspace)
end
for screen_id,workspaces in pairs(new_mapping) do
-- move workspace to that
for i,workspace in pairs(workspaces) do
move_if_needed(workspace, screen_id)
end
end
end
-- refresh xinerama and rearrange workspaces on screen layout updates
function mod_xrandr.screenlayoutupdated()
notioncore.profiling_start('notion_xrandrrefresh.prof')
local screens = mod_xinerama.query_screens()
if screens then
local merged_screens = mod_xinerama.merge_overlapping_screens(screens)
mod_xinerama.setup_screens(merged_screens)
end
local max_screen_id = mod_xinerama.find_max_screen_id(screens);
mod_xrandr.rearrangeworkspaces(max_screen_id)
if screens then
mod_xinerama.close_invisible_screens(max_screen_id)
end
mod_xinerama.populate_empty_screens()
notioncore.screens_updated(notioncore.rootwin())
notioncore.profiling_stop()
end
randr_screen_change_notify_hook = notioncore.get_hook('randr_screen_change_notify')
if randr_screen_change_notify_hook then
randr_screen_change_notify_hook:add(mod_xrandr.screenlayoutupdated)
end

1
.notion/look.lua Normal file
View File

@ -0,0 +1 @@
dopath('look_codevoid')

193
.notion/look_codevoid.lua Normal file
View File

@ -0,0 +1,193 @@
-- look_brownsteel.lua drawing engine configuration file for Notion.
if not gr.select_engine("de") then return end
de.reset()
de.defstyle("*", {
shadow_colour = "#404040",
highlight_colour = "#707070",
background_colour = "#121212",
foreground_colour = "#FFA600",
padding_pixels = 1,
highlight_pixels = 1,
shadow_pixels = 1,
border_style = "elevated",
font = "-nil-profont-medium-r-normal---220-72-72-c-120-iso8859-1",
text_align = "center",
})
de.defstyle("frame", {
shadow_colour = "#404040",
highlight_colour = "#121212",
padding_colour = "#505050",
background_colour = "#000000",
foreground_colour = "#FFA600",
padding_pixels = 1,
highlight_pixels = 1,
shadow_pixels = 1,
spacing = 0,
})
de.defstyle("tab", {
de.substyle("active-selected", {
shadow_colour = "#1c1c1c",
highlight_colour = "#1c1c1c",
background_colour = "#242424",
foreground_colour = "#FFA600",
}),
de.substyle("active-unselected", {
shadow_colour = "#121212",
highlight_colour = "#121212",
background_colour = "#121212",
foreground_colour = "#6f6f6f",
}),
de.substyle("inactive-selected", {
shadow_colour = "#080808",
highlight_colour = "#181818",
background_colour = "#121212",
foreground_colour = "#804C00",
}),
-- de.substyle("inactive-unselected", {
shadow_colour = "#080808",
highlight_colour = "#080808",
background_colour = "#080808",
foreground_colour = "#4c4c4c",
-- }),
text_align = "center",
})
de.defstyle("input", {
shadow_colour = "#404040",
highlight_colour = "#707070",
background_colour = "#1c1c1c",
foreground_colour = "#FFA600",
padding_pixels = 1,
highlight_pixels = 1,
shadow_pixels = 1,
border_style = "elevated",
de.substyle("*-cursor", {
background_colour = "#1c1c1c",
foreground_colour = "#FFA600",
}),
de.substyle("*-selection", {
background_colour = "#121212",
foreground_colour = "#ffffff",
}),
})
de.defstyle("input-menu", {
de.substyle("active", {
shadow_colour = "#304050",
highlight_colour = "#708090",
background_colour = "#1c1c1c",
foreground_colour = "#ffffff",
}),
})
-- Common stdisp settings for the "emboss" styles
de.defstyle("stdisp", {
shadow_pixels = 0,
highlight_pixels = 0,
text_align = "left",
de.substyle("important", {
foreground_colour = "green",
}),
de.substyle("critical", {
foreground_colour = "red",
}),
})
-- Common tab settings for the "emboss" styles
de.defstyle("actnotify", {
shadow_colour = "#600808",
highlight_colour = "#c04040",
background_colour = "#b03030",
foreground_colour = "#ffffff",
})
de.defstyle("tab-frame", {
-- TODO: some kind of amend option. It should not be necessary to
-- duplicate this definition for both tab-frame and tab-menuentry,
-- or for each style, nor use more complex hacks to communicate
-- this stuff otherwise.
de.substyle("*-*-*-unselected-activity", {
shadow_colour = "#600808",
highlight_colour = "#c04040",
background_colour = "#901010",
foreground_colour = "#eeeeee",
}),
de.substyle("*-*-*-selected-activity", {
shadow_colour = "#600808",
highlight_colour = "#c04040",
background_colour = "#b03030",
foreground_colour = "#ffffff",
}),
de.substyle("*-*-*-tabnumber", {
background_colour = "black",
foreground_colour = "green",
}),
})
de.defstyle("tab-frame-tiled", {
spacing = 0,
})
de.defstyle("tab-menuentry", {
text_align = "left",
highlight_pixels = 0,
shadow_pixels = 0,
de.substyle("*-*-*-unselected-activity", {
shadow_colour = "#600808",
highlight_colour = "#c04040",
background_colour = "#901010",
foreground_colour = "#eeeeee",
}),
de.substyle("*-*-*-selected-activity", {
shadow_colour = "#600808",
highlight_colour = "#c04040",
background_colour = "#b03030",
foreground_colour = "#ffffff",
}),
})
de.defstyle("tab-menuentry-big", {
padding_pixels = 7,
})
de.defstyle("frame-tiled", {
border_style = "inlaid",
padding_pixels = 0,
spacing = 0,
})
de.defstyle("frame-floating", {
border_style = "ridge",
bar = "shaped"
})
de.defstyle("frame-tiled-alt", {
bar = "none",
})
de.defstyle("dock", {
border = 7,
outline_style = "each",
tile_size = {
width = "640",
height= "800",
},
})
gr.refresh()

197
.notion/look_huf.lua Normal file
View File

@ -0,0 +1,197 @@
-- look_clean.lua drawing engine configuration file for Ion.
if not gr.select_engine("de") then return end
de.reset()
de.defstyle("*", {
shadow_colour = "#233340",
highlight_colour = "#233340",
background_colour = "#233340",
foreground_colour = "grey",
padding_pixels = 0,
highlight_pixels = 1,
shadow_pixels = 1,
border_style = "elevated",
font = "-misc-fixed-medium-r-*-*-13-*-*-*-*-60-*-*",
text_align = "center",
})
de.defstyle("tab", {
font = "-misc-fixed-medium-r-*-*-13-*-*-*-*-60-*-*",
de.substyle("*", {
shadow_colour = "grey15",
highlight_colour = "grey15",
background_colour = "black",
foreground_colour = "grey50",
}),
de.substyle("active-selected", {
shadow_colour = "#233340",
highlight_colour = "#233340",
background_colour = "#233340",
foreground_colour = "grey90",
}),
de.substyle("active-unselected", {
shadow_colour = "grey15",
highlight_colour = "grey15",
background_colour = "grey15",
foreground_colour = "grey",
}),
de.substyle("inactive-selected", {
shadow_colour = "#2A3D4D",
highlight_colour = "#2A3D4D",
background_colour = "black",
foreground_colour = "grey70",
}),
de.substyle("inactive-unselected", {
shadow_colour = "grey15",
highlight_colour = "grey15",
background_colour = "black",
foreground_colour = "grey50",
}),
text_align = "center",
})
de.defstyle("input", {
foreground_colour = "white",
de.substyle("*-cursor", {
background_colour = "white",
foreground_colour = "#405d75",
}),
de.substyle("*-selection", {
background_colour = "#aaaaaa",
foreground_colour = "black",
}),
font = "-misc-fixed-medium-r-*-*-13-*-*-*-*-60-*-*",
})
-- Common settings for the "clean" styles
de.defstyle("frame", {
background_colour = "#000000",
de.substyle("active", {
-- Something detached from the frame is active
-- padding_colour = "#314759",
--padding_colour = "#233340",
padding_colour = "grey40",
}),
de.substyle("quasiactive", {
-- Something detached from the frame is active
-- padding_colour = "#FF0000", // XXX ask tuomo about this, how to make it work in reverse?
padding_colour = "#233340",
}),
de.substyle("userattr1", {
-- For user scripts
padding_colour = "#009010",
}),
padding_pixels = 1,
})
de.defstyle("frame-tiled", {
shadow_pixels = 0,
highlight_pixels = 0,
spacing = 1,
})
de.defstyle("frame-tiled-alt", {
bar = "none",
})
de.defstyle("frame-floating", {
bar = "shaped",
padding_pixels = 0,
})
de.defstyle("frame-transient", {
bar = "none",
padding_pixels = 0,
})
de.defstyle("actnotify", {
shadow_colour = "#c04040",
highlight_colour = "#c04040",
background_colour = "#901010",
foreground_colour = "#eeeeee",
})
de.defstyle("tab", {
de.substyle("*-*-*-unselected-activity", {
shadow_colour = "#c04040",
highlight_colour = "#c04040",
background_colour = "#901010",
foreground_colour = "#eeeeee",
}),
de.substyle("*-*-*-selected-activity", {
shadow_colour = "#c04040",
highlight_colour = "#c04040",
background_colour = "#b03030",
foreground_colour = "#ffffff",
}),
de.substyle("*-*-*-tabnumber", {
background_colour = "black",
foreground_colour = "green",
}),
})
de.defstyle("tab-frame", {
spacing = 1,
})
de.defstyle("tab-frame-floating", {
spacing = 0,
})
de.defstyle("tab-menuentry", {
text_align = "left",
de.substyle("inactive-selected", {
background_colour = "#233340",
}),
})
de.defstyle("tab-menuentry-big", {
font = "-*-helvetica-medium-r-normal-*-17-*-*-*-*-*-*-*",
padding_pixels = 7,
})
de.defstyle("stdisp", {
shadow_pixels = 0,
highlight_pixels = 0,
text_align = "left",
background_colour = "#000000",
foreground_colour = "grey",
font="-misc-fixed-medium-r-*-*-13-*-*-*-*-60-*-*",
de.substyle("important", {
foreground_colour = "green",
}),
de.substyle("critical", {
foreground_colour = "red",
}),
de.substyle("separator", {
-- foreground_colour = "#405d75",
foreground_colour = "blue",
-- foreground_colour = "#8a999e",
}),
})
de.defstyle("tab-menuentry-big", {
padding_pixels = 7,
font = "-misc-fixed-medium-r-*-*-18-*-*-*-*-*-*-*",
})
gr.refresh()

26
.notion/mod_float-sb.lua Normal file
View File

@ -0,0 +1,26 @@
-- Authors: Unknown
-- License: Unknown
-- Last Changed: Unknown
--
-- Example of floating toggleable statusbar
--
local floatsbscr=ioncore.find_screen_id(0)
local floatsb
floatsb=floatsbscr:attach_new{
type="WStatusBar",
unnumbered=true,
sizepolicy='southwest',
template='%workspace_pager',
passive=true,
level=2
}
local function toggle_floatsb()
floatsbscr:set_hidden(floatsb, 'toggle')
end
ioncore.defbindings("WScreen", {
kpress(META.."B", toggle_floatsb)
})

View File

@ -0,0 +1,11 @@
ctrl_statusbar.save = {
active = {
"%date",
"load:% %>load",
},
inactive = {
"battery: %battery",
"%workspace_pager",
"net:% %>netmon",
}
}

15
.notion/shellbar.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/ksh
set -A _SYSV -- $(sysctl -n hw.sensors.cpu0.temp0 \
hw.sensors.acpithinkpad0.fan0 \
hw.cpuspeed \
| cut -d" " -f1)
TEMP="$(sysctl -n hw.sensors.cpu{0,1,2,3,4,5,6,7,8,9,10,11}.frequency0 \
| cut -d. -f1 | sort)"
AVG="$(printf '(%s)/12' "$TEMP" | tr '\n' '+')"
out() { printf '%s/1000/1000\n' "$1" | bc; }
printf " %s%% | %2s°C | %4sRPM | %4sMhz (~%4sMhz) |" \
"$(apm -l)" "${_SYSV[0]}" "${_SYSV[1]}" "${_SYSV[2]}" "$(out $AVG)"

View File

@ -0,0 +1,117 @@
-- Authors: Rico Schiekel <fire@paranetic.de>, Canaan Hadley-Voth, Kevin Granade <kevin.granade@gmail.com>
-- License: Unknown
-- Last Changed: 2007-05-09
--
-- statusbar_workspace.lua
--
-- Show current workspace name or number in the statusbar.
--
-- Put any of these in cfg_statusbar.lua's template-line:
-- %workspace_name
-- %workspace_frame
-- %workspace_pager
-- %workspace_name_pager
-- %workspace_num_name_pager
--
-- This is an internal statusbar monitor and does NOT require
-- a dopath statement (effective after a 2006-02-12 build).
--
-- version 1
-- author: Rico Schiekel <fire at paranetic dot de>
--
-- version 2
-- added 2006-02-14 by Canaan Hadley-Voth:
-- * %workspace_pager shows a list of workspace numbers
-- with the current one indicated:
--
-- 1i 2i [3f] 4p 5c
--
-- i=WIonWS, f=WFloatWS, p=WPaneWS, c=WClientWin/other
--
-- * %workspace_frame - name of the active frame.
--
-- * Added statusbar_ to the filename (since it *is*
-- an internal statusbar monitor) so that it works without
-- a "dopath" call.
--
-- * Removed timer. Only needs to run on hook.
-- Much faster this way.
--
-- version 3
-- update for ion-3rc-20070506 on 2007-05-09
-- by Kevin Granade <kevin dot granade at gmail dot com>
--
-- Updated to use new wx_ api
-- Replaced region_activated_hook with region_notify_hook
-- Added %workspace_name_pager, which works similarly to %workspace_pager,
-- but instead displays the name of each workspace
-- Added display for WGroupWS to %workspace_pager, displayed as 'g'
--
local function update_frame()
local fr
ioncore.defer( function()
fr=ioncore.current():name()
mod_statusbar.inform('workspace_frame', fr)
mod_statusbar.update()
end)
end
local function update_workspace()
local scr=ioncore.find_screen_id(0)
local curws = scr:mx_current()
local wstype, c
local pager=""
local name_pager=""
local name_pager_plus=""
local curindex = scr:get_index(curws)+1
n = scr:mx_count(1)
for i=1,n do
tmpws=scr:mx_nth(i-1)
wstype=obj_typename(tmpws)
if wstype=="WIonWS" then
c="-I"
elseif wstype=="WFloatWS" then
c="-FL"
elseif wstype=="WPaneWS" then
c="-PA"
elseif wstype=="WGroupWS" then
c=""
else
c="-FS"
end
if i==curindex then
name_pager_plus=name_pager_plus.." ["..tmpws:name().."]"
name_pager=name_pager.." "..tmpws:name().." "
pager=pager.."["..(i)..c.."]"
else
name_pager_plus=name_pager_plus.." "..(i)..":"..tmpws:name()
name_pager=name_pager.." "..tmpws:name()
pager=pager.." "..(i)..c.." "
end
end
local fr,cur
-- Older versions without an ioncore.current() should
-- skip update_frame.
-- update_frame()
ioncore.defer( function()
mod_statusbar.inform('workspace_pager', pager)
-- mod_statusbar.inform('workspace_name', curws:name())
-- mod_statusbar.inform('workspace_name_pager', name_pager)
-- mod_statusbar.inform('workspace_num_name_pager', name_pager_plus)
mod_statusbar.update()
end)
end
local function update_workspace_wrap(reg, how)
-- if how ~= "name" then
-- return
-- end
update_workspace()
end
ioncore.get_hook("region_notify_hook"):add(update_workspace_wrap)
ioncore.get_hook("screen_managed_changed_hook"):add(update_workspace)

View File

@ -0,0 +1,21 @@
function get_shell(cmd)
local handle = io.popen(cmd, 'r')
if not handle then
return "could not open shellbar.sh"
end
local result, error = handle:read('*a')
handle:close()
if not result then
return "(" .. error .. ")" -- chance of interrupted system call
end
return result
end
local timer = statusd.create_timer()
local function update()
statusd.inform("shellbar", get_shell('/home/sdk/.notion/shellbar.sh'))
timer:set(5000, update)
end
update()