2012-07-06 14:19:54 +02:00
|
|
|
-- Startup
|
|
|
|
|
|
|
|
-- Setup display
|
|
|
|
local xrandr = {
|
|
|
|
naruto = "--output VGA1 --auto --output DVI1 --auto --left-of VGA1",
|
|
|
|
neo = "--output HDMI-0 --auto --output DVI-0 --auto --right-of HDMI-0"
|
|
|
|
}
|
|
|
|
if xrandr[config.hostname] then
|
|
|
|
os.execute("xrandr " .. xrandr[config.hostname])
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Spawn a composoting manager
|
2012-07-07 02:08:36 +02:00
|
|
|
awful.util.spawn("xcompmgr", false)
|
2012-07-06 14:19:54 +02:00
|
|
|
|
|
|
|
-- Start idempotent commands
|
|
|
|
local execute = {
|
|
|
|
-- Start PulseAudio
|
|
|
|
"pulseaudio --check || pulseaudio -D",
|
|
|
|
"xset -b", -- Disable bell
|
|
|
|
-- Enable numlock
|
|
|
|
"numlockx on",
|
|
|
|
}
|
|
|
|
|
|
|
|
if config.hostname == "naruto" then
|
|
|
|
execute = awful.util.table.join(
|
|
|
|
execute, {
|
|
|
|
"xset m 4 3", -- Mouse acceleration
|
2012-07-14 12:29:48 +02:00
|
|
|
})
|
2012-07-06 14:19:54 +02:00
|
|
|
elseif config.hostname == "neo" then
|
|
|
|
execute = awful.util.table.join(
|
|
|
|
execute, {
|
|
|
|
-- Keyboard configuration
|
|
|
|
"xset m 3 3", -- Mouse acceleration
|
2012-07-14 12:29:48 +02:00
|
|
|
})
|
2012-07-06 14:19:54 +02:00
|
|
|
elseif config.hostname == "guybrush" then
|
|
|
|
execute = awful.util.table.join(
|
|
|
|
execute, {
|
|
|
|
-- Wheel emulation
|
|
|
|
"xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 8 1",
|
|
|
|
"xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Button' 8 2",
|
|
|
|
"xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Axes' 8 6 7 4 5",
|
|
|
|
-- Disable touchpad
|
|
|
|
"xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Off' 8 1"})
|
|
|
|
end
|
|
|
|
|
|
|
|
os.execute(table.concat(execute, ";"))
|
|
|
|
|
|
|
|
-- Spawn various X programs
|
2012-07-13 08:21:57 +02:00
|
|
|
xrun("polkit-gnome-authentication-agent-1",
|
|
|
|
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1")
|
|
|
|
xrun("Bluetooth Applet",
|
|
|
|
"bluetooth-applet")
|
2012-07-13 10:57:53 +02:00
|
|
|
xrun("pidgin", "pidgin -n")
|
2012-07-13 08:21:57 +02:00
|
|
|
xrun("emacs")
|
2012-07-13 08:09:22 +02:00
|
|
|
|
2012-07-13 08:21:57 +02:00
|
|
|
if config.hostname == "neo" then
|
|
|
|
xrun("keepassx", "keepassx -min -lock")
|
2012-07-13 10:57:53 +02:00
|
|
|
xrun("transmission", "transmission-gtk -m")
|
2012-07-13 08:21:57 +02:00
|
|
|
xrun("chromium")
|
|
|
|
elseif config.hostname == "guybrush" then
|
|
|
|
xrun("keepassx", "keepassx -min -lock")
|
|
|
|
xrun("NetworkManager Applet", "nm-applet")
|
|
|
|
xrun("chromium")
|
|
|
|
elseif config.hostname == "naruto" then
|
|
|
|
xrun("iceweasel")
|
2012-07-06 14:19:54 +02:00
|
|
|
end
|