yep, more dotfiles

sway: add jellyfin to idle inhibiter list

wiro.world 8b9edc96 5627e12f

verified
+32 -44
+32 -44
home-manager/fragments/sway.nix
··· 144 144 145 145 window = { 146 146 titlebar = false; 147 - commands = [ 148 - # Tag of shame 149 - { 150 - # Equivalent to `[shell="xwayland"] title_format "%title [XWayland]"` but for all other shells 151 - criteria.shell = "^((?!xdg_shell).)*$"; 152 - command = ''title_format "%title <small>[%shell]</small>"''; 153 - } 154 - 155 - # Toggle floating mode for some specific windows 156 - { 157 - # TODO: Bitwarden window glitches on opening 158 - criteria = { 159 - app_id = "^firefox$"; 160 - title = "Bitwarden Password Manager"; 161 - }; 162 - command = ''floating enable''; 163 - } 164 - { 165 - # Toggles floating for every Unity window but the main one 166 - # Only the main window begins with `Unity - ` 167 - criteria = { 168 - title = "^((?!^Unity - ).)*$"; 169 - class = "^Unity$"; 170 - instance = "^Unity$"; 147 + commands = 148 + let 149 + fullscreenAppInhibitIdle = appId: { 150 + criteria.app_id = "^${appId}$"; 151 + command = "inhibit_idle fullscreen"; 171 152 }; 172 - command = ''floating enable''; 173 - } 153 + in 154 + [ 155 + # Tag of shame 156 + { 157 + # Equivalent to `[shell="xwayland"] title_format "%title [XWayland]"` but for all other shells 158 + criteria.shell = "^((?!xdg_shell).)*$"; 159 + command = ''title_format "%title <small>[%shell]</small>"''; 160 + } 174 161 175 - # Inhibit IDLE when these are fullscreen 176 - { 177 - criteria.app_id = "firefox"; 178 - command = "inhibit_idle fullscreen"; 179 - } 180 - { 181 - criteria.app_id = "mpv"; 182 - command = "inhibit_idle fullscreen"; 183 - } 184 - { 185 - criteria.app_id = "spotify"; 186 - command = "inhibit_idle fullscreen"; 187 - } 188 - { 189 - criteria.app_id = "zen-beta"; 190 - command = "inhibit_idle fullscreen"; 191 - } 192 - ]; 162 + # Toggle floating mode for some specific windows 163 + { 164 + # Toggles floating for every Unity window but the main one 165 + # Only the main window begins with `Unity - ` 166 + criteria = { 167 + title = "^((?!^Unity - ).)*$"; 168 + class = "^Unity$"; 169 + instance = "^Unity$"; 170 + }; 171 + command = ''floating enable''; 172 + } 173 + 174 + # Inhibit IDLE when these are fullscreen 175 + (fullscreenAppInhibitIdle "firefox") 176 + (fullscreenAppInhibitIdle "mpv") 177 + (fullscreenAppInhibitIdle "spotify") 178 + (fullscreenAppInhibitIdle "zen-beta") 179 + (fullscreenAppInhibitIdle "org.jellyfin.JellyfinDesktop") 180 + ]; 193 181 }; 194 182 195 183 focus.followMouse = false;