new work display setup

This commit is contained in:
Rick van Lieshout 2025-03-06 13:47:29 +01:00
parent 8d2f51b64a
commit 7f1d9640b6
9 changed files with 52 additions and 29 deletions

16
.vscode/settings.json vendored
View File

@ -1,13 +1,21 @@
{ {
"cSpell.words": [ "cSpell.words": [
"autohint", "autohint",
"autorandr",
"dunst", "dunst",
"dunstrc", "dunstrc",
"greenclip", "greenclip",
"gtkrc",
"hintstyle", "hintstyle",
"inotify",
"keygen",
"makepkg",
"mimeapps", "mimeapps",
"nanorc", "nanorc",
"networkmanager",
"noconfirm",
"pacman", "pacman",
"picom",
"polkit", "polkit",
"polybar", "polybar",
"poshthemes", "poshthemes",
@ -16,7 +24,13 @@
"rofi", "rofi",
"seafile", "seafile",
"terminalrc", "terminalrc",
"Xresources" "timedatectl",
"trizen",
"usermod",
"xbacklight",
"xfconf",
"Xresources",
"zokugun"
], ],
"sonarlint.connectedMode.project": { "sonarlint.connectedMode.project": {
"connectionId": "public-sonarcloud", "connectionId": "public-sonarcloud",

View File

@ -1,2 +0,0 @@
docker-credential-pass -> add to AUR
^ set up `pass`

View File

@ -1,7 +1,8 @@
Xft.hinting: true Xft.hinting: true
rofi.dpi: 150 rofi.dpi: 110
Xcursor.size: 20 dpi: 110
Xcursor.size: 25
Xft.hintstyle: hintslight Xft.hintstyle: hintslight
Xft.rgba: rgba Xft.rgba: rgba
Xft.antialias: true Xft.antialias: true
Xft.dpi: 150 Xft.dpi: 110

View File

@ -9,9 +9,10 @@ declare -A undocked_settings=(
["Xft.hinting"]="true" ["Xft.hinting"]="true"
["Xft.rgba"]="rgba" ["Xft.rgba"]="rgba"
["Xft.hintstyle"]="hintslight" ["Xft.hintstyle"]="hintslight"
["Xcursor.size"]="20" ["Xcursor.size"]="50"
["Xft.dpi"]="150" ["Xft.dpi"]="160"
["rofi.dpi"]="150" ["rofi.dpi"]="160"
["dpi"]="150"
) )
declare -A docked_settings=( declare -A docked_settings=(
@ -19,9 +20,10 @@ declare -A docked_settings=(
["Xft.hinting"]="true" ["Xft.hinting"]="true"
["Xft.rgba"]="rgba" ["Xft.rgba"]="rgba"
["Xft.hintstyle"]="hintslight" ["Xft.hintstyle"]="hintslight"
["Xcursor.size"]="20" ["Xcursor.size"]="25"
["Xft.dpi"]="120" ["Xft.dpi"]="110"
["rofi.dpi"]="120" ["rofi.dpi"]="110"
["dpi"]="110"
) )
function updateXSettings() { function updateXSettings() {
@ -37,12 +39,12 @@ function applyLayout() {
"undocked") "undocked")
xrandr --output eDP --primary --mode 2880x1920 --pos 0x0 --rotate normal --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --off --output DisplayPort-3 --off --output DisplayPort-4 --off --output DisplayPort-5 --off --output DisplayPort-6 --off --output DisplayPort-7 --off xrandr --output eDP --primary --mode 2880x1920 --pos 0x0 --rotate normal --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --off --output DisplayPort-3 --off --output DisplayPort-4 --off --output DisplayPort-5 --off --output DisplayPort-6 --off --output DisplayPort-7 --off
updateXResources undocked_settings updateXResources undocked_settings
updateXSettings 150 updateXSettings ${undocked_settings["dpi"]}
;; ;;
"docked") "docked")
xrandr --output eDP --off --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --off --output DisplayPort-3 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DisplayPort-4 --off --output DisplayPort-5 --off --output DisplayPort-6 --off --output DisplayPort-7 --off xrandr --output eDP --off --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --off --output DisplayPort-3 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DisplayPort-4 --off --output DisplayPort-5 --off --output DisplayPort-6 --off --output DisplayPort-7 --off
updateXResources docked_settings updateXResources docked_settings
updateXSettings 120 updateXSettings ${docked_settings["dpi"]}
;; ;;
*) *)
echo "Unknown layout: $layout" echo "Unknown layout: $layout"

View File

@ -3,10 +3,10 @@
<channel name="thunar" version="1.0"> <channel name="thunar" version="1.0">
<property name="last-view" type="string" value="ThunarIconView"/> <property name="last-view" type="string" value="ThunarIconView"/>
<property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_100_PERCENT"/> <property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_100_PERCENT"/>
<property name="last-window-width" type="int" value="1416"/> <property name="last-window-width" type="int" value="1415"/>
<property name="last-window-height" type="int" value="1851"/> <property name="last-window-height" type="int" value="1846"/>
<property name="last-window-maximized" type="bool" value="true"/> <property name="last-window-maximized" type="bool" value="false"/>
<property name="last-separator-position" type="int" value="229"/> <property name="last-separator-position" type="int" value="376"/>
<property name="misc-single-click" type="bool" value="false"/> <property name="misc-single-click" type="bool" value="false"/>
<property name="misc-thumbnail-mode" type="string" value="THUNAR_THUMBNAIL_MODE_ALWAYS"/> <property name="misc-thumbnail-mode" type="string" value="THUNAR_THUMBNAIL_MODE_ALWAYS"/>
<property name="misc-thumbnail-draw-frames" type="bool" value="false"/> <property name="misc-thumbnail-draw-frames" type="bool" value="false"/>

View File

@ -13,6 +13,7 @@ seafile
networkmanager-l2tp networkmanager-l2tp
xorg-xev xorg-xev
nvm nvm
hadolint-bin
dotnet-host-bin dotnet-host-bin
keychain keychain

View File

@ -21,6 +21,8 @@ reflector
gtk-engines gtk-engines
kubectl kubectl
less less
smartmontools
ethtool
# #
# i3wm # i3wm

View File

@ -1,18 +1,16 @@
#! /bin/bash #! /bin/bash
displays=($(xrandr | awk '/ connected /{print $1}')) mapfile -t displays < <(xrandr | awk '/ connected /{print $1}')
if (( ${#displays[@]} > 1 )) if ((${#displays[@]} > 1)); then
then selected_display="$(zenity --list --title 'Select Display' --radiolist --column '' --column 'Display' $(xrandr | awk '/ connected /{print NR,$1}'))"
selected_display="$(zenity --list --title 'Select Display' --radiolist --column '' --column 'Display' $(xrandr | awk '/ connected /{print NR,$1}'))"
else else
selected_display="${displays[0]}" selected_display="${displays[0]}"
fi fi
current_brightness=($(xrandr --current --verbose | grep -m1 Brightness | awk '{print $2}' | sed 's/0.//' | sed 's/.0/00/' )) current_brightness=$(xbacklight -display "$selected_display" -get)
zenity --scale --title "Set brightness of $selected_display" --value=$current_brightness --print-partial | zenity --scale --title "Set brightness of $selected_display" --value=$current_brightness --print-partial |
while read brightness while read brightness; do
do xbacklight -display "$selected_display" -set "$brightness"
xrandr --output "$selected_display" --brightness $(awk '{print $1/100}' <<<"$brightness"}) done
done

View File

@ -101,7 +101,7 @@ function install_gtk {
function install_docker { function install_docker {
sudo systemctl enable docker sudo systemctl enable docker
sudo usermod -aG docker $USER sudo usermod -aG docker "$USER"
} }
@ -169,6 +169,7 @@ function install_config {
mkdir -p ~/Pictures/Screenshots mkdir -p ~/Pictures/Screenshots
setDateTimeConfig setDateTimeConfig
setup_groups mastermindzh
} }
# Installs the dependencies on Arch Linux # Installs the dependencies on Arch Linux
@ -197,6 +198,12 @@ function setup_pass {
pass init info@rickvanlieshout.com pass init info@rickvanlieshout.com
} }
# set up groups for specific user
function setup_groups {
local user=${1:-mastermindzh}
sudo usermod -a -G video "$user"
}
# ======================================= # =======================================
# User output functions # User output functions
# ======================================= # =======================================