Browse Source

Update all the various scripts to work in nixos

Samuel W. Flint 7 years ago
parent
commit
a40b480474

+ 1 - 1
command-statistics/change-directory-stats

@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;

+ 1 - 1
command-statistics/history-stats

@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 

+ 1 - 1
command-statistics/ssh-command-stats

@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;

+ 1 - 1
i3-battery-popup

@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/bin/sh
 
 ################################################################################
 # A script that shows a battery warning on i3wm                                #

+ 2 - 2
i3-move-workspace-to-current-display

@@ -11,7 +11,7 @@ def ipc_query(req="command", msg=""):
 if __name__ == "__main__":
     # Usage & checking args
     if len(argv) != 2:
-        print "Usage: i3-switch-workspace name-of-workspace"
+        print("Usage: i3-switch-workspace name-of-workspace")
         exit(-1)
 
     newworkspace = argv[1]
@@ -23,4 +23,4 @@ if __name__ == "__main__":
             active_display = w['output']
 
     # Moving workspace to active display
-    print ipc_query(msg="'workspace number " + newworkspace + "; move workspace to output " + active_display + "'")
+    print(ipc_query(msg="'workspace number " + newworkspace + "; move workspace to output " + active_display + "'"))

+ 1 - 1
i3-open-pdf

@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/sh
 
 cd
 

+ 3 - 3
isbn2bibtex.py

@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # Copyright FlintFam Systems Management, 2013.
 # 
 # This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
 
 import sys
 import urllib
-import urllib2
+#import urllib2
 import json
 import random
 import re
@@ -30,7 +30,7 @@ for arg in sys.argv:
 
 query = urllib.quote_plus(qstring)
 queryURL = jsonreq + query
-jsondata = urllib2.urlopen(queryURL).read()
+jsondata = urllib.urlopen(queryURL).read()
 data = json.loads(jsondata)
 
 for book in data['data']:

+ 1 - 1
screen-watchmr

@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/sh
 
 screen -AdmS mr -t Home watchmr ~
 screen -S mr -X screen -t Projects watchmr ~/Projects

+ 1 - 1
sshfs-helper

@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;

+ 1 - 1
watchmr

@@ -1,4 +1,4 @@
-#!/usr/bin/sh
+#!/bin/sh
 
 if [ $# -eq 1 ] ; then
     cd $1