summaryrefslogtreecommitdiff
path: root/awesome/func
diff options
context:
space:
mode:
Diffstat (limited to 'awesome/func')
-rw-r--r--awesome/func/noborders.lua20
-rw-r--r--awesome/func/sloppyfocus.lua4
-rw-r--r--awesome/func/tagnames.lua51
-rw-r--r--awesome/func/warpcursor.lua22
4 files changed, 0 insertions, 97 deletions
diff --git a/awesome/func/noborders.lua b/awesome/func/noborders.lua
deleted file mode 100644
index fe67024..0000000
--- a/awesome/func/noborders.lua
+++ /dev/null
@@ -1,20 +0,0 @@
-local beautiful = require("beautiful")
-
--- TODO this function will call arrange multiple times. once per each change of c.border_width
-local function update_borders(s)
- local max = s.selected_tag.layout.name == "max"
- local only_one = #s.tiled_clients == 1 -- use tiled_clients so that other floating windows don't affect the count
-
- -- but iterate over clients instead of tiled_clients as tiled_clients doesn't include maximized windows
- for _, c in pairs(s.clients) do
- if c.prevent_kill then
- c.border_width = beautiful.border_width * 3
- elseif (max or only_one or c.maximized) and not c.floating then
- c.border_width = 0
- else
- c.border_width = beautiful.border_width
- end
- end
-end
-
-screen.connect_signal("arrange", update_borders) -- NOTE this signal may eventually be deprecated. see issue #2581 and the v5 milestone on github
diff --git a/awesome/func/sloppyfocus.lua b/awesome/func/sloppyfocus.lua
deleted file mode 100644
index a616286..0000000
--- a/awesome/func/sloppyfocus.lua
+++ /dev/null
@@ -1,4 +0,0 @@
--- Enable sloppy focus, so that focus follows mouse.
-client.connect_signal("mouse::enter", function(c)
- c:emit_signal("request::activate", "mouse_enter", { raise = false })
-end)
diff --git a/awesome/func/tagnames.lua b/awesome/func/tagnames.lua
deleted file mode 100644
index fcd01a4..0000000
--- a/awesome/func/tagnames.lua
+++ /dev/null
@@ -1,51 +0,0 @@
---TODO find out why it doesnt work at start
---local awful = require("awful")
-
-function nametags(s)
- local tags = s.tags
- for _, tag in ipairs(tags) do
- -- set tag basename
- if tag.basename == nil then
- tag.basename = tag.name
- end
-
- -- check if tag has any clients. if not, use basename
- if next(tag:clients()) == nil then
- tag.name = tag.basename
- else
- -- loop over all screen clients (ordered top to bottom)
- local hastag = nil
- for _, c in ipairs(s.clients) do
- -- test if client in on the tag
- for _, ctag in ipairs(c:tags()) do
- if ctag == tag then
- hastag = c
- break
- end
- end
- -- if it does, this will be the tag name. so break
- if hastag ~= nil then
- break
- end
- end
- -- set tag name
- -- there should always be a tag since we checked above so if there isnt then there is clearly a problem
- --TODO remove this if statement
- if hastag then
- tag.name = tag.basename .. ": " .. hastag.class
- end
- end
- end
-end
-
-function nametagsc(c)
- nametags(c.screen)
-end
-
-client.connect_signal("manage", nametagsc)
-client.connect_signal("swapped", nametagsc)
-client.connect_signal("tagged", nametagsc)
-client.connect_signal("unmanage", nametagsc)
-client.connect_signal("untagged", nametagsc)
-
---awful.screen.connect_for_each_screen(nametags)
diff --git a/awesome/func/warpcursor.lua b/awesome/func/warpcursor.lua
deleted file mode 100644
index f1a46bd..0000000
--- a/awesome/func/warpcursor.lua
+++ /dev/null
@@ -1,22 +0,0 @@
-function warp_cursor(c)
--- if c ~= client.focus or not c.warp_cursor then
- if not c.warp_cursor then
- return
- end
-
- -- dont allow moving mouse unless it is over another client or over nothing
- local canmovemouse = mouse.current_client or (mouse.current_wibox or mouse.current_widget) == nil
-
- if canmovemouse and mouse.current_client ~= c then
- mouse.coords {
- x = c.x + (c.width / 2),
- y = c.y + (c.height / 2),
- }
- end
-end
-
-client.connect_signal("focus", warp_cursor)
---client.connect_signal("property::size", warp_cursor)
---client.connect_signal("property::position", warp_cursor)
-
-return warp_cursor