add awesomeWM config + utility scripts that were in there

This commit is contained in:
Crispy 2023-03-13 21:20:54 +01:00
parent a419b86997
commit 986ea52711
27 changed files with 947 additions and 9 deletions

15
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,15 @@
{
"Lua.workspace.checkThirdParty": false,
"Lua.workspace.library": [
"/usr/share/awesome/lib"
],
"Lua.diagnostics.disable": [
"lowercase-global"
],
"Lua.diagnostics.globals": [
"client",
"awesome",
"root",
"screen"
]
}

View file

@ -0,0 +1,30 @@
local awful = require("awful")
require("modules/smart_reload")
require("modules/laptop_detector")
if is_reloading() then
finish_reload()
return
end
awful.spawn(CONFIG_DIR .. "utils/xcape_conf.sh") -- xcape config
awful.spawn("picom -b") -- compositor
awful.spawn("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1") -- authentication popup for obs virtual camera etc
awful.spawn("redshift")
awful.spawn("sxhkd")
if not is_laptop then
awful.spawn("numlockx on") -- numlock
awful.spawn(CONFIG_DIR .. "utils/xrandr_conf.sh") -- xrandr config
awful.spawn("discord", { screen = 3 })
awful.spawn("vscodium")
awful.spawn("spotify", { tag = "2", screen = 3, urgent = false })
awful.spawn("firefox")
awful.spawn(terminal .. " -e fish -c \"sleep 2 && gomuks\"", { tag = "3", screen = 3, urgent = false, focus = false })
awful.spawn(terminal .. " -e fish -c \"sleep 5 && ncpamixer\"",
{ tag = "4", screen = 3, urgent = false, focus = false })
awful.spawn(terminal .. " -e btop", { tag = "5", screen = 3, urgent = false, focus = false })
awful.spawn(terminal .. " -e fish -c \"sleep 5 && snoud\"", { tag = "6", screen = 3, urgent = false, focus = false })
end

View file

@ -0,0 +1,74 @@
local awful = require("awful")
local wibox = require("wibox")
--local beautiful = require("beautiful")
local gears = require("gears")
require("modules/laptop_detector")
if not is_laptop then
battery_widget = wibox.widget.textbox()
return
end
local tohex = function(value)
local h = string.format("%x", value)
if h:len() == 1 then
h = "0" .. h
end
return h
end
-- battery percentage
local battery_text = awful.widget.watch("cat /sys/class/power_supply/BAT0/capacity", 30, function(widget, stdout)
for line in stdout:gmatch("[^\r\n]+") do
widget.text = line .. "%"
break
end
widget.align = "center"
end)
local battery_charging = awful.widget.watch("cat /sys/class/power_supply/AC/online", 5, function(widget, stdout)
for line in stdout:gmatch("[^\r\n]+") do
if line == "1" then
widget.text = " +"
else
widget.text = " -"
end
break
end
end)
local battery_bar = awful.widget.watch("cat /sys/class/power_supply/BAT0/capacity", 30, function(widget, stdout)
local charge = 0
for line in stdout:gmatch("[^\r\n]+") do
charge = tonumber(line)
break
end
widget.value = charge
local red = 0
local green = 102
if charge <= 50 then
red = (50 - charge) * 5
green = charge * 2
end
local color = "#" .. tohex(red) .. tohex(green) .. "00"
widget.color = color
widget.max_value = 100
widget.forced_width = 64
widget.border_color = color --"#008866"
widget.background_color = "#000000"
widget.border_width = 1
widget.shape = function(cr, width, height) gears.shape.octogon(cr, width, height, 2) end
widget.margins = { top = 1, bottom = 1, left = 5, right = 5 }
end,
wibox.widget.progressbar())
battery_widget = {
battery_bar,
battery_text,
battery_charging,
layout = wibox.layout.stack
}

View file

@ -0,0 +1,39 @@
local awful = require("awful")
local wibox = require("wibox")
--local beautiful = require("beautiful")
require("modules/laptop_detector")
if not is_laptop then
brightness = {}
return
end
local piechart_widget, piechart_timer = awful.widget.watch("simple-brightness get", 1,
function(widget, stdout)
local val = tonumber(stdout)
widget.data_list = {
{ "brightness", val },
{ "fill", 255 - val }
}
widget.display_labels = false
widget.forced_height = 24
widget.forced_width = 24
--widget.border_color = "#ffff00"
widget.border_width = 0
widget.colors = { "#ffbb00", "#444444" }
end,
wibox.widget.piechart()
)
local inc_f = function(amt)
awful.spawn("simple-brightness inc " .. tostring(amt))
-- TODO: force update, decrease watch frequency
--piechart_timer
end
brightness = {
piechart = piechart_widget,
inc = inc_f
}

