From f35f43c2ce2ed7f72f3b0aa4446df706f24f1701 Mon Sep 17 00:00:00 2001
From: Yaroslav <contact@yaroslavps.com>
Date: Fri, 18 Sep 2020 13:14:55 +0300
Subject: Switch to Alacritty terminal emulator

Updated some other configs and scripts to better interact with
Alacritty.

Also rely on fontconfig file, instead of specifying the font in each
config (i.e. use font family 'monospace').
---
 dotfiles/.local/bin/ddquakemite | 10 +++++-----
 dotfiles/.local/bin/menuman     |  4 +---
 dotfiles/.local/bin/tmuxatt     |  3 +++
 3 files changed, 9 insertions(+), 8 deletions(-)
 create mode 100755 dotfiles/.local/bin/tmuxatt

(limited to 'dotfiles/.local/bin')

diff --git a/dotfiles/.local/bin/ddquakemite b/dotfiles/.local/bin/ddquakemite
index f449a5f..8760e14 100755
--- a/dotfiles/.local/bin/ddquakemite
+++ b/dotfiles/.local/bin/ddquakemite
@@ -1,13 +1,13 @@
 #!/bin/sh
 
-if ! [ -z "$(swaymsg -t get_tree | grep 'quakemite')" ]; then
-    if [ -z "$(swaymsg -t get_tree | grep -A 46 'quakemite' | tail -n 1 | grep 'true')" ]; then
-        swaymsg '[title="quakemite"] scratchpad show'
+if ! [ -z "$(swaymsg -t get_tree | grep 'ddterminal')" ]; then
+    if [ -z "$(swaymsg -t get_tree | grep -A 46 'ddterminal' | tail -n 1 | grep 'true')" ]; then
+        swaymsg '[title="ddterminal"] scratchpad show'
     else
-        swaymsg '[title="quakemite"] move scratchpad'
+        swaymsg '[title="ddterminal"] move scratchpad'
     fi
 else
-    $TERMINAL -t "quakemite" -e "$SHELL -c 'TERM=xterm-256color; TERMINAL=termite; tmux -f "$HOME/.config/tmux/tmux.conf" a || tmux -f "$HOME/.config/tmux/tmux.conf"'" &
+    $TERMINAL -t "ddterminal" -e tmuxatt &
     sleep 0.2s
     currenty=$(swaygetcurrentwindow | cut -d ' ' -f1 | cut -d ',' -f2 )
     let moveup=$currenty-25
diff --git a/dotfiles/.local/bin/menuman b/dotfiles/.local/bin/menuman
index 868d801..fe79667 100755
--- a/dotfiles/.local/bin/menuman
+++ b/dotfiles/.local/bin/menuman
@@ -9,7 +9,6 @@ else
   # Source settings from .bemenurc
   . ~/.config/bemenurc
 
-  action="$TERMINAL -e"
   chosen=$(printf "$list" | bemenu -p "Select man page:" -i -l 25 --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")
 fi
 
@@ -17,5 +16,4 @@ if [ -z "$chosen" ]; then
     exit 0
 fi
 
-[ -n "$action" ] && $action "man $chosen" && exit 0
-man $chosen
+$TERMINAL -t "man $chosen" -e man $chosen
diff --git a/dotfiles/.local/bin/tmuxatt b/dotfiles/.local/bin/tmuxatt
new file mode 100755
index 0000000..1d9a2ea
--- /dev/null
+++ b/dotfiles/.local/bin/tmuxatt
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+tmux a || tmux
-- 
cgit v1.2.3