Skip to content

Instantly share code, notes, and snippets.

View pawamoy's full-sized avatar
🤔
Ping me if I don't reply!

Timothée Mazzucotelli pawamoy

🤔
Ping me if I don't reply!
View GitHub Profile
@m-col
m-col / scroll_groups.py
Created May 6, 2020 19:14
scroll groups in qtile
"""
mod-m and mod-n scroll between groups right and left respectively.
Depending on the number of screens used the integers will need changing (where there are 3s, 4s and 5s below).
The numbers below are for 3 groups on one screen and 2 on the other - knowing that it can be worked out (hopefully!)
"""
def _scroll_screen(direction):
""" Scroll next group of subset allocated to specific screen """
if num_monitors > 1:
def _inner(qtile):
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/drop-down-terminal@gs-extensions.zzrough.org set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@ndarville
ndarville / django-pagination.html
Created September 2, 2012 15:45
Django Pagination Code
{% if page.has_other_pages %}
<div class="pagination">
<!-- Older page -->
{% if page.has_previous %}
<a href="?page={{ page.previous_page_number }}" title="Go to the older threads.">&lt;&nbsp;Older</a>
{% endif %}
<!-- First page -->
{% if current_page > 4 %}
<a href="?page=1">1</a>&nbsp;&#8943;