Skip to content

Instantly share code, notes, and snippets.

View SkyyySi's full-sized avatar

Simon B. SkyyySi

View GitHub Profile
SkyyySi / gtk.css
Created October 22, 2023 17:58
Dracula for GTK4 / libadwaita applications
Generated with Gradience
Issues caused by theming should be reported to Gradience repository, and not to upstream
@define-color accent_color #bd93f9;
@define-color accent_bg_color #bd93f9;
SkyyySi / get-battery.lua
Last active October 18, 2023 16:43
A standalone script to get the current charging percentage of your device's battery, written in Lua. Requires LGI. Linux only (maybe BSD too; probably not, though).
#!/usr/bin/env luajit
local script_version = "1.1.1"
local lgi = require("lgi")
local GLib = lgi.GLib
local UPowerGlib = lgi.UPowerGlib
local function get_battery()
for _, device in pairs(UPowerGlib.Client():get_devices()) do
SkyyySi / rc.moon
Last active February 8, 2023 22:06
Port of awesome wm's rc.lua to moonscript
-- 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"
awesome = awesome ---@type awesome
screen = screen ---@type screen
client = client ---@type client
awful = require "awful" ---@type awful
gears = require "gears" ---@type gears
SkyyySi / button.lua
Created January 26, 2023 16:50
A wibox.container for turning any widget into a button. For awesomewm.
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
---@class wibox.container.button : wibox.container.background
---@operator call(table): wibox.container.button._instance
---@field private _private table
local button = {} = {}
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local lgi = require("lgi")
local dpi = beautiful.xresources.apply_dpi
local modkey = modkey or "Mod4"
local spacing = dpi(8)
local font_size = " "..tostring(math.floor(dpi(8)+0.5))
import modules.scripts as scripts
import gradio as gr
import os
from modules import images
from modules.processing import process_images, Processed
from modules.processing import Processed
from modules.shared import opts, cmd_opts, state
SkyyySi /
Last active September 1, 2022 19:46
A nice string conversion module for tables

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

SkyyySi / lambda.lua
Last active May 20, 2022 18:01
A simple lambda expression parser for Lua. Doesn't support accessing local variables (besides the parameters).
#!/usr/bin/env lua
--- Create a simple anonymous function with a Ruby-like syntax.
--- Usage:
--- ```
--- local lambda = require("lambda")
--- f = lambda[[|x, y| x + y + 2]]
--- print(f(3, 6))
SkyyySi /
Last active April 2, 2024 08:21
A list of alternatives after the shutdown of Vanced


These are the current alternatives (with links when possible):

SkyyySi /
Last active March 14, 2022 21:01
Create a sideways wibar in awesome window manager

Create a sideways wibar in awesome wm


The wibar of the awesome window manager is extremely flexible and can do many things that are hard to do with other panels at best, that ususally end up being janky anyway, and sometimes just are not possible outright. One of these things is to move the panel to the side of the screen and have everything behave correctly. In the following, I am going to show you how you can create a panel attactched to the right side of each of your connected screens.