Skip to content

Instantly share code, notes, and snippets.

View cassidyjames's full-sized avatar

Cassidy James cassidyjames

View GitHub Profile
_/\__________
| |
| Popover |
|___________|
[ Button ]
Off switch: (o--)
On switch: (--o)
private const string CSS = """
.foo {
background: %s;
color: %s;
}
""";
construct {
var button = new Gtk.Button.with_label ("Button");
button.get_style_context ().add_class ("foo");
var provider = new Gtk.CssProvider ();
provider.load_from_resource ("/com/github/yourusername/yourrepositoryname/Application.css");
Gtk.StyleContext.add_provider_for_screen (
Gdk.Screen.get_default (),
provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
);
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/github/yourusername/yourrepositoryname">
<file alias="Application.css">Application.css</file>
</gresource>
</gresources>
.foo {
background: #552255;
color: white;
}
.foo {
background-image: linear-gradient(
to bottom,
@BLUEBERRY_500,
@BLUEBERRY_700
);
border-color: @BLUEBERRY_100;
color: white;
text-shadow: 0 1px alpha(@BLUEBERRY_900, 0.67);
}
@cassidyjames
cassidyjames / touchegg.conf
Last active November 2, 2020 20:50
A touchégg config I am trying out for elementary OS and big trackpads
<touchégg>
<settings>
<property name="animation_delay">150</property>
<property name="action_execute_threshold">20</property>
<property name="color">909090</property>
<property name="borderColor">FFFFFF</property>
</settings>
<application name="All">
<gesture type="SWIPE" fingers="3" direction="LEFT">
<action type="CHANGE_DESKTOP">
@cassidyjames
cassidyjames / gist:90e29e9f89c769f781a259da687d48b2
Created March 24, 2021 16:42
elementary Slack Sidebar (Light)
#F1F1F1,#FAFAFA,#DFDFDF,#333333,#FBFBFB,#333333,#68B723,#C6262E,#EDEDED,#333333
@cassidyjames
cassidyjames / gist:5413a3ec621b6e484535bbe47dfed974
Created March 24, 2021 16:49
elementary Slack Sidebar (Dark)
#313131,#FAFAFA,#252525,#FFFFFF,#3B3B3B,#FFFFFF,#9BDB4D,#ED5353,#313131,#FFFFFF
@cassidyjames
cassidyjames / framework-xrandr.txt
Created August 6, 2021 03:36
Notes for using xrandr on elementary OS for the Framework Laptop
## To add a sensible 1× resolution of 1500×1000:
gtf 1500 1000 60
# 1504x1000 @ 60.00 Hz (GTF) hsync: 62.10 kHz; pclk: 125.19 MHz
# Modeline "1504x1000_60.00" 125.19 1504 1600 1760 2016 1000 1001 1004 1035 -HSync +Vsync
xrandr --newmode "1504x1000_60.00" 125.19 1504 1600 1760 2016 1000 1001 1004 1035 -HSync +Vsync
xrandr --addmode eDP-1 "1504x1000_60.00"