Git Product home page Git Product logo

Comments (2)

rumly111 avatar rumly111 commented on June 3, 2024

But the real reason I want it is because I have a script that counts down N minutes then plays a BEEP sound, and optionally displays a notification. Obviously I don't want 2 notifications to be shown. Or I can not display a notification, but kitty's notification message just says a command has finished running, but which command?

And here's the script I use:

#!/bin/bash

MINS=0

if [ $# -gt 0 ] ; then
	if echo $1 | grep -q '^[0-9]\+$' ; then
		MINS=$1
	else
		echo "Invalid argument: $1"
		echo "Usage: $0 <minutes>"
		exit -1
	fi
fi

for i in `seq $MINS -1 1` ; do
	echo "$i minutes remaining"
	sleep 1m
done

mpv --really-quiet --no-video /home/joseph/Stuff/beep.wav

if [ $# -gt 1 ] ; then
	shift
	notify-send -t 2500 "$*"
fi

from kitty.

kovidgoyal avatar kovidgoyal commented on June 3, 2024

This is not really possible. kitty has no way to know what
command is running*. That information is in your shell. If you want this
level of customization you should instead implement this in your shell
(IIRC fish shell for example supports this already). Use the kitty
notification protocol to implement the notifications
https://sw.kovidgoyal.net/kitty/desktop-notifications/

  • well technically, this could be added to the kitty shell integration
    scripts so that the shell informs kitty of the running command when it
    informs it of the output, but this is pretty complex to implement.

Also, filtering by command doesnt really make sense. One typically can
run all sorts of complex command lines with chained pipes etc, there is
no simple single "command" to filter by.

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.