- 1. 概要
- 2. デフォルト
- 3. 設定
1. 概要
「CachyOS」は、「ArcoLinux」と同様、インストール時点で、自動起動の仕組みが用意されているようです。
2. デフォルト
デフォルトで。
~/.config/qtile/config.py
に、下記の記述があります。
from libqtile import hook
# some other imports
import os
import subprocess
# stuff
@hook.subscribe.startup_once
def autostart():
home = os.path.expanduser('~/.config/qtile/scripts/autostart.sh') # path to my script, under my user directory
subprocess.call([home])
~/.config/qtile/scripts/autostart.sh
は、下記のように記述されています。
#!/bin/bash
feh --bg-fill $HOME/.config/qtile/Wallpaper/Skyscraper.png &
picom --daemon --config $HOME/.config/qtile/scripts/picom.conf &
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
/usr/bin/wired &
eval $(gnome-keyring-daemon --start)
nm-applet &
3. 設定
二重起動防止の仕掛けを入れておきます。
vi ~/.config/qtile/scripts/autostart.sh
#!/bin/bash
シェバンの下に、下記の関数を記述します。
run()
{
if ! pgrep $1 ;
then
$@&
fi
}
|
|