[PR #249] [MERGED] Screen change script argument #1586

Closed
opened 2026-05-05 07:56:58 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/debauchee/barrier/pull/249
Author: @vorph1
Created: 2/5/2019
Status: Merged
Merged: 2/10/2019
Merged by: @AdrianKoshka

Base: masterHead: screen-change-script


📝 Commits (3)

📊 Changes

5 files changed (+72 additions, -34 deletions)

View changed files

📝 .gitignore (+5 -0)
📝 src/lib/barrier/ArgParser.cpp (+5 -1)
📝 src/lib/barrier/ServerApp.cpp (+57 -30)
📝 src/lib/barrier/ServerArgs.cpp (+4 -3)
📝 src/lib/barrier/ServerArgs.h (+1 -0)

📄 Description

Added a new server cli argument --screen-change-script that is invoked with the screen name as the first parameter.

My main use case for barrier is for VMs with GPU passthrough so I use this to switch my monitor input ie.

#!/bin/bash
case "$1" in
    "WIN10")
        notify-send "Changing to guest output"
        sudo ddcutil -d 1 setvcp 0x60 0x01
        ;;
    "desktop")
        notify-send "Changing to host output"
        sudo ddcutil -d 1 setvcp 0x60 0x03
        ;;
esac

This is for linux server only.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/debauchee/barrier/pull/249 **Author:** [@vorph1](https://github.com/vorph1) **Created:** 2/5/2019 **Status:** ✅ Merged **Merged:** 2/10/2019 **Merged by:** [@AdrianKoshka](https://github.com/AdrianKoshka) **Base:** `master` ← **Head:** `screen-change-script` --- ### 📝 Commits (3) - [`24b3ee5`](https://github.com/debauchee/barrier/commit/24b3ee547ca36397e4d0af8dad4b64567d8a1016) Screen change script argument - [`783fbbd`](https://github.com/debauchee/barrier/commit/783fbbd84da11686a145007120f4768b0958f518) Use std::system - [`bf1fd35`](https://github.com/debauchee/barrier/commit/bf1fd352374ed7b17e6f498f589fbf914ebad388) Start script via execl ### 📊 Changes **5 files changed** (+72 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+5 -0) 📝 `src/lib/barrier/ArgParser.cpp` (+5 -1) 📝 `src/lib/barrier/ServerApp.cpp` (+57 -30) 📝 `src/lib/barrier/ServerArgs.cpp` (+4 -3) 📝 `src/lib/barrier/ServerArgs.h` (+1 -0) </details> ### 📄 Description Added a new server cli argument `--screen-change-script` that is invoked with the screen name as the first parameter. My main use case for barrier is for VMs with GPU passthrough so I use this to switch my monitor input ie. ``` #!/bin/bash case "$1" in "WIN10") notify-send "Changing to guest output" sudo ddcutil -d 1 setvcp 0x60 0x01 ;; "desktop") notify-send "Changing to host output" sudo ddcutil -d 1 setvcp 0x60 0x03 ;; esac ``` This is for linux server only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 07:56:58 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1586
No description provided.