Compare commits
No commits in common. "2aedbced667e13e80cc028a4552e294128fb6460" and "bc6d6815b746a3a3b0c192c7825ce147b226cccf" have entirely different histories.
2aedbced66
...
bc6d6815b7
5 changed files with 1 additions and 51 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +0,0 @@
|
||||||
pkg/
|
|
||||||
src/
|
|
||||||
sway-dynamic-*/
|
|
||||||
sway-dynamic-*.pkg.tar.zst
|
|
17
PKGBUILD
17
PKGBUILD
|
@ -1,17 +0,0 @@
|
||||||
# Maintainer redxef <redxef@redxef.at>
|
|
||||||
pkgname=sway-dynamic
|
|
||||||
pkgver=1.0.1
|
|
||||||
pkgrel=1
|
|
||||||
pkgdesc="Helper files to dynamically launch sway for NVIDIA comaptibility or not"
|
|
||||||
arch=('any')
|
|
||||||
url="https://gitea.redxef.at/redxef/sway-dynamic"
|
|
||||||
license=('MIT')
|
|
||||||
depends=('sway' 'sway-nvidia')
|
|
||||||
source=("$pkgname-$pkgver::git+$url.git#tag=v$pkgver")
|
|
||||||
sha256sums=('SKIP')
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "$pkgname-$pkgver"
|
|
||||||
install -Dm755 sway-dynamic "$pkgdir/usr/bin/sway-dynamic"
|
|
||||||
install -Dm644 sway-dynamic.desktop "$pkgdir/usr/share/wayland-sessions/sway-dynamic.desktop"
|
|
||||||
}
|
|
|
@ -1,9 +1,3 @@
|
||||||
# sway-dynamic
|
# sway-dynamic
|
||||||
|
|
||||||
Dynamically switch between sway and sway-nvidia based on active gpu.
|
Dynamically switch between sway and sway-nvidia based on active gpu.
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Blacklist the module which should not be loaded on boot, the script
|
|
||||||
detects if the `nvidia` or `nouveau` driver is loaded and either calls
|
|
||||||
`sway-nvidia` or `sway`.
|
|
18
sway-dynamic
18
sway-dynamic
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
active_module() {
|
|
||||||
if [ -n "$(lsmod | grep "nvidia")" ]; then
|
|
||||||
echo "nvidia"
|
|
||||||
elif [ -n "$(lsmod | grep "nouveau")" ]; then
|
|
||||||
echo nouveau
|
|
||||||
else
|
|
||||||
# no nvidia modules loaded
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$(active_module)" = 'nvidia' ]; then
|
|
||||||
exec sway-nvidia
|
|
||||||
else
|
|
||||||
exec sway
|
|
||||||
fi
|
|
|
@ -1,5 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Name=Sway (Dynamic)
|
|
||||||
Comment=An i3-compatible Wayland compositor (NVIDIA Fixes or Standard)
|
|
||||||
Exec=sway-dynamic
|
|
||||||
Type=Application
|
|
Loading…
Reference in a new issue