Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

Commit

Permalink
Added documentation for new desktop wrapping setting. Changed the nam…
Browse files Browse the repository at this point in the history
…e of the setting to reflect that it works in both directions.
  • Loading branch information
sdias committed May 4, 2017
1 parent 73ae65c commit 1a1421f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ To create custom packs, simply create one icon per desktop and name them appropr
You can set what is the default desktop using the "[General] DefaultDesktop" setting.
You can set if you want to be able to switch desktops by scrolling over the taskbar using the "[General] TaskbarScrollSwitching" setting (1 for yes, 0 for no).
If your keyboard shortcuts configuration conflicts with the default Windows shortcuts (`Win + Ctrl + Left Arrow` and `Win + Ctrl + Right Arrow`), you can specify if you want to switch between desktops instantly or if you want the default Windows transition to be used, by setting the "[General] UseNativePrevNextDesktopSwitchingIfConflicting setting (1 for yes, 0 for no).
You can set the "[General] DesktopWrapping" setting to define if the desktops should wrap around (if you try to go to the next desktop when you are in the last desktop, you go to the first desktop, and if you try to go to the previous desktop when you are in the first desktop, you go to the last desktop).

### Settings Migration Guide

Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DefaultDesktop=1
TaskbarScrollSwitching=1
UseNativePrevNextDesktopSwitchingIfConflicting=0
WarpFromEndToStart=1
DesktopWrapping=1

[Tooltips]
Enabled=1
Expand Down
6 changes: 3 additions & 3 deletions virtual-desktop-enhancer.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Menu, Tray, Click, 1

ReadIni("settings.ini")

global WarpFromEndToStart := (GeneralWarpFromEndToStart != "" and GeneralWarpFromEndToStart ~= "^[01]$") ? GeneralWarpFromEndToStart : 1
global GeneralDesktopWrapping := (GeneralDesktopWrapping != "" and GeneralDesktopWrapping ~= "^[01]$") ? GeneralDesktopWrapping : 1
global TooltipsEnabled := (TooltipsEnabled != "" and TooltipsEnabled ~= "^[01]$") ? TooltipsEnabled : 1
global TooltipsLifespan := (TooltipsLifespan != "" and TooltipsLifespan ~= "^\d+$") ? TooltipsLifespan : 750
global TooltipsCentered := (TooltipsCentered != "" and TooltipsCentered ~= "^[01]$") ? TooltipsCentered : 1
Expand Down Expand Up @@ -397,7 +397,7 @@ _GetDesktopName(n:=1) {

_GetNextDesktopNumber() {
i := _GetCurrentDesktopNumber()
if (WarpFromEndToStart == 1) {
if (GeneralDesktopWrapping == 1) {
i := (i == _GetNumberOfDesktops() ? 1 : i + 1)
} else {
i := (i == _GetNumberOfDesktops() ? i : i + 1)
Expand All @@ -408,7 +408,7 @@ _GetNextDesktopNumber() {

_GetPreviousDesktopNumber() {
i := _GetCurrentDesktopNumber()
if (WarpFromEndToStart == 1) {
if (GeneralDesktopWrapping == 1) {
i := (i == 1 ? _GetNumberOfDesktops() : i - 1)
} else {
i := (i == 1 ? i : i - 1)
Expand Down

0 comments on commit 1a1421f

Please sign in to comment.