Compare commits
3 commits
568727ed6f
...
f80ea32901
Author | SHA1 | Date | |
---|---|---|---|
f80ea32901 | |||
4b7f822626 | |||
f23a52224d |
3 changed files with 5 additions and 39 deletions
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
tubearchivist = {
|
tubearchivist = {
|
||||||
image = "docker.io/bbilly1/tubearchivist:v0.4.7";
|
image = "docker.io/bbilly1/tubearchivist:v0.4.8";
|
||||||
dependsOn = [ "archivist-es" "archivist-redis" ];
|
dependsOn = [ "archivist-es" "archivist-redis" ];
|
||||||
ports = [ "127.0.0.1:9887:8000" ];
|
ports = [ "127.0.0.1:9887:8000" ];
|
||||||
environmentFiles = [ config.age.secrets.tubearchivist-environment-ta.path ];
|
environmentFiles = [ config.age.secrets.tubearchivist-environment-ta.path ];
|
||||||
|
|
|
@ -5,12 +5,12 @@ let
|
||||||
|
|
||||||
borders-config = [
|
borders-config = [
|
||||||
"style=round"
|
"style=round"
|
||||||
"active_color=0xeebd93f9"
|
"active_color=0xffbd93f9"
|
||||||
"inactive_color=0xeeabb2bf"
|
"inactive_color=0xffabb2bf"
|
||||||
"width=7.0"
|
"width=7.0"
|
||||||
"blur_radius=15.0"
|
|
||||||
"hidpi=on"
|
"hidpi=on"
|
||||||
"ax_focus=on"
|
"ax_focus=on"
|
||||||
|
"blacklist='Dropover,LaunchBar'"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,6 @@ let
|
||||||
|
|
||||||
window_padding = 10;
|
window_padding = 10;
|
||||||
|
|
||||||
native-tab-apps = [ "Finder" "TablePlus" ];
|
|
||||||
|
|
||||||
unmanaged-apps = [
|
unmanaged-apps = [
|
||||||
"Dash"
|
"Dash"
|
||||||
"Dato"
|
"Dato"
|
||||||
|
@ -43,29 +41,6 @@ let
|
||||||
${yabai-bin} -m config --space $space_index right_padding $padding
|
${yabai-bin} -m config --space $space_index right_padding $padding
|
||||||
${yabai-bin} -m config --space $space_index window_gap $padding
|
${yabai-bin} -m config --space $space_index window_gap $padding
|
||||||
'';
|
'';
|
||||||
|
|
||||||
script-native-tab-fix = pkgs.writeShellScript "yabai-native-tab-fix.sh" ''
|
|
||||||
app_display=$(${yabai-bin} -m query --windows --window $YABAI_WINDOW_ID | ${jq-bin} '.display')
|
|
||||||
[ -z "$app_display" ] && app_display=$(${yabai-bin} -m query --displays --display mouse | ${jq-bin} '.index')
|
|
||||||
|
|
||||||
ql_windows=$(${yabai-bin} -m query --windows --display $app_display | ${jq-bin} 'map(select(.subrole == "Quick Look")) | length')
|
|
||||||
|
|
||||||
if [ $app_display -eq 1 ]; then
|
|
||||||
win_count=$(${yabai-bin} -m query --windows --display next | ${jq-bin} 'length')
|
|
||||||
[ -z "$win_count" ] && win_count=0
|
|
||||||
|
|
||||||
if [ $ql_windows -eq 0 ] && [ $win_count -gt 0 ]; then
|
|
||||||
${yabai-bin} -m display --focus next && yabai -m display --focus prev
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
win_count=$(${yabai-bin} -m query --windows --display prev | ${jq-bin} 'length')
|
|
||||||
[ -z "$win_count" ] && win_count=0
|
|
||||||
|
|
||||||
if [ $ql_windows -eq 0 ] && [ $win_count -gt 0 ]; then
|
|
||||||
${yabai-bin} -m display --focus prev && yabai -m display --focus next
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.yabai = {
|
services.yabai = {
|
||||||
|
@ -98,16 +73,7 @@ in
|
||||||
# Smart Gaps
|
# Smart Gaps
|
||||||
yabai -m signal --add event=window_created action='${script-smart-padding}'
|
yabai -m signal --add event=window_created action='${script-smart-padding}'
|
||||||
yabai -m signal --add event=window_destroyed action='${script-smart-padding}'
|
yabai -m signal --add event=window_destroyed action='${script-smart-padding}'
|
||||||
'' + lib.strings.concatMapStrings
|
'';
|
||||||
# Hacky workaround for https://github.com/koekeishiya/yabai/issues/68
|
|
||||||
(app: ''
|
|
||||||
# Native tab handling for ${app}
|
|
||||||
yabai -m signal --add event=window_created app="^${app}$" action='${script-native-tab-fix}'
|
|
||||||
yabai -m signal --add event=window_destroyed app="^${app}$" action='${script-native-tab-fix}'
|
|
||||||
yabai -m signal --add event=window_moved app="^${app}$" action='${script-native-tab-fix}'
|
|
||||||
yabai -m signal --add event=window_resized app="^${app}$" action='${script-native-tab-fix}'
|
|
||||||
'')
|
|
||||||
native-tab-apps;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.skhd.skhdConfig = ''
|
services.skhd.skhdConfig = ''
|
||||||
|
|
Loading…
Reference in a new issue