Skip to content

Instantly share code, notes, and snippets.

View flexiondotorg's full-sized avatar
❄️
Nix & NixOS

Martin Wimpress flexiondotorg

❄️
Nix & NixOS
View GitHub Profile
@flexiondotorg
flexiondotorg / triple-head.sh
Created November 13, 2018 23:14
xrandr script for ThinkPad P1/X1 Extreme and 2 externals monitors connected to ThinkPad Thunderbolt 3 Dock
#!/usr/bin/env bash
SCREENS=$(xrandr --query | grep connected | grep -v disconnected | cut -d' ' -f1)
INTERNAL=$(echo ${SCREENS} | grep eDP-1-1)
RET=$?
if [ ${RET} -eq 0 ]; then
echo "Internal panel detected."
xrandr --output eDP-1-1 --auto
exit
fi
@flexiondotorg
flexiondotorg / mate-meta-wm
Created January 22, 2018 00:44
A meta window manager to set the default window manager for Ubuntu MATE. Runs standalone but not when the session is starting up.
#!/usr/bin/env python3
# Copyright (C) 2018 Martin Wimpress <code@ubuntu-mate.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@flexiondotorg
flexiondotorg / README.md
Created January 11, 2018 19:12
Ubuntu MATE on Ubuntu Touch
@flexiondotorg
flexiondotorg / python-snapd-glib-example.py
Created October 10, 2017 11:30
Python example of using snapd-glib to authenticate, install and remove snaps.
#!/usr/bin/python3
#http://people.ubuntu.com/~robert-ancell/snapd-glib/reference/index.html
import getpass
import gi
import json
import os
import sys
gi.require_version ('Snapd', '1')
@flexiondotorg
flexiondotorg / gitkraken.yaml
Created September 4, 2017 12:10
GitKraken snap
name: gitkraken
version: 2.7.1
summary: Unleash your repo
description: |
Insomnia is a cross-platform REST client, built on top of Electron.
confinement: devmode
parts:
gitkraken:
@flexiondotorg
flexiondotorg / insomnia.yaml
Last active August 31, 2017 09:06
insomnia snap
name: insomnia
version: 5.7.14
summary: The most intuitive cross-platform REST API Client
description: |
Insomnia is a cross-platform REST client, built on top of Electron.
confinement: devmode
parts:
insomnia:
@flexiondotorg
flexiondotorg / keybase.md
Created September 13, 2016 22:02
keybase.md

Keybase proof

I hereby claim:

  • I am flexiondotorg on github.
  • I am wimpress (https://keybase.io/wimpress) on keybase.
  • I have a public key whose fingerprint is 79F9 461B F24B 27F5 0DEB 8A50 7454 357C FFEE 1E5C

To claim this, I am signing this object:

from __future__ import unicode_literals, print_function, absolute_import
from gi.repository import Gio
import os.path
VALID = {'toplevel': ('expand', 'size', 'orientation'),
'launcher': ('object-type', 'launcher-location', 'locked', 'menu-path', 'position', 'toplevel-id'),
'applet': ('object-type', 'applet-iid', 'toplevel-id', 'position', 'locked'),
'menu-bar': ('object-type', 'applet-iid', 'toplevel-id', 'position', 'locked'),
'menu': ('object-type', 'toplevel-id', 'position', 'locked'),
'action': ('object-type', 'action-type', 'position', 'toplevel-id'),