Last active
August 29, 2015 14:17
-
-
Save glabra/665ae8f00d4c7831f373 to your computer and use it in GitHub Desktop.
systemd で目覚まし時計
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Mezamashi | |
ConditionPathExists=/home/hoge/mezamashi.wav | |
[Service] | |
ExecStart=/usr/bin/ffplay -loop 0 -nodisp "/home/hoge/mezamashi.wav" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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