2012-07-06 14:19:54 +02:00
|
|
|
-- Spawn a composoting manager
|
2013-09-27 09:45:11 +02:00
|
|
|
awful.util.spawn("compton", false)
|
|
|
|
awful.util.spawn("xcompmgr", false) -- Will fail if compton has been started
|
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",
|
2012-07-16 17:39:12 +02:00
|
|
|
-- Read resources
|
|
|
|
"xrdb -merge " .. awful.util.getdir("config") .. "/Xresources",
|
2012-08-16 21:06:08 +02:00
|
|
|
-- Default browser
|
2014-02-26 09:37:43 +01:00
|
|
|
"xdg-mime default " .. config.browser .. ".desktop " ..
|
|
|
|
"x-scheme-handler/http " ..
|
|
|
|
"x-scheme-handler/https " ..
|
|
|
|
"text/html",
|
2014-02-26 09:36:45 +01:00
|
|
|
-- Default MIME types
|
2014-02-26 10:20:40 +01:00
|
|
|
"xdg-mime default evince.desktop application/pdf",
|
2014-02-27 09:18:57 +01:00
|
|
|
"xdg-mime default gpicview.desktop image/png image/x-apple-ios-png image/jpeg image/jpg image/gif"
|
2012-07-06 14:19:54 +02:00
|
|
|
}
|
|
|
|
|
2012-07-20 15:14:29 +02:00
|
|
|
-- Keyboard/Mouse configuration
|
2014-06-09 16:50:04 +02:00
|
|
|
if config.hostname == "guybrush" then
|
2012-07-06 14:19:54 +02:00
|
|
|
execute = awful.util.table.join(
|
|
|
|
execute, {
|
2012-07-16 17:59:23 +02:00
|
|
|
-- Keyboard and mouse
|
2012-07-20 15:14:29 +02:00
|
|
|
"setxkbmap us,fr '' compose:ralt ctrl:nocaps grp:rctrl_rshift_toggle",
|
2012-11-13 21:19:19 +01:00
|
|
|
"xmodmap -e 'keysym XF86WebCam = XF86ScreenSaver'",
|
2012-07-06 14:19:54 +02:00
|
|
|
-- 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"})
|
2014-06-08 07:37:57 +02:00
|
|
|
elseif config.hostname == "zoro" then
|
|
|
|
execute = awful.util.table.join(
|
|
|
|
execute, {
|
|
|
|
-- Keyboard and mouse
|
|
|
|
"setxkbmap us,fr '' compose:ralt grp:rctrl_rshift_toggle",
|
2014-06-08 23:09:18 +02:00
|
|
|
"xmodmap -e 'keycode 110 = Control_L'", -- home
|
|
|
|
"xmodmap -e 'keycode 115 = Control_L'", -- end
|
|
|
|
"xmodmap -e 'add control Control_L Control_R'",
|
|
|
|
"xmodmap -e 'keycode 49 = Insert", -- between alt_l and ctrl_l
|
|
|
|
"xmodmap -e 'keycode 9 = grave asciitilde'", -- escape
|
2014-06-08 07:37:57 +02:00
|
|
|
-- Wheel emulation
|
|
|
|
"xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 1",
|
|
|
|
"xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Button' 2",
|
|
|
|
"xinput set-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Axes' 6 7 4 5",
|
|
|
|
-- Make touchpad buttons work
|
2014-06-08 23:09:18 +02:00
|
|
|
"xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Soft Button Areas' 3656 5112 0 2200 2928 3656 0 2200",
|
|
|
|
"xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Area' 0 0 2200 0"})
|
2012-07-06 14:19:54 +02:00
|
|
|
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")
|
2013-12-03 18:53:25 +01:00
|
|
|
xrun("pidgin", "pidgin -n")
|
2014-06-06 22:22:03 +02:00
|
|
|
xrun("keepassx", "keepassx -min -lock")
|
|
|
|
xrun("NetworkManager Applet", "nm-applet")
|
2012-07-13 08:09:22 +02:00
|
|
|
|
2012-07-13 08:21:57 +02:00
|
|
|
if config.hostname == "neo" then
|
2012-07-13 10:57:53 +02:00
|
|
|
xrun("transmission", "transmission-gtk -m")
|
2012-07-06 14:19:54 +02:00
|
|
|
end
|