Use XDG_CONFIG_HOME

This commit is contained in:
Thomas Avé 2022-08-06 17:21:13 +02:00
parent 33cd4712cf
commit 4bf8c9f9eb
2 changed files with 5 additions and 10 deletions

View File

@ -123,7 +123,7 @@ keys.globalkeys = gears.table.join(
function()
local c = client.focus
if c and c.class == "Alacritty" then
awful.spawn(string.format("/home/user/.config/awesome/scripts/launch_alacritty.sh %d", c.pid))
awful.spawn(string.format(os.getenv("XDG_CONFIG_HOME") .. "/awesome/scripts/launch_alacritty.sh %d", c.pid))
else
awful.spawn(apps.terminal)
end
@ -147,14 +147,14 @@ keys.globalkeys = gears.table.join(
-- launch rofi
awful.key({modkey}, "XF86Launch5",
function()
awful.spawn("/home/user/.config/awesome/scripts/toggle_rofi.sh")
awful.spawn(os.getenv("XDG_CONFIG_HOME") .. "awesome/scripts/toggle_rofi.sh")
end,
{description = "application launcher", group = "launcher"}
),
-- launch rofi
awful.key({modkey}, "d",
function()
awful.spawn("/home/user/.config/awesome/scripts/toggle_rofi.sh")
awful.spawn(os.getenv("XDG_CONFIG_HOME") .. "/awesome/scripts/toggle_rofi.sh")
end,
{description = "application launcher", group = "launcher"}
),
@ -246,7 +246,7 @@ keys.globalkeys = gears.table.join(
awful.key({modkey}, "Escape",
function()
-- emit signal to show the exit screen
awful.util.spawn("rofi -show power-menu -modi power-menu:~/.config/awesome/scripts/rofi-power-menu")
awful.util.spawn("rofi -show power-menu -modi power-menu:" .. os.getenv("XDG_CONFIG_HOME") .. "/awesome/scripts/rofi-power-menu")
end,
{description = "toggle exit screen", group = "hotkeys"}
),

View File

@ -18,13 +18,8 @@ local awful = require("awful")
-- define default apps (global variable so other components can access it)
apps = {
network_manager = "nm-connection-editor", -- recommended: nm-connection-editor
power_manager = "", -- recommended: xfce4-power-manager
terminal = 'bash -c "WINIT_X11_SCALE_FACTOR=1 alacritty"',
launcher = "/home/user/.toggle_rofi.sh",
lock = "i3lock",
screenshot = "scrot -e 'mv $f ~/Pictures/Screenshots/ 2>/dev/null'",
filebrowser = "nautilus"
}
-- List of apps to run on start-up
@ -32,7 +27,7 @@ local run_on_start_up = {
"numlockx on",
"nm-applet",
"xcape -e \"Super_L=Super_L|XF86Launch5\" -t 5000",
"/home/user/.config/awesome/scripts/setup_display.sh",
os.getenv("XDG_CONFIG_HOME") .. "/awesome/scripts/setup_display.sh",
"xmodmap /home/user/.Xmodmap"
}