Added docs

This commit is contained in:
Thomas Forgione 2018-11-29 12:13:43 +01:00
parent 09cf022b6a
commit bc09145408
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 23 additions and 23 deletions

46
rc.lua
View File

@ -413,93 +413,93 @@ globalkeys = awful.util.table.join(
-- Custom shortcuts -- Custom shortcuts
awful.key({ }, "XF86AudioRaiseVolume", function() awful.key({ }, "XF86AudioRaiseVolume", function()
awful.util.spawn("amixer set Master 3%+", false) awful.util.spawn("amixer set Master 3%+", false)
end, {description = "increase the volume by 3%", group="custom"}), end, {description = "increase the volume by 3%", group="Fn Keys"}),
awful.key({ }, "XF86AudioLowerVolume", function() awful.key({ }, "XF86AudioLowerVolume", function()
awful.util.spawn("amixer set Master 3%-", false) awful.util.spawn("amixer set Master 3%-", false)
end, {description = "decrease the volume by 3%", group="custom"}), end, {description = "decrease the volume by 3%", group="Fn Keys"}),
awful.key({ }, "XF86AudioMute", function() awful.key({ }, "XF86AudioMute", function()
awful.util.spawn("amixer set Master toggle", false) awful.util.spawn("amixer set Master toggle", false)
end, {description = "mute sound", group="custom"}), end, {description = "mute sound", group="Fn Keys"}),
awful.key({ }, "XF86MonBrightnessDown", function () awful.key({ }, "XF86MonBrightnessDown", function ()
awful.util.spawn("xbacklight -dec 5") awful.util.spawn("xbacklight -dec 5")
end, {description = "decrease brightness", group="custom"}), end, {description = "decrease brightness", group="Fn Keys"}),
awful.key({ }, "XF86MonBrightnessUp", function () awful.key({ }, "XF86MonBrightnessUp", function ()
awful.util.spawn("xbacklight -inc 5") awful.util.spawn("xbacklight -inc 5")
end, {description = "increase brightness", group="custom"}), end, {description = "increase brightness", group="Fn Keys"}),
awful.key({ }, "XF86PowerOff", function () awful.key({ }, "XF86PowerOff", function ()
awful.util.spawn("gksudo shutdown now") awful.util.spawn("gksudo shutdown now")
end, {description = "Shutdown", group="custom"}), end, {description = "Shutdown", group="Fn Keys"}),
awful.key({ }, "XF86AudioPlay", function() awful.key({ }, "XF86AudioPlay", function()
music.execute_command('play') music.execute_command('play')
end, {description = "play or pause the current music", group="custom"}), end, {description = "play or pause the current music", group="Fn Keys"}),
awful.key({ }, "XF86AudioStop", function() awful.key({ }, "XF86AudioStop", function()
music.execute_command('stop') music.execute_command('stop')
end, {description = "stop the current music", group="custom"}), end, {description = "stop the current music", group="Fn Keys"}),
awful.key({ }, "XF86AudioNext", function() awful.key({ }, "XF86AudioNext", function()
music.execute_command('next') music.execute_command('next')
end, {description = "skip to the next music", group="custom"}), end, {description = "skip to the next music", group="Fn Keys"}),
awful.key({ }, "XF86AudioPrev", function() awful.key({ }, "XF86AudioPrev", function()
music.execute_command('previous') music.execute_command('previous')
end, {description = "skip to the previous music", group="custom"}), end, {description = "skip to the previous music", group="Fn Keys"}),
awful.key({ }, "Print", function () awful.key({ }, "Print", function ()
awful.spawn.easy_async_with_shell('gnome-screenshot -fp "`echo -n ' .. home .. '"/Pictures/Captures/Capture du " && date "+%Y-%m-%d %H:%M:%S"`.png"', function() end) awful.spawn.easy_async_with_shell('gnome-screenshot -fp "`echo -n ' .. home .. '"/Pictures/Captures/Capture du " && date "+%Y-%m-%d %H:%M:%S"`.png"', function() end)
end, {description = "capture the screen", group="custom"}), end, {description = "capture the screen", group="Fn Keys"}),
awful.key({modkey}, "a", function () awful.key({modkey}, "a", function ()
awful.spawn.easy_async(options.browser, function() end) awful.spawn.easy_async(options.browser, function() end)
naughty.notify({title = "Starting " .. options.browser}) naughty.notify({title = "Starting " .. options.browser})
end, {description="start the web browser", group="custom"}), end, {description="start the web browser", group="shortcuts"}),
awful.key({modkey}, "l", function() awful.key({modkey}, "l", function()
awful.spawn.easy_async_with_shell('sleep 1 && xset dpms force off && slock', function() end) awful.spawn.easy_async_with_shell('sleep 1 && xset dpms force off && slock', function() end)
end, { description="Locks the screen", group="custom"}), end, { description="Locks the screen", group="screen control"}),
awful.key({modkey, "Shift"}, "l", function() awful.key({modkey, "Shift"}, "l", function()
awful.spawn.easy_async_with_shell('sleep 1 && xset dpms force off', function() end) awful.spawn.easy_async_with_shell('sleep 1 && xset dpms force off', function() end)
end, { description="Locks the screen", group="custom"}), end, { description="Turns off the screen", group="screen control"}),
awful.key({modkey, "Shift"}, "Tab", function() awful.key({modkey, "Shift"}, "Tab", function()
awful.spawn.easy_async('xdotool key Caps_Lock', function() end) awful.spawn.easy_async('xdotool key Caps_Lock', function() end)
end, {description="switch the caps lock", group="custom"}), end, {description="switch the caps lock", group="screen control"}),
awful.key({modkey}, "#83", function() awful.key({modkey}, "#83", function()
awful.spawn.easy_async("tvrs enable left", function() end) awful.spawn.easy_async("tvrs enable left", function() end)
end, {description="lol", group="custom"}), end, {description="Sets the second screen to the left of the main screen", group="screen control"}),
awful.key({modkey}, "#84", function() awful.key({modkey}, "#84", function()
awful.spawn.easy_async("tvrs duplicate", function() end) awful.spawn.easy_async("tvrs duplicate", function() end)
end, {description="lol", group="custom"}), end, {description="Sets the second screen to copy the main screen", group="screen control"}),
awful.key({modkey}, "#85", function() awful.key({modkey}, "#85", function()
awful.spawn.easy_async("tvrs enable right", function() end) awful.spawn.easy_async("tvrs enable right", function() end)
end, {description="lol", group="custom"}), end, {description="Sets the second screen to the right of the main screen", group="screen control"}),
awful.key({modkey}, "#80", function() awful.key({modkey}, "#80", function()
awful.spawn.easy_async("tvrs enable above", function() end) awful.spawn.easy_async("tvrs enable above", function() end)
end, {description="lol", group="custom"}), end, {description="Sets the second screen above the main screen", group="screen control"}),
awful.key({modkey}, "#88", function() awful.key({modkey}, "#88", function()
awful.spawn.easy_async("tvrs enable below", function() end) awful.spawn.easy_async("tvrs enable below", function() end)
end, {description="lol", group="custom"}), end, {description="Sets the second screen below the main screen", group="screen control"}),
awful.key({modkey}, "#90", function() awful.key({modkey}, "#90", function()
awful.spawn.easy_async("tvrs disable", function() end) awful.spawn.easy_async("tvrs disable", function() end)
end, {description="lol", group="custom"}), end, {description="Disable the second screen", group="screen control"}),
awful.key({modkey}, "z", function() awful.key({modkey}, "z", function()
awful.spawn.easy_async("firefox https://hangouts.google.com https://messenger.com https://web.telegram.org https://gitter.im https://vortex-n7.slack.com/ https://nextcloud.tforgione.fr/apps/calendar", function() end) awful.spawn.easy_async("firefox https://hangouts.google.com https://messenger.com https://web.telegram.org https://gitter.im https://vortex-n7.slack.com/ https://nextcloud.tforgione.fr/apps/calendar", function() end)
naughty.notify({title = "Starting social media"}) naughty.notify({title = "Starting social media"})
end, {description="Open social media", group="custom"}), end, {description="Open social media", group="shortcuts"}),
awful.key({modkey, "Shift"}, "m", function() awful.key({modkey, "Shift"}, "m", function()
awful.spawn.easy_async('sleep 0.5', function() awful.spawn.easy_async('sleep 0.5', function()
@ -507,7 +507,7 @@ globalkeys = awful.util.table.join(
os.execute('xdotool type --clearmodifiers ' .. options.email:sub(i,i)) os.execute('xdotool type --clearmodifiers ' .. options.email:sub(i,i))
end end
end) end)
end, {description="lol", group="autoinput"}) end, {description="Automatically enters the key to type your email", group="shortcuts"})
) )