Page 1 of 1

How to remove Suspend or Hibernate or both from KDE kicker

Posted: Mon Jul 21, 2014 7:12 pm
by GDixon
After changing many scripts I finally found the right one to modify.

You can remove both Suspend and Hibernate or just what you don't want showing on the KDE kicker menu.
I use Suspend (to ram) but not Hibernate due to my hard drive being a ssd for example.
Edit the script below

/etc/bin/pm-is-supported

Code: Select all

#!/bin/sh
#
# Copyright 2007 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#



####### MAKE SURE YOU BACK UP THE ORIGINAL SCRIPT FOR THE FUTURE #######

. "/usr/lib/pm-utils/pm-functions"

help_options()

# EDIT OUT WHAT YOU DO NOT WANT ON THE MENU BELOW, FOR EXAMPLE I DELETED ALL
# BUT SUSPEND SINCE I HAVE A SSD----IT LOOKED LIKE THE LINE BELOW ORIGINALLY
# echo "pm-is-supported [--suspend | --hibernate | --suspend-hybrid ]"
# REBOOT AFTER YOUR DONE FOR THE CHANGES TO SHOW 

{
	echo "pm-is-supported [--suspend ]" # CHANGES MADE TO THIS LINE FOR SUSPEND ONLY
	echo
}

ARG="$(echo ${1#--}|tr - _)"

case "$ARG" in
	suspend)                               # ALSO CHANGED HERE 
		"check_$ARG" ;;
	help) 	help_options ;;
	*) 	help_options 1>&2
		exit 1 ;;
esac