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
Member
From: ON, Canada
Registered: 2008-10-25
Posts: 528

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.


Siduction
Debian Sid
Xfce 4.18

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: 11,485

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.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- 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.012 seconds, 7 queries executed - Memory usage: 523.67 KiB (Peak: 528.98 KiB) ]