Skip to content

Commit

Permalink
2.6
Browse files Browse the repository at this point in the history
- Added Albanian, Bulgarian, Irish, Persian and Russian languages
- Added approximate memory released to optimization notification
- Added right-to-left (RTL) language and UI support
- Added run on low priority setting. If enabled, it limits the app resource usage by reducing the process priority and ensuring it runs efficiently. It might increase the optimization time, but it helps if your Windows freezes during it
- Added show virtual memory setting and memory usage view
- Added support to cultures' native formats, like decimal separators
- Added tray icon customization. Users can choose between the default app image or show physical memory usage with a background color based on the value. (0% - 79%) White | (80% - 89%) Orange | (90% - 100%) Red
- Improved code, documentation, and UI
- Improved Greek and Ukrainian languages
- Improved UI rendering when the start minimized setting is enabled
  • Loading branch information
IgorMundstein committed Dec 18, 2023
1 parent 7f64ddb commit 8d87c7c
Show file tree
Hide file tree
Showing 78 changed files with 2,171 additions and 884 deletions.
Binary file modified .github/images/main-window-compact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/main-window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/memory-usage-danger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/memory-usage-warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/memory-usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 35 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,16 @@

### Memory Areas

- `Clean Combined Page List` - Flushes the blocks from the combined page list effectively only when page combining is enabled
- `Clean Modified Page List` - Flushes memory from the modified page list, writing unsaved data to disk and moving the pages to the standby list
- `Clean Processes Working Set` - Removes memory from all user-mode and system working sets and moves it to the standby or modified page lists. Note that by the time processes run, any code will necessarily populate their working sets to do so
- `Clean Standby List` - Flushes pages from all standby lists to the free list
- `Clean Standby List (Low Priority)` - Flushes pages from the lowest-priority standby list to the free list
- `Clean System Working Set` - Removes memory from the system cache working set
- `Combined Page List` - Flushes the blocks from the combined page list effectively only when page combining is enabled
- `Modified Page List` - Flushes memory from the modified page list, writing unsaved data to disk and moving the pages to the standby list
- `Processes Working Set` - Removes memory from all user-mode and system working sets and moves it to the standby or modified page lists. Note that by the time processes run, any code will necessarily populate their working sets to do so
- `Standby List` - Flushes pages from all standby lists to the free list
- `Standby List (Low Priority)` - Flushes pages from the lowest-priority standby list to the free list
- `System Working Set` - Removes memory from the system cache working set

### Multi-Language

- `Arabic` `Chinese` `Dutch` `English` `French` `German` `Greek` `Indonesian` `Italian` `Japanese` `Korean` `Macedonian` `Polish` `Portuguese` `Serbian` `Slovenian` `Spanish` `Turkish` `Ukrainian`

### Notifications

