ENH launch brave differently depending on system
This commit is contained in:
parent
e362dcc91f
commit
dfce270f47
|
@ -24,8 +24,7 @@ data:
|
|||
vpn: {{ and $desktop (promptBool "vpn" false) }}
|
||||
seafile: {{ and $desktop (promptBool "seafile" false) }}
|
||||
activitywatch: {{ and $desktop (promptBool "activitywatch" false) }}
|
||||
conky_alias: {{ if $desktop -}}{{ (promptString "conky" "none") }}{{ else }}none{{ end }}
|
||||
rofi_alias: {{ if $desktop -}}{{ (promptString "rofi-alias" "none") }}{{ else }}none{{ end }}
|
||||
desktop_alias: {{ if $desktop -}}{{ (promptString "alias" "none") }}{{ else }}none{{ end }}
|
||||
development:
|
||||
|
||||
{{- /* emacs implies that most development options are true */}}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
type: git-repo
|
||||
url: https://lambdahub.yavin4.ch/ndwarshuis/xman.git
|
||||
{{- end }}
|
||||
{{- if ne .features.conky_alias "none" }}
|
||||
{{- if ne .features.desktop_alias "none" }}
|
||||
.config/conky:
|
||||
type: git-repo
|
||||
url: https://lambdahub.yavin4.ch/ndwarshuis/conky-config.git
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
.symlinks
|
||||
|
||||
{{ if eq .features.conky_alias "none" -}}
|
||||
{{ if eq .features.desktop_alias "none" -}}
|
||||
.config/conky.yml
|
||||
.config/systemd/user/conky_pacman.service
|
||||
.config/systemd/user/conky_pacman.timer
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#! /bin/bash
|
||||
|
||||
# call the brave browser with some nice flags
|
||||
|
||||
# NOTE, the vulkan ICD is specified to force the intel GPU rather than the
|
||||
# Nvidida gpu (which otherwise would be chosen by default and cause it to
|
||||
# be woken up every time I do anything with video/graphics/cameras/etc)
|
||||
# NOTE use-angle=vulkan is extremely important (for some reason)
|
||||
# NOTE obviously this entails vulkan being installed with the indel drive
|
||||
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json \
|
||||
/usr/bin/brave \
|
||||
--process-per-site \
|
||||
--disk-cache-dir="/tmp/brave-cache" \
|
||||
--use-angle=vulkan \
|
||||
--enable-gpu-compositing \
|
||||
--enable-gpu-rasterization \
|
||||
--enable-oop-rasterization \
|
||||
--enable-features=VaapiVideoEncoder,WebUIDarkMode \
|
||||
--ignore-gpu-blocklist \
|
||||
--enable-zero-copy \
|
||||
--enable-raw-draw \
|
||||
--use-vulkan \
|
||||
--force-dark-mode \
|
||||
"$@"
|
|
@ -31,7 +31,7 @@ run_stack_in_dir ~/.config/xmonad
|
|||
|
||||
run_stack_in_dir ~/.config/xman
|
||||
|
||||
{{ if ne .features.conky_alias "none" -}}
|
||||
{{ if ne .features.desktop_alias "none" -}}
|
||||
## ASSUME luarocks is installed
|
||||
~/.config/conky/install_rocks
|
||||
{{- end }}
|
||||
|
|
|
@ -11,7 +11,7 @@ pkgs+="\n"
|
|||
pkgs+=$(cat "$conf_dir/xman/make_pkgs")
|
||||
pkgs+="\n"
|
||||
|
||||
{{- if ne .features.conky_alias "none" }}
|
||||
{{- if ne .features.desktop_alias "none" }}
|
||||
pkgs+=$(cat "$conf_dir/conky/make_pkgs")
|
||||
pkgs+="\n"
|
||||
{{- end }}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{{- if eq .features.desktop_alias "work-laptop" -}}
|
||||
{{- include ".files/brave-bins/work-laptop" -}}
|
||||
{{- else -}}
|
||||
{{- include ".files/brave-bins/default" -}}
|
||||
{{- end -}}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
feh --no-fehbg --bg-scale --bg-fill "$XDG_DATA_HOME/backgrounds/moon_forest.jpg" &
|
||||
|
||||
{{ if ne .features.conky_alias "none" -}}
|
||||
{{ if ne .features.desktop_alias "none" -}}
|
||||
killall conky > /dev/null 2>&1
|
||||
conky -d > /dev/null 2>&1
|
||||
{{- end }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{- if eq .features.conky_alias "laptop" -}}
|
||||
{{- if eq .features.desktop_alias "laptop" -}}
|
||||
{{- include ".files/conky-configs/laptop.dhall" -}}
|
||||
{{- else if eq .features.conky_alias "workstation" -}}
|
||||
{{- else if eq .features.desktop_alias "workstation" -}}
|
||||
{{- include ".files/conky-configs/workstation.dhall" -}}
|
||||
{{- else if eq .features.conky_alias "work-laptop" -}}
|
||||
{{- else if eq .features.desktop_alias "work-laptop" -}}
|
||||
{{- include ".files/conky-configs/work-laptop.dhall" -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{- if eq .features.conky_alias "laptop" -}}
|
||||
{{- if eq .features.desktop_alias "laptop" -}}
|
||||
{{- include ".files/rofi-dev-configs/laptop.dhall" -}}
|
||||
{{- else if eq .features.conky_alias "workstation" -}}
|
||||
{{- else if eq .features.desktop_alias "workstation" -}}
|
||||
{{- include ".files/rofi-dev-configs/workstation.dhall" -}}
|
||||
{{- else if eq .features.conky_alias "work-laptop" -}}
|
||||
{{- else if eq .features.desktop_alias "work-laptop" -}}
|
||||
{{- include ".files/rofi-dev-configs/work-laptop.dhall" -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
let C = ../rofi-extras/dhall/rofi-dev.dhall
|
||||
|
||||
let cryptdir =
|
||||
{{ if eq .features.rofi_alias "laptop" -}}
|
||||
"/mnt/data/Documents/.crypt"
|
||||
{{- else if eq .features.rofi_alias "workstation" -}}
|
||||
"/mnt/data/.crypt"
|
||||
{{- else -}}
|
||||
"~/.crypt"
|
||||
{{- end }}
|
||||
|
||||
let sshKey =
|
||||
{{ if eq .features.rofi_alias "workstation" -}}
|
||||
"ssh workstation"
|
||||
{{- else -}}
|
||||
"ssh"
|
||||
{{- end }}
|
||||
|
||||
let gpgKey =
|
||||
{{ if eq .features.rofi_alias "workstation" -}}
|
||||
"gpg workstation"
|
||||
{{- else -}}
|
||||
"gpg"
|
||||
{{- end }}
|
||||
|
||||
let bwConfig =
|
||||
\(k : Text) ->
|
||||
C.PasswordConfig.PwdBW ({ bwKey = k, bwTries = 2 } : C.BitwardenConfig)
|
||||
|
||||
let sshData =
|
||||
\(r : Text) ->
|
||||
C.DataConfig.SSHFSConfig
|
||||
( { sshfsRemote = r, sshfsPassword = None C.PasswordConfig }
|
||||
: C.SSHFSData
|
||||
)
|
||||
|
||||
let sshfsTree =
|
||||
\(m : Text) ->
|
||||
\(l : Text) ->
|
||||
\(r : Text) ->
|
||||
{ tcParent =
|
||||
{ deviceMount = { mpPath = m, mpLabel = Some l } : C.MountConfig
|
||||
, deviceData = sshData r
|
||||
}
|
||||
: C.DeviceConfig
|
||||
, tcChildren = [ "ssh" ]
|
||||
}
|
||||
: C.TreeConfig
|
||||
|
||||
let crypt = \(b : Text) -> "${cryptdir}/${b}"
|
||||
|
||||
let vcName = \(n : Text) -> "Veracrypt (${n})"
|
||||
|
||||
let vcryptTree =
|
||||
\(m : Text) ->
|
||||
\(l : Optional Text) ->
|
||||
\(v : Text) ->
|
||||
\(k : Text) ->
|
||||
{ tcParent =
|
||||
{ deviceMount = { mpPath = m, mpLabel = l } : C.MountConfig
|
||||
, deviceData =
|
||||
C.DataConfig.VeracryptConfig
|
||||
( { vcVolume = crypt v
|
||||
, vcPassword = Some (bwConfig (vcName k))
|
||||
}
|
||||
: C.VeracryptData
|
||||
)
|
||||
}
|
||||
: C.DeviceConfig
|
||||
, tcChildren = [] : List Text
|
||||
}
|
||||
: C.TreeConfig
|
||||
|
||||
let defaultDevs =
|
||||
[ { tKey = "ssh"
|
||||
, tVal =
|
||||
vcryptTree
|
||||
"${env:HOME as Text}/.ssh"
|
||||
(Some "ssh")
|
||||
"ssh-config"
|
||||
sshKey
|
||||
}
|
||||
, { tKey = "gnupg"
|
||||
, tVal =
|
||||
vcryptTree
|
||||
"${env:GNUPGHOME as Text}"
|
||||
(None Text)
|
||||
"gpg-config"
|
||||
gpgKey
|
||||
}
|
||||
]
|
||||
|
||||
let otherDevs =
|
||||
{{- if eq .features.rofi_alias "laptop" -}}
|
||||
[ { tKey = "accounts"
|
||||
, tVal = vcryptTree "accounts" (None Text) "accounts" "accounts"
|
||||
}
|
||||
, { tKey = "ansible-pki"
|
||||
, tVal = vcryptTree "ansible-pki" (None Text) "ansible" "Ansible PKI"
|
||||
}
|
||||
, { tKey = "call_logs"
|
||||
, tVal = vcryptTree "call-logs" (None Text) "call_logs" "ACR"
|
||||
}
|
||||
, { tKey = "ebm_snakemake"
|
||||
, tVal =
|
||||
sshfsTree
|
||||
"ebm_snakemake"
|
||||
"EBM"
|
||||
"nisaba:/aigenomics/EBM_dev/snakemake"
|
||||
}
|
||||
, { tKey = "nist_workstation"
|
||||
, tVal =
|
||||
sshfsTree
|
||||
"nist_workstation"
|
||||
"NIST Workstation"
|
||||
"nist-workstation:/mnt/data"
|
||||
}
|
||||
, { tKey = "music"
|
||||
, tVal =
|
||||
sshfsTree
|
||||
"/mnt/data/Music"
|
||||
"Music"
|
||||
"portnoy4prez:/mnt/data/home/Music"
|
||||
}
|
||||
, { tKey = "videos"
|
||||
, tVal =
|
||||
sshfsTree
|
||||
"/mnt/data/Videos"
|
||||
"Videos"
|
||||
"portnoy4prez:/mnt/data/home/Videos"
|
||||
}
|
||||
]
|
||||
{{- else if eq .features.rofi_alias "workstation" -}}
|
||||
[ { tKey = "ebm_snakemake"
|
||||
, tVal =
|
||||
sshfsTree
|
||||
"ebm_snakemake"
|
||||
"EBM"
|
||||
"nisaba:/aigenomics/EBM_dev/snakemake"
|
||||
}
|
||||
]
|
||||
{{- else -}}
|
||||
[] : C.TreeMap
|
||||
{{- end }}
|
||||
|
||||
in { scTmpPath = Some "/tmp/media/${env:LOGNAME as Text}"
|
||||
, scVerbose = Some False
|
||||
, scDevices = defaultDevs # otherDevs
|
||||
}
|
Loading…
Reference in New Issue