Last active
August 29, 2015 14:18
-
-
Save g-eorge/228643bc086bf7f994c0 to your computer and use it in GitHub Desktop.
Open a terminal in i3 window manager with different font when not on the default display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bindsym Mod1+Return exec --no-startup-id term_for_display.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
from subprocess import check_output | |
out = check_output(["i3-msg", "-t", "get_workspaces"]) | |
workspaces = json.loads(out.decode("utf-8")) | |
focused_workspace = filter(lambda x: x["focused"], workspaces) | |
print(next(focused_workspace)["output"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
hidpi_display="eDP1" | |
current_display=$(get_display.py) | |
if [ "$current_display" != "$hidpi_display" ]; then | |
urxvt -fn "xft:Terminus:pixelsize=18,style=Regular" | |
else | |
urxvt | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment