Skip to content

Instantly share code, notes, and snippets.

View kesor's full-sized avatar
🏠
Working from home

Evgeny Zislis kesor

🏠
Working from home
View GitHub Profile
@kesor
kesor / scratch.sh
Created November 9, 2024 12:30
wm scratchpad script
#!/bin/sh
name=$1
case "$name" in
speedcrunch)
win_ids=$(xdotool search --classname "SpeedCrunch")
visible_win=""
hidden_win=""
@kesor
kesor / keybindings.txt
Created November 10, 2024 14:39
dwm keyboard cheat sheet
# Window Navigation
Mod j / k : Focus next / prev window
Mod Enter : Move to master
Mod Tab : Prev tag
# Window Management
Mod h / l : Shrink / Grow master
Mod Shift c : Close window
Mod Shift Space : Toggle float
Mod Shift f : Fullscreen
@kesor
kesor / nix-env-vars-wrapper.nix
Last active November 28, 2024 02:18
A function to wrap home-manager packages in environment variable setting shell script
{ lib, pkgs, ... }:
let
# Function to wrap a package with custom environment variables
makeWrappedPackage = pkg: envVars: pkgs.stdenv.mkDerivation {
name = "env-wrap-${pkg.name}";
nativeBuildInputs = [ pkgs.makeWrapper ];
buildCommand = ''
mkdir -p $out/bin
for exe in ${lib.getExe pkg}; do
@kesor
kesor / env-wrapper.nix
Last active November 28, 2024 05:30
NIX Environment Variables Wrapper with symlinkJoin to symlink all the original package into the new wrapper
{ lib, pkgs, ... }:
let
# Function to wrap a package with custom environment variables
makeWrappedPackage = pkg: envVars: pkgs.symlinkJoin {
name = "env-wrap-${pkg.pname or pkg.name}";
paths = [ pkg ]; # Symlink all files form the original
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
for exe in ${lib.getExe pkg}; do
@kesor
kesor / eza-wrapper.sh
Last active January 16, 2025 05:11
Wrapper around `eza` to make it have `ls`-like arguments, especially `-t`
#!/bin/bash
# CHANGE THIS
ACTUAL_EZA=/usr/local/bin/_eza
display_time="modified"
sort_time=""
args=()
while [ "$#" -gt 0 ]; do
@kesor
kesor / flake.nix
Last active January 17, 2025 18:09
home manager flake.nix on ubuntu
{
description = "Home Manager configuration";
inputs = {
# nixpkgsUnstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/release-24.11";
systems.url = "github:nix-systems/default";
catppuccin.url = "github:catppuccin/nix";
ghostty.url = "github:ghostty-org/ghostty";
homeManager = {