Skip to content

Instantly share code, notes, and snippets.

View Jacob-Vlijm's full-sized avatar

Jacob Vlijm Jacob-Vlijm

  • The Netherlands
View GitHub Profile
@Jacob-Vlijm
Jacob-Vlijm / w_resize.py
Created January 25, 2015 18:52
window resize script for XFCE (Xubuntu), depends on wmctrl
#!/usr/bin/env python3
import subprocess
import sys
arg = sys.argv[1]
WA_correction = 48
def get(command):
return subprocess.check_output(["/bin/bash", "-c", command]).decode("utf-8")
@Jacob-Vlijm
Jacob-Vlijm / snap left - right
Last active August 29, 2015 14:13
Script that works like aero snap, meant for Metacity (can be used on multiple screens)
#!/usr/bin/env python3
"""
Copyright (C) 2014 Jacob Vlijm
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version. This
program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. You
@Jacob-Vlijm
Jacob-Vlijm / paste_snippets.py
Last active September 22, 2015 23:20
Script to paste textual snippets in applications that past with the key combination Ctrl+V. It needs xsel and xdotool to be installed
#!/usr/bin/env python3
"""
Copyright (C) 2014 Jacob Vlijm
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version. This
program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. You
@Jacob-Vlijm
Jacob-Vlijm / add_to_launcher.py
Last active August 29, 2015 14:07
script for Ubuntu+Unity to add an application( 's desktop file) to the launcher
#!/usr/bin/env python
"""
Copyright (C) 2014 Jacob Vlijm
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version. This
program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. You
@Jacob-Vlijm
Jacob-Vlijm / password_wallpaper.py
Last active August 29, 2015 14:07
background script to password protect wallpaper changing in Ubuntu 14.04
#!/usr/bin/env python3
"""
Copyright (C) 2014 Jacob Vlijm
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version. This
program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. You
@Jacob-Vlijm
Jacob-Vlijm / hide_launcher.py
Last active April 5, 2016 20:21
script, to run in the background, for Ubuntu 14.04 + Unity, to hide the Unity launcher only on specific viewports. Requires wmctrl to be installed
#!/usr/bin/env python3
"""
Copyright (C) 2014 Jacob Vlijm
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version. This
program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. You
@Jacob-Vlijm
Jacob-Vlijm / run_on_viewport.py
Last active August 29, 2015 14:07
script to run (and keep running) application(s) on defined viewports of Ubuntu 14.04, requires wmctrl to be installed
#!/usr/bin/env python3
"""
Copyright (C) 2014 Jacob Vlijm
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or any later version. This
program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details. You
should have received a copy of the GNU General Public License along with this