Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-06-09 17:51:51

Bart1972
Member
Registered: 2020-06-09
Posts: 2

Send message like MWM f.send_msg

Hi,
I am a newby of xfce.
I wonder if is possible send message in the same way MWM does by means of f.send_msg.
Thanks in advance for the help.

Offline

#2 2020-06-09 19:41:49

eriefisher
Wanderer
From: ON, Canada
Registered: 2008-10-25
Posts: 988

Re: Send message like MWM f.send_msg

I don't know how Motif works so stating what your looking to achieve would be helpful rather than digging into the whole MWM environment.


But it's all right, when you're all in pain and you feel the rain come down
It's alright, when you find your way, then you see it disappear
It's alright....
Chris Cornell

Offline

#3 2020-06-09 20:03:25

Bart1972
Member
Registered: 2020-06-09
Posts: 2

Re: Send message like MWM f.send_msg

On the focus of a window i want to send a custom  message or signal.

Offline

#4 2020-06-09 23:05:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,644

Re: Send message like MWM f.send_msg

Something like this?

#!/bin/bash

PROCESS="mousepad"
COUNT=0

while true
do

   if [ "$(ps -e | grep $(xdotool getwindowpid $(xdotool getwindowfocus)) | grep -v grep | awk '{print $4}')" == "$PROCESS" ];
   then
	COUNT=$((COUNT+1))
	echo $COUNT
   fi

   sleep 1

done

...currently coded to count the approximate seconds that a particular process is in focus. You can change this to do anything you want.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 524.23 KiB (Peak: 525.2 KiB) ]