Skip to content

Instantly share code, notes, and snippets.

@LeandroLovisolo
Last active August 29, 2015 14:09
Show Gist options
  • Save LeandroLovisolo/7d25271504283543f305 to your computer and use it in GitHub Desktop.
Save LeandroLovisolo/7d25271504283543f305 to your computer and use it in GitHub Desktop.
i3 window manager script that toggles the visibility of the currently focused window's title bar
#!/usr/bin/env python3
# Save this script to ~/.i3/toggle-title-bar.py, then add the following to
# your ~/.i3/config file:
#
# # toggle title bar
# bindsym $mod+t exec ~/.i3/toggle-title-bar.py
#
# Author: Leandro Lovisolo <[email protected]>
# https://github.com/LeandroLovisolo
from gi.repository import i3ipc
i3 = i3ipc.Connection()
border = i3.get_tree().find_focused().get_property("border")
if border == "normal":
i3.command("border 1pixel")
else:
i3.command("border normal")
@gciruelos
Copy link

>LeandroL
>not un capo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment