#!/bin/sh HDMI_ON_OFF=$(xrandr | grep Screen | awk '{ print $8 }') CONFIG="$HOME/.config/i3/config" case $HDMI_ON_OFF in 3280) sed -i '/"ncmpzug"/s/462/1822/g' $CONFIG st -n ncmpzug -e ncmpcpp-ueberzug ;; 1920) sed -i '/"ncmpzug"/s/1822/462/g' $CONFIG st -n ncmpzug -e ncmpcpp-ueberzug ;; esac