aboutsummaryrefslogtreecommitdiff
path: root/.config/awesome/misc/setup.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/awesome/misc/setup.lua')
-rw-r--r--.config/awesome/misc/setup.lua65
1 files changed, 0 insertions, 65 deletions
diff --git a/.config/awesome/misc/setup.lua b/.config/awesome/misc/setup.lua
deleted file mode 100644
index aeee19a..0000000
--- a/.config/awesome/misc/setup.lua
+++ /dev/null
@@ -1,65 +0,0 @@
-local naughty = require "naughty"
-local beautiful = require "beautiful"
--- local notif_overlay = require "ui.notifs"
-local wicked = require "ui.wicked"
-local awful = require "awful"
-local rubato = require "lib.rubato"
-local vars = require "misc.vars"
-
--- naughty.connect_signal("request::display", function(n)
--- notif_overlay:notify(n)
--- end)
-
-naughty.connect_signal("request::display", function(n)
- naughty.layout.box {
- notification = n,
- placement = function(d)
- return awful.placement.right(d, {
- margins = beautiful.useless_gap * 2
- })
- end
- }
-
- -- wicked:.notify(n)
-end)
-
-naughty.connect_signal("request::display_error", function(message, startup)
- naughty.notification {
- urgency = "critical",
- title = "Oops, an error happened"..(startup and " during startup!" or "!"),
- message = message
- }
-end)
-
--- Taken from https://www.reddit.com/r/awesomewm/comments/syjolb/comment/hy0xy35/
-
-awesome.connect_signal('exit', function(reason_restart)
- if not reason_restart then return end
-
- local file = io.open('/tmp/awesomewm-last-selected-tags', 'w+')
-
- for s in screen do
- file:write(s.selected_tag.index, '\n')
- end
-
- file:close()
-end)
-
-awesome.connect_signal('startup', function()
- local file = io.open('/tmp/awesomewm-last-selected-tags', 'r')
- if not file then return end
-
- local selected_tags = {}
-
- for line in file:lines() do
- table.insert(selected_tags, tonumber(line))
- end
-
- for s in screen do
- local i = selected_tags[s.index]
- local t = s.tags[i]
- t:view_only()
- end
-
- file:close()
-end)