Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4db5069
Refactor code structure for improved readability and maintainability
retiarylime Oct 21, 2025
21872dc
Enhance Dim Unfocused Windows extension with configurable settings an…
retiarylime Oct 21, 2025
3bc00b0
Refactor settings schema for Dim Unfocused Windows extension with enh…
retiarylime Oct 21, 2025
9c2c660
Update UUID in extension and metadata for consistency and clarity
retiarylime Oct 21, 2025
a2ceb4f
Refactor settings schema for Dim Unfocused Windows extension to impro…
retiarylime Oct 21, 2025
c7759cd
Merge pull request #1 from retiarylime:1.1.0
retiarylime Oct 21, 2025
7bee4e8
Fix UUID in metadata for Dim Unfocused Windows extension to ensure co…
retiarylime Oct 21, 2025
13ded19
Fix UUID in extension for consistency and enhance settings schema wit…
retiarylime Oct 21, 2025
101a65c
Remove unused screenshot for Dim Unfocused Windows extension to strea…
retiarylime Oct 21, 2025
7b0e539
Enhance dimming functionality by adding settings for dimming enableme…
retiarylime Oct 21, 2025
d931477
Update settings schema to allow full opacity range for unfocused wind…
retiarylime Oct 21, 2025
dcf4c2f
Create dim-only mode
retiarylime Oct 21, 2025
c453474
refined settings for opacity and brightness
retiarylime Oct 21, 2025
6537fe8
Ensure toggle-keybinding and excude-dialogs are working
retiarylime Oct 21, 2025
e7e2445
Merge pull request #4 from retiarylime:1.2.4
retiarylime Oct 21, 2025
6fe5519
improve extension description
retiarylime Oct 21, 2025
4e94961
Merge pull request #5 from retiarylime:1.2.4
retiarylime Oct 21, 2025
45cc10b
Refactor code structure for improved readability and maintainability
retiarylime Oct 22, 2025
4d62b5a
Merge pull request #6 from retiarylime:1.2.5
retiarylime Oct 22, 2025
45a3978
Refactor code structure for improved readability and maintainability
retiarylime Oct 22, 2025
f3fe16a
Merge pull request #7 from retiarylime/duw-1.2.5
retiarylime Oct 22, 2025
53b678a
Merge branch 'linuxmint:master' into master
retiarylime Oct 22, 2025
b21ba85
Update README with centered settings image
retiarylime Oct 22, 2025
58ebd7a
Merge branch 'linuxmint:master' into master
retiarylime Oct 22, 2025
daae71b
Add GNU General Public License v2
retiarylime Oct 22, 2025
05bdb3c
Initialize LICENSE file
retiarylime Oct 22, 2025
cf637e2
Change license from MIT to GPL v3.0
retiarylime Oct 22, 2025
6e21a9e
Revert "Change license from MIT to GPL v3.0"
retiarylime Oct 22, 2025
f117b95
Revert "Initialize LICENSE file"
retiarylime Oct 22, 2025
d2a8e53
Revert "Add GNU General Public License v2"
retiarylime Oct 22, 2025
0abd430
Change license from MIT to GNU General Public License v3.0
retiarylime Oct 22, 2025
405776d
Merge pull request #10 from retiarylime:main
retiarylime Oct 22, 2025
8fe48cc
Update animation settings descriptions for clarity
retiarylime Oct 22, 2025
8e0b0af
Merge pull request #11 from retiarylime:master
retiarylime Oct 22, 2025
61d0087
Update screenshot for dim-unfocused-windows extension
retiarylime Oct 22, 2025
e10e7d3
Update screenshot for dim-unfocused-windows extension
retiarylime Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions dim-unfocused-windows@retiarylime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Changelog

All notable changes to the Dim Unfocused Windows extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2025-10-22

### Added
- ✅ **NEW** - Separate opacity and brightness controls for independent visual effects
- ✅ **NEW** - Keyboard shortcut to toggle dimming on/off (default: Super+Shift+D)
- ✅ **IMPROVED** - Enhanced dialog window detection and exclusion
- ✅ **IMPROVED** - Simplified settings interface with cleaner organization

