Workspace is fun

Style 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
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Workspace is fun

Post by smurphos »

Here's a better example with some comments. Internally the system starts counting workspaces from 0 - so your default workspace is 0, the second is 1, the third is 2 etc....

This script opens Chrome and moves it to workspace 1, System Monitor and moves it to workspace 2, and Update manager and moves it workspace 3. It uses the Window Title to identify the correct window. I saved the script in ~/bin and made it executable. For this example I've then made a desktop launcher pointing to the script. One click and all three apps are open and in their respective workspaces.

Image

Script

Code: Select all

#!/bin/bash
#Description: A script to set up applications is specific workspaces
cd
#open chrome
/usr/bin/google-chrome-stable %U
#wait until the chrome window opens
until wmctrl -l | grep -q "New Tab"; do
    sleep 0.1
done
#move chrome from workspace 0 to workspace 1
wmctrl -r "New Tab - Google Chrome" -t 1
#open system monitor
gnome-system-monitor
#wait until the system monitor window opens
until wmctrl -l | grep -q "System Monitor"; do
    sleep 0.1
done
#move system monitor from workspace 0 to workspace 2
wmctrl -r "System Monitor" -t 2
#open mintupdate
mintupdate
#wait until the mintupdate window opens
until wmctrl -l | grep -q "Update Manager"; do
    sleep 0.1
done
#move mintupdate from workspace 0 to workspace 3
wmctrl -r "Update Manager" -t 3
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Ozo

Re: Workspace is fun

Post by Ozo »

That opens Chrome and System Monitor but not Update Manager. Both are on Workspace 2 .

EDIT: OK, now it sends all three to Workspace 2. Making progress I think. Oops, now it will not send Update Manager. It is a problem with bringing up the UM.

I will try to use your text to make my own multi-launcher (without UM) but that will take a while. I have 5 to install.

Auto loading the Workspaces is a nice addition to this system of navigation. You have that working for you so we know it is possible. I am not sure what my problem is with it but no matter. I am just happy to see that the Workspaces method is so useful. It is hard to believe this has been ignored for so long. :?:

Great job on the tutorial above. I have been using Chrome ext. Nimbus but never did the video in a forum. Your recorder "Camera, Built in" looks useful. Do you have a link?
Ozo

Re: Workspace is fun

Post by Ozo »

I changed Update Manager to Software Manager in your text and ran that but get this, it stalls there.

Code: Select all

 user@Bott990 ~ $ #!/bin/bash
user@Bott990 ~ $ #Description: A script to set up applications is specific workspaces
user@Bott990 ~ $ cd
user@Bott990 ~ $ #open chrome
user@Bott990 ~ $ /usr/bin/google-chrome-stable %U
[14326:14363:0408/134203.285503:ERROR:browser_gpu_channel_host_factory.cc(120)] Failed to launch GPU process.
Created new window in existing browser session.
user@Bott990 ~ $ #wait until the chrome window opens
user@Bott990 ~ $ until wmctrl -l | grep -q "New Tab"; do
>     sleep 0.1
> done
user@Bott990 ~ $ #move chrome from workspace 0 to workspace 1
user@Bott990 ~ $ wmctrl -r "New Tab - Google Chrome" -t 1
user@Bott990 ~ $ #open system monitor
user@Bott990 ~ $ gnome-system-monitor

The System Monitor opens but does not get to Workspace 1. Chrome opens on WS2. Here is the code after I changed it.

Code: Select all

 #!/bin/bash
#Description: A script to set up applications is specific workspaces
cd
#open chrome
/usr/bin/google-chrome-stable %U
#wait until the chrome window opens
until wmctrl -l | grep -q "New Tab"; do
    sleep 0.1
done
#move chrome from workspace 0 to workspace 1
wmctrl -r "New Tab - Google Chrome" -t 1
#open system monitor
gnome-system-monitor
#wait until the system monitor window opens
until wmctrl -l | grep -q "System Monitor"; do
    sleep 0.1
done
#move system monitor from workspace 0 to workspace 2
wmctrl -r "System Monitor" -t 2
#open Software Manager
Software Manager
#wait until the Software Manager window opens
until wmctrl -l | grep -q "Software Manager"; do
    sleep 0.1
done
#move Software Manager from workspace 0 to workspace 3
wmctrl -r "Software Manager" -t 3
done
#move Software Manager from workspace 0 to workspace 3
wmctrl -r "Software Manager" -t 3
Last edited by Ozo on Sun Apr 08, 2018 2:17 pm, edited 2 times in total.
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Workspace is fun

Post by smurphos »

It looks like you are trying to run the script line by line in a terminal? That won't work properly. You need to save it as a file in ~/bin (create the folder if you haven't got one) and make it executable. You can then call it via the terminal using its file name, or make a launcher shortcut to it.