View file

@ -0,0 +1,12 @@
local function file_exists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
is_laptop = file_exists("/sys/class/power_supply/BAT0/capacity")
--is_laptop = true

View file

@ -0,0 +1,29 @@
local awful = require("awful")
local gears = require("gears")
navigation_keys = gears.table.join(
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.byidx(1) end,
{ description = "swap with next client by index", group = "client" }),
awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.byidx(-1) end,
{ description = "swap with previous client by index", group = "client" }),
awful.key({ modkey, "Control" }, "j", function() awful.screen.focus_relative(1) end,
{ description = "focus the next screen", group = "screen" }),
awful.key({ modkey, "Control" }, "k", function() awful.screen.focus_relative(-1) end,
{ description = "focus the previous screen", group = "screen" }),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{ description = "jump to urgent client", group = "client" }),
awful.key({ modkey, }, "Tab",
function()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{ description = "go back", group = "client" })
)

View file

@ -0,0 +1,34 @@
local awful = require("awful")
CONFIG_DIR = awful.util.get_configuration_dir()
HOME_DIR = CONFIG_DIR .. "../../"
local function file_exists(name)
local f = io.open(name, "r")
if f ~= nil then
io.close(f)
return true
else
return false
end
end
local INDICATOR_FILE = "/tmp/awesome_is_restarting"
function test()
local focused_client = awful.client.focus.history.get()
focused_client:raise()
end
function smart_reload()
awful.spawn("touch " .. INDICATOR_FILE)
awesome.restart()
end
function is_reloading()
return file_exists(INDICATOR_FILE)
end
function finish_reload()
awful.spawn("rm " .. INDICATOR_FILE)
end

View file

@ -0,0 +1,64 @@
local awful = require("awful")
local gears = require("gears")
require("modules/laptop_detector")
special_keys = gears.table.join(
awful.key({ "Ctrl" }, "Print", function()
awful.util.spawn(SCRIPTS_DIR .. "screenshot_selection.sh")
end,
{ description = "screenshot selection", group = "screenshot" }),
awful.key({ modkey, "Shift" }, "s", function()
awful.util.spawn(SCRIPTS_DIR .. "screenshot_selection.sh")
end,
{ description = "screenshot selection", group = "screenshot" }),
awful.key({}, "Print", function()
awful.util.spawn(SCRIPTS_DIR .. "screenshot_full.sh")
end,
{ description = "full screenshot", group = "screenshot" }),
awful.key({ "Shift" }, "Print", function()
awful.util.spawn(SCRIPTS_DIR .. "record_mp4.sh")
end,
{ description = "record selection", group = "screenshot" }),
awful.key({ modkey }, "Print", function()
awful.util.spawn(SCRIPTS_DIR .. "screenshot_active.sh")
end,
{ description = "screenshot active window", group = "screenshot" }),
awful.key({ modkey }, "r", function()
awful.util.spawn("rofi -show")
end,
{ description = "Rofi", group = "launcher" }),
-- Media Keys
awful.key({}, "XF86AudioPlay", function()
awful.util.spawn("playerctl play-pause", false)
end),
awful.key({}, "XF86AudioNext", function()
awful.util.spawn("playerctl next", false)
end),
awful.key({}, "XF86AudioPrev", function()
awful.util.spawn("playerctl previous", false)
end)
)
if is_laptop then
special_keys = gears.table.join(
special_keys,
awful.key({}, "XF86MonBrightnessUp", function()
awful.spawn("/usr/bin/simple-brightness -inc 32")
end,
{ description = "Increase brightness", group = "laptop" }),
awful.key({}, "XF86MonBrightnessDown", function()
awful.spawn("/usr/bin/simple-brightness -dec 32")
end,
{ description = "Lower brightness", group = "laptop" })
)
end

462
awesome/rc.lua Normal file
View file

