Skip to content

Instantly share code, notes, and snippets.

View rodrigopedra's full-sized avatar

Rodrigo Pedra Brum rodrigopedra

  • São Carlos, Brazil
View GitHub Profile

Wayland transition notes for X11 users

Please comment below to contribute. Thanks!

X11 concept Wayland concept Notes
"Window" "Top-level Shell Surface" An entire window, including window decorations
X11 (the specfication) Wayland (the protocols) Neither X11 nor Wayland are binaries that can be installed
Xorg, one universally shared default implementation Multiple competing Wayland compositors Unfortunately there is no universally used single Wayland compositor; apparently every desktop environment does its own, and as a result what works in one may not work in another
export DISPLAY=... export WAYLAND_DISPLAY=... How to know which WAYLAND_DISPLAY one needs to export? The sockets (and their names) should be located in /run/user/*. If WAYLAND_SOCKET is detected, the client will prefer to use the socket provided using that environment variable.
@patillacode
patillacode / cap.sh
Last active November 23, 2023 21:35
#!/bin/bash
################################################################################
# cap - capture your screen
#
# This script allows you to capture your screen on Linux or macOS systems using
# the appropriate tools available on each platform. On Linux, it uses 'slop'
# and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts
# you to select a desktop area for recording and saves the recording as an MP4/MOV
# file with customizable video quality.
@jpenalbae
jpenalbae / peek.sh
Last active March 19, 2024 16:11
Record desktop area on linux using slop and ffmpeg
#!/bin/bash
# Video Quality
# The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default,
# and 51 is worst quality possible. A lower value generally leads to higher
# quality, and a subjectively sane range is 17–28
QUALITY=28
# check if slop command exists
if ! command -v slop &> /dev/null
export default defineConfig({
plugins: [
laravel(['resources/js/app.js']),
{
name: 'ziggy',
enforce: 'post',
handleHotUpdate({ server, file }) {
if (file.includes('/routes/') && file.endsWith('.php')) {
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`))
}
@probonopd
probonopd / Wayland.md
Last active July 23, 2024 22:15
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

@aldolat
aldolat / Akonadi-MySQL-workaround.md
Last active November 23, 2023 04:25
If MySQL is installed, Akonadi doesn't work anymore. This is a possible workaround to get Akonadi back to work.
<?php
namespace App\Some\Path;
class ShortTermMemory
{
private $store = [];
public function set($key, $value)
{
@awerlang
awerlang / README
Last active June 24, 2024 15:50
A zypper wrapper that maximizes network throughput
zypper-download
===============
Downloads packages using any amount of available openSUSE mirrors.
Installation
------------
Copy both files to the following locations:
@bodqhrohro
bodqhrohro / vidqgif.sh
Created February 22, 2020 20:22
Compress a video to a tiny GIF with a very strong quantization and no dithering
#!/bin/sh
# parameters: input, output
# make a 256-colors palette first
palettefull=$( mktemp --suffix=.png )
ffmpeg -i "$1" -vf 'palettegen' -y "$palettefull"
# quantize the palette (palettegen's builting limiter
# tries to preserve too much similar shades)
palettequant=$( mktemp --suffix=.png )
@tibovanheule
tibovanheule / BlockYouTubeHostsFile
Created January 1, 2019 23:51 — forked from marshyyyy/BlockYouTubeHostsFile
Block YouTube Hosts File
0.0.0.0 host.youtube.com
0.0.0.0 mx.youtube.com
0.0.0.0 admin.youtube.com
0.0.0.0 devel.youtube.com
0.0.0.0 stats.youtube.com
0.0.0.0 http.youtube.com
0.0.0.0 mx0.youtube.com
0.0.0.0 administration.youtube.com
0.0.0.0 development.youtube.com
0.0.0.0 svn.youtube.com