diff --git a/group_vars/all b/group_vars/all index fd3ea32..087f027 100644 --- a/group_vars/all +++ b/group_vars/all @@ -102,6 +102,7 @@ browser_choices: - tor-browser-en - play - qcode + - "| xclip -selection c" passwordless_sudo: - /usr/bin/openvpn* diff --git a/roles/browsers/templates/browser.sh.j2 b/roles/browsers/templates/browser.sh.j2 index 09335a1..0b155a0 100644 --- a/roles/browsers/templates/browser.sh.j2 +++ b/roles/browsers/templates/browser.sh.j2 @@ -1,6 +1,10 @@ -#!/bin/sh +#!/bin/bash # {{ ansible_managed }} menu=$(echo -e "{% for browser in browser_choices %}{{ browser }}\n{% endfor %}" | rofi -dmenu -p "browser ") -eval $menu \"$@\" > /dev/null 2>&1 & +if [[ $menu == \|* ]]; then + eval echo \"$@\" $menu > /dev/null 2>&1 & +else + eval $menu \"$@\" > /dev/null 2>&1 & +fi