Refactor env local files
This commit is contained in:
parent
939945fcba
commit
ce4bd6eeed
6 changed files with 39 additions and 18 deletions
2
.config/env.d/.gitignore
vendored
2
.config/env.d/.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
99-local
|
||||
93-local
|
||||
99-secrets
|
||||
|
|
16
.config/env.d/80-conditionals
Executable file
16
.config/env.d/80-conditionals
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# shellcheck disable=2089
|
||||
[ -x "$(command -v bat)" ] && export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
# shellcheck disable=2090
|
||||
[ -x "$(command -v moar)" ] && export MANPAGER="moar"
|
||||
[ -x "$(command -v moar)" ] && export PAGER="moar"
|
||||
|
||||
[ -x "$(command -v nvim)" ] && export EDITOR="$(which nvim)"
|
||||
|
||||
[ -x "$(command -v gpgconf)" ] && export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
|
||||
[ -x "$(command -v home-manager)" ] \
|
||||
&& [ -x "$(command -v nix)" ] \
|
||||
&& [ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ] \
|
||||
&& . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
22
.config/env.d/93-local##hostname.portalo
Executable file
22
.config/env.d/93-local##hostname.portalo
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
export AUDIO_DEVICE="alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__Line1__sink"
|
||||
export AUTOSTART_DISPLAY="Hyprland"
|
||||
|
||||
export KDE_CONNECT_DEVICE="Fairphone3"
|
||||
|
||||
# X11
|
||||
if [ -n "$WAYLAND_DISPLAY" ]
|
||||
then
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export MONITOR_PRIMARY="DP-1"
|
||||
export MONITOR_SECONDARY="HDMI-A-1"
|
||||
else
|
||||
export XDG_SESSION_TYPE=x11
|
||||
export MONITOR_PRIMARY="DisplayPort-0"
|
||||
export MONITOR_SECONDARY="HDMI-A-0"
|
||||
fi
|
||||
|
||||
export BROWSER_CHROMIUM="brave"
|
||||
|
||||
export DUNST_MONITOR="$MONITOR_SECONDARY"
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
export AUDIO_DEVICE="alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__Line1__sink"
|
||||
export AUTOSTART_DISPLAY="Hyprland"
|
||||
|
||||
export KDE_CONNECT_DEVICE="Fairphone3"
|
||||
|
||||
# X11
|
||||
#export MONITOR_PRIMARY="DisplayPort-0"
|
||||
#export MONITOR_SECONDARY="HDMI-A-0"
|
||||
# Wayland
|
||||
export MONITOR_PRIMARY="DP-1"
|
||||
export MONITOR_SECONDARY="HDMI-A-1"
|
||||
|
||||
export BROWSER_CHROMIUM="brave"
|
||||
|
||||
export DUNST_MONITOR="$MONITOR_SECONDARY"
|
Loading…
Add table
Add a link
Reference in a new issue