Skip to content

Instantly share code, notes, and snippets.

@pedrocr
pedrocr / gist:03ba5d05fc1fd1d3a17ff4a6ddb3d3ea
Created December 22, 2019 16:22
Bisecting broken reload in sway
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
939c7b2d529b8c982672a6e141a8bef2348d358a
1d3cbe9f278297fffa83e4e0c99d8ba46903cc3e
3334d11adc926c0f6d86afc4897117d5559036f5
5d882cb5fc2d9d9fd68439021e48a90aa2e50e79
90e3d25009a201363e5cbe001f344f97f7f7c579
1a5797803a48fb71515e6bd6335d684a6cae6b6d
We cannot bisect more!
# pedrocr's config for sway
set $mod Mod4
set $term gnome-terminal
set $lock swaylock -f -c 112233 -i ~/LockImage.png
#set $menu dmenu_path | dmenu -fn "Monospace Regular-21\" -nb "#000" | xargs swaymsg exec --
#set $menu dmenu_path | rofi -width 100 -location 1 -lines 10 -bw 2 -yoffset -2 -show-icons -font "Monospace Regular 20" -modi combi -show combi -combi-modi drun,run
set $menu ~/bin/wlmenu
@pedrocr
pedrocr / gist:ebc42631b5ac479e29078e5c41e37e23
Created October 30, 2019 08:40
Firefox correctly (non-tiled) tooltips
"representation": "H[firefox]",
"nodes": [
{
"id": 212,
"name": "Structure and Interpretation of Computer Programs, 2nd ed. - sicp.pdf - Mozilla Firefox",
"rect": {
"x": 0,
"y": 40,
"width": 2560,
"height": 1400
@pedrocr
pedrocr / gist:b12fb22f7881f7d3903dd939b4c5d1bb
Created October 30, 2019 08:35
Tiled Firefox Tooltips
"representation": "H[firefox firefox]",
"nodes": [
{
"id": 70,
"name": "Structure and Interpretation of Computer Programs, 2nd ed. - sicp.pdf - Mozilla Firefox",
"rect": {
"x": 0,
"y": 40,
"width": 1280,
"height": 1400
@pedrocr
pedrocr / gist:8721e7d2f6304a87cd80a4a3569dd9ae
Created October 30, 2019 08:32
Tiled firefox tooltips
"type": "workspace",
"representation": "H[firefox firefox]",
"nodes": [
{
"id": 70,
"name": "Carros elétricos, painéis solares e armazenamento de energia limpa | Tesla - Mozilla Firefox",
"rect": {
"x": 0,
"y": 40,
"width": 1280,
@pedrocr
pedrocr / gist:5e1f6e1f406f63bebfa31ee734abb5be
Created October 21, 2019 22:35
Sway mpv memory leak mpv log
Playing: test.avi
(+) Video --vid=1 (msmpeg4v3 640x352 25.000fps)
(+) Audio --aid=1 (ac3 2ch 48000Hz)
File tags:
Artist: AMC
Comment: AMC
Title: AMC
[1029483.636] -> wl_display@1.get_registry(new id wl_registry@2)
[1029483.671] -> wl_display@1.sync(new id wl_callback@3)
[1029483.742] wl_display@1.delete_id(3)
@pedrocr
pedrocr / gist:539daf0639eb4f8ee112eb1639d5a4e7
Created October 21, 2019 22:34
Sway mpv memory leak log
2019-10-21 23:29:33 - [sway/main.c:152] Linux coulson 5.0.0-31-generic #33-Ubuntu SMP Mon Sep 30 18:51:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
2019-10-21 23:29:33 - [sway/main.c:168] Contents of /etc/lsb-release:
2019-10-21 23:29:33 - [sway/main.c:152] DISTRIB_ID=Ubuntu
2019-10-21 23:29:33 - [sway/main.c:152] DISTRIB_RELEASE=19.04
2019-10-21 23:29:33 - [sway/main.c:152] DISTRIB_CODENAME=disco
2019-10-21 23:29:33 - [sway/main.c:152] DISTRIB_DESCRIPTION="Ubuntu 19.04"
2019-10-21 23:29:33 - [sway/main.c:168] Contents of /etc/os-release:
2019-10-21 23:29:33 - [sway/main.c:152] NAME="Ubuntu"
2019-10-21 23:29:33 - [sway/main.c:152] VERSION="19.04 (Disco Dingo)"
2019-10-21 23:29:33 - [sway/main.c:152] ID=ubuntu
@pedrocr
pedrocr / wlmenu
Created August 27, 2019 23:43
wldash startup script
#!/bin/bash
if pgrep --uid $(whoami) wldash
then
killall --user $(whoami) wldash
exit 0
else
selection="$(~/bin/dot-desktop | ~/bin/wldash -i -p 'exec:')"
if [ "$selection" != "" ]
then
@pedrocr
pedrocr / gist:d37c42d08af14de505cddc7f949d69d7
Created August 1, 2019 14:34
bindsym clis that should be shared with the GUI programs
# Brightness keys
bindsym XF86MonBrightnessUp exec brightnessctl s 5%+
bindsym XF86MonBrightnessDown exec brightnessctl --min-value=17 s 5%-
# Audio Keys
set $sink $(pacmd list-sinks 2>&1 | grep "* index" | head -n 1 | cut -d " " -f 5)
bindsym XF86AudioLowerVolume exec pactl -- set-sink-mute $sink 0 && pactl -- set-sink-volume $sink -10%
bindsym XF86AudioRaiseVolume exec pactl -- set-sink-mute $sink 0 && pactl -- set-sink-volume $sink +10%
bindsym XF86AudioMute exec pactl -- set-sink-mute $sink toggle
@pedrocr
pedrocr / gist:02706c877d42747fecd5cea707249d4a
Created July 31, 2019 19:00
sway: disabling events on type:touchpad not working
2019-07-31 19:59:17 - [sway/main.c:152] Linux coulson 5.0.0-20-generic #21-Ubuntu SMP Mon Jun 24 09:32:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
2019-07-31 19:59:17 - [sway/main.c:168] Contents of /etc/lsb-release:
2019-07-31 19:59:17 - [sway/main.c:152] DISTRIB_ID=Ubuntu
2019-07-31 19:59:17 - [sway/main.c:152] DISTRIB_RELEASE=19.04
2019-07-31 19:59:17 - [sway/main.c:152] DISTRIB_CODENAME=disco
2019-07-31 19:59:17 - [sway/main.c:152] DISTRIB_DESCRIPTION="Ubuntu 19.04"
2019-07-31 19:59:17 - [sway/main.c:168] Contents of /etc/os-release:
2019-07-31 19:59:17 - [sway/main.c:152] NAME="Ubuntu"
2019-07-31 19:59:17 - [sway/main.c:152] VERSION="19.04 (Disco Dingo)"
2019-07-31 19:59:17 - [sway/main.c:152] ID=ubuntu