Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/env bash
- run_or_raise() {
- local _raise=${1}
- local _run=${2}
- wmctrl -x -a ${_raise} || ${_run} &
- }
- # tabs colors
- theme_light="tabbed -c -t #fafafa -T #9575cd -u #eeeeee -U #4d4d4d"
- theme_dark="tabbed -c -t #252525 -T #9575cd -u #2d2d2d -U #00997a"
- # focus WM_CLASS tabbed.tabbed OR start new tabbed if not exist
- run_or_raise "tabbed.tabbed" "${theme_light}"
- until wmctrl -lx | grep "tabbed.tabbed"; do
- sleep 0.25
- done
- #focus the current active window and start zathura
- wmctrl -r :ACTIVE:
- zathura -e $(wmctrl -lx | grep "tabbed.tabbed" | cut -d' ' -f1) "${1}"
Add Comment
Please, Sign In to add comment