oh haruhi where to begin

This commit is contained in:
Izaya 2021-11-11 08:13:34 +11:00
parent 6c0805c1f4
commit 6737421e58
2 changed files with 32 additions and 12 deletions

42
rc.lua
View File

@ -259,6 +259,13 @@ awful.screen.connect_for_each_screen(function(s)
else -- portrait
awful.tag(tags, s, awful.layout.suit.fair.horizontal)
end
--[[
awful.tag.attached_connect_signal(nil, "tagged", function(tag)
for _,c in pairs(tag:clients()) do
c.titlebars_enabled = tag.layout == awful.layout.suit.floating
end
end)
]]
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
@ -328,6 +335,7 @@ awful.screen.connect_for_each_screen(function(s)
}
end
end)
-- }}}
-- {{{ Mouse bindings
@ -666,12 +674,14 @@ awful.rules.rules = {
properties = {tag = "6"} },
{ rule = { class = "Gajim", name = ".*File Transfer.*"},
properties = {tag = "5", floating = true } },
{ rule_any = { class = {"RimWorldLinux", "Minecraft.*"} },
{ rule_any = { class = {"RimWorldLinux", "Minecraft.*", "valheim.x86_64"} },
properties = {fullscreen = true, tag = "4" } },
{ rule = { class = "Waterfox-classic" },
properties = {tag = "8"} },
{ rule = { class = "QuiteRss" },
properties = {tag = "9"} },
{ rule = { class = "fcw32.exe", name = "" },
properties = {titlebars_enabled = false } },
}
-- }}}
@ -692,15 +702,30 @@ end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
if c.first_tag.layout ~= awful.layout.suit.floating then return end
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({ }, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
awful.button({ }, 2, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end),
awful.button({ }, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
local wmenu = {
{"Toggle Floating",function() c.floating = not c.floating end},
{"Toggle Maximised",function() c.maximized = not c.maximized end},
{"Toggle Minimised",function() c.minimized = not c.minimized end},
{"Toggle Sticky",function() c.sticky = not c.sticky end},
{"Toggle Ontop",function() c.ontop = not c.ontop end},
{"Toggle Fullscreen",function() c.fullscreen = not c.fullscreen end},
{"Close",function() c:kill() end},
theme = { width = 150 }
}
awful.menu(wmenu):show()
end)
)
@ -719,30 +744,25 @@ client.connect_signal("request::titlebars", function(c)
layout = wibox.layout.flex.horizontal
},
{ -- Right
awful.titlebar.widget.floatingbutton (c),
awful.titlebar.widget.minimizebutton(c),
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.stickybutton (c),
awful.titlebar.widget.ontopbutton (c),
awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal()
},
layout = wibox.layout.align.horizontal
}
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
awful.spawn.with_shell(
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
'xrdb -merge <<< "awesome.started:true";' ..
'corectrl &' ..
'nextcloud &' ..
'blueberry &' ..
'SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass ssh-add &' ..
'xinput set-prop "Logitech MX518 Gaming Mouse" "libinput Accel Profile Enabled" 0, 0;' ..
'xinput set-prop "TPPS/2 IBM TrackPoint" "libinput Accel Profile Enabled" 0, 0;' ..
'dex --environment Awesome --autostart --search-paths "$XDG_CONFIG_DIRS/autostart:$XDG_CONFIG_HOME/autostart";' -- https://github.com/jceb/dex
)
gears.wallpaper.set("#000000")
--awful.spawn.with_shell("SSH_AUTH_SOCK=/run/user/1000/ssh-agent.socket SSH_ASKPASS_REQUIRE=force SSH_ASKPASS=/usr/lib/ssh/ssh-askpass ssh-add")
--[[
awful.spawn.with_shell("corectrl")
awful.spawn.with_shell("nextcloud")
awful.spawn.with_shell('xinput set-prop "Logitech MX518 Gaming Mouse" "libinput Accel Profile Enabled" 0, 0')
]]--

View File

@ -40,7 +40,7 @@ theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#1268a4"
theme.border_width = "0"
theme.border_width = dpi(1)
theme.border_normal = "#000000"
theme.border_focus = "#1268a4"
theme.border_marked = "#91231c"