You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problems & Solutions for Interaction Between C and Go
At Vimeo, on the transcoding team, we work a lot with Go, and a lot with C, for various tasks such as media ingest. This means we use CGO quite extensively, and consequently, have run into bits that are perhaps not very well documented, if at all. Below is my effort to document some of the problems we've run into, and how we fixed or worked around them.
Many of these are obviously wrong in retrospect, but hindsight is 20/20, and these problems do exist in many codebases currently.
Some are definitely ugly, and I much welcome better solutions! Tweet me at @daemon404 if you have any, or have your own CGO story/tips, please! I'd love to learn of them.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)
This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).
Testing colors
Running this script should look the same in tmux as without.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to recover your SwayWM socket in an SSH session.
How to recover your SwayWM socket in an SSH session.
I've run into a strange problem where sometimes, my monitors are forced to DPMS off and moving the cursor or pressing keys does not free it. I suspect this is a bug in my SwayWM configuration or a bug in Swaylock, but it resolves itself if I wait until the device again locks, which causes a second Swaylock instance to appear.
In any case, if you get yourself stuck and need to recover, you might want to be able to run swaymsg remotely. If you do, you might run into strange issues. swaymsg calls sway --get-socketpath to get the IPC socket, which... just returns the value of the SWAYSOCK environment variable. In my case, this also has the funny side-effect of starting a dbus session and SSH agent each time its invoked, because it is calling the NixOS-wrapped SwayWM binary. Probably should patch the NixOS version to explicitly call the unwrapped binary!
In order to recover the SWAYSOCK, one approach that should be relatively easy and does not requ