start: move start commands to systemd misc-x@.service

This commit is contained in:
Vincent Bernat 2020-01-26 09:07:20 +01:00
parent db92161900
commit 243de00594
4 changed files with 4 additions and 16 deletions

2
rc.lua
View file

@ -58,13 +58,11 @@ config.layouts = {
awful.layout.suit.floating, awful.layout.suit.floating,
} }
config.hostname = awful.util.pread('uname -n'):gsub('\n', '') config.hostname = awful.util.pread('uname -n'):gsub('\n', '')
config.browser = "firefox"
-- Remaining modules -- Remaining modules
loadrc("appearance") -- theme and appearance settings loadrc("appearance") -- theme and appearance settings
loadrc("debug") -- debugging primitive `dbg()` loadrc("debug") -- debugging primitive `dbg()`
loadrc("start") -- programs to run on start
loadrc("bindings") -- keybindings loadrc("bindings") -- keybindings
loadrc("wallpaper") -- wallpaper settings loadrc("wallpaper") -- wallpaper settings
loadrc("widgets") -- widgets configuration loadrc("widgets") -- widgets configuration

View file

@ -1,13 +0,0 @@
-- Start idempotent commands
local execute = {
-- Default browser
"xdg-mime default " .. config.browser .. ".desktop " ..
"x-scheme-handler/http " ..
"x-scheme-handler/https " ..
"text/html",
-- Default MIME types
"xdg-mime default org.gnome.Evince.desktop application/pdf",
"xdg-mime default gpicview.desktop image/png image/x-apple-ios-png image/jpeg image/jpg image/gif"
}
os.execute(table.concat(execute, ";"))

View file

@ -17,7 +17,7 @@ shifty.config.tags = {
exclusive = true, exclusive = true,
max_clients = 1, max_clients = 1,
screen = math.min(screen.count(), 2), screen = math.min(screen.count(), 2),
spawn = config.browser, spawn = "firefox",
icon = tagicon("web") icon = tagicon("web")
}, },
emacs = { emacs = {

View file

@ -5,5 +5,8 @@ PartOf=graphical-session@%i.target
[Service] [Service]
Environment=DISPLAY=%I Environment=DISPLAY=%I
ExecStart=/usr/bin/xset -b ExecStart=/usr/bin/xset -b
ExecStart=/usr/bin/xdg-mime default firefox.desktop x-scheme-handler/http x-scheme-handler/https text/html
ExecStart=/usr/bin/xdg-mime default org.gnome.Evince.desktop application/pdf
ExecStart=/usr/bin/xdg-mime default gpicview.desktop image/png image/jpeg image/jpg image/gif image/webp
Type=oneshot Type=oneshot
RemainAfterExit=false RemainAfterExit=false