Add auto starting screenshot utility (configurable)

This commit is contained in:
Alice Gaudon 2019-07-25 17:21:34 +02:00
parent 58e6624a5a
commit c6d65d7ead
2 changed files with 12 additions and 5 deletions

View File

@ -15,7 +15,9 @@ config.terminal = "terminator"
-- Change to gears.filesystem.get_themes_dir() .. "default/theme.lua" to use default awesome theme
config.theme = awful.util.getdir("config") .. "/default_theme.lua"
config.screenshotCmd = "flameshot gui"
config.screenshot_utility_command = "flameshot gui"
config.screenshot_utility_auto_start = true
config.screenshot_utility_auto_start_command = "flameshot"
config.kbSwitchCmd = "setxkbmap"
config.kbLayouts = { "fr", "us" }
@ -27,4 +29,4 @@ config.windowSwitcher = "rofi -show window -config " .. awful.util.getdir("confi
config.volume_osd_timeout = 2
return config
return config

11
rc.lua
View File

@ -64,11 +64,16 @@ local tiling = require("tiling")
-- Network widget
if os.execute("nm-applet --help") == true then
os.execute("nm-applet &")
awful.spawn("nm-applet")
else
-- Support for more network managers should be requested via issues
end
-- Screenshot auto launch
if config.screenshot_utility_auto_start then
awful.spawn(config.screenshot_utility_auto_start_command)
end
-- This is used later as the default terminal and editor to run.
editor = os.getenv("EDITOR") or "nano"
editor_cmd = config.terminal .. " -e " .. editor
@ -428,8 +433,8 @@ globalkeys = gears.table.join(
awful.key({ "Shift" }, "Alt_L", function () kbdlayout.switch() end,
{description = "switch keyboard layout"}),
-- Flameshot
awful.key({}, "Print", function () os.execute( config.screenshotCmd ) end,
{description = "screenshot using the specified command"}),
awful.key({}, "Print", function () os.execute(config.screenshot_utility_command) end,
{description = "Take a screenshot using the screenshot utility", group="utilities"}),
-- Media control
awful.key({}, "XF86AudioPlay", media_control.playPause,
{description = "Toggle Play / Pause", group="media control"}),