diff options
author | Thomas Letan <lthms@soap.coffee> | 2022-09-10 11:49:34 +0200 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2022-09-10 11:49:34 +0200 |
commit | 0b442b6093e61f1f8e4f6abec40ba5c496eff5e3 (patch) | |
tree | 8406827b50ea731925ac82c1f74332f15915d98a | |
parent | Implement a command that allows to move to a specific workspace (diff) |
Fade unfocused windows
-rw-r--r-- | bin/spatial/ribbon.ml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/spatial/ribbon.ml b/bin/spatial/ribbon.ml index 5af50c1..176bb10 100644 --- a/bin/spatial/ribbon.ml +++ b/bin/spatial/ribbon.ml @@ -277,6 +277,7 @@ let hide_window_command window = let show_window_command workspace window = [ + Command.With_criteria (Con_id window, Opacity 0.75); Command.With_criteria (Con_id window, Move_container workspace); Command.With_criteria (Con_id window, Focus); ] @@ -318,8 +319,15 @@ let arrange_commands ?force_focus workspace ribbon = let focus_command = match (force_focus, ribbon.visible) with | None, Some (f, l) -> - [ Command.With_criteria (Con_id (List.nth l f), Focus) ] - | Some w, _ -> [ Command.With_criteria (Con_id w, Focus) ] + [ + Command.With_criteria (Con_id (List.nth l f), Focus); + Command.With_criteria (Con_id (List.nth l f), Opacity 1.0); + ] + | Some w, _ -> + [ + Command.With_criteria (Con_id w, Focus); + Command.With_criteria (Con_id w, Opacity 1.0); + ] | _ -> [] in hide_commands @ show_commands @ focus_command |