%% Need to pull out the binary search code in musicUtil/mkplaylist and put it here somewhere. Also, needs to be prototyped more like sort() and take a coderef for the comparison. %% cdburn -I'd like it to do both data CDs and CD-DA with cdrdao. Based on the file extension? .iso or .toc -Change this to use strict and also make the docs use the $opt_* vars. -Need to add overburn support. Here are the switches: $ cdrecord driveropts=burnfree -sao -overburn dev=/dev/hdc foo.iso -Maybe take out the default 24x and make it not specify at all? This would handle future faster drives without adjustment. %% hibernate - This script's name conflicts with hibernate in the hibernate-script package. Not sure what to do about it yet, probably need better names for both suspend and hibernate. - Also, may be a good idea to group suspend and hibernate into a subdir %% megawho - Add info in usage: Please don't be a jerk with mega hits to whois services. %% router-reset -Possibly add logging of when this is called. %% sshtun - Write a document explaining: - what this is all for - the issues - things you need to do - things you need to install - and how to use the script. - This project needs its own subdirectory %% xgo.hs - Decouple the data about what hardware to look for (identifiers) from the script. New file in /etc perhaps ----- 2007-07-08 rewrite What happens now: - locchk (actually was named locCheck) is supposed to be installed in /etc/init.d/. Runs at boot to detect our location. - Determines laptop location based on looking for the USB keyboard (or KVM) - Checks to see if it can find the mouse, which has been a known problem in the past. - Writes these things to a file: /var/tmp/locCheck - xgo script is used to call startx for us - Processes args - If suppress start-up was specified, export that as XGOSUPPRESS=1 - This is for .xsession - Was a profile requested? - No: check the file from locchk, set the profile from that - Yes: Validate it's a known profile - Was no-action specified? - Yes: Show what would have been done. - No: exec startx with proper layout ----- todo - Check for running X server, do not run again. How do we do this? $ pgrep X And check for 0 exit code (success) - Need to add the location searching stuff, but make it store results in the environment like suppress stuff. - Add default behavior of cd into user's home directory prior to starting X, with a switch to suppress this behavior as well. ----- pass environment around like this: #! /usr/bin/env runhaskell module Main where import System.Posix.Env ( putEnv ) import System.Process ( runCommand ) main = do putEnv "FOO=1" runCommand "echo $FOO" New script will need to symlink the image in ~/artwork/desktop-art/ ----- Stuff for figuring out docked status, not used at this time: keyboards :: [String] keyboards = [ "Justcom Technology" -- Raritan KVM switch , "CHESEN" -- USB to PS/2 adapter ] keyboards2 = [ "CHESEN" , "Justcom Technology" ] keyboards3 = [ "CHESEN" , "fuck" ] searchKeyboard :: String -> Bool searchKeyboard devs = any match keyboards where match :: String -> Bool match keyboard = case (matchRegex (mkRegex keyboard) devs) of Nothing -> False _ -> True %% general notes -All apps should check for binary dependencies like cdlabelgen, vorbiscomment, etc -Change all scripts to use here document for usage notes %% scripts going public Candidates for this: - megawho Scripts slated for public release need some things: - Author email address - Version number - Uniform and comprehensive help - More idiot-proofing with args - Licensing