@ -0,0 +1,462 @@
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
CONFIG_DIR = awful.util.get_configuration_dir()
HOME_DIR = CONFIG_DIR .. "../../"
SCRIPTS_DIR = HOME_DIR .. "dotfiles/scripts/"
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")
require("modules/smart_reload")
require("modules/laptop_detector")
modkey = "Mod4" -- super
require("modules/navigation_keys")
require("modules/special_keys")
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal("debug::error",
function(err)
-- avoid endless error loop
if in_error then return end
in_error = true
naughty.notify({
preset = naughty.config.presets.critical,
title = "Error loading config!",
text = tostring(err)
})
in_error = false
end
)
end
-- Theme
local theme_path = CONFIG_DIR .. "/themes/default/"
beautiful.init(theme_path .. "theme.lua")
naughty.notify({ title = "Theme loaded", text = tostring(theme_path), icon = theme_path .. "icon.png", screen = 1 })
require("modules/brightness")
require("modules/battery")
-- default apps
terminal = "kitty"
file_manager = "pcmanfm"
awful.menu.menu_keys = {
up = { "Up", "k", "q", "w" },
down = { "Down", "j", "Tab", "s" },
back = { "Left", "h", "a" },
exec = { "Return", "Space" },
enter = { "Right", "l", "d" },
close = { "Escape" },
}
-- Menu
-- Create a launcher widget and a main menu
local system_menu = {
{ "keyboard layout", {
{ "SE", function() awful.spawn("setxkbmap -layout se") end },
{ "US", function() awful.spawn("setxkbmap -layout us") end },
} },
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
{ "reload", smart_reload },
{ "log out", function() awesome.quit() end },
{ "shut down", {
{ "now", function() awful.spawn("shutdown now") end },
{ "in 60s", function() awful.spawn("shutdown") end }
} },
}
local main_menu = awful.menu({
items = {
{ "system", system_menu, beautiful.awesome_icon },
{ "terminal", terminal },
{ "file manager", file_manager },
{ "OVR Utils", function() awful.spawn("./proj/godot/ovr-utils/builds/linux/ovr-utils.x86_64") end },
{ "close menu", function()
end }
}
})
local launcher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = main_menu })
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
menubar.show_categories = false
menubar.menu_gen.all_menu_dirs = {
"/usr/share/applications/",
HOME_DIR .. ".local/share/applications/",
--"/var/lib/flatpak/exports/share/applications",
}
local juneday = awful.widget.watch(SCRIPTS_DIR .. "june", 600, function(widget, stdout)
for line in stdout:gmatch("[^\r\n]+") do
widget.text = " [ " .. line .. " ] "
break
end
widget.align = "center"
end)
-- Create a textclock widget
local textclock = wibox.widget.textclock()
-- Create a wibox for each screen and add it
-- buttons for each tag widget
local taglist_buttons = gears.table.join(
awful.button({}, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({}, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({}, 5, function(t)
awful.tag.viewnext()
end),
awful.button({}, 4, function(t)
awful.tag.viewprev()
end)
)
-- main section of top bar
local tasklist_buttons = gears.table.join(
awful.button({}, 1, function(c)
if c == client.focus then
c.minimized = true
else
c:emit_signal(
"request::activate",
"tasklist",
{ raise = true }
)
end
end),
awful.button({}, 3, function()
awful.menu.client_list({ theme = { width = 250 } })
end)
)
local function set_wallpaper(s)
if beautiful.wallpaper then
local wallpaper = beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
gears.wallpaper.centered(wallpaper, s)
end
end
awful.screen.connect_for_each_screen(function(s)
set_wallpaper(s)
-- Each screen has its own tag table.
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.suit.corner.nw)
-- Create a taglist widget
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons
}
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons
}
-- Create the wibox
s.mywibox = awful.wibar({ position = "top", screen = s })
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
launcher,
s.mytaglist,
},
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
brightness.piechart,
battery_widget,
-- wibox.widget.systray(),
juneday,
textclock,
--s.mylayoutbox,
},
}
end)
-- Mouse bindings for background
root.buttons(gears.table.join(
awful.button({}, 3, function() main_menu:toggle() end)
))
-- global key bindings
local globalkeys = gears.table.join(
awful.key({ modkey }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
awful.key({ modkey }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ modkey, "Control" }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ modkey }, "a", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ modkey }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ modkey, "Control" }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ modkey }, "d", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ modkey }, "j",
function()
awful.client.focus.byidx(1)
end,
{ description = "focus next by index", group = "client" }
),
awful.key({ modkey }, "k",
function()
awful.client.focus.byidx( -1)
end,
{ description = "focus previous by index", group = "client" }
),
awful.key({ modkey }, "Return", function() awful.spawn(terminal) end,
{ description = "open terminal", group = "launcher" }),
awful.key({ modkey, "Control" }, "r", smart_reload,
{ description = "reload awesome", group = "awesome" }),
awful.key({ modkey }, "l", function() awful.tag.incmwfact(0.05) end,
{ description = "increase master width factor", group = "layout" }),
awful.key({ modkey }, "h", function() awful.tag.incmwfact( -0.05) end,
{ description = "decrease master width factor", group = "layout" }),
awful.key({ modkey, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end,
{ description = "increase the number of master clients", group = "layout" }),
awful.key({ modkey, "Shift" }, "l", function() awful.tag.incnmaster( -1, nil, true) end,
{ description = "decrease the number of master clients", group = "layout" }),
awful.key({ modkey, "Control" }, "h", function() awful.tag.incncol(1, nil, true) end,
{ description = "increase the number of columns", group = "layout" }),
awful.key({ modkey, "Control" }, "l", function() awful.tag.incncol( -1, nil, true) end,
{ description = "decrease the number of columns", group = "layout" }),
awful.key({ modkey }, "space", function() awful.layout.inc(1) end,
{ description = "select next", group = "layout" }),
awful.key({ modkey, "Shift" }, "space", function() awful.layout.inc( -1) end,
{ description = "select previous", group = "layout" }),
awful.key({ modkey, "Control" }, "n",
function()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal("request::activate", "key.unminimize", { raise = true })
end
end,
{ description = "restore minimized", group = "client" }),
-- Menubar
awful.key({ modkey }, "Escape", function() menubar.show() end,
{ description = "show the menubar", group = "launcher" }),
awful.key({ modkey }, "e", function() menubar.show() end,
{ description = "show the menubar", group = "launcher" }),
awful.key({ modkey }, "f", function() awful.spawn(file_manager) end,
{ description = "open files", group = "launcher" }),
awful.key({ modkey }, "t", function() awful.spawn(terminal) end,
{ description = "open terminal", group = "launcher" }),
-- alt-tab menu
awful.key({ "Mod1" }, "Tab", function()
awful.spawn("rofi -show")
end,
{ description = "rofi", group = "launcher" })
)
globalkeys = gears.table.join(globalkeys, special_keys, navigation_keys)
local clientkeys = gears.table.join(
awful.key({ modkey, "Shift" }, "f",
function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{ description = "toggle fullscreen", group = "client" }),
awful.key({ modkey }, "q",
function(c) c:kill() end,
{ description = "close", group = "client" }),
awful.key({ modkey, "Control" }, "space",
awful.client.floating.toggle,
{ description = "toggle floating", group = "client" }),
awful.key({ modkey, "Shift" }, "t",
function(c) c.ontop = not c.ontop end,
{ description = "toggle keep on top", group = "client" }),
awful.key({ modkey }, "n",
function(c) c.minimized = true end,
{ description = "minimize", group = "client" }),
awful.key({ modkey }, "m",
function(c)
c.maximized = not c.maximized
c:raise()
end,
{ description = "(un)maximize", group = "client" })
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = gears.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end,
{ description = "view tag #" .. i, group = "tag" }),
-- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9,
function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end,
{ description = "toggle tag #" .. i, group = "tag" }),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
{ description = "move focused client to tag #" .. i, group = "tag" })
)
end
-- client mouse input
local clientbuttons = gears.table.join(
awful.button({}, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
end),
awful.button({ modkey }, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
awful.mouse.client.resize(c)
end)
)
-- Set keys
root.keys(globalkeys)
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen
}
},
-- Floating clients.
{ rule_any = {
instance = {
"pavucontrol",
},
class = {
"Arandr",
--"Godot_Engine",
},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev
"Steam",
"Friends List",
"Beataroni",
"ovr-utils",
"Godot",
},
}, properties = { floating = true, placement = awful.placement.no_offscreen } },
-- Add titlebars to normal clients and dialogs
{ rule_any = { type = { "normal", "dialog" }
}, properties = { titlebars_enabled = true }
},
{ rule_any = { name = { "Launching steam" }
}, properties = { focus = false, raise = false }
},
{ rule = {
class = "/home/crispypin/bin/ovr-utils/ovr-utils.x86_64",
},
properties = { floating = true, width = 16, height = 16, tag = "9" }
},
}
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function(client)
if awesome.startup
and not client.size_hints.user_position
and not client.size_hints.program_position then
awful.placement.no_offscreen(client)
end
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(client)
if client.focus ~= nil then
local focus_class = client.focus.class
-- naughty.notify({title = focus_class}) -- DEBUG
if focus_class == "steam_app_361420" or -- astroneer
focus_class == "minecraft" then
return
end
end
client:emit_signal("request::activate", "mouse_enter", { raise = false })
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)
require("modules/autostart")
-- Run garbage collector regularly to prevent memory leaks
-- gears.timer {
-- timeout = 60,
-- autostart = true,
-- callback = function() collectgarbage() end
--}

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -0,0 +1,131 @@
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local awful = require("awful")
local dpi = xresources.apply_dpi
local theme_path = awful.util.get_configuration_dir() .. "/themes/default/"
local theme = {}
theme.font = "monospace bold 10"
theme.bg_normal = "#203"
theme.bg_focus = "#b6f" -- in menus
theme.bg_urgent = "#e44"
theme.bg_minimize = "#444"
theme.bg_systray = "#111111"
theme.fg_normal = "#c9f"
theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#000"
theme.useless_gap = 0 --.5--1.5--dpi(1.5)
theme.border_width = 0
theme.border_normal = "#4400bb" --"#0066bb"
theme.border_focus = "#ff8844" --"#00ccff"
theme.border_marked = "#882211"
theme.widget_background = "#000000"
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
theme.tasklist_bg_focus = "#408" --"#ff8800"-- window titles
theme.tasklist_fg_focus = "#fff" -- window titles
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
-- Example:
theme.taglist_bg_focus = "#53f"
-- Generate taglist squares:
local taglist_square_size = dpi(6)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)
-- Variables set for theming notifications:
-- notification_font
-- notification_[border_color|border_width|shape|opacity]
theme.notification_font = "freesans 9"
theme.notification_bg = "#224455"
theme.notification_fg = "#ccbbff"
theme.notification_border_color = "#5533ff"
theme.notification_border_width = dpi(4)
theme.notification_margin = 8
theme.notification_width = 512
theme.notification_icon_size = 64
theme.notification_height = 64 + theme.notification_margin * 2
theme.notification_opacity = 0.8
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = theme_path .. "submenu.png"
--theme.menu_submenu_icon = "submenu.png"
theme.menu_height = dpi(48)
theme.menu_width = dpi(256)
theme.menu_border_color = "#ff8844"
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
-- Define the image to load
-- theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png"
-- theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png"
-- theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png"
-- theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png"
-- theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png"
-- theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png"
-- theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png"
-- theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png"
-- theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png"
-- theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png"
-- theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png"
-- theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png"
-- theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png"
-- theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png"
-- theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
-- theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
theme.wallpaper = theme_path .. "background.png"
-- You can use your own layout icons like this:
-- theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
-- theme.layout_fairv = themes_path.."default/layouts/fairvw.png"
-- theme.layout_floating = themes_path.."default/layouts/floatingw.png"
-- theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png"
-- theme.layout_max = themes_path.."default/layouts/maxw.png"
-- theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png"
-- theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png"
-- theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png"
-- theme.layout_tile = themes_path.."default/layouts/tilew.png"
-- theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png"
-- Generate Awesome icon:
-- theme.awesome_icon = theme_assets.awesome_icon(
-- theme.menu_height, theme.bg_focus, theme.fg_focus
-- )
theme.awesome_icon = theme_path .. "icon.png"
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = nil
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View file

