Skip to content

Instantly share code, notes, and snippets.

View rehhouari's full-sized avatar
💫

Rafik El Hadi Houari rehhouari

💫
View GitHub Profile
@rehhouari
rehhouari / zellij-lock.zsh
Last active April 29, 2024 17:04
Automatically lock Zellij when a certain command is executed
# Define an array of commands in ENV that will lock Zellij when ran
# export ZELLIJ_LOCK=("micro" "nano" "vim")
# Store the last command we ran, this is to be used in precmd() after it exists
command=''
# Run before a command is executed
function preexec() {
# Extract the command from the input string
local cmd=${1%% *}
@rehhouari
rehhouari / system-wide-clipboard-linux.zsh
Last active March 31, 2024 05:03 — forked from varenc/system-wide-clipboard.zsh
Zsh copy & paste system wide for Linux (X11& Wayland with customizable paste and copy commands)
# Forked from https://gist.github.com/varenc/e4a22145c484771f254fa20982e2cd7f
## 2024-03-30: Ported it to Linux, added display detection and customizable copy/paste commands
## Using environment variables
## 2020-05-16: Changed `echo` to `printf` so that backslashes are not interpretted by echo
## and so that CUTBUFFER shows up exactly in the pasteboard without modification
# Detect display server
display_server=$(echo $DISPLAY | cut -d: -f1)
@rehhouari
rehhouari / audiorelay-pipewire.md
Created March 15, 2024 01:16
How to install AudioRelay on Linux using Pipewire (through pipewire-pulse)

Keybase proof

I hereby claim:

  • I am rehhouari on github.
  • I am rehhouari (https://keybase.io/rehhouari) on keybase.
  • I have a public key whose fingerprint is E89D 52B3 F37B 4586 19D8 C539 1B16 AF80 EAA5 BA67

To claim this, I am signing this object: