Binary instead of definition

This commit is contained in:
2024-03-31 14:01:16 +02:00
parent 52255410e3
commit 1d95300a22
3 changed files with 25 additions and 3 deletions
Regular → Executable
+24 -2
View File
@@ -1,5 +1,27 @@
# xrandr wrapper for nushell #!/usr/bin/env nu
def xrandr [] {
# default view: only main screen
def "main d" [] {
^xrandr --output $env.PRIMARY_SCREEN --mode 2560x1440 --primary --output $env.SECONDARY_SCREEN --off --output HDMI-0 --off
}
# bureau view: both screens side to side
def "main b" [] {
^xrandr --output $env.PRIMARY_SCREEN --mode 2560x1440 --primary --output $env.SECONDARY_SCREEN --mode 1920x1080 --right-of $env.PRIMARY_SCREEN --output HDMI-0 --off
}
# television view: only TV on (720p so that menus are readable)
def "main t" [] {
^xrandr --output $env.PRIMARY_SCREEN --off --output $env.SECONDARY_SCREEN --off --output HDMI-0 --mode 1280x720 --primary
}
# stream view: only secondary screen
def "main s" [] {
^xrandr --output $env.SECONDARY_SCREEN --mode 1920x1080 --primary --output $env.PRIMARY_SCREEN --off
}
def main [] {
mut output = [] mut output = []
mut current_screen = { mut current_screen = {
name: "" name: ""
-1
View File
@@ -9,6 +9,5 @@ source ~/.config/nushell/config/update.nu
source ~/.config/nushell/config/gclone.nu source ~/.config/nushell/config/gclone.nu
source ~/.config/nushell/config/pass.nu source ~/.config/nushell/config/pass.nu
source ~/.config/nushell/config/docker.nu source ~/.config/nushell/config/docker.nu
source ~/.config/nushell/config/xrandr.nu
source ~/.config/nushell/config/tfetch.nu source ~/.config/nushell/config/tfetch.nu
+1
View File
@@ -261,6 +261,7 @@ $env.PATH = ($env.PATH
| split row (char esep) | split row (char esep)
| prepend ('/opt/cuda/bin') | prepend ('/opt/cuda/bin')
| prepend ($env.HOME + '/.config/polymny/bin') | prepend ($env.HOME + '/.config/polymny/bin')
| prepend ($env.HOME + '/.config/nushell/bin')
| prepend ($env.HOME + '/.config/dotfiles/bin') | prepend ($env.HOME + '/.config/dotfiles/bin')
| prepend ($env.HOME + '/.config/dotfiles/bin-extra') | prepend ($env.HOME + '/.config/dotfiles/bin-extra')
| prepend ($env.HOME + '/.cargo/bin') | prepend ($env.HOME + '/.cargo/bin')