update awesome config
This commit is contained in:
@@ -20,7 +20,7 @@ pravitekeys = awful.util.table.join(
|
|||||||
|
|
||||||
awful.key({ modkey }, "q",
|
awful.key({ modkey }, "q",
|
||||||
function ()
|
function ()
|
||||||
run_or_raise("firefox", {class = "Nightly"})
|
run_or_raise("firefox", {class = "Firefox"})
|
||||||
end),
|
end),
|
||||||
|
|
||||||
awful.key({ modkey, "Shift" }, "v",
|
awful.key({ modkey, "Shift" }, "v",
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
|
|
||||||
--[[
|
--[[
|
||||||
|
|
||||||
Awesome WM configuration template
|
Awesome WM configuration template
|
||||||
github.com/copycat-killer
|
github.com/lcpz
|
||||||
|
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
-- {{{ Required libraries
|
-- {{{ Required libraries
|
||||||
local awesome, client, screen, tag = awesome, client, screen, tag
|
local awesome, client, mouse, screen, tag = awesome, client, mouse, screen, tag
|
||||||
local ipairs, string, os, table, tostring, tonumber, type = ipairs, string, os, table, tostring, tonumber, type
|
local ipairs, string, os, table, tostring, tonumber, type = ipairs, string, os, table, tostring, tonumber, type
|
||||||
|
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
@@ -20,15 +19,20 @@ local lain = require("lain")
|
|||||||
--local menubar = require("menubar")
|
--local menubar = require("menubar")
|
||||||
local freedesktop = require("freedesktop")
|
local freedesktop = require("freedesktop")
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
||||||
|
require("awful.hotkeys_popup.keys")
|
||||||
|
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
|
-- another config (This code will only ever execute for the fallback config)
|
||||||
if awesome.startup_errors then
|
if awesome.startup_errors then
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, there were errors during startup!",
|
title = "Oops, there were errors during startup!",
|
||||||
text = awesome.startup_errors })
|
text = awesome.startup_errors })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Handle runtime errors after startup
|
||||||
do
|
do
|
||||||
local in_error = false
|
local in_error = false
|
||||||
awesome.connect_signal("debug::error", function (err)
|
awesome.connect_signal("debug::error", function (err)
|
||||||
@@ -44,18 +48,26 @@ end
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Autostart windowless processes
|
-- {{{ Autostart windowless processes
|
||||||
|
|
||||||
|
-- This function will run once every time Awesome is started
|
||||||
local function run_once(cmd_arr)
|
local function run_once(cmd_arr)
|
||||||
for _, cmd in ipairs(cmd_arr) do
|
for _, cmd in ipairs(cmd_arr) do
|
||||||
findme = cmd
|
awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd))
|
||||||
firstspace = cmd:find(" ")
|
|
||||||
if firstspace then
|
|
||||||
findme = cmd:sub(0, firstspace-1)
|
|
||||||
end
|
|
||||||
awful.spawn.with_shell(string.format("pgrep -u $USER -x %s > /dev/null || (%s)", findme, cmd))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
run_once({ "urxvtd", "unclutter -root", "fcitx -d", "/usr/libexec/polkit-gnome-authentication-agent-1 &", "xcompmgr -c" })
|
run_once({ "urxvtd", "unclutter -root" }) -- entries must be separated by commas
|
||||||
|
|
||||||
|
-- This function implements the XDG autostart specification
|
||||||
|
--[[
|
||||||
|
awful.spawn.with_shell(
|
||||||
|
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
|
||||||
|
'xrdb -merge <<< "awesome.started:true";' ..
|
||||||
|
-- list each of your autostart commands, followed by ; inside single quotes, followed by ..
|
||||||
|
'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart"' -- https://github.com/jceb/dex
|
||||||
|
)
|
||||||
|
--]]
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
@@ -579,8 +591,8 @@ awful.rules.rules = {
|
|||||||
properties = { titlebars_enabled = false } },
|
properties = { titlebars_enabled = false } },
|
||||||
|
|
||||||
-- Set Firefox to always map on the second tag on screen 1.
|
-- Set Firefox to always map on the second tag on screen 1.
|
||||||
{ rule = { class = "Nightly" },
|
{ rule = { class = "Firefox" },
|
||||||
properties = { screen = 1, tag = screen[1].tags[2] } },
|
properties = { screen = 1, tag = screen[1].tags[2] }, maximized = true },
|
||||||
|
|
||||||
{ rule = { class = "mpv"},
|
{ rule = { class = "mpv"},
|
||||||
properties = { screen = 1, tag = screen[1].tags[4], switchtotag = true, fullscreen = true } },
|
properties = { screen = 1, tag = screen[1].tags[4], switchtotag = true, fullscreen = true } },
|
||||||
@@ -589,7 +601,7 @@ awful.rules.rules = {
|
|||||||
properties = { screen = 1, tag = screen[1].tags[5] } },
|
properties = { screen = 1, tag = screen[1].tags[5] } },
|
||||||
|
|
||||||
{ rule = { class = "Emacs" },
|
{ rule = { class = "Emacs" },
|
||||||
properties = { screen = 1, tag = screen[1].tags[3] } },
|
properties = { screen = 1, tag = screen[2].tags[3] } },
|
||||||
|
|
||||||
{ rule = { class = "Gimp", role = "gimp-image-window" },
|
{ rule = { class = "Gimp", role = "gimp-image-window" },
|
||||||
properties = { maximized = true } },
|
properties = { maximized = true } },
|
||||||
|
|||||||
Reference in New Issue
Block a user