Skip to main content
Replace automatic Python syntax highlighting with Bash one
Source Link
Benjamin Loison
  • 5.8k
  • 4
  • 20
  • 37

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 
python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 

or drop a function into your .bashrc. I use apython here but you could override 'python'

function apython() { /usr/bin/python $* notify-send 'Alert' "python $* is complete" paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga } 
function apython() { /usr/bin/python $* notify-send 'Alert' "python $* is complete" paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga } 

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 

or drop a function into your .bashrc. I use apython here but you could override 'python'

function apython() { /usr/bin/python $* notify-send 'Alert' "python $* is complete" paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga } 

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 

or drop a function into your .bashrc. I use apython here but you could override 'python'

function apython() { /usr/bin/python $* notify-send 'Alert' "python $* is complete" paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga } 
added 281 characters in body
Source Link
rtaft
  • 2.4k
  • 1
  • 18
  • 37

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 

or drop a function into your .bashrc. I use apython here but you could override 'python'

function apython() { /usr/bin/python $* notify-send 'Alert' "python $* is complete" paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga } 

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga 

or drop a function into your .bashrc. I use apython here but you could override 'python'

function apython() { /usr/bin/python $* notify-send 'Alert' "python $* is complete" paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga } 
Source Link
rtaft
  • 2.4k
  • 1
  • 18
  • 37

Why use python at all? You might forget to remove it and check it into a repository. Just run your python command with && and another command to run to do the alerting.

python myscript.py && notify-send 'Alert' 'Your task is complete' && paplay /usr/share/sounds/freedesktop/stereo/suspend-error.oga