Skip to content

Instantly share code, notes, and snippets.

@SebastianJarsve
SebastianJarsve / indentation.py
Created August 13, 2014 06:51
To use with Pythonista
import editor, console
script = editor.get_text()
selection = editor.get_selection()
selected_text = script[selection[0]:selection[1]].splitlines()
indentation = int(console.input_alert('Indent'))
replacement = []
for line in selected_text:
if indentation > 0:
@SebastianJarsve
SebastianJarsve / TicTacToe.py
Created November 4, 2014 05:31
TicTacToe.py
# coding: utf-8
import ui, console
class Grid (object):
def __init__(self):
self.cells = [0 for i in range(9)]
self.current_player = 1
def add_brick(self, pos):
@SebastianJarsve
SebastianJarsve / dwm-nomonocleborders-20190607-cb3f58a.diff
Created June 7, 2019 07:08
dwm patch which disables borders on non-floating clients in the monocle layout
From ebf49ca1785c9ed259d04d26d30a16e09554f382 Mon Sep 17 00:00:00 2001
From: Sebastian Jarsve <sebastianjarsve@gmail.com>
Date: Fri, 7 Jun 2019 08:08:13 +0200
Subject: [PATCH] remove borders from nonfloating clients in monocle layout
---
dwm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dwm.c b/dwm.c
From 54b3ebd727272af097e7dfb935b724f871fdde01 Mon Sep 17 00:00:00 2001
From: Sebastian Jarsve <sebastianjarsve@gmail.com>
Date: Tue, 26 Nov 2019 09:11:22 +0100
Subject: [PATCH] Remove borders from specific clients
Remove borders from clents when in monocle layout and in tile layout
when there is only one client.
---
dwm.c | 13 +++++++++++++
1 file changed, 13 insertions(+)