summaryrefslogtreecommitdiff
path: root/.config/waybar/scripts/envyswitch.sh
blob: 34a52793b038df7e02386339457b2d5fc3a3c155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/env bash

mode="$(printf "Integrated\nHybrid\nNvidia" | rofi -dmenu -case-smart -matching "fuzzy" -p "Select the graphics mode:")"
printf $mode


case "$mode" in
    Integrated)
        sudo -A envycontrol -s integrated && notify-send "Graphics mode set to integrated"
        ;;
    Hybrid)
        sudo -A envcontrol -s hybrid && notify-send "Graphics mode set to hybrid"
        ;;
    Nvidia)
        sudo -A envycontrol -s nvidia && notify-send "Graphics mode set to nvidia"
        ;;
    *)
        exit 1
        ;;
esac