using Conky to display an image without a window [SOLVED]

Add functionality to your desktop
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: using Conky to display an image without a window [SOLVED]

Post by Logansfury »

Koentje wrote: Mon Jan 29, 2024 9:33 pm I have a rooted samsung S5 that i use as IP camera and to control the thing i login with adb and use similar commands to swipe, move finger around, tap, double tap, etc.. i have all sorts of scripts to focus camera, enable/disable flashlight, brightness control, network control, reboot/shutdown, etc. Without ever touching the screen i control all camera aspects and more.

Love it! :mrgreen:
This sounds like the kind of things I automate on my android Samsung Note 9 with the app Tasker.

Did you notice I made a new thread? I was looking to focus the conky displayed image over all other open windows. Do you know a way?
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: using Conky to display an image without a window [SOLVED]

Post by Koentje »

I don't know tasker, but with the input command you can do a lot!

Focus camera script

Code: Select all

#!/system/xbin/bash
#
#
echo
echo "Focus camera IP Webcam (com.pas.webcam)"
echo "---------------------------------------"
echo

#
# Check if app is running
echo "-* Check if app is running"
app=$(dumpsys power | grep "PARTIAL_WAKE_LOCK" | grep "IP Webcam")
if [ "$app" = "" ]; then
  echo "-* App is not running, exit!"
  echo
  exit
else
  echo "-* App is running"
fi

#
# Check display status
echo "-* Check display status"
disp=$(dumpsys power | grep "Display Power" | awk -F "state=" '{print $2}')
echo "-* Display = $disp"

#
# Unlock screen if locked
if [ "$disp" = "OFF" ]; then
  input keyevent 26
  echo "-* Pushed powerbutton to unlock"
  sleep 1
else
  echo "-* No need to unlock"
fi

#
# Start focus events
echo "-* Tap focus button"
input tap 655 387
#echo "-* Tap FOCUS"
#input tap 368 235
#echo "-* Tap OK"
#input tap 660 573

#
# Lock screen
input keyevent KEYCODE_SOFT_SLEEP
echo "-* Screen locked"

echo
echo "Done!"
echo
I will check that topic..
Image
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: using Conky to display an image without a window [SOLVED]

Post by Logansfury »

Koentje wrote: Mon Jan 29, 2024 9:43 pm I will check that topic..
I appreciate that. How does one relay the input command to the phone? Using Terminex?
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: using Conky to display an image without a window [SOLVED]

Post by Koentje »

No.. i make a connection with adb and execute a script.

adb connect 192.168.1.22:5555 and i'm on the commandline..
Image
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: using Conky to display an image without a window [SOLVED]

Post by Logansfury »

Koentje wrote: Mon Jan 29, 2024 10:11 pm No.. i make a connection with adb and execute a script.

adb connect 192.168.1.22:5555 and i'm on the commandline..
Oh far out! Tasker has ADB Wifi implementation and can do a lot of cool stuff when ADB is enabled on the phone by my windows PC. (Has to be re-enabled with every reboot/restart)

One of the things I used EvenGhost automation program on windows for was to immediately identify any of my phones plugging in and then grant ADB access.
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: using Conky to display an image without a window [SOLVED]

Post by Koentje »

You can make a udev event for when the phone is plugged into the usb port.
I had an old huawei that always mounted a gadget cdrom that only works in windows and i don't want it to do that. So when the phone was plugged in, the udev rule immediatly unmounted that shit!
You can do that with any usb device.. let it start a script at connect.

I have a Corsair K70 RGB keyboard and it's connected to a switch with my NAS. But when i switch to the NAS the leds go to their standard rgd wave animation, "faaak i'm on LSD" mode!! :lol:
I made a udev rule that identifies when plugged in (switched) and then run a command to switch the led profile of my keyboard.

/etc/udev/rules.d/50-keyboard-conect.rules

Code: Select all

ATTRS{idVendor}=="1b1c", ATTRS{idProduct}=="1b49", RUN+="/root/bin/kbd" 
With lsusb you get your vendor and product ID's.
Image
User avatar
Logansfury
Level 6
Level 6
Posts: 1237
Joined: Fri Oct 27, 2023 4:08 pm
Location: Las Vegas NV, USA

Re: using Conky to display an image without a window [SOLVED]

Post by Logansfury »

Koentje wrote: Mon Jan 29, 2024 10:39 pm You can make a udev event for when the phone is plugged into the usb port.
I had an old huawei that always mounted a gadget cdrom that only works in windows and i don't want it to do that. So when the phone was plugged in, the udev rule immediatly unmounted that shit!
You can do that with any usb device.. let it start a script at connect.

I have a Corsair K70 RGB keyboard and it's connected to a switch with my NAS. But when i switch to the NAS the leds go to their standard rgd wave animation, "faaak i'm on LSD" mode!! :lol:
I made a udev rule that identifies when plugged in (switched) and then run a command to switch the led profile of my keyboard.

/etc/udev/rules.d/50-keyboard-conect.rules

Code: Select all

ATTRS{idVendor}=="1b1c", ATTRS{idProduct}=="1b49", RUN+="/root/bin/kbd" 
With lsusb you get your vendor and product ID's.
This is way over my head lol!
Image <-- Cick for sudo inxi --usb -Fxxxnmprz output, updated hourly!
User avatar
Koentje
Level 7
Level 7
Posts: 1581
Joined: Tue Jan 04, 2022 6:23 pm
Location: Netherlands

Re: using Conky to display an image without a window [SOLVED]

Post by Koentje »

Sounds harder then you think... ;)

When i run lsusb on terminal i get all usb devices.. one of them is my keyboard:
Bus 001 Device 006: ID 1b1c:1b49 Corsair CORSAIR K70 RGB MK.2 Mechanical Gaming Keyboard
In the 6th column you see 1b1c:1b49, that reads vendorID:productID.

Now i go to the file i made, /etc/udev/rules.d/50-keyboard-connect.rules
And make this line that identifies my keyboard when it connects, and if recognized it runs /root/bin/kbd script.
ATTRS{idVendor}=="1b1c", ATTRS{idProduct}=="1b49", RUN+="/root/bin/kbd"

And in that script i can do anything i want that must be done when that device connects...
Image
Post Reply

Return to “Compiz, Conky, Docks & Widgets”