Skip to content

Instantly share code, notes, and snippets.

@20after4
20after4 / README.md
Last active March 31, 2025 21:28
bash script to implement floating scratch windows in `niri`

Notes

  1. Place the files in your path
  2. Make niri-toggle-scratch.sh and json_select executable.
  3. On line 32 of niri-toggle-scratch.sh I have code to focus my floating-kitty window (a dedicated terminal instance) after showing scratch windows. You might want to customize or remove this part depending on how you use scratch windows.

See also

Related discussion is in this thread: YaLTeR/niri#329 (reply in thread)

@subidit
subidit / languages.toml
Created March 21, 2024 08:21
Helix LaTeX setup. with latexmk/tectonic builds and zathura/okular forward search.
[[language]]
name = "latex"
[language.config.texlab]
auxDirectory = "build"
[language.config.texlab.chktex]
onOpenAndSave = true
onEdit = true
@musjj
musjj / config.kdl
Last active March 13, 2024 07:48
config.kdl
default_mode "locked"
keybinds {
normal {
bind "p" {
SwitchToMode "Pane"
}
bind "m" {
SwitchToMode "Move"
}
@metalelf0
metalelf0 / eat-food.zsh
Last active February 28, 2024 07:44
Sample zsh script with both interactive user menu and direct input
#!/usr/bin/env zsh
# Call this script with:
# ./eat-food.zsh [opt]
#
# If a food is given, and is in the valid foods (opts array), it will eat the given food
# e.g. ./eat-food.zsh bananas
#
# If a food is given, but it's not valid, it will prompt for a food to eat
# e.g. ./eat-food.zsh pineapples
@gagregrog
gagregrog / bash_menu.sh
Created August 23, 2021 03:29
Ephemeral Interactive Bash Menu with Up/Down selection or numeral selection
# Original solution sourced from:
# https://unix.stackexchange.com/questions/146570/arrow-key-enter-menu
#
# Updated to do the following:
# - Display index with each option
# - Choose options 1-9 with numeric input
# - Clear the menu and reset the cursor when an option is selected
#
# Arguments:
# array of options