feat(desktop): update for new monitor, add software

This commit is contained in:
Pavel Korytov 2021-07-26 17:38:55 +03:00
parent 3a441661bb
commit 776cab2b89
5 changed files with 21 additions and 14 deletions

View file

@ -1,5 +1,6 @@
(specifications->manifest (specifications->manifest
'( '(
"anydesk"
"polkit-gnome" "polkit-gnome"
"fontconfig" "fontconfig"
"qbittorrent" "qbittorrent"

View file

@ -1,4 +1,5 @@
(specifications->manifest (specifications->manifest
'( '(
"krita"
"gimp" "gimp"
"libreoffice")) "libreoffice"))

View file

@ -180,6 +180,7 @@ Also, Xresources are used to set =Xft= settings. Unfortunately, the DPI setting
(let ((hostname (system-name))) (let ((hostname (system-name)))
(cond ((string-equal hostname "azure") 120) (cond ((string-equal hostname "azure") 120)
((string-equal hostname "eminence") 120) ((string-equal hostname "eminence") 120)
((string-equal hostname "indigo") 120)
(t 96))) (t 96)))
#+end_src #+end_src
@ -219,7 +220,7 @@ Set screen layout & other params depending on hostname
#+begin_src sh :tangle ~/bin/scripts/screen-layout #+begin_src sh :tangle ~/bin/scripts/screen-layout
hostname=$(hostname) hostname=$(hostname)
if [ "$hostname" = "indigo" ]; then if [ "$hostname" = "indigo" ]; then
xrandr --output DisplayPort-0 --off --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-D-0 --mode 1366x768 --pos 1920x312 --rotate normal xrandr --output DisplayPort-0 --off --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-D-0 --mode 1920x1080 --pos 1920x0 --rotate normal
elif [ "$hostname" = "eminence" ]; then elif [ "$hostname" = "eminence" ]; then
xgamma -gamma 1.25 xgamma -gamma 1.25
fi fi
@ -780,22 +781,23 @@ The script below allows me to:
#+begin_src bash :tangle ./bin/polybar.sh #+begin_src bash :tangle ./bin/polybar.sh
hostname=$(hostname) hostname=$(hostname)
# Settings varying on the hostname # Settings varying on the hostname
export WLAN_INTERFACE=$(nmcli -f DEVICE con show | grep -Ev "(.*docker.*|DEVICE|br.*|tun.*|--)" | xargs)
if [ "$hostname" = "azure" ]; then if [ "$hostname" = "azure" ]; then
TRAY_MONITOR="eDP-1" TRAY_MONITOR="eDP-1"
export WLAN_INTERFACE="wlp3s0" # export WLAN_INTERFACE="wlp3s0"
elif [ "$hostname" = "eminence" ]; then elif [ "$hostname" = "eminence" ]; then
TRAY_MONITOR="eDP" TRAY_MONITOR="eDP"
export WLAN_INTERFACE="wlo1" # export WLAN_INTERFACE="wlo1"
else else
TRAY_MONITOR="HDMI-A-0" TRAY_MONITOR="HDMI-A-0"
export WLAN_INTERFACE="wlp35s0f3u2" # export WLAN_INTERFACE="wlp35s0f3u2"
fi fi
# Setting varying on the monitor # Setting varying on the monitor
declare -A FONT_SIZES=( declare -A FONT_SIZES=(
["eDP"]="13" ["eDP"]="13"
["eDP-1"]="13" ["eDP-1"]="13"
["DVI-D-0"]="11" ["DVI-D-0"]="13"
["HDMI-A-0"]="13" ["HDMI-A-0"]="13"
) )
declare -A EMOJI_SCALE=( declare -A EMOJI_SCALE=(
@ -807,13 +809,13 @@ declare -A EMOJI_SCALE=(
declare -A BAR_HEIGHT=( declare -A BAR_HEIGHT=(
["eDP"]="29" ["eDP"]="29"
["eDP-1"]="29" ["eDP-1"]="29"
["DVI-D-0"]="23" ["DVI-D-0"]="29"
["HDMI-A-0"]="29" ["HDMI-A-0"]="29"
) )
declare -A BLOCKS=( declare -A BLOCKS=(
["eDP"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP" ["eDP"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP"
["eDP-1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP" ["eDP-1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP"
["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP" ["DVI-D-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP" ["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
) )
@ -2086,6 +2088,7 @@ This section generates manifests for various desktop software that I'm using.
|----------+-----------------| |----------+-----------------|
| office | libreoffice | | office | libreoffice |
| office | gimp | | office | gimp |
| office | krita |
** LaTeX ** LaTeX
| Category | Guix dependency | | Category | Guix dependency |
|----------+-----------------| |----------+-----------------|
@ -2399,6 +2402,7 @@ Other desktop programs I use are listed below.
| qbittorrent | torrent client | | qbittorrent | torrent client |
| fontconfig | | | fontconfig | |
| polkit-gnome | Polkit authentication agent | | polkit-gnome | Polkit authentication agent |
| anydesk | Remote desktop software |
#+NAME: packages #+NAME: packages
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no

View file

@ -2,22 +2,23 @@
# [[file:../Desktop.org::*Launching][Launching:1]] # [[file:../Desktop.org::*Launching][Launching:1]]
hostname=$(hostname) hostname=$(hostname)
# Settings varying on the hostname # Settings varying on the hostname
export WLAN_INTERFACE=$(nmcli -f DEVICE con show | grep -Ev "(.*docker.*|DEVICE|br.*|tun.*|--)" | xargs)
if [ "$hostname" = "azure" ]; then if [ "$hostname" = "azure" ]; then
TRAY_MONITOR="eDP-1" TRAY_MONITOR="eDP-1"
export WLAN_INTERFACE="wlp3s0" # export WLAN_INTERFACE="wlp3s0"
elif [ "$hostname" = "eminence" ]; then elif [ "$hostname" = "eminence" ]; then
TRAY_MONITOR="eDP" TRAY_MONITOR="eDP"
export WLAN_INTERFACE="wlo1" # export WLAN_INTERFACE="wlo1"
else else
TRAY_MONITOR="HDMI-A-0" TRAY_MONITOR="HDMI-A-0"
export WLAN_INTERFACE="wlp35s0f3u2" # export WLAN_INTERFACE="wlp35s0f3u2"
fi fi
# Setting varying on the monitor # Setting varying on the monitor
declare -A FONT_SIZES=( declare -A FONT_SIZES=(
["eDP"]="13" ["eDP"]="13"
["eDP-1"]="13" ["eDP-1"]="13"
["DVI-D-0"]="11" ["DVI-D-0"]="13"
["HDMI-A-0"]="13" ["HDMI-A-0"]="13"
) )
declare -A EMOJI_SCALE=( declare -A EMOJI_SCALE=(
@ -29,13 +30,13 @@ declare -A EMOJI_SCALE=(
declare -A BAR_HEIGHT=( declare -A BAR_HEIGHT=(
["eDP"]="29" ["eDP"]="29"
["eDP-1"]="29" ["eDP-1"]="29"
["DVI-D-0"]="23" ["DVI-D-0"]="29"
["HDMI-A-0"]="29" ["HDMI-A-0"]="29"
) )
declare -A BLOCKS=( declare -A BLOCKS=(
["eDP"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP" ["eDP"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP"
["eDP-1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP" ["eDP-1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP battery SEP sun aw-afk date TSEP"
["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP" ["DVI-D-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP" ["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP weather SEP sun aw-afk date TSEP"
) )

View file

@ -2,7 +2,7 @@
# [[file:../../Desktop.org::*Device-specific settings][Device-specific settings:1]] # [[file:../../Desktop.org::*Device-specific settings][Device-specific settings:1]]
hostname=$(hostname) hostname=$(hostname)
if [ "$hostname" = "indigo" ]; then if [ "$hostname" = "indigo" ]; then
xrandr --output DisplayPort-0 --off --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-D-0 --mode 1366x768 --pos 1920x312 --rotate normal xrandr --output DisplayPort-0 --off --output HDMI-A-0 --mode 1920x1080 --pos 0x0 --rotate normal --output DVI-D-0 --mode 1920x1080 --pos 1920x0 --rotate normal
elif [ "$hostname" = "eminence" ]; then elif [ "$hostname" = "eminence" ]; then
xgamma -gamma 1.25 xgamma -gamma 1.25
fi fi