The error looks like it might be related to already having another instance of chrome open.

Re - Update manager I think that may fail to launch from the terminal/script if it's set to show the tray-icon at all times.

For Software Manager You need to change mintupdate to the command to open Software Manager which is mintinstall. Use the menu editor to check what the command is for specific applications.

The sreenshot applet was a good find - I spotted it in a recommendation from one of the dev team. It not on Cinnamon Spices - get it direct from the authors Github - https://github.com/rjanja/desktop-capture

The screen recording is using Cinnamon's built-in screen recorder. That can also be accessed via Ctrl-Shift-Alt-R (to switch on and off). Recordings are saved in your home by default using the keyboard shortcut method. The default format - webm - can't be posted on the forums but if you convert the video to an animated gif it can be uploaded to imgur and posted like a regular image. I used an online conversion tool this morning to do that but am planning to put a little script together to handle the conversion locally. Once it's working I'll post a copy up.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Ozo

Re: Workspace is fun

Post by Ozo »

I shut off the browser, edited the text, and launched but got this back.

Code: Select all

user@Bott990 ~ $ #!/bin/bash
user@Bott990 ~ $ #Description: A script to set up applications in specific workspaces
user@Bott990 ~ $ cd
user@Bott990 ~ $ #open chrome
user@Bott990 ~ $ /usr/bin/google-chrome-stable %U
[24261:24285:0408/152558.256729:ERROR:in_progress_cache_impl.cc(93)] Could not read download entries from file because there was a read failure.
[24261:24326:0408/152558.468115:ERROR:token_service_table.cc(141)] Failed to decrypt token for service AccountId-110639469438297114712
[24261:24261:0408/152558.734281:ERROR:gpu_process_transport_factory.cc(1019)] Lost UI shared context.
[1:10:0408/152558.948684:ERROR:cmd_buffer_helper.cc(139)] ContextResult::kFatalFailure: CommandBufferHelper::AllocateRingBuffer() failed
[1:10:0408/152558.950122:ERROR:command_buffer_proxy_impl.cc(133)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
User avatar
smurphos
Level 18
Level 18
Posts: 8501
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Workspace is fun

Post by smurphos »

smurphos wrote: Sun Apr 08, 2018 1:36 pm The sreenshot applet was a good find - I spotted it in a recommendation from one of the dev team. It not on Cinnamon Spices - get it direct from the authors Github - https://github.com/rjanja/desktop-capture

The screen recording is using Cinnamon's built-in screen recorder. That can also be accessed via Ctrl-Shift-Alt-R (to switch on and off). Recordings are saved in your home by default using the keyboard shortcut method. The default format - webm - can't be posted on the forums but if you convert the video to an animated gif it can be uploaded to imgur and posted like a regular image. I used an online conversion tool this morning to do that but am planning to put a little script together to handle the conversion locally. Once it's working I'll post a copy up.
OK no need for a custom script - the desktop-capture applet -https://github.com/rjanja/desktop-capture- is compatible with a variety of screen recorders one of which is Byzanz which records straight to animated gif. Byzanz is in the repos - apt install byzanz

Ozo wrote: Sun Apr 08, 2018 4:10 pm I shut off the browser, edited the text, and launched but got this back.
Sorry - I've got no clue on that one.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Ozo

Re: Workspace is fun

Post by Ozo »

I have had similar issues before. It seems that once I install something it can not be reinstalled even though the earlier version was removed supposedly. This is not all the time but does occur occasionally. The next time I reinstall this os I will probably be able to successfully install the auto-installer.

How did you put the gif in your post? Same as a photo?
Ozo

Re: Workspace is fun

Post by Ozo »

After a while my use of Workspaces has evolved. Now I am only using two workspaces and spend almost zero time fussing with them. Still, I use the dock and if I wish to actually view an active program I can open Hot Corners with a swipe into either right corner. That rarely happens anymore. I have stripped the panel even more as well but it is quite functional, just no activity now that the Windows list applet, the Update Manager applet and the Audio applet are gone.

I found that when installing updates manually (no applet) that one must first open The Update Manager and then refresh it, load the first result and then the rest will appear automatically.

Minimal Panel and Menu. There are four active programs on Workspace 1 but no activity on the panel.
Image

Workspaces, when programs are minimized they are on Workspace 1. Workspace 2 then automatically appears.
Image

Plank Dock integrates well with Workspaces. When an active programs launcher is clicked it instantly appears and another click minimizes it. This is especially nice when it is the Software Manager that comes up instantaneously. You do not get a duplicate program when you click twice either. A right click and the program can be closed from the dock. There is an activity indicator light below each launcher. Click the photo once or twice to enlarge it for a view of the indicator lights.

Image
Locked

Return to “Themes, Icons & Wallpaper”