Skip to content

Instantly share code, notes, and snippets.

@seraphyn
Created November 29, 2013 11:23
Show Gist options
  • Save seraphyn/7704436 to your computer and use it in GitHub Desktop.
Save seraphyn/7704436 to your computer and use it in GitHub Desktop.
Notion Konifguration
-- 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'.
-- Terminal emulator
XTERM="urxvt"
-- Debian sets the META and ALTMETA keys in /etc/default/ion3.
META="Mod1+"
ALTMETA="Mod4+"
SHIFT="Caps_Lock"
-- 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=true,
-- Movement commands warp the pointer to frames instead of just
-- changing focus. Enabled by default.
warp=false,
default_ws_type="WIonWS",
}
-- cfg_ioncore contains configuration of the Ion 'core'
dopath("cfg_ioncore")
-- Load some kludges to make apps behave better.
dopath("cfg_kludges")
-- Load some modules. Disable the loading of cfg_modules by commenting out
-- the corresponding line with -- if you don't want the whole default set
-- (everything except mod_dock). Then uncomment the lines for the modules
-- you want.
dopath("mod_query")
dopath("mod_tiling")
dopath("mod_menu")
dopath("mod_dock")
dopath("mod_statusbar")
dopath("mod_sp")
dopath("mod_xrandr")
dopath("mod_xinerama")
dopath("cfg_menus")
dopath("cfg_mymenu")
dopath("statusbar_workspace")
dopath("look-zenburn-ion3")
--dopath("debian")
defbindings("WScreen", {
bdoc("Switch to n:th object (workspace, full screen client window) "..
"within current screen."),
-- F21 and F20 is the forward and backward on thinkpadkeyboard
kpress("F21", "WScreen.switch_next(_)"),
kpress("F20", "WScreen.switch_prev(_)"),
kpress("XF86AudioLowerVolume","ioncore.exec_on(_, 'amix down')"),
kpress("XF86AudioRaiseVolume", "ioncore.exec_on(_, 'amix up')"),
kpress("XF86AudioMute", "ioncore.exec_on(_, 'amixer set Master toggle')"),
kpress("XF86AudioPrev","ioncore.exec_on(_, 'mocp -r')"),
kpress("XF86AudioStop","ioncore.exec_on(_, 'mocp -s')"),
kpress("XF86AudioPlay","ioncore.exec_on(_, 'mocp -G')"),
kpress("XF86AudioNext","ioncore.exec_on(_, 'mocp -f')"),
-- Buttons on thinkpadkeyboard with pressed with FN
kpress(META.. "XF86AudioPrev","ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcForm?command=previous')"),
kpress(META.. "XF86AudioStop","ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcForm?command=stop')"),
kpress(META.. "XF86AudioPlay","ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcForm?command=play')"),
kpress(META.. "XF86AudioNext","ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcForm?command=next')"),
kpress(META.. "XF86AudioLowerVolume","ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcHttp?command=setvolume&parameter=50')"),
kpress(META.. "XF86AudioRaiseVolume", "ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcHttp?command=setvolume&parameter=70')"),
kpress(META.. "XF86AudioMute", "ioncore.exec_on(_, 'curl http://192.168.1.4/xbmcCmds/xbmcHttp?command=setvolume&parameter=0')"),
-- META is ALT ALTMETA is damn Windowslogothing on the Thinkpadkeyboard
submap(META.."K", {
bdoc("Go to previous active object."),
kpress("K", "ioncore.goto_previous()"),
bdoc("Clear all tags."),
kpress("T", "ioncore.clear_tags()"),
}),
bdoc("Navigate through child screens"),
kpress(META.. "Left", "ioncore.goto_next(_chld, 'left')"),
kpress(META.. "Right", "ioncore.goto_next(_chld, 'right')"),
kpress(META.. "Up", "ioncore.goto_next(_chld, 'up')"),
kpress(META.. "Down", "ioncore.goto_next(_chld, 'down')"),
bdoc("Create a new workspace of chosen default type."),
kpress(META.."F10", "ioncore.create_ws(_)"),
bdoc("Create a new workspace and ask for type."),
kpress(ALTMETA.."F10", "mod_query.query_workspace(_)"),
bdoc("Display the main and user menu."),
kpress(META.."F11", "mod_menu.bigmenu(_, _sub, 'mymenu')"),
kpress(META.."F12", "mod_menu.bigmenu(_, _sub, 'mainmenu')"),
--kpress("Super_L", "mod_menu.bigmenu(_, _sub, 'mymenu')"),
kpress("Menu", "mod_menu.bigmenu(_, _sub, 'mainmenu')"),
})
-- WMPlex context bindings
--
-- These bindings work in frames and on screens. The innermost of such
-- contexts/objects always gets to handle the key press. Most of these
-- bindings define actions on client windows. (Remember that client windows
-- CAN BE PUT IN FULLSCREEN MOde and therefore may not have a frame.)
--
-- The "_sub:WClientWin" guards are used to ensure that _sub is a client
-- window in order to stop Ion from executing the callback with an invalid
-- parameter if it is not and then complaining.
--
defbindings("WGroupCW", {
bdoc("Toggle client window group full-screen mode"),
kpress_wait(META.. "F", "WGroup.set_fullscreen(_, 'toggle')"),
})
defbindings("WMPlex", {
bdoc("Close current object."),
kpress_wait(META.."C", "WRegion.rqclose_propagate(_, _sub)"),
bdoc("Nudge current client window. This might help with some "..
"programs' resizing problems."),
kpress_wait(META.."L",
"WClientWin.nudge(_sub)", "_sub:WClientWin"),
submap(META.."K", {
bdoc("Kill client owning current client window."),
kpress("C", "WClientWin.kill(_sub)", "_sub:WClientWin"),
bdoc("Send next key press to current client window. "..
"Some programs may not allow this by default."),
kpress("Q", "WClientWin.quote_next(_sub)", "_sub:WClientWin"),
}),
bdoc("Run a terminal emulator."),
kpress(ALTMETA.. "u", "ioncore.exec_on(_, 'externaledit')"),
bdoc("Run a terminal emulator."),
kpress(ALTMETA.. "t", "ioncore.exec_on(_, 'termi')"),
bdoc("Run a terminal emulator."),
kpress(ALTMETA.. "x", "ioncore.exec_on(_, 'xterm')"),
bdoc("Run Worker."),
kpress(ALTMETA.. "w", "ioncore.exec_on(_, 'worker')"),
-- bdoc("Run XLock."),
-- kpress(ALTMETA.. "PAUSE", "ioncore.exec_on(_, 'i3lock')"),
bdoc("Query for command line to execute."),
kpress(META.."Escape", "mod_query.query_exec(_)"),
bdoc("Query for Lua code to execute."),
kpress(ALTMETA.."F8", "mod_query.query_lua(_)"),
-- bdoc("Query for file to edit."),
-- kpress(MOD4.."F5",
-- "mod_query.query_editfile(_, 'run-mailcap --action=edit')"),
-- bdoc("Query for file to view."),
-- kpress(MOD4.."F6",
-- "mod_query.query_runfile(_, 'run-mailcap --action=view')"),
-- bdoc("Query for a client window to go to."),
-- kpress(META.."G", "mod_query.query_gotoclient(_)"),
})
-- WFrame context bindings
--
-- These bindings are common to all types of frames. The rest of frame
-- bindings that differ between frame types are defined in the modules'
-- configuration files.
defbindings("WFrame", {
bdoc("Tag current object within the frame."),
kpress(META.."T", "WRegion.set_tagged(_sub, 'toggle')", "_sub:non-nil"),
-- bdoc("Switch to n:th object within the frame."),
-- kpress(MOD3.."1", "WFrame.switch_nth(_, 0)"),
-- kpress(MOD3.."2", "WFrame.switch_nth(_, 1)"),
-- kpress(MOD3.."3", "WFrame.switch_nth(_, 2)"),
-- kpress(MOD3.."4", "WFrame.switch_nth(_, 3)"),
-- kpress(MOD3.."5", "WFrame.switch_nth(_, 4)"),
-- kpress(MOD3.."6", "WFrame.switch_nth(_, 5)"),
-- kpress(MOD3.."7", "WFrame.switch_nth(_, 6)"),
-- kpress(MOD3.."8", "WFrame.switch_nth(_, 7)"),
-- kpress(MOD3.."9", "WFrame.switch_nth(_, 8)"),
-- kpress(MOD3.."0", "WFrame.switch_nth(_, 9)"),
bdoc("Switch to next/previous object within the frame."),
kpress(ALTMETA.."1", "WFrame.switch_next(_)"),
kpress(ALTMETA.."2", "WFrame.switch_prev(_)"),
submap(META.."K", {
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", "WFrame.attach_tagged(_)"),
}),
--Mychange
-- bdoc("Query for a client window to attach to active frame."),
-- kpress(META.."A", "mod_query.query_attachclient(_)"),
bdoc("Display frame context menu."),
kpress(META.."M", "mod_menu.menu(_, _sub, 'ctxmenu')"),
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(_)"),
})
-- 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+Right", "WMoveresMode.resize(_,-1, 0, 0, 0)"),
kpress("Shift+Left", "WMoveresMode.resize(_, 0,-1, 0, 0)"),
kpress("Shift+Down", "WMoveresMode.resize(_, 0, 0,-1, 0)"),
kpress("Shift+Up", "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)"),
})
--
-- Ion statusbar module configuration file
--
-- 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="%date || %>load || E: %netmon_avgin/%netmon_avgout W: %iwinfo_signal %iwinfo_ssid || %laptopstatus_batterypercent || %workspace_pager ||%weather_tempC C %weather_wind || %exec_sera %exec_chris %exec_google WP: %exec_wp %systray",
--template="[ %date || load: %05load_1min || mail: %02mail_new/%02mail_total ] %filler %systray",
}
-- 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 %Y-%m-%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,
},
-- exec = {
-- rss={
-- program = 'newsbeuter -x reload print-unread',
-- retry_delay = 2400 * 1000,
-- },
-- },
exec = {
chris={
program='/home/seraphyn/bin/imapchris',
retry_delay=6000*1000,
},
sera={
program='/home/seraphyn/bin/imapseraphyn',
retry_delay=6000*1000,
},
google={
program='/home/seraphyn/bin/imapgoogle',
retry_delay=6000*1000,
},
wp={
program='/home/seraphyn/bin/WP',
retry_delay=10*1000,
},
},
-- 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={},
},
}
-- look-zenburn-ion3.lua --- Zenburn color theme for Ion3
-- This file is in the public domain.
-- Author: Daniel Brockman <[email protected]>
-- URL: http://www.brockman.se/software/zenburn/look-zenburn-ion3.lua
-- Based on Jani Nurminen's original Zenburn color scheme for Vim,
-- and the classic brownsteel look for pwm.
-- Thanks to Luke Renn for porting this to Ion3.
if not gr.select_engine("de") then return end
de.reset()
-- font_medium = "-*-lucidatypewriter-medium-*-*-*-8-*-*-*-*-*-*-*"
-- font_bold = "-*-lucidatypewriter-bold-*-*-*-8-*-*-*-*-*-*-*"
-- font_medium = "-*-lucy-medium-*-*-*-8-*-*-*-*-*-*-*"
-- font_bold = "-*-lucy-bold-*-*-*-8-*-*-*-*-*-*-*"
-- font_medium = "-*-fixed-medium-r-normal-*-6-*-*-*-*-*-*-*",
font_medium = "-*-droid sans-mono-r-*-*-7-*-*-*-*-*-*-*",
de.defstyle("*", {
shadow_colour = "#262626",
highlight_colour = "#767676",
background_colour = "#464646",
foreground_colour = "#acac9c",
padding_pixels = 1,
highlight_pixels = 1,
shadow_pixels = 1,
border_style = "elevated",
font = font_medium,
text_align = "center",
})
de.defstyle("frame", {
based_on = "*",
transparent_background = true,
padding_colour = "#505050",
background_colour = "#000000",
foreground_colour = "#ffffff",
padding_pixels = 2,
highlight_pixels = 1,
shadow_pixels = 1,
de.substyle("active", {
shadow_colour = "#204050",
highlight_colour = "#607080",
background_colour = "#505050",
foreground_colour = "#ffffff",
}),
})
de.defstyle("frame-ionframe", {
based_on = "frame",
border_style = "inlaid",
padding_pixels = 1,
spacing = 1,
})
de.defstyle("frame-floatframe", {
based_on = "frame",
border_style = "ridge"
})
de.defstyle("tab", {
based_on = "*",
font = font_bold,
de.substyle("inactive-unselected", {
shadow_colour = "#262626",
highlight_colour = "#767676",
background_colour = "#464646",
foreground_colour = "#acac9c",
}),
de.substyle("inactive-selected", {
shadow_colour = "#404040",
highlight_colour = "#909090",
background_colour = "#606060",
foreground_colour = "#dcdccc",
}),
de.substyle("active-unselected", {
shadow_colour = "#203040",
highlight_colour = "#607080",
background_colour = "#405060",
foreground_colour = "#a0a0a0",
}),
de.substyle("active-selected", {
shadow_colour = "#304050",
highlight_colour = "#708090",
background_colour = "#506070",
foreground_colour = "#ffffff",
}),
text_align = "center",
})
de.defstyle("tab-frame", {
based_on = "tab",
de.substyle("*-*-*-*-activity", {
shadow_colour = "#404040",
highlight_colour = "#707070",
background_colour = "#990000",
foreground_colour = "#eeeeee",
}),
})
de.defstyle("tab-frame-ionframe", {
based_on = "tab-frame",
spacing = 1,
})
de.defstyle("tab-menuentry", {
based_on = "tab",
text_align = "left",
})
de.defstyle("tab-menuentry-big", {
based_on = "tab-menuentry",
padding_pixels = 2,
})
de.defstyle("input", {
based_on = "*",
background_colour = "#000000",
foreground_colour = "#ffffff",
padding_pixels = 1,
highlight_pixels = 1,
shadow_pixels = 1,
border_style = "elevated",
de.substyle("*-cursor", {
background_colour = "#ffffff",
foreground_colour = "#000000",
}),
de.substyle("*-selection", {
background_colour = "#505050",
foreground_colour = "#ffffff",
}),
})
gr.refresh()
@seraphyn
Copy link
Author

ALT+ESC rundialog
Windowstaste +T = Terminal urxvt
Windowstatse 1 und 2 = Frame vor und zurück
ALT+^ = Scratchpad
Windowstaste+W= worker Dateimanager
ALT+F10="neuer virtueller Desktop"
ALT+C= Frame bzw Programm schliessen
Windowstaste + S = Horizontal teilen
Windowstaste + K dann S = Senkrecht teilen

Der Rest ergibt such aus dem lenrne der Konfiguration

Script etc sind hier zu finden : http://seraphyn.teiko.org/?s=notion

look-zenburn-ion3.lua habe ich mir ein wenig angepasst.
Notion beherrscht auch transparenz, das ist nicht zu vergessen, sprich die Statusbar etc können auch tranparent sein, aber für was ;)

Ich nutze ein selbstkompiliertes Trayion, es geht aber auch stalonetray welches ich aber als nervig in der Konifguration empfand.
Siehe auch http://notion.sourceforge.net/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment