Skip to content

Instantly share code, notes, and snippets.

@glabra
Last active August 29, 2015 14:17
Show Gist options
  • Save glabra/665ae8f00d4c7831f373 to your computer and use it in GitHub Desktop.
Save glabra/665ae8f00d4c7831f373 to your computer and use it in GitHub Desktop.
systemd で目覚まし時計
mkdir -p ~/.config/systemd/user
cd ~/.config/systemd/user
vi mezamashi.service mezamashi.timer
systemctl --user daemon-reload
# 音が鳴るか確認するには下記を実行
# systemcti --user start mezamashi.service
# systemcti --user stop mezamashi.service
systemctl --user enable mezamashi.timer
[Unit]
Description=Mezamashi
ConditionPathExists=/home/hoge/mezamashi.wav
[Service]
ExecStart=/usr/bin/ffplay -loop 0 -nodisp "/home/hoge/mezamashi.wav"
[Unit]
Description=Mezamashi Timer
[Timer]
OnCalender=10:00:00
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment