Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.65 KB | None | 0 0
  1. #!/bin/bash
  2. ans=$(zenity  --title="Conky Config App" --list  --width=300 --height=300 --text "Select task from the list below." --radiolist  --column "Run" --column "Task" FALSE "Use-default-Conky-theme" FALSE "Use-Conky-gray-theme" FALSE "Start-Conky" FALSE "Kill-Conky" FALSE "Fix-Conky-covering-windows" FALSE "Remove-Conky-from-Startup" FALSE "Add-Conky-to-Startup" FALSE "Delay-Conky-Startup-time" --separator=":")
  3.  
  4. arr=$(echo $ans | tr "\:" "\n")
  5. clear
  6. for x in $arr
  7. do
  8.  
  9.     if [ $x = "Kill-Conky" ]
  10.     then
  11.         echo "=================================================="
  12.         echo -e $RED"Conky"$ENDCOLOR
  13.         /usr/bin/notify-send "Killing Conky"
  14.         killall conky
  15.     fi
  16.     if [ $x = "Start-Conky" ]
  17.     then
  18.         echo "=================================================="
  19.         echo -e $RED"Starting Conky"$ENDCOLOR
  20.         /usr/bin/notify-send "Starting Conky"
  21.         conky
  22.     fi
  23.     if [ $x = "Remove-Conky-from-Startup" ]
  24.     then
  25.         echo "=================================================="
  26.         echo -e $RED"Removing Conky from Startup Applications"$ENDCOLOR
  27.         /usr/bin/notify-send "Removing Conky from Startup Applications"
  28.         mkdir ~/.conky-backup
  29.                 cp ~/.config/autostart/.startconky.sh.desktop ~/.conky-backup
  30.                 rm ~/.config/autostart/.startconky.sh.desktop
  31.  
  32.     fi
  33.     if [ $x = "Use-default-Conky-theme" ]
  34.     then
  35.         echo "=================================================="
  36.         echo -e $RED"Setting up the Conky default theme"$ENDCOLOR
  37.         /usr/bin/notify-send "Setting up the Conky default theme"
  38.         killall conky
  39.                 rm ~/.conkyrc
  40.                 cp ~/.conkyrc.default ~/.conkyrc
  41.                 conky
  42.     fi
  43.  
  44.     if [ $x = "Use-Conky-gray-theme" ]
  45.     then
  46.         echo "=================================================="
  47.         echo -e $RED"Setting up the Conky Gray theme"$ENDCOLOR
  48.         /usr/bin/notify-send "Setting up the Conky Gray theme"
  49.         killall conky
  50.                 rm ~/.conkyrc
  51.                 cp ~/.conkyrc.gray ~/.conkyrc
  52.                 conky
  53.  
  54.         fi
  55.  
  56.     if [ $x = "Fix-Conky-covering-windows" ]
  57.     then
  58.         echo "=================================================="
  59.         echo -e $RED"Killing/Starting Conky"$ENDCOLOR
  60.         /usr/bin/notify-send "Killing/Starting Conky"
  61.         killall conky && conky
  62.     fi
  63.  
  64. if [ $x = "Add-Conky-to-Startup" ]
  65.     then
  66.         echo "=================================================="
  67.         echo -e $RED"Adding Conky to Startup Applications"$ENDCOLOR
  68.         /usr/bin/notify-send "Adding Conky to Startup Applications"
  69.         cp ~/.conky-backup/.startconky.sh.desktop ~/.config/autostart/
  70.     fi
  71.  
  72. if [ $x = "Delay-Conky-Startup-time" ]
  73.     then
  74.         echo "=================================================="
  75.         echo -e $RED"Editing startconky.sh"$ENDCOLOR
  76.         /usr/bin/notify-send "Editing startconky.sh"
  77.         gksudo gedit /.startconky.sh
  78.     fi
  79. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement