Giter VIP home page Giter VIP logo

mr.resolution's Introduction

Mr. Resolution

Dark Helmet: What's the matter with this thing? What's all this churning and bubbling, you call that a radar screen?
Colonel Sandurz: No sir, we call it 'Mr. Resolution'. Care for some?
Dark Helmet: [pause] Yes. I always have a great resolution when I use virtualized Windows on Linux. You know that.
Colonel Sandurz: Of course, I do.
Dark Helmet: Everybody knows that!
Crewmen: Of course, we do, sir!

If you use Windows in a libvirt/qemu environment like me, you maybe also use looking glass to display the vm.

Unfortunately it does not adjust the clients desktop resolution based on the looking glass window which is a bit tedious to work with especially in tiling wms.

Mr. Resolution is basically a quick proof of concept that uses the Nvidia API to create custom resolutions.

The goal is to integrate the virtual machine in a way, that it does not appear as one.

Pretty sure it's possible with AMD as well, unfortunately my AMD gpu is currently used somewhere else.

It creates a simple web server that can be called like so:

curl -X POST http://192.168.122.237:9696/display/resolution --verbose -d "width=1920&height=500"

The service should change the resolution pixel perfect. It takes a few seconds to apply the custom resolution though.

One thing to consider is, that it really actually changes the clients resolution with all drawbacks.

Windows sometimes behaves weirdly on resolution changes, shrinking and moving windows can happen.

If you have the important applications maximized it should be fine - most of the time.

demo

Usage

As this is just a web service you will also require a software that actually sends the window geometry to the guest. In AwesomeWM I do it that way:

local lookingGlassFilter = function (c)
    return awful.rules.match(c, {class = "looking-glass-client"})
end
              

function resizeLookingGlassWindow(c)
    clients = awful.client.iterate(lookingGlassFilter)

    for c in clients do
        print(c.name .. ' ' .. c.width .. 'x' .. c.height);
        
        queryString = "curl -X POST http://192.168.122.237:9696/display/resolution -d 'width=" .. c.width .. "&height=" .. c.height .. "' &"

        awful.spawn.with_shell(queryString)
    end
end

...
clientkeys = mytable.join(
    awful.key({modkey}, "o", resizeLookingGlassWindow, {description = "Test resize", group = "launcher"}), 
...

With other wms/dms you need to write a script or use something existing.

mr.resolution's People

Contributors

lmoe avatar

Watchers

 avatar  avatar

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.