It is currently March 29th, 2024, 10:06 am

A way to control virtual desktops

Get help with creating, editing & fixing problems with skins
jumi
Posts: 11
Joined: January 12th, 2018, 5:39 am

A way to control virtual desktops

Post by jumi »

Hi.

I'm looking for a way to control my Windows 10 virtual desktops through Rainmeter. What I have in mind is similar to most window manager panels on Linux, with an active desktop label, background, etc.

I currently use keyboard shortcuts to switch between workspaces, and could create a skin that sends a keyboard shortcut command to nirCMD (as seen in this topic: https://forum.rainmeter.net/viewtopic.php?t=13190) but it wouldn't work the way as I intended. I know there's a VirtuaWin plugin for Rainmeter but I find it redundant to use since Windows 10 already supports virtual desktops.

Here's an example pic:
Image
1 and 2 are all the workspaces and 1 is selected, visible through it's differentiated background and foreground, etc.

EDIT: Image is broken: https://imgur.com/a/2JE0T
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: A way to control virtual desktops

Post by eclectic-tech »

jumi wrote:Hi.

I'm looking for a way to control my Windows 10 virtual desktops through Rainmeter. What I have in mind is similar to most window manager panels on Linux, with an active desktop label, background, etc.

I currently use keyboard shortcuts to switch between workspaces, and could create a skin that sends a keyboard shortcut command to nirCMD (as seen in this topic: https://forum.rainmeter.net/viewtopic.php?t=13190) but it wouldn't work the way as I intended. I know there's a VirtuaWin plugin for Rainmeter but I find it redundant to use since Windows 10 already supports virtual desktops.

Here's an example pic:
Image
1 and 2 are all the workspaces and 1 is selected, visible through it's differentiated background and foreground, etc.

EDIT: Image is broken: https://imgur.com/a/2JE0T
Rainmeter has dropped the virtual desktop plugin as of v4.0 for various reasons. See this post

AFAIK using a third party utility is the only way to currently control Win10 virtual desktops via sendkey in rainmeter bangs.
Generally, rainmeter developers do not encourage using these because of the possibility of abuse (and I agree). :twisted:

None of the popular VDMs offer the ability to isolate rainmeter skins to specific desktops; all skins will show on all desktops. Beyond that, Windows 10 runs many applications in the background, but these windows are "seen" by the VDMs and are displayed in the list of available windows (Cortana, Start, Action Center, etc.). This can be confusing when only user windows are what most people want to see and access.

I created a skin to work with Windows 10 virtual desktops; feel free to try it (mod it to your liking); it uses autokey's sendkey routine for most actions and 1 external executable for all task. Virtual Desktop 10

I also created a simple 2 button version to switch between 2 desktops as you showed in your image; if you are interested I can post the code (you will need to have my virtual desktop 10 skin installed, and add the code as a new skin).

Aside: I recently found DeskSpace for Windows, which has 3D cube which transitions between multiple workspaces, very similar to CompWiz for Linux systems. It has a free trial and may be worth looking in to for your use. This is not a recommendation, just a suggestion ;-)
GIF sample: https://1drv.ms/i/s!AuMKzww4rZT6jxTztOkLiniccwJc

There is also a freeware version that you might want to try YODM-3D

Feel free to remove these suggestions if you feel they are advertising :17what
jumi
Posts: 11
Joined: January 12th, 2018, 5:39 am

Re: A way to control virtual desktops

Post by jumi »

eclectic-tech wrote:Rainmeter has dropped the virtual desktop plugin as of v4.0 for various reasons. See this post

AFAIK using a third party utility is the only way to currently control Win10 virtual desktops via sendkey in rainmeter bangs.
Generally, rainmeter developers do not encourage using these because of the possibility of abuse (and I agree). :twisted:

None of the popular VDMs offer the ability to isolate rainmeter skins to specific desktops; all skins will show on all desktops. Beyond that, Windows 10 runs many applications in the background, but these windows are "seen" by the VDMs and are displayed in the list of available windows (Cortana, Start, Action Center, etc.). This can be confusing when only user windows are what most people want to see and access.

I created a skin to work with Windows 10 virtual desktops; feel free to try it (mod it to your liking); it uses autokey's sendkey routine for most actions and 1 external executable for all task. Virtual Desktop 10

I also created a simple 2 button version to switch between 2 desktops as you showed in your image; if you are interested I can post the code (you will need to have my virtual desktop 10 skin installed, and add the code as a new skin).

Aside: I recently found DeskSpace for Windows, which has 3D cube which transitions between multiple workspaces, very similar to CompWiz for Linux systems. It has a free trial and may be worth looking in to for your use. This is not a recommendation, just a suggestion ;-)
GIF sample: https://1drv.ms/i/s!AuMKzww4rZT6jxTztOkLiniccwJc