[![](/.github/images/notification.png)](#notifications)
- `Albanian` `Arabic` `Bulgarian` `Chinese` `Dutch` `English` `French` `German` `Greek` `Indonesian` `Irish` `Italian` `Japanese` `Korean` `Macedonian` `Persian` `Polish` `Portuguese` `Russian` `Serbian` `Slovenian` `Spanish` `Turkish` `Ukrainian`

### Processes excluded from optimization

Expand All @@ -65,14 +61,30 @@
- `Auto update` - Keeps the app up to date
- `Close after optimization` - Closes the app after optimization
- `Close to the notification area` - Minimize the app to the system tray when clicking the close (X) button
- `Run on startup` - Runs the app after the system boots up
- `Show optimization notifications` - Sends a message to the notification area after optimization
- `Start minimized` - The app will start minimized to the system tray. Single/Double click on the icon to restore
- `Run on low priority` - It limits the app resource usage by reducing the process priority and ensuring it runs efficiently. It might increase the optimization time, but it helps if your Windows freezes during it
- `Run on startup` - Runs the app after the system boots up. It creates an entry on Windows **Task Scheduler** and Windows Registry at **Computer\HKEY_CURRENT_USER\Software\WinMemoryCleaner**
- `Show optimization notifications` - Sends a message to the notification area after optimization. It includes the approximate memory released
- `Show virtual memory` - It also monitors the virtual memory usage
- `Start minimized` - The app will start minimized to the system tray. Single-click on the icon to restore

### System tray (Notification area)

- Menu

[![](/.github/images/system-tray.png)](#system-tray)

- Notification

[![](/.github/images/notification.png)](#notifications)

### Tray icon

- `Image` - Show app icon
- `Memory usage` - Show physical memory usage with a background color based on the value
- [![](/.github/images/memory-usage.png)](#tray-icon) `(0% - 79%)` White
- [![](/.github/images/memory-usage-warning.png)](#tray-icon) `(80% - 89%)` Orange
- [![](/.github/images/memory-usage-danger.png)](#tray-icon) `(90% - 100%)` Red

## 🖥️ Command arguments (NO GUI)

You can use the following arguments to run the app silently.
Expand Down Expand Up @@ -103,6 +115,7 @@ The app generates logs in the Windows event
- Model-View-ViewModel (MVVM) design pattern
- No third library or DLL dependencies
- Portable (Single .exe file)
- Right-to-left language support and bidirectional text
- S.O.L.I.D. Principles of Object-Oriented
- Use of Windows native methods for memory management
- Windows Event to save logs
Expand All @@ -125,23 +138,30 @@ If you are a native speaker of any language other than English, you can contribu
2. Change the file build action property to Embedded Resource
3. Rebuild and run the WinMemoryCleaner project

💡 When a new version requires translated text changes, Google Translate will be used for translation by the developer. The contributor's efforts to submit updates will always be appreciated.

❤️ Contributors

- `Albanian (Shqip)` [Omer Rustemi](https://github.com/omerrustemicode)
- `Arabic (اللغة العربية)` [Abdulmajeed-Alrajhi](https://github.com/Abdulmajeed-Alrajhi)
- `Bulgarian (български)` [Konstantin](https://github.com/constantinejc)
- `Chinese (Simplified) (中文(简体))` [Kun Zhao](https://github.com/kzhdev) | [raydenake22](https://github.com/raydenake22)
- `Chinese (Traditional) (中文(繁體))` [raydenake22](https://github.com/raydenake22) | [rtyrtyrtyqw](https://github.com/rtyrtyrtyqw)
- `Dutch (Nederlands)` [hax4dazy](https://github.com/hax4dazy)
- `French (Français)` [William VINCENT](https://github.com/wixaw)
- `German (Deutsch)` [Calvin](https://github.com/Slluxx)
- `Greek (Ελληνικά)` [tkatsageorgis](https://github.com/tkatsageorgis)
- `Indonesian (Indonesia)` [Eskey](https://github.com/Eskeyz)
- `Irish (Gaeilge)` [Happygolucky254](https://github.com/Happygolucky254)
- `Italian (Italiano)` [wintrymichi](https://github.com/wintrymichi)
- `Japanese (日本語)` [dai](https://github.com/dai)
- `Korean (한국어)` [VenusGirl](https://github.com/VenusGirl)
- `Macedonian (Македонски)` [Dimitrij Gjorgji](https://github.com/Cathadox)
- `Persian (فارسی)` [KavianK](https://github.com/KavianK)
- `Polish (Polski)` [Fresta56](https://github.com/Fresta56)
- `Russian (Русский)` [ruslooob](https://github.com/ruslooob)
- `Serbian (Srpski)` [DragorMilos](https://github.com/DragorMilos)
- `Slovenian (Slovenščina)` [Jadran Rudec](https://github.com/JadranR)
- `Spanish (Español)` [Ajneb Al Revés](https://github.com/AjnebAlReves) | [Nekrodamus](https://github.com/FrannDzs)
- `Turkish (Türkçe)` [Viollje](https://github.com/Viollje)
- `Ukrainian (Українська)` [Oleksander](https://github.com/Mariachi1231)
- `Ukrainian (Українська)` [RieBi](https://github.com/RieBi) | [Oleksander](https://github.com/Mariachi1231)
106 changes: 73 additions & 33 deletions src/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<local:EnumToBooleanConverter x:Key="EnumToBooleanConverter" />
<local:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<local:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
<local:StringFormatConverter x:Key="StringFormatConverter" />
<local:ViewModelLocator x:Key="ViewModelLocator" />
<!-- Colors -->
<SolidColorBrush x:Key="DarkBackground" Color="#2C2C2C" />
Expand All @@ -19,17 +20,24 @@
<SolidColorBrush x:Key="DarkMemoryBarTrackBackground" Color="#00AA41" />
<SolidColorBrush x:Key="DarkOver" Color="#00AEF7" />
<SolidColorBrush x:Key="DarkWindowBackground" Color="#202020" />
<SolidColorBrush x:Key="DarkWindowBorderBrush" Color="#707070" />
<SolidColorBrush x:Key="DarkWindowBorderBrush" Color="#303030" />
<!-- Styles (Base) -->
<Style x:Key="FrameworkElementBase"
TargetType="{x:Type FrameworkElement}">
<Style x:Key="FrameworkElementBase" TargetType="{x:Type FrameworkElement}">
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ControlBase" TargetType="{x:Type Control}" BasedOn="{StaticResource FrameworkElementBase}">
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}" />
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Style.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3" />
</Style>
</Style.Resources>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
Expand All @@ -44,10 +52,7 @@
</Style>
<!-- Styles -->
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ControlBase}">
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="3, 0, 3, 0" />
Expand All @@ -68,9 +73,6 @@
</Setter>
</Style>
<Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource ControlBase}">
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}" />
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
Expand All @@ -90,8 +92,8 @@
Visibility="Collapsed"
Width="15" />
</Border>
<ContentPresenter Margin="5, -1, 0, 0"
HorizontalAlignment="Left"
<ContentPresenter HorizontalAlignment="Left"
Margin="5, -1, 0, 0"
RecognizesAccessKey="True"
VerticalAlignment="Center" />
</StackPanel>
Expand Down Expand Up @@ -132,7 +134,6 @@
</ControlTemplate>
<Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource ControlBase}">
<Setter Property="ScrollViewer.CanContentScroll" Value="False" />
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ComboBox}">
Expand All @@ -142,8 +143,7 @@
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
Foreground="{StaticResource DarkForeground}"
Name="ToggleButton"
Template="{StaticResource ComboBoxToggleButton}">
</ToggleButton>
Template="{StaticResource ComboBoxToggleButton}" />
<ContentPresenter Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
Expand Down Expand Up @@ -286,23 +286,74 @@
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Image}" BasedOn="{StaticResource FrameworkElementBase}" />
<Style TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ControlBase}">
<Style.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3" />
</Style>
</Style.Resources>
</Style>
<Style TargetType="{x:Type ItemsControl}" BasedOn="{StaticResource ControlBase}" />
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource FrameworkElementBase}">
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Label">
<Border>
<ContentPresenter RecognizesAccessKey="False" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}" BasedOn="{StaticResource ControlBase}">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<BulletDecorator Background="Transparent">
<BulletDecorator.Bullet>
<Grid Height="13"
Width="13">
<Ellipse x:Name="Border"
Fill="{StaticResource DarkBackground}"
Stroke="{StaticResource DarkBorderBrush}"
StrokeThickness="1" />
<Ellipse x:Name="CheckMark"
Fill="{StaticResource DarkForeground}"
Margin="4" />
</Grid>
</BulletDecorator.Bullet>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
Margin="5, -1, 0, 0"
RecognizesAccessKey="True"
VerticalAlignment="{TemplateBinding VerticalAlignment}" />
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="false">
<Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBackground}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBackground}" />
<Setter TargetName="Border" Property="Stroke" Value="{StaticResource DarkBorderBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{StaticResource DarkDisabled}" />
<Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBackground}" />
<Setter TargetName="Border" Property="Stroke" Value="{StaticResource DarkBorderBrush}" />
<Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource DarkDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- ScrollBar (BEGIN) -->
<Style x:Key="ScrollThumbs" TargetType="{x:Type Thumb}" BasedOn="{StaticResource FrameworkElementBase}">
<Setter Property="Template">
Expand Down Expand Up @@ -470,10 +521,7 @@
</Style.Triggers>
</Style>
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ControlBase}">
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}" />
<Setter Property="Content" Value="" />
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="3, 0, 3, 0" />
Expand Down Expand Up @@ -502,15 +550,7 @@
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource ControlBase}">
<Setter Property="Background" Value="{StaticResource DarkBackground}" />
<Setter Property="Foreground" Value="{StaticResource DarkForeground}" />
<Style.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3" />
</Style>
</Style.Resources>
</Style>
<Style TargetType="{x:Type ToolTip}" BasedOn="{StaticResource ControlBase}" />
</ResourceDictionary>
</Application.Resources>
</Application>
Loading

0 comments on commit 8d87c7c

Please sign in to comment.