Skip to content

Instantly share code, notes, and snippets.

Avatar

Emmanuel Lepage Vallée Elv13

View GitHub Profile
View gist:636af212bccf1e751d1dd72a076821db
# This Dockerfile creates a very small AppImage using static
# linking and LTO. It is 100% portable for all x86_64 *OR*
# aarch64 systems.
#
# The general idea is to create a single file you can `scp`
# into all of your system and have a Lua based self contained
# config "just working".
FROM debian:buster-slim as bootstrap
MAINTAINER Emmanuel Lepage Vallee <elv1313+bugs@gmail.com>
@Elv13
Elv13 / fix_mouse_screen.lua
Created May 29, 2019
Crude and untested (written directly in GitHub editor) attempt to fix the mouse property::screen
View fix_mouse_screen.lua
-- Instructions:
-- 1) Put this into a file called fix_mouse_screen.lua in ~/.config/awesome
-- 2) add require("fix_mouse_screen") to rc.lua
local placement = require("awful.placement")
local wibox = require("wibox")
local cur = mouse.screen
client.connect_signal("focus", function(c)
@Elv13
Elv13 / radical.patch
Created May 17, 2019
Radical menu system fix for Awesome 4.3
View radical.patch
diff --git a/radical/box.lua b/radical/box.lua
index 197b5cc..75ff7f7 100644
--- a/radical/box.lua
+++ b/radical/box.lua
@@ -24,7 +24,7 @@ local function new(args)
local s = w.screen
w:connect_signal("property::geometry", function()
if w.screen ~= s then
- w:move_by_parent()
+ w:move_next_to()
@Elv13
Elv13 / high_contrast_theme.lua
Created May 2, 2019
high_contrast_theme.lua
View high_contrast_theme.lua
-- 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")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
@Elv13
Elv13 / inner_shadow.lua
Last active Apr 12, 2019
An AwesomeWM "wibox" container to draw an inner shadow shaped like a rounded rectangle
View inner_shadow.lua
local cairo = require("lgi").cairo
local gears = require("gears")
local wibox = require("wibox")
local inner_shadow = {}
function inner_shadow:layout(context, width, height)
if not self._private.widget then return end
local offset = (self._private.border_width or 0)
View gist:e9caf5399a0ccf41cda2f8cada9a9501
-- Get a string from the command prompt.
local function prompt(message)
return vim.api.nvim_call_function("input", {message})
end
--- Bring sanity back to search, no idiotic magic by default
local function search()
local res = prompt("Search: "):gsub("/", "\\/")
vim.api.nvim_input("<cmd>/\\V"..res.."/<cr><esc>n")
@Elv13
Elv13 / geticon.sh
Last active Mar 22, 2019
geticon.sh
View geticon.sh
#!/bin/sh
# This script get the various breeze icons used by an application
# and output a Qt plugin that can be statically linked using the
# official Qt plugin system. It makes applications more portable
# since they no longer require a valid icon theme to be installed.
#
# This is a *fallback* for platforms without an icon theme or with
# incomplete icon themes at the cost of a larger binary.
#
View gist:2fae7950a8863a2b34095397932b2cb9
-- 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")
-- @DOC_REQUIRE_SECTION@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
View gist:b679fe3cb100cd63a7082cc808d316b8
-- 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")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
View gist:1691174c1f6d784ce6fef6d0a1bb0908
--- This is a LuaJIT FFI binding for the notmuch mail indexer.
--
-- It only supports LuaJIT2 and nothing else.
--
-- The first version only support running queries and tagging the result. That's
-- about has much (ah ah) as notmuch does anyway.
--
-- The thread support seems to crash, no thread tagging for now.
--
local ffi = require("ffi")