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
| switch = lambda funcs, query: funcs[query] if query in funcs else funcs['default'] | |
| # Porting the switch statement to python | |
| # GPL Christian Påbøl Jacobsen @mrcpj1998 |
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
| import praw, subprocess | |
| SUBREDDIT = "wallpapers" | |
| r = praw.Reddit(client_id="", | |
| client_secret="", | |
| user_agent="WallpaperGrabber by /u/ParanoidBox") | |
| allowedFormats = ['jpg', 'png'] | |
| urls = [post.url for post in r.subreddit(SUBREDDIT).hot() if post.url.split(".")[-1] in allowedFormats] | |
| subprocess.call(['feh', "--bg-fill", urls[0]) |
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 | |
| #$1 is low percent | |
| #$2 is min percent | |
| # Original script: github.com/mrcpj1998 | |
| # MIT License | |
| # Batpercent script sourced from private github.com/chregon2001 | |
| lockFile="/tmp/batman.lck" | |
| export BATMAN=true | |
| hasWarned=1 | |
| if [ -f $lockFile ]; |
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/python | |
| import praw | |
| import sys | |
| import random | |
| from pprint import pprint | |
| import subprocess | |
| SUBREDDIT = sys.argv[1] if len(sys.argv) > 1 else "offensive_wallpapers" | |
| reddit = praw.Reddit(client_id='2RBn1ZOfEqZFkw', | |
| client_secret='9sIGnCtbEd3Stio2v4_Nbljlh2g', |
NewerOlder