-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9487732
commit ac2eb40
Showing
25 changed files
with
365 additions
and
391 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
local awful = require("awful") | ||
local beautiful = require("beautiful") | ||
local gfs = require("gears.filesystem") | ||
local M = {} | ||
-- This Lua module contains simple functions for playing sounds at startup and notifications | ||
|
||
local function spawn(cmd) | ||
awful.spawn.easy_async(cmd, function() end) | ||
end | ||
local awful = require("awful") -- Import the 'awful' module | ||
local gfs = require("gears.filesystem") -- Import the 'gears.filesystem' module | ||
|
||
local M = {} -- Create a table to store the functions | ||
|
||
--- Play a sound notification using pacat | ||
function M.play() | ||
awful.spawn( | ||
"pacat --property=media.role=event " | ||
.. gfs.get_configuration_dir() | ||
.. "themes/assets/sounds/notify2.wav" | ||
) | ||
awful.spawn( | ||
"pacat --property=media.role=event " | ||
.. gfs.get_configuration_dir() | ||
.. "themes/assets/sounds/confirm1.wav" | ||
) | ||
end | ||
|
||
--- Play a startup sound notification using pacat | ||
function M.startup() | ||
awful.spawn( | ||
"pacat --property=media.role=event " | ||
.. gfs.get_configuration_dir() | ||
.. "themes/assets/sounds/startup.wav" | ||
) | ||
awful.spawn( | ||
"pacat --property=media.role=event " | ||
.. gfs.get_configuration_dir() | ||
.. "themes/assets/sounds/notify0.wav" | ||
) | ||
end | ||
|
||
return M | ||
return M -- Return the table containing the functions |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.