### Changed
- 🔄 **BREAKING** - Removed "Enable dimming" checkbox - extension is always active
- 🔄 **BREAKING** - Removed "Dimming method" selection - now applies both opacity and brightness simultaneously
- 🔄 **BREAKING** - Replaced single "dim" slider with separate "opacity" and "brightness" sliders
- 🔄 **BREAKING** - Removed "Dim minimized windows" option for simplified behavior
- 🔄 **UPDATED** - Opacity slider: 0-100% (default 70%) - controls window transparency
- 🔄 **UPDATED** - Brightness slider: 0-100% (default 70%) - controls window darkness/lightness
- 🔄 **UPDATED** - Brightness uses Clutter.BrightnessContrastEffect for true brightness control

### Technical Improvements
- 🎯 **ENHANCED** - Dual visual effects: opacity reduction + brightness darkening
- 🎯 **ENHANCED** - Keybinding system with proper setup/cleanup and conflict handling
- 🎯 **ENHANCED** - Improved window type detection for dialogs and modal windows
- 🎯 **ENHANCED** - Better state management for toggle functionality
- 🎯 **ENHANCED** - More precise brightness control using Clutter effects

### Verified Working
- ✅ Separate opacity and brightness controls working independently
- ✅ Keyboard toggle (Super+Shift+D) enables/disables dimming instantly
- ✅ Dialog windows properly excluded when setting is enabled
- ✅ Smooth animations for both opacity and brightness changes
- ✅ Real-time settings updates without restart required

## [1.0] - 2025-10-21

### Added
- ✅ **WORKING** - Initial release of Dim Unfocused Windows extension
- ✅ **WORKING** - Automatic dimming of unfocused windows (70% opacity / 179/255)
- ✅ **WORKING** - Real-time focus detection and window state management
- ✅ **WORKING** - Smooth animation transitions (300ms easeInOutQuad)
- ✅ **WORKING** - Multi-application support (Terminal, VS Code, Browser, etc.)
- Configurable opacity settings (10-95%) via settings panel
- Multiple animation easing options (linear, quad, cubic variants)
- Smart window filtering:
- Option to exclude dialog windows
- Option to include/exclude minimized windows
- Automatic exclusion of system windows (desktop, dock, notifications, etc.)
- Settings panel with organized sections
- Support for Cinnamon 4.0 through 6.2
- Proper state management and cleanup
- Signal management for performance optimization
- Window state tracking with original opacity preservation

### Technical Features
- Uses native Cinnamon APIs for window management (`global.get_window_actors()`)
- Implements proper extension lifecycle (init, enable, disable)
- Memory efficient with automatic cleanup
- Compatible with existing window management extensions
- Follows Cinnamon extension development best practices
- Robust error handling and fallback to defaults

### Verified Working
- ✅ Focus detection between Terminal, VS Code, Brave browser, Extensions panel
- ✅ Smooth dimming: unfocused windows → 179 opacity (70% visible)
- ✅ Smooth restoration: focused windows → 255 opacity (100% visible)
- ✅ Real-time updates with sub-second response time
- ✅ Proper cleanup on disable

### Documentation
- Comprehensive README with installation and usage instructions
- Inline code documentation with detailed logging
- Troubleshooting guide with working solutions
- Technical implementation details
674 changes: 674 additions & 0 deletions dim-unfocused-windows@retiarylime/LICENSE

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions dim-unfocused-windows@retiarylime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Dim Unfocused Windows

A Cinnamon extension that automatically dims unfocused windows to enhance visual clarity and reduce distractions by making it easier to identify the active window.

![screenshot](screenshot.png)
![screenshot2](screenshot2.png)
<p align="center">
<img src="settings.png" width="500">
<p/>

## Features

1. **Automatic Dimming**: Windows automatically become semi-transparent when they lose focus
2. **Smooth Animations**: Configurable transition animations with multiple easing options for a polished experience
3. **Customizable Effects**: Adjust opacity (0-100%) and brightness (0-100%) levels to suit your preferences
4. **Smart Filtering**: Option to exclude dialog windows and system windows
5. **Performance Optimized**: Lightweight implementation with minimal system impact
6. **Keyboard Toggle**: Quick keyboard shortcut (default: Super+Shift+D) to temporarily disable/enable dimming
7. **Real-time Settings**: Changes to settings are applied immediately without restart
8. **Multi-Application Support**: Works seamlessly across Terminal, browsers, editors, and other applications

## Requirements

This extension requires Cinnamon 4.0 or better.

## Limitations

