Commit Graph

9 Commits

Author SHA1 Message Date
MasterofJOKers b5243aaa2b Add lxc-debian-userns LXC template script
This script can be used as LXC template to install a Debian into a
directory using `mmdebstrap`. It's intended use is to create a container
filesystem with appropriate uids/gids for use in an unprivileged
container. The script assumes that it runs as root and only changes the
userns to install Debian.
2023-02-26 00:24:25 +01:00
MasterofJOKers 845e3fe30e Add remap-uid-and-gid-for-lv
I've used this script to remap files' uids/gids of containers created
without a custom userns into their new range.  It's inferior to
`fuidshift` from the `lxc` project in that it doesn't handle ACLs and is
quite slow - probably because it calls a binary for every file.

By default, it runs in debug mode only printing the chown command
instead of executing it. You need to edit the file to use it.

It also only works with LVs (logical volumes from LVM), mounting them
automatically.
2023-02-25 17:15:23 +01:00
MasterofJOKers 271d7009cf Add get-lxc-idmap-config script
This script handles uid/gid ranges for creating unprivileged containers as root.
2023-02-25 17:13:12 +01:00
MasterofJOKers 2f9f69ec77 Add udev-device-plug-handler
This command runs in the background and listens for udev bind events,
comparing the attributes of those events to known implemented devices.
If any match, we call their handle() method. The same handle() method is
called on startup if the presence of the device is detected via the
check_available() method.

Currently implemented devices are my Logitech G930 headset and my TEX
Shinobi keyboard.
2022-09-06 20:47:01 +02:00
MasterofJOKers 7729a8a9db Add cronplayer
This command's main purpose is to get run regularly via cron and play (a
list of) files possibly repeated to a specific PulseAudio device.
Additonally, it can just play a command or start as an HTTP server
providing an interface to play local files, stop the current playback
and show the current status.

Actual playback is done via ffmpeg and paplay.
2022-05-17 23:41:31 +02:00
MasterofJOKers e558da4427 Add switch-pa-sink
This script can be used to switch the pulseaudio sink of an application
to the next sink in the list of sinks. The sink is found by querying the
currently focused window from i3 and retrieving the PID via _NET_WM_PID
attribute using xprop. If that PID doesn't directly have sink attached,
the script searches for children of this PID having a sink and switches
those. This is useful to switch e.g. an mpv running inside a terminal.
2022-01-26 00:00:57 +01:00
MasterofJOKers 12c3ac9c05 Add sorted-co.py
This is a script to copy files onto an USB stick or an MP3 player in
sorted order so stupd mp3 players or radios that play files in the order
they were added to the directory instead of by sorted filename still
play the files in the right order.
2022-01-25 23:33:53 +01:00
MasterofJOKers 38fe8c0a82 Add *.swp to .gitignore 2022-01-25 23:33:41 +01:00
MasterofJOKers a7d5c21c45 Initial commit 2020-12-15 23:06:45 +00:00