Skip to content

Instantly share code, notes, and snippets.

Bharadwaj Raju bharadwaj-raju

Block or report user

Report or block bharadwaj-raju

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wallpaper.py
# coding: utf-8
# Licensed under the MIT License
# Copyright © 2016 Bharadwaj Raju <bharadwaj.raju@keemail.me>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
@bharadwaj-raju
bharadwaj-raju / panel-alpha.sh
Created Aug 13, 2016
changes panel transparency depending on whether any window is maximized or not
View panel-alpha.sh
#!/usr/bin/env bash
#-- CONFIGURATION
transparent_alpha=0
maximized_alpha=100
interval=0
#--
alpha_prop_list=()
for prop in $(xfconf-query -c xfce4-panel -p /panels -l); do
View get_time_of day.py
def get_time_of_day(level=3):
'''
For detail level 2:
06 to 20: day
20 to 06: night
'''
'''
For detail level 3:
View WorkSaver.py
#!/usr/bin/env python
import subprocess
apps_to_save = ['Gedit', 'Writer']
battery_limit = 10 # in percent
def get_battery_percentage():
View LogMonitor.py
#!/usr/bin/env python
import os
import sys
import subprocess
import collections
import time
import mmap
try:
View Compose_Key
Compose + <apostrophe> <apostrophe> : "´" acute # ACUTE ACCENT
Compose + <minus> <asciicircum> : "¯" macron # MACRON
Compose + <asciicircum> <minus> : "¯" macron # MACRON
Compose + <underscore> <underscore> : "¯" macron # MACRON
Compose + <underscore> <asciicircum> : "¯" macron # MACRON
Compose + <space> <parenleft> : "˘" breve # BREVE
Compose + <parenleft> <space> : "˘" breve # BREVE
Compose + <quotedbl> <quotedbl> : "¨" diaeresis # DIAERESIS
Compose + <space> <less> : "ˇ" caron # CARON
Compose + <less> <space> : "ˇ" caron # CARON
View RandomCopier.py
#!/usr/bin/env python3
# Script to copy n random folders to a location
# Usage: RandomCopier.py [source folder] [destination folder] [number to copy]
import os
import sys
import shutil
import random
View RandomCopier.py
#!/usr/bin/env python3
# Script to copy n random folders to a location
# Usage: RandomCopier.py [source folder] [destination folder] [number to copy]
import os
import sys
import shutil
import random
View compile.sh
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
else
if [ -f "$1" ] ; then
NAME=${1%.*}
#mkdir $NAME && cd $NAME
case "$1" in
*.tar.bz2) tar xvjf ./"$1" ;;
@bharadwaj-raju
bharadwaj-raju / zsh.zsh
Last active May 1, 2016
My ultra-custom zshrc
View zsh.zsh
# Path to your oh-my-zsh installation.
export ZSH=/home/bharadwaj/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="bullet-train"
# Uncomment the following line to use case-sensitive completion.
You can’t perform that action at this time.