1. The dimming effect applies visual filters to window actors, which may interact differently with certain window types or themes
2. In some cases, window decorations or borders may not dim consistently with the window content
3. The brightness effect relies on Clutter's brightness/contrast effects, which may not be available in all Cinnamon versions (though supported versions should work fine)
4. Dialog windows are excluded by default to prevent issues with modal dialogs and file choosers, but it may be inconsistent in some cases

## Installation

<!-- This extension is available on Cinnamon Spices. It can be installed directly from within Cinnamon using the "Extensions" application under the "System Settings".

[Dim Unfocused Windows on Cinnamon Spices](https://cinnamon-spices.linuxmint.com/extensions/view/XXX) -->

For the latest development version, follow these instructions to install manually:

1. Clone the repository (or download the latest release by clicking the green "Code" button above, then "Download ZIP")

```
git clone https://github.com/retiarylime/dim-unfocused-windows.git
```

2. If you downloaded a ZIP, extract it into a directory of your choice

```
unzip ~/Downloads/dim-unfocused-windows-main.zip
```

3. Change directory to the cloned repository or extracted ZIP file

4. Copy or link the "dim-unfocused-windows@retiarylime" directory into the "~/.local/share/cinnamon/extensions/" directory

```
cp -r $PWD/files/dim-unfocused-windows@retiarylime ~/.local/share/cinnamon/extensions/
```

5. Open the Cinnamon Extensions application (Menu → Preferences → Extensions)

6. Find "Dim Unfocused Windows" in the list and click the "+" button to enable it

7. Click the settings (gears) icon to open the settings panel and configure your preferences

## Settings

### Unfocused Window Effects
- **Opacity**: Control how transparent unfocused windows become (0-100%, default: 70%)
- **Brightness**: Adjust the brightness level of unfocused windows (0-100%, default: 70%)

### Animation Settings
- **Animation duration**: Set the speed of the dimming transition (0-1000ms, default: 300ms)
- **Animation type**: Choose from various easing curves (linear, quadratic, cubic) for smooth transitions

### Other Settings
- **Exclude dialog windows**: Prevent dimming of dialog boxes, file choosers, and preference windows
- **Toggle keybinding**: Set a keyboard shortcut to quickly enable/disable dimming (default: Super+Shift+D)

## How It Works

The extension monitors window focus changes using Cinnamon's built-in signals:
- When a window gains focus, all other windows are dimmed
- When a window loses focus, it gets dimmed unless it becomes the new focused window
- Window states are tracked to preserve original opacity values
- Smooth animations provide visual feedback during transitions

## Technical Details

- Uses `Meta.Display` focus signals for window tracking
- Leverages `Clutter.Actor` opacity manipulation for visual effects
- Implements `Clutter.BrightnessContrastEffect` for brightness control
- Utilizes `Tweener` for smooth animations
- Employs `Settings.ExtensionSettings` for configuration management
- Follows Cinnamon extension best practices for lifecycle management

## Troubleshooting

**Extension not working after installation:**
- Restart Cinnamon (Alt+F2, type 'r', press Enter)
- Check if the extension is enabled in Settings → Extensions
- Look for error messages in `~/.xsession-errors` or run `journalctl -f` while enabling

**Performance issues:**
- Reduce animation duration in settings
- Consider reducing the number of open windows to improve performance

**Windows getting minimized instead of dimmed:**
- This was fixed in v1.0 - ensure you're using the latest version
- Restart Cinnamon after updating (Alt+F2, type 'r', press Enter)

**Windows not restoring properly:**
- Disable and re-enable the extension
- Check for conflicts with other window management extensions
- Use the keyboard toggle (Super+Shift+D) to reset the extension state

**Settings not applying:**
- Changes should apply immediately, but you can restart Cinnamon if needed
- Check the extension logs in `~/.xsession-errors` for any errors

**Conflicts with other extensions:**
- If you have installed any window management or transparency-related extensions, ensure they don't conflict with Dim Unfocused Windows. You may need to disable them if you experience issues

## Feedback

Feel free to open an [issue](https://github.com/retiarylime/dim-unfocused-windows/issues) on this [GitHub repository](https://github.com/retiarylime/dim-unfocused-windows) if you want to make a suggestion or report a problem.

If you like this Cinnamon extension, "star" this GitHub repository to encourage continued development. Thanks!

## Credits

This extension was developed following Cinnamon extension development best practices and utilizes the standard Cinnamon APIs for window management and visual effects.

## License

This extension is released under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

## Changelog

See CHANGELOG.md for detailed version history.
Loading