Skip to content

Commit

Permalink
Merge pull request #24 from C0rvust/version-2.0.2
Browse files Browse the repository at this point in the history
Version 2.0.2
  • Loading branch information
C0rvust authored May 9, 2023
2 parents c529007 + 474d863 commit a2f550a
Show file tree
Hide file tree
Showing 30 changed files with 57 additions and 43 deletions.
Binary file removed .Assets/Overview3.png
Binary file not shown.
Binary file removed .Assets/Overview4.png
Binary file not shown.
Binary file removed .Assets/Overview5.png
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@Resources/Modules/NowPlaying/Include/CoverMM.png
@Resources/Modules/Taskbar/Include/Dependencies/Icons
@Resources/Modules/Taskbar/Include/Pinned
@Resources/Modules/Shortcut/Include/Shortcuts
Binary file modified @Resources/Fonts/MaterialIcon.ttf
Binary file not shown.
Binary file modified @Resources/ModuleList.inc
Binary file not shown.
18 changes: 8 additions & 10 deletions @Resources/Modules/NowPlaying/Include/MediaSwitcher.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ function SetPlayerHierachy {
}

function ReturnActivePlayer {
$PlayerList=$Global:PlayerList # Given the set hierachy
For($i=0; $i -lt $PlayerList.length; $i++){ # Choose the one that is hghest in hierachy and is currently playing media
If($($RMAPI.Measure("MSState."+$PlayerList[$i])) -eq 1){
Return $PlayerList[$i]
}
}
For($i=0; $i -lt $PlayerList.length; $i++){ # Otherwise choose the one that is highest in hierachy and is currently paused
If($($RMAPI.Measure("MSState."+$PlayerList[$i])) -eq 2){
Return $PlayerList[$i]

$PlayerList=$Global:PlayerList
for ($state=1; $state -le 2; $state++){ # First find the first player that is playing media (1), if not then find the first player that is currently paused
for ($i=0; $i -lt $PlayerList.length; $i++) {
if($($RMAPI.Measure("MSState."+$PlayerList[$i])) -eq $state) {
Return $PlayerList[$i]
}
}
}
Return "" # Otherwise return "no player avaliable"
Return $null # Otherwise return "no player avaliable"
}

function SetActivePlayer {
Expand Down
2 changes: 1 addition & 1 deletion @Resources/Modules/NowPlaying/Include/Variables.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Variables]
; vargen|NowPlaying Position|NowPlaying|int|0:#Body.Width#
Module.NowPlaying.P=750
Module.NowPlaying.P=600
; vargen|NowPlaying Anchor [0/1/2]|NowPlaying|int|0:2
Module.NowPlaying.A=1
Module.NowPlaying.W=(12*#Body.Element#)
Expand Down
Binary file modified @Resources/Modules/NowPlaying/NowPlaying.inc
Binary file not shown.
4 changes: 2 additions & 2 deletions @Resources/Modules/Power/Include/Variables.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Variables]
; vargen|Power Position|Power|int|0:#Body.Width#
Module.Power.P=46
Module.Power.P=8
; vargen|Power Anchor [0/1/2]|Power|int|0:2
Module.Power.A=0
Module.Power.W=(1*#Body.Element#)
Module.Power.W=(1*#Body.Element#)
3 changes: 2 additions & 1 deletion @Resources/Modules/Shortcut/Include/Shortcut.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ LeftMouseUpAction=[`"#@#Modules\Shortcut\Include\Shortcuts\$($_.Name)`"]
"@
}
$Content | Out-File $Dest

$Content | Out-File -FilePath $Dest
}
}

Expand Down
2 changes: 1 addition & 1 deletion @Resources/Modules/Shortcut/Include/Variables.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Variables]
; vargen|Shortcut Position|Shortcut|int|0:#Body.Width#
Module.Shortcut.P=8
Module.Shortcut.P=1000
; vargen|Shortcut Anchor [0/1/2]|Shortcut|int|0:2
Module.Shortcut.A=0
Module.Shortcut.W=(1*#Body.Element#)
Expand Down
Binary file not shown.
Binary file modified @Resources/Modules/Taskbar/Include/Item.inc
Binary file not shown.
2 changes: 1 addition & 1 deletion @Resources/Modules/Taskbar/Include/Taskbar.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ x=($($i)*#Module.Taskbar.ProgramW#+(#Module.Taskbar.ProgramW#-#Module.Taskbar.Ic
"@
}
$Content | Out-File $Destination
$Content | Out-File -FilePath $Destination
$RMAPI.Bang("!Refresh")
}
}
Expand Down
2 changes: 1 addition & 1 deletion @Resources/Modules/Taskbar/Include/Variables.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Variables]
; vargen|Taskbar Position|Taskbar|int|0:#Body.Width#
Module.Taskbar.P=86
Module.Taskbar.P=46
; vargen|Taskbar Anchor [0/1/2]|Taskbar|int|0:2
Module.Taskbar.A=0
Module.Taskbar.W=(#Module.Taskbar.ProgramCount#*#Module.Taskbar.ProgramW#)
Expand Down
3 changes: 1 addition & 2 deletions @Resources/Modules/Taskbar/Taskbar.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Measure=Plugin
Plugin=ProgramOptions
Indexes=#Module.Taskbar.ProgramCount#
AdditionalDependencies=#Module.Taskbar.AddDep#
WindowMirrorPath=#Module.Taskbar.WMPath#
UpdateDivider=(1000/#UpdateInterval#)

[Module.Taskbar.PSRM]
Expand All @@ -25,7 +24,7 @@ Plugin=PowerShellRM
ScriptFile=#@#Modules\Taskbar\Include\Taskbar.ps1
UpdateDivider=(1000/#UpdateInterval#)

[Module.Taskbar.PSRM2]
[Module.Taskbar.PSRMParam]
Measure=Plugin
Plugin=PowershellRM
Param=214,85,113|255
Expand Down
2 changes: 1 addition & 1 deletion @Resources/Modules/Time/Include/Variables.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Variables]
; vargen|Time Position|Time|int|0:#Body.Width#
Module.Time.P=1492
Module.Time.P=1192
; vargen|Time Anchor [0/1/2]|Time|int|0:2
Module.Time.A=2
Module.Time.W=(2*#Body.Element#)
2 changes: 1 addition & 1 deletion @Resources/Modules/Volume/Include/Variables.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Variables]
; vargen|Volume Position|Volume|int|0:#Body.Width#
Module.Volume.P=1356
Module.Volume.P=1124
; vargen|Volume Anchor [0/1/2]|Volume|int|0:2
Module.Volume.A=2
Module.Volume.W=(2*#Body.Element#)
1 change: 0 additions & 1 deletion @Resources/Settings/Settings.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$RootConfig=$RmAPI.VariableStr("RootConfig")
$Resources=$RmAPI.VariableStr("@")
# $VariablesFile=$RmAPI.VariableStr("@") + "Variables.inc"
$ModuleListFile=$RmAPI.VariableStr("@") + "ModuleList.inc"
$ModuleFolder=$RmAPI.VariableStr("@") + "Modules"
$SettingsFolder=$RmAPI.VariableStr("@") + "Settings"
Expand Down
8 changes: 4 additions & 4 deletions @Resources/Variables.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Body.Element=30
; vargen|Element padding|General|int|0:
Body.Padding=8
; vargen|Taskbar width|General|int|0:
Body.Width=1500
Body.Width=1200
Body.Height=(#Body.Element#+2*#Body.Padding#)
; vargen|Corner size|General|int|0:
Body.Corner=6
; vargen|PopUp gap|General|int|0:
Body.PopUp=5
Body.PopUp=10

; Background
; vargen|Background colour|General|rgb
Expand Down Expand Up @@ -39,5 +39,5 @@ Font.Icon=MaterialIcon
Font.IconS=(#Body.Element#*0.75)

; Do not adjust
Body.X=210
Body.Y=20
Body.X=2280
Body.Y=10
4 changes: 2 additions & 2 deletions Modular Taskbar.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Skin.Height=#Body.Height#
[Main.ActionTimer]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Wait 500 | DeactivatePopup
DeactivatePopup=[!DeactivateConfig "#RootConfig#\Popup"]
ActionList1=Wait 500 | DeactivatePopUp
DeactivatePopUp=[!DeactivateConfig "#RootConfig#\PopUp"]
DynamicVariables=1
IgnoreWarnings=1

Expand Down
2 changes: 1 addition & 1 deletion PopUp/NowPlaying_PopUp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Skin.Width=(#Body.Element#*14)
Skin.Height=(#Body.Element#*10)

; Do not change
Parent.Position=750
Parent.Position=600
Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#)))
Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#)))

Expand Down
2 changes: 1 addition & 1 deletion PopUp/Power_PopUp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Skin.Width=(#Body.Element#*3+#Body.Padding#*4)
Skin.Height=(#Body.Element#*1+#Body.Padding#*2)

; Do not change
Parent.Position=61
Parent.Position=23.5
Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#)))
Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#)))

Expand Down
9 changes: 7 additions & 2 deletions PopUp/Shortcut_PopUp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Skin.Width=(#Body.Element#*6)
Skin.Height=(#Module.Shortcut.ItemSize#*(#Module.Shortcut.GennedItemCount#+1))

; Do not change
Parent.Position=23
Parent.Position=1015.5
Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#)))
Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#)))

Module.Shortcut.GennedItemCount=4
Module.Shortcut.GennedItemCount=0
Module.Shortcut.ItemSize=(round(#Body.Element#*0.8))
CurrentItem=

Expand Down Expand Up @@ -58,6 +58,11 @@ SolidColor=0,0,0,1
AntiAlias=1
DynamicVariables=1

; [Module.Shortcut.ItemCountCheck]
; Measure=Calc
; ifCondition=#Module.Shortcut.GennedItemCount#=0
; ifTrueAction=[!DeactivateConfig]

[Module.Shortcut.Background]
Meter=Shape
Shape=Rectangle 0,0,#Skin.Width#,#Skin.Height#,#Body.Corner# | StrokeWidth 0 | Fill Color #Colour.1#,#colour.1.Alpha#
Expand Down
2 changes: 1 addition & 1 deletion PopUp/Taskbar_PopUp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Skin.Width=(#Body.Element#*10)
Skin.Height=(#Module.Taskbar.ItemSize#*#Module.Taskbar.GennedItemCount#+2*#Body.Padding#)

; Do not change
Parent.Position=120
Parent.Position=172
Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#)))
Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#)))

Expand Down
2 changes: 1 addition & 1 deletion PopUp/Time_PopUp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Skin.Width=(7*#Module.Time.ItemSize#+2*#Body.Padding#)
Skin.Height=(7*#Module.Time.ItemSize#+3*#Body.Padding#)

; Do not change
Parent.Position=1462
Parent.Position=1162
Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#)))
Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#)))

Expand Down
2 changes: 1 addition & 1 deletion PopUp/Volume_PopUp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Skin.Width=(#Body.Element#*10)
Skin.Height=(#Body.Element#*2+#Body.Padding#*2)

; Do not change
Parent.Position=1326
Parent.Position=1094
Skin.X=(clamp((#Body.X#+#Parent.Position#-#Skin.Width#/2),(#Body.X#),(#Body.X#+#Body.Width#-#Skin.Width#)))
Skin.Y=(((#Body.Y#+#Body.Height#/2)<(#ScreenAreaHeight#/2)?(#Body.Y#+#Body.Height#+#Body.PopUp#):(#Body.Y#-#body.PopUp#-#Skin.Height#)))
Format=(((#Format#=0?1:0)=0?1:0)=0?1:0)
Expand Down
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,30 @@ It is recommended (but not required) that you remove your stock taskbar via 3par

# Installing
The latest release of Modular Taskbar can be found [here](https://github.com/C0rvust/Modular-Taskbar/releases). Simply run the `.rmskin` file once downloaded.
Modular Taskbar requires the Rainmeter application (minimum version `4.5.14.3663`), the installation instructions can be found on their homepage [here](https://www.rainmeter.net/).
Modular Taskbar requires the Rainmeter application (minimum version `4.5.17.3700`), the installation instructions can be found on their homepage [here](https://www.rainmeter.net/).

# Preview
<img src=".Assets/Overview3.png" width="100%"/>
<img src=".Assets/Overview4.png" width="100%"/>
<img src=".Assets/Overview5.png" width="100%"/>
<img src="https://user-images.githubusercontent.com/40166216/237038870-dd219d84-b1fa-476f-92cc-6a92bbef91eb.png" width="100%"/>
<img src="https://user-images.githubusercontent.com/40166216/237038878-20f5c516-32e9-4b4b-8acb-b97dc31537fb.png" width="100%"/>
<img src="https://user-images.githubusercontent.com/40166216/237038884-c160225f-c569-4fb4-b0a1-cbd5353c117a.png" width="100%"/>

# Requirements

- [MagickMeter by khanhas](https://github.com/khanhas/MagickMeter) - Follow these [instructions](https://github.com/khanhas/MagickMeter#how-to-install) to install the parent application ImageMagick.

- [WebNowPlaying by tjhrulz](https://github.com/tjhrulz/WebNowPlaying) - Follow these [instructions](https://github.com/tjhrulz/WebNowPlaying#extension-links) to install the browser extension.
- [WebNowPlaying-Redux by Keifufu & tjhrulz](https://github.com/keifufu/WebNowPlaying-Redux-Rainmeter) - Install the wnp browser extension from [here](https://github.com/keifufu/WebNowPlaying-Redux#installing).

- [Spicetify-CLI by khanhas](https://github.com/khanhas/spicetify-cli) - Follow these [instructions](https://github.com/khanhas/spicetify-cli/wiki/Guide-for-Rainmeter-user) to install Spicetify-CLI. _If you don't use Spotify, no further actions are required._
- [Spicetify-CLI by khanhas](https://github.com/khanhas/spicetify-cli) - Open a powershell window and run the following code line by line.
- _If you don't use Spotify, no further actions are required._

- [PowershellRM by Khanhas](https://github.com/khanhas/PowershellRM#requirements) - Follow these [instructions](https://github.com/khanhas/PowershellRM#requirements) to update your powershell version (Version `3.x` or above).
_As Win 10 is shipped with Powershell_ `5.1`_, no further actions are required by Win 10 users; update is required only for Win 7 users._
```ps1
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/khanhas/spicetify-cli/master/install.ps1" | Invoke-Expression
spicetify
spicetify config extensions webnowplaying.js
```

- [PowershellRM by Khanhas](https://github.com/khanhas/PowershellRM#requirements) - Update your Powershell to (Version `3.x` or above) [here](https://www.microsoft.com/en-us/download/details.aspx?id=54616).
- _As Win 10 is shipped with Powershell_ `5.1`_, no further actions are required by Win 10 users; update is required only for Win 7 users._

# Features
## Modules
Expand Down
1 change: 1 addition & 0 deletions Settings/Settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Update=#UpdateInterval#
DefaultUpdateDivider=-1
AccurateText=1
OnCloseAction=[!WriteKeyValue Variables CurrentPage "Modules"]
RightMouseUpAction=[]
DefaultAlwaysOnTop=-2

[Variables]
Expand Down

0 comments on commit a2f550a

Please sign in to comment.