There is also a freeware version that you might want to try YODM-3D

Feel free to remove these suggestions if you feel they are advertising :17what
Hi, thanks for the very well detailed reply!

And yes, I figured that working with several skins on multiple desktops would be a problem, but your skin works just the way I thought something would be achievable with Rainmeter. I'd also like to take a look at this simple 2 button version, as I'm currently using 2 desktops as well (and maybe it could be edited to work with several other desktops).
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: A way to control virtual desktops

Post by eclectic-tech »

jumi wrote:Hi, thanks for the very well detailed reply!

And yes, I figured that working with several skins on multiple desktops would be a problem, but your skin works just the way I thought something would be achievable with Rainmeter. I'd also like to take a look at this simple 2 button version, as I'm currently using 2 desktops as well (and maybe it could be edited to work with several other desktops).
Here is the skin code for switching between 2 virtual desktops
It's a bit of a cheat, since adding more than 2 desktops reverts its function to previous/next operation. :D

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
Group=#RootConfig#

OnRefreshAction=[!ZPos +2]

; Hide/Show All Skins with mouse scrolls
MouseScrollUpAction=[!Show *]
MouseScrollDownAction=[!Hide *][!Show "#CurrentConfig#"][!Redraw]

; Show Desktops Tasks View
MiddleMouseUpAction=["#@#Actions\SendKey.exe "#{TAB}""]


; ========= Metadata ==========
[Metadata]
Name=Virtual Desktop Control skin for Windows 10 - 2 Desktops
Author=Eclectic Tech
Information=Uses move-left/move-right key combinations to switch between 2 desktops; a slight cheat, since creating more desktops, will change it's function to previous/next 
License=CC Share-Alike NC 4
Version=1.2017.10.23

; ========= Variables ==========
[Variables]

; ========= Styles ==========

; ========= Meters ==========
[SwitchLeft]
Meter=String
FontSize=10
SolidColor=0,0,0,32
FontColor=255,255,255
Padding=6,3,6,3
DynamicVariables=1
Text=1
LeftMouseUpAction=["#@#Actions\SendKey.exe "^#{LEFT}""]

[SwitchRight]
Meter=String
FontSize=10
SolidColor=0,0,0,32
FontColor=255,255,255
Padding=6,3,6,3
DynamicVariables=1
Text=2
X=6R
Y=r
LeftMouseUpAction=["#@#Actions\SendKey.exe "^#{RIGHT}""]
You will need to use this code to create a new skin in 'Skins\VirtualDesktop10' folder; the @Resources\Actions files are needed for this to work.
jumi
Posts: 11
Joined: January 12th, 2018, 5:39 am

Re: A way to control virtual desktops

Post by jumi »

For anyone interested, I found sort of a decent solution.

There's an AHK script that enhances how virtual desktops works in Windows 10, it can be found here. What it does is, besides many other features, add hotkeys to jump to specific workspaces.

So I made, with the help of nirCMD, 4 Rainmeter frames that works as buttons with the sendkeypress function, so each one - on click - jumps to its designated workspace. Also, for each one there's a differentiated foreground that pops up over it when clicked. Each one deactivates all the other ones so only the selected workspace is highlighted.

https://imgur.com/a/WeE9I
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: A way to control virtual desktops

Post by eclectic-tech »

jumi wrote:For anyone interested, I found sort of a decent solution.

There's an AHK script that enhances how virtual desktops works in Windows 10, it can be found here. What it does is, besides many other features, add hotkeys to jump to specific workspaces.

So I made, with the help of nirCMD, 4 Rainmeter frames that works as buttons with the sendkeypress function, so each one - on click - jumps to its designated workspace. Also, for each one there's a differentiated foreground that pops up over it when clicked. Each one deactivates all the other ones so only the selected workspace is highlighted.

https://imgur.com/a/WeE9I
Nice find! :thumbup:

I looked at that after your first post, but didn't investigate it very closely... but, whoa!, it is a very good implementation of an auto hot key script, with a dll library, to interface nicely with Windows 10 64-bit!

You don't need to use NIRCMD to use this, it can be used with the included autohotkey compiled script executeable, or just run the script directly, if you have autohotkey installed.

Select desktops directly via Hotkeys, or step through them via task bar scroll or mouse scroll!

One of the nicest features is the ability to set separate wallpapers/colors on each desktop! 8-)

Now if someone can figure out how to integrate skins to separate desktops, we would be dancing in the streets! :17group

Thank for sharing! :great: