Trash Program

  • Uploaded by: Frank
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Trash Program as PDF for free.

More details

  • Words: 236
  • Pages: 2
#!usr/bin/perl #Program was created by (FLJR90) "FrankQC" #On the CNET Forums.

to help show/empty trashcan

use Term::ANSIColor; system("clear"); print "Type /? for help\n"; &main; sub main { print "What would you like to do?> "; chomp($input = <>); if($input eq "/showtrash") { &showtrash; &main; }elsif($input eq "/deletetrash") { &deletetrash; &main; }elsif($input eq "/showtrash?") { print color 'bold blue'; print "/showtrash will open your Trashcan in GUI window.\n"; print color 'reset'; &main; }elsif($input eq "/deletetrash?") { print color 'bold blue'; print "/deletetrash will delete your Trashcan.\n"; print color 'reset'; &main; }elsif($input eq "/?") { &commands; &main; }elsif($input eq "/exit") { system("clear"); exit; }elsif($input eq "/exit?") { print color 'bold blue'; print "/exit exits you from the program.\n"; print color 'reset'; }else{ print "Your input of \"$input\" does not exist.\n"; &main; } } sub showtrash { system("nautilus ~/.local/share/Trash/files"); &main; } sub deletetrash { print "Are you sure you want to delete trash? (Y/n)> "; chomp($deletequestion = <>); if($deletequestion eq "Y") {

system("sudo rm -Rf ~/.local/share/Trash/files/*"); print color 'bold blue'; print "Trash got emptied.\n"; print color 'reset'; &main; }elsif($deletequestion eq "n") { print color 'bold blue'; print "User does not want to delete trash.\n"; print color 'reset'; &main; }else{ print "Your input of \"$deletequestion\" does not exist.\n"; &main; } } sub commands { print color 'bold blue'; print "Available commands are: /showtrash /deletetrash /exit\n"; print "/showtrash? /deletetrash? /exit? will tell you what they do.\n"; print color 'reset'; &main; }

Related Documents

Trash Program
May 2020 11
Ordinance Trash
December 2019 24
Talkin Trash
November 2019 16
Program
May 2020 25

More Documents from ""

Ct-g2175 Panasonic Diagrama
December 2019 36
May 2020 12
Irc Bot V.2.1
June 2020 15
980908_02rev
May 2020 12
Irc Bot V.2.0
May 2020 16