Code Monkey home page Code Monkey logo

Comments (5)

MahmoudDolah avatar MahmoudDolah commented on August 21, 2024

It' s clear at this point that this is an issue with xmodmap and not with your script.
Using the following command instead of the xmodmap command doesn't have this issue
$ xset led on
http://failtime.freeshell.org/2017/02/05/cooler-master-devastator-ii-leds-on-ubuntu-linux/

from movescreen.

calandoa avatar calandoa commented on August 21, 2024

The problem is probably due to the output of one of the external tools. A possible way to investigate would be to check these outputs. You can do this by adding a print after each subprocess call, like this:

# orignal line
out = subprocess.check_output(['xrandr']).decode('ascii', 'ignore')
# add this one (3x times)
print "---xandr---\n", out, "---end---\n"

Then, in a terminal, try directly "movescreen.py left" (or right) and capture the log with the leds and without. The differences between each log might give us an hint.

from movescreen.

MahmoudDolah avatar MahmoudDolah commented on August 21, 2024

https://gist.github.com/MahmoudDolah/67985d53460ae712e5a80129e52cf188
This gist contains where I put the debug code (identified by the # Debug code comment

Here, you'll see the output from the script with xset led on
https://gist.github.com/MahmoudDolah/539ded43d7038737cd37ddcfe12059d6

Here, I turned the LEDs on using the xmodmap command
https://gist.github.com/MahmoudDolah/72f2a94f567ffb921033d77228d6d5a7

And finally, here is from all LEDs off
https://gist.github.com/MahmoudDolah/88d4f06c0efddf941202229d2381d564

Also, I'll note that the script works when I have the LEDs on with xmodmap and type the command manually, but not when I use my keyboard shortcut

image

Edit: I'll also note that I'm not using the keybindings that you recommend in the README (https://github.com/calandoa/movescreen#xfce-setup) and that I have tried it with those keybindings but it still doesn't work

from movescreen.

calandoa avatar calandoa commented on August 21, 2024

It looks like Xfce is not calling movescreen at all, i.e. the shortcuts are temporarily disabled.

You can confirm that by logging each execution in a file with a hack at the top of the script like:

import datetime
sys.stdout = open('/tmp/ms_' + str(datetime.datetime.now().time()) + '.log', 'w')

All the following print will be done in a log in /tmp named with the current time, and you will probably find out that no file appears when LED are on.

from movescreen.

MahmoudDolah avatar MahmoudDolah commented on August 21, 2024

It looks like you're correct, thanks for the debugging
Looks like we've confirmed what I said here #1 (comment) that this issue isn't with your script
I'm going to close this issue
Thanks again 👍

from movescreen.

Related Issues (15)

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.