@ -26,6 +26,7 @@
~/.config/rustfmt: rustfmt
~/.config/sxhkd: sxhkd
~/.config/rofi: rofi
~/.config/awesome: awesome
~/.local/share/ovr-utils/overlay_data.json: ovr-utils/overlay_data.json
~/bin/scripts: scripts
~/.steam/debian-installation/steamapps/compatdata/661130/pfx/drive_c/users/steamuser/AppData/LocalLow/Alpha Blend Interactive/ChilloutVR/game2.config: steam/ChilloutVR/game.config

BIN
scripts/june Executable file

Binary file not shown.

29
scripts/record_mp4.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
statusfile="/tmp/running_screen_recorder"
# check for running instance, stop it and exit
if [ -f $statusfile ]; then
ffpid=$(<$statusfile)
kill $ffpid
rm $statusfile
exit 0
fi
# select area of screen
slop=$(slop -f "%x %y %w %h %g %i" --color=0.8,0.4,1.0,1.0 -t 16) || exit 1
read -r X Y W H G ID < <(echo $slop)
videofile=$(xdg-user-dir VIDEOS)/sel_$(date "+%Y-%m-%d_%H.%M.%S").mp4
logfile="/tmp/screen_recorder_ffmpeg.log"
# make sure selection width and height is even
# even video size needed for yuv420p format
# which is needed for android playback & thumbnails in discord
H=$(( $H - $H%2 ))
W=$(( $W - $W%2 ))
ffmpeg -y -video_size "$W"x"$H" -f x11grab -framerate 60 \
-i $DISPLAY+$X,$Y -pix_fmt yuv420p $videofile 2> $logfile &
# store pid so that recording can be stopped next time the script is run
echo $! > $statusfile

