Skip to content

Commit

Permalink
minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkessel authored Aug 5, 2024
1 parent 8cef643 commit a0bdcdf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sit-stand.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ function SetTray {
$global:autostart = (-not $global:autostart)
UpdateIcon
UpdateRegistry
})
})
$menuItemChangeFocus = New-Object System.Windows.Forms.ToolStripMenuItem
$menuItemChangeFocus.Text = "Respect focus assist"
$menuItemChangeFocus.Add_Click({
$global:focus = (-not $global:focus)
UpdateIcon
$menuItemChangeFocus.Text = "Respect focus assist"
$menuItemChangeFocus.Add_Click({
$global:focus = (-not $global:focus)
UpdateIcon
UpdateRegistry
})
$menuItemChangeSitSound = New-Object System.Windows.Forms.ToolStripMenuItem
Expand Down Expand Up @@ -327,6 +327,7 @@ function UpdateIcon {
foreach ($x in $contextMenu.Items[2].DropDownItems[4].DropDownItems) {
$x.checked = ($x.text -eq $global:TrayColorBg)
}
$contextMenu.Items[2].DropDownItems[5].Checked = $global:autostart
$contextMenu.Items[2].DropDownItems[6].Checked = $global:focus
if ( $global:SitSound.SoundLocation -eq 'silent' ) {
$contextMenu.Items[2].DropDownItems[7].Text = "Sit sound (silent)"
Expand Down

0 comments on commit a0bdcdf

Please sign in to comment.