This file contains 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 python3 | |
# Author: Serg Kolo | |
# Date: Oct 3rd, 2016 | |
# Description: Script for aligning the center of | |
# user's active window with the center of the monitor | |
# Tested on: Ubuntu 16.04 | |
# Written for: http://askubuntu.com/q/832720/295286 | |
from __future__ import print_function | |
import gi |
This file contains 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 python3 | |
# -*- coding: utf-8 -*- | |
# Author: Serg Kolo,<[email protected]> | |
# Date: September 28, 2016 | |
# Purpose: Monitoring script that shutsdown | |
# system if logout occurs or chrome exits | |
# Written for: http://askubuntu.com/q/828524/295286 | |
from gi.repository import Gdk |
This file contains 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
import subprocess | |
output = subprocess.check_output(['xrandr']).decode().split('\n') | |
found = None | |
for item in output: | |
if ' connected' in item: | |
found = True | |
print(item.split()[0]) | |
if found and item.startswith(' '): | |
print(item.split()[0]) |
This file contains 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 python3 | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import time | |
import os | |
def run_cmd(cmdlist): | |
""" Reusable function for running external commands """ |
This file contains 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 perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use Net::DBus; | |
use diagnostics; | |
sub dbus_sub |
This file contains 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 python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Author: Serg Kolo , contact: [email protected] | |
Date: August 9th, 2016 | |
Purpose: Spawns a command depending on current | |
viewport, as defined in ~/.workspace_commands.json | |
Written for: http://askubuntu.com/q/56367/295286 | |
Tested on: Ubuntu 16.04 LTS , Unity desktop |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
""" | |
Author: Sergiy Kolodyazhnyy | |
Date: August 2nd, 2016 | |
Written for: http://askubuntu.com/q/806212/295286 | |
Tested on Ubuntu 16.04 LTS | |
usage: xinput_monitor.py [-h] [-q] -d DEVICE |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
""" | |
Author: Sergiy Kolodyazhnyy | |
Date: August 2nd, 2016 | |
Written for: http://askubuntu.com/q/806212/295286 | |
Tested on Ubuntu 16.04 LTS | |
usage: dynamic_mouse_speed.py [-h] [-q] [-p POINTER] [-s SCROLL] [-v] |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
""" | |
Author: Sergiy Kolodyazhnyy | |
Date: August 2nd, 2016 | |
Written for: http://askubuntu.com/q/805515/295286 | |
Tested on Ubuntu 16.04 LTS | |
""" | |
import gi | |
gi.require_version('Gdk', '3.0') |
This file contains 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 python2 | |
import appindicator | |
import gtk | |
import urllib2 | |
class IPIndicator(appindicator.Indicator): | |
""" | |
An indicator displaying public IP address. |