This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Import the necessary modules | |
local lgi = require 'lgi' | |
local cairo = lgi.cairo | |
local Gdk = lgi.Gdk | |
local Gtk = lgi.Gtk | |
-- Define the window size | |
local window_width = 400 | |
local window_height = 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/common.h b/src/common.h | |
index 193bc2a..74013da 100644 | |
--- a/src/common.h | |
+++ b/src/common.h | |
@@ -109,6 +109,13 @@ typedef struct glx_prog_main { | |
GLint unifm_tex; | |
/// Location of uniform "time" in window GLSL program. | |
GLint unifm_time; | |
+ /// Location of the uniform "resolution" in window GLSL program. | |
+ GLint unifm_win_resolution; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define PI 3.14159 | |
#define colorRange 24.0 | |
uniform vec2 resolution; | |
uniform sampler2D tex; | |
uniform float opacity; | |
uniform float time; | |
uniform bool invert_color; | |
// https://www.shadertoy.com/view/lsBfRc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.connect_signal("request::titlebars", function(c) | |
local window_title = { | |
align = "center", | |
widget = b.titlewidget(c) | |
} | |
local move_window = click(left_click, function() c:emit_signal("request::activate", "titlebar", {raise = true}) awful.mouse.client.move(c) end ) | |
titlebar_color = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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") |
NewerOlder