/[antiright]/antiright/src/ACE
ViewVC logotype

Diff of /antiright/src/ACE

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.36 by jefbed, Wed Dec 29 20:06:30 2004 UTC revision 1.37 by jefbed, Tue Jan 18 22:36:06 2005 UTC
# Line 75  ACE_Panel() Line 75  ACE_Panel()
75  {  {
76      $ARSHELL -Am -r 6\      $ARSHELL -Am -r 6\
77          -AL\          -AL\
78            -W 'ACE Panel'\
79          'ACE -A Jukebox'\          'ACE -A Jukebox'\
80          'ACE Alarm'\          'ACE Alarm'\
81          'ACE Calculator'\          'ACE Calculator'\
# Line 128  Desktop() Line 129  Desktop()
129  }  }
130  return_pseudorandom_color()  return_pseudorandom_color()
131  {  {
132      local colors="powderblue lavender pink wheat black darkgeay darkred\      local colors="powderblue lavender pink wheat azure antiquewhite\
133   lightsteelblue gainsboro midnightblue"   lightsteelblue gainsboro thistle darkseagreen"
134      local ones=$(date +%S | cut -c 2)      local ones=$(date +%S | cut -c 2)
135      echo $colors | awk '{print $'$(($ones+1))'}'      echo $colors | awk '{print $'$(($ones+1))'}'
136  }  }
# Line 200  Settings() Line 201  Settings()
201  {  {
202      ACE_Check_Configuration_File      ACE_Check_Configuration_File
203      TMP=${TMPDIR:-/tmp}/ACE.$$      TMP=${TMPDIR:-/tmp}/ACE.$$
204      echo "$ARSHELL -Am -r 18"\\ > $TMP      echo "$ARSHELL -W Settings -Am -r 18"\\ > $TMP
205      for title in $(ACE_record_titles)      for title in $(ACE_record_titles)
206        do        do
207        echo " \"ACE -A Settings_Node $title\""\\ >> $TMP        echo " \"ACE -A Settings_Node $title\""\\ >> $TMP
# Line 283  CD_Player() Line 284  CD_Player()
284  KillJuke()  KillJuke()
285  {  {
286      kill $(ps xa | grep JUKE | grep -v grep | awk '{print $1}')      kill $(ps xa | grep JUKE | grep -v grep | awk '{print $1}')
287      kill $(ps xa | grep tail | grep ~/.antiright_mp3s | grep -v grep | awk '{print $1}')      kill $(ps xa | grep tail | grep ~/.antiright_mp3s | grep -v grep\
288            | awk '{print $1}')
289  }  }
290  Juke_Song()  Juke_Song()
291  {  {
292          echo Playing $(grep Playing ~/.antiright_mp3s | tail -n 1 | cut -d ' ' -f 5-)          echo Playing $(grep Playing ~/.antiright_mp3s | tail -n 1\
293                | cut -d ' ' -f 5-)
294  }  }
295  Install_BitchX()  Install_BitchX()
296  {  {
# Line 296  Install_BitchX() Line 299  Install_BitchX()
299  }  }
300  create_fake_song_file()  create_fake_song_file()
301  {  {
302          echo 'Playing MPEG stream from http://www.nongnu.org/antiright mp3' > ~/.antiright_mp3s          echo 'Playing MPEG stream from http://www.nongnu.org/antiright mp3'\
303                > ~/.antiright_mp3s
304  }  }
305  Juke()  Juke()
306  {  {
# Line 307  Juke() Line 311  Juke()
311          fi          fi
312          local mp3player="$(ACE -r mp3_player)"          local mp3player="$(ACE -r mp3_player)"
313          local mp3dir="$(ACE -r mp3_dir)"          local mp3dir="$(ACE -r mp3_dir)"
314          local stop_play="killall $mp3player; rm -f ~/.antiright_mp3s; ACE -A create_fake_song_file"          local stop_play="killall $mp3player; rm -f ~/.antiright_mp3s;\
315          local play_next="killall $mp3player; $mp3player -Z $mp3dir/*.mp3 2>> ~/.antiright_mp3s"   ACE -A create_fake_song_file"
316            local play_next="killall $mp3player; $mp3player -Z $mp3dir/*.mp3\
317     2>> ~/.antiright_mp3s"
318          local killjukebox="ACE -A KillJuke"          local killjukebox="ACE -A KillJuke"
319          create_fake_song_file          create_fake_song_file
320          $ARSHELL -W JUKE\          $ARSHELL -W JUKE\
# Line 321  Juke() Line 327  Juke()
327  }  }
328  Jukebox()  Jukebox()
329  {  {
330      xsetroot -solid slategrey &      xsetroot -solid darkgrey &
331      xterm -geometry 80x12-0+0\      xterm -geometry 80x12-0+0\
332          -bg slategrey -bd slategrey\          -bg darkgrey -bd darkgrey\
333          -xrm "*overrideRedirect: True"\          -xrm "*overrideRedirect: True"\
334          -xrm ".xterm.vt100.background: slategrey"\          -xrm ".xterm.vt100.background: darkgrey"\
335          -e ACE -A Juke &          -e ACE -A Juke &
336  }  }
337  Calculate()  Calculate()
# Line 387  Uptime() Line 393  Uptime()
393  }  }
394  Administration_Panel()  Administration_Panel()
395  {  {
396      $ARSHELL -W Administration -Am -r 4\      $ARSHELL -W Administration -Am -r 5\
397          'ACE Fix_File_Permissions'\          'ACE Fix_File_Permissions'\
398          'ACE Root_Shell'\          'ACE Root_Shell'\
399          'ACE See_All_Processes'\          'ACE See_All_Processes'\
400          'ACE See_All_Users'\          'ACE See_All_Users'\
401          'ACE See_Disk_Info'\          'ACE See_Disk_Info'\
402            'ACE SysV_Init'\
403          'ACE See_Open_Ports'\          'ACE See_Open_Ports'\
404          'ACE See_User_Processes'\          'ACE See_User_Processes'\
405          'ACE System_Monitor'\          'ACE System_Monitor'\
# Line 401  Administration_Panel() Line 408  Administration_Panel()
408          "$ARSHELL -Am -UL uptime -xrm '*fontList: fixed' & # Uptime"\          "$ARSHELL -Am -UL uptime -xrm '*fontList: fixed' & # Uptime"\
409          "$ARSHELL\          "$ARSHELL\
410   -W 'I/O Statistics' -Am -UL iostat -xrm '*fontList: fixed' & # I/O_Statistics"\   -W 'I/O Statistics' -Am -UL iostat -xrm '*fontList: fixed' & # I/O_Statistics"\
411          'ACE -A Load_Meter'          'ACE -A Load_Meter'\
412                'ACE -A System_Accounting'\
413                "xload -bg red4 -fg yellow -hl yellow & # X_Load"
414    }
415    System_Accounting()
416    {
417        sar | $ARSHELL\
418            -Am -Aw -p -W System_Accounting\
419            -xrm "*XmText.fontList: fixed"
420  }  }
421  Fix_File_Permissions()  Fix_File_Permissions()
422  {  {
423      chmod og-rwx ~/.*/*      chmod og-rwx ~/.*/*
424  }  }
 Root_Shell()  
 {  
     xterm -e su  
 }  
425  See_All_Processes()  See_All_Processes()
426  {  {
427      ps xau | $ARSHELL -W 'All Processes' -Am -Aw -p      ps xau | $ARSHELL -W 'All Processes' -Am -Aw -p
# Line 487  Open_Display() Line 498  Open_Display()
498  {  {
499      ACE_peer_operation 'xhost +'      ACE_peer_operation 'xhost +'
500  }  }
501  Open_URL()  Show_Runlevel_Information()
 {  
     ACE -L 'Open URL' xterm -e lynx  
 }  
 FTP()  
502  {  {
503      ACE_peer_operation ftp      runlevel=$($ARSHELL -At "Runlevel:" | cut -d : -f 2)
504        $ARSHELL -Al "$(ls /etc/init.d.d/rc${runlevel}.d)" -E "echo Dismiss"
505  }  }
506  Telnet()  SysV_Delete_Service()
507  {  {
508      ACE_peer_operation telnet      local runlevel=$($ARSHELL -At Runlevel:)
509        rm /etc/init.d/rc${runlevel}.d/*${1}
510  }  }
511  SSH()  SysV_Service()
512  {  {
513      ACE_peer_operation ssh      local order=$($ARSHELL -Al "Enter 'runlevel:order'"\
514            -At "$1:" "ACE -A Show_Runlevel_Information"\
515            "ACE -A SysV_Delete_Service $1" | cut -d : -f 2-)
516        local runlevel=$(echo $order | cut -d : -f 1)
517        local order=$(echo $order | cut -d : -f 2)
518        cp /etc/init.d/$1 /etc/init.d/rc${runlevel}.d/S${order}${1}
519  }  }
520  SFTP()  SysV_Init()
521  {  {
522      ACE_peer_operation sftp      local service=$(ls /etc/init.d | grep -v '.d' | $ARSHELL -Am\
523            -Aw -p -At Modify: | cut -d : -f 2)
524        if [ "$service" != "" ] && [ "$service" != "Dismiss" ]; then
525            SysV_Service $service &
526            SysV_Init &
527        fi
528  }  }
529    
530  ACE_show_usage_and_exit()  ACE_show_usage_and_exit()
# Line 514  ACE_show_usage_and_exit() Line 533  ACE_show_usage_and_exit()
533          [+-A ARG] [--] ARGS..."          [+-A ARG] [--] ARGS..."
534      exit 2      exit 2
535  }  }
 Manual_Menu()  
 {  
     $ARSHELL 'xterm -e man ACE' 'xterm -e man arcd' 'xterm -e system.antiright'  
 }  
 Help_Menu()  
 {  
     $ARSHELL 'ACE -A Manual_Menu \# Manuals'\  
         -Al 'AntiRight is a lightweight_desktop environment.'\  
         -Al 'Copyright 2004, Jeffrey_Bedard'\  
         -Al 'Licensed under the GNU General Public License'\  
         -Al 'There is NO Warranty, Use at your own risk.'\  
         -geometry 300x100+0+0  
 }  
 View_Menu()  
 {  
     $ARSHELL 'ACE A.C.E' 'ACE -A Administration_Panel'\  
         'ACE -A File_System_Panel' 'ACE -A Network_Panel'\  
         'ACE -A Theme_Panel'  
 }  
 File_Menu()  
 {  
     $ARSHELL 'ACE File_Manager'  
 }  
536    
537  while getopts :ctp:r:L:V:A: OPT; do  while getopts :ctp:r:L:V:A: OPT; do
538      case $OPT in      case $OPT in

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26