Skip to content

Instantly share code, notes, and snippets.

View bernardassan's full-sized avatar
Zig ^ Rust

Bernard Assan bernardassan

Zig ^ Rust
View GitHub Profile
@bernardassan
bernardassan / riverinit.zig
Last active March 15, 2025 19:05
River Window Manager Configurator in Zig
const std = @import("std");
const builtin = @import("builtin");
const debug = std.debug;
const mem = std.mem;
const posix = std.posix;
const process = std.process;
pub const std_options: std.Options = .{
.log_level = .warn,
};
@bernardassan
bernardassan / zvm.elv
Last active January 24, 2026 14:54
A zig (zigup/zvm) version manager in elvish
#!/bin/env elvish
use os
use path
use str
use flag
use platform
fn arch {
var arch = ""
var os = ""
@bernardassan
bernardassan / riverinit.lua
Last active August 4, 2024 15:18
River Init Config in Luajit
#!/usr/bin/luajit
local getenv = os.getenv
local fmt = string.format
local exec = os.execute
--trim leading and trailling whitespaces
local function trim(str)
return str:gsub("^%s*(.-)%s*$", "%1")
end
@bernardassan
bernardassan / statusbar.zsh
Created January 28, 2024 15:07
Sway Status Bar
#!/bin/zsh
#inspirations from
#https://github.com/mumin16/arch-sway
#https://gitlab.com/bullbytes/dotfiles/-/blob/master/sway/status.sh
#https://u|nix.stackexchange.com/questions/473788/simple-swaybar-example
#https://github.com/zakariaGatter/i3blocks-gate/blob/master/i3b-gate
# sway config in ~/.config/sway/config :
# bar {
# status_command exec ~/.config/sway/swaybar.sh
@bernardassan
bernardassan / sway.conf.sh
Created January 28, 2024 14:44
Sway Config
# Default config for sway
# for sway related config : https://github.com/Ultra-Code/archsway/tree/master/sway
# Read `man 5 sway` for a complete reference.
#disable XWayland entirely and run a "pure" Wayland session
xwayland disable
#
# Variables
#