5
scripts/screenshot_active.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
path=$(xdg-user-dir PICTURES)/screenshots/window_$(date "+%Y-%m-%d_%H:%M:%S").png
mkdir -p $(xdg-user-dir PICTURES)/screenshots
maim -u -i $(xdotool getactivewindow) -o $path
xclip -selection clipboard -target image/png -i $path

5
scripts/screenshot_full.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
path=$(xdg-user-dir PICTURES)/screenshots/screen-$(date "+%Y-%m-%d_%H:%M:%S").png
mkdir -p $(xdg-user-dir PICTURES)/screenshots
maim -u -o $path
xclip -selection clipboard -target image/png -i $path

View file

@ -0,0 +1,2 @@
#!/bin/bash
maim -s -u --color=1.0,0.5,0.0,1.0 -t 16 | xclip -selection clipboard -t image/png

View file

@ -162,7 +162,7 @@
},
{
"name": "GraphicsResolutionPresets",
"value": "960x1056",
"value": "1056x1056",
"type": 3
},
{
@ -292,7 +292,7 @@
},
{
"name": "AudioWorldSFX",
"value": "0",
"value": "30",
"type": 0
},
{
@ -302,7 +302,7 @@
},
{
"name": "AudioPlayerVoice",
"value": "49",
"value": "43",
"type": 0
},
{
@ -357,7 +357,7 @@
},
{
"name": "AudioPlayerVoiceAttenuationDistanceFalloff",
"value": "4",
"value": "7",
"type": 0
},
{

View file

View file

@ -1,3 +0,0 @@
#!/bin/env python3

View file

@ -19,7 +19,7 @@
"liveServer.settings.root": "docs/",
"liveServer.settings.donotVerifyTags": true,
"editor.insertSpaces": false,
"editor.fontFamily": "\"-linja lipamanka\", sans, mono, \"linja pona\", mono",
"editor.fontFamily": "\"-linja lipamanka\", sans, mono",
"editor.minimap.renderCharacters": false,
"Lua.telemetry.enable": false,
"Lua.workspace.library": [
@ -54,5 +54,6 @@
"extensions.autoCheckUpdates": false,
"extensions.autoUpdate": false,
"lldb.suppressUpdateNotifications": true,
"zenMode.hideLineNumbers": false
"zenMode.hideLineNumbers": false,
"editor.inlayHints.enabled": "offUnlessPressed"
}

View file

@ -1 +1,9 @@
#setxkbmap -layout se
xrandr --output DisplayPort-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --set TearFree on \
--output DisplayPort-1 --off \
--output DisplayPort-2 --mode 1920x1080 --pos 0x0 --rotate normal --set TearFree on \
--output HDMI-A-0 --mode 1280x1024 --pos 3840x0 --rotate normal --set TearFree on
# bind super to super+esc, for menubar toggle with one key
xcape -e "Super_L=Super_L|Escape"