Switch `grave` pop-up terminal to use Alacritty

TODO:
- Need to update existing window detection to find 'Alacritty-grave'
app_id.
- Also switch to AnyEvent::Sway
This commit is contained in:
John Mertz 2023-04-09 21:40:34 -04:00
parent 71c0f653b8
commit 6c466e6dc9
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 4 additions and 5 deletions

View File

@ -6,7 +6,9 @@ use warnings;
# Workspace to push the terminal to when dismissed # Workspace to push the terminal to when dismissed
my $hidden = 'grave'; my $hidden = 'grave';
# Terminal application used for pop-up (swaymsg 'name') # Terminal application used for pop-up (swaymsg 'name')
my $term = 'uxterm'; my $term = 'alacritty';
# App ID
my $class = 'Alacritty-grave';
use JSON::XS; use JSON::XS;
my $json = JSON::XS->new(); my $json = JSON::XS->new();
@ -59,14 +61,11 @@ foreach my $d (@{$root->{nodes}}) {
} }
} }
} }
print "Active workspace = $workspace\n"
. "Terminal ID = $term_id\n"
. "Terminal WS = $term_ws\n";
# If there is no terminal found, spawn one # If there is no terminal found, spawn one
if (!defined($term_id)) { if (!defined($term_id)) {
print "No term running, starting one\n"; print "No term running, starting one\n";
exec $term `$term --config-file $ENV{HOME}/.dotfiles/alacritty/grave.yml --class $class`;
# If the current workspace is known and terminal isn't on it, bring and focus # If the current workspace is known and terminal isn't on it, bring and focus
} elsif ($workspace != $term_ws) { } elsif ($workspace != $term_ws) {
print "Term not on current workspace, bringing it\n"; print "Term not on current workspace, bringing it\n";