~/Projects/confbook
git clone https://code.lsong.org/confbook
Commit
- Commit
- 3d63cb24caf866d10ab66901d07fae42e8f7a96a
- Author
- Lsong <[email protected]>
- Date
- 2023-07-07 05:14:03 -0400 -0400
- Diffstat
polybar/colors.ini | 2 polybar/launch.sh | 11 ++ rofi/colors.rasi | 2 xorg/.Xresources | 2 xorg/.xinitrc | 3 xorg/xinit/xinitrc | 55 +++++++++++++++++ xorg/xinit/xinitrc.d/40-libcanberra-gtk-module.sh | 13 ++++ xorg/xinit/xinitrc.d/50-systemd-user.sh | 15 ++++ xorg/xinit/xserverrc | 2 xorg/xorg.conf.d/00-keyboard.conf | 10 +++ xorg/xorg.conf.d/01-monitor.conf | 15 ++++ xorg/xorg.conf.d/20-intel.conf | 7 ++ xorg/xorg.conf.d/99-touchscreen.conf | 7 ++
update
diff --git a/polybar/colors.ini b/polybar/colors.ini index bcfa437f2c902467794611d1031e5fa0453b3138..65ae5b93e50d651552977711a6f3ac059ed0b02d 120000 --- a/polybar/colors.ini +++ b/polybar/colors.ini @@ -1 +1 @@ -/home/lsong/.config/polybar/themes/cherry.ini \ No newline at end of file +/home/lsong/.config/polybar/themes/default.ini \ No newline at end of file diff --git a/polybar/launch.sh b/polybar/launch.sh index 68ca15b2231ea276556599a9308e49ce8c415ae3..66c576cdfd79328ceae4bb7a242136fb486bc169 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -2,8 +2,6 @@ #!/usr/bin/env bash # Add this script to your wm startup file. -DIR="$HOME/.config/polybar" - # Terminate already running bar instances killall -q polybar @@ -11,3 +10,12 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done # Launch the bar #!/usr/bin/env bash +#!/usr/bin/env bash + +for monitor in $(xrandr -q | grep -e "\sconnected\s" | cut -d' ' -f1); do + if [ "$(xrandr -q | grep -e "\sconnected\s" | grep $monitor | grep -c primary)" == "1" ]; then + MONITOR=$monitor polybar main -c ~/.config/polybar/config.ini & + else + MONITOR=$monitor polybar main -c ~/.config/polybar/config.ini & + fi +done diff --git a/rofi/colors.rasi b/rofi/colors.rasi index 5e4022daaf61927cb79825e1d65a87599c9c39da..9b53db1f2b6e47f53d3e6e05fabe4a1fa30bd400 120000 --- a/rofi/colors.rasi +++ b/rofi/colors.rasi @@ -1 +1 @@ -/home/lsong/.config/rofi/themes/cherry.rasi \ No newline at end of file +/home/lsong/.config/rofi/themes/default.rasi \ No newline at end of file diff --git a/xorg/.Xresources b/xorg/.Xresources new file mode 100644 index 0000000000000000000000000000000000000000..9eee9567e2a70cd5f7880bc8661fdca3ff911e06 --- /dev/null +++ b/xorg/.Xresources @@ -0,0 +1,2 @@ + +Xft.dpi: 144 diff --git a/xorg/.xinitrc b/xorg/.xinitrc new file mode 100755 index 0000000000000000000000000000000000000000..5317fc569f5239410682c02f978afc7846cb2c61 --- /dev/null +++ b/xorg/.xinitrc @@ -0,0 +1,3 @@ + +exec startx /usr/bin/bspwm +# exec startxfce4 diff --git a/xorg/xinit/xinitrc b/xorg/xinit/xinitrc new file mode 100644 index 0000000000000000000000000000000000000000..23df1191e1f0ea9ac89c672b86b9ceac47ff1885 --- /dev/null +++ b/xorg/xinit/xinitrc @@ -0,0 +1,55 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + + + + + + + + xrdb -merge $sysresources + +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + + + + + + + + xrdb -merge "$userresources" + +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +twm & +xclock -geometry 50x50-1+1 & +xterm -geometry 80x50+494+51 & +xterm -geometry 80x20+494-0 & +exec xterm -geometry 80x66+0+0 -name login diff --git a/xorg/xinit/xinitrc.d/40-libcanberra-gtk-module.sh b/xorg/xinit/xinitrc.d/40-libcanberra-gtk-module.sh new file mode 100755 index 0000000000000000000000000000000000000000..edc158e6cfb187faa08731b5e646a4c9aae3f4f6 --- /dev/null +++ b/xorg/xinit/xinitrc.d/40-libcanberra-gtk-module.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +case "${DESKTOP_SESSION-}" in + gnome*) # Done by gnome-settings-daemon + ;; + *) + # Extra check in case DESKTOP_SESSION is not set correctly + if [ -z "${GNOME_DESKTOP_SESSION_ID-}" ]; then + GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module" + export GTK_MODULES + fi + ;; +esac diff --git a/xorg/xinit/xinitrc.d/50-systemd-user.sh b/xorg/xinit/xinitrc.d/50-systemd-user.sh new file mode 100755 index 0000000000000000000000000000000000000000..fb03ecbec05f0cea71ecfbd512259d2a435aa158 --- /dev/null +++ b/xorg/xinit/xinitrc.d/50-systemd-user.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +systemctl --user import-environment DISPLAY XAUTHORITY + +if command -v dbus-update-activation-environment >/dev/null 2>&1; then + dbus-update-activation-environment DISPLAY XAUTHORITY +fi diff --git a/xorg/xinit/xserverrc b/xorg/xinit/xserverrc new file mode 100644 index 0000000000000000000000000000000000000000..b4de2528749e0a352e0fc3218f622726e2e37cbc --- /dev/null +++ b/xorg/xinit/xserverrc @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/X -nolisten tcp "$@" diff --git a/xorg/xorg.conf.d/00-keyboard.conf b/xorg/xorg.conf.d/00-keyboard.conf new file mode 100644 index 0000000000000000000000000000000000000000..a51097b1ee681e3fc22179a588b56c79116d1c7e --- /dev/null +++ b/xorg/xorg.conf.d/00-keyboard.conf @@ -0,0 +1,10 @@ +# Written by systemd-localed(8), read by systemd-localed and Xorg. It's +# probably wise not to edit this file manually. Use localectl(1) to +# instruct systemd-localed to update it. +Section "InputClass" + Identifier "system-keyboard" + MatchIsKeyboard "on" + Option "XkbLayout" "us" + Option "XkbModel" "pc105+inet" + Option "XkbOptions" "terminate:ctrl_alt_bksp" +EndSection diff --git a/xorg/xorg.conf.d/01-monitor.conf b/xorg/xorg.conf.d/01-monitor.conf new file mode 100644 index 0000000000000000000000000000000000000000..372b9de3c07ac2d36ae020b7c8fcd3ed615ab8c3 --- /dev/null +++ b/xorg/xorg.conf.d/01-monitor.conf @@ -0,0 +1,15 @@ + +Section "Monitor" + Identifier "DSI1" + # Option "DPI" "114x144" + Option "Rotate" "right" + Option "Primary" "true" +EndSection + +Section "Monitor" + Identifier "HDMI1" + Option "LeftOf" "DSI1" + Option "PreferredMode" "3840x2160" + Option "DPI" "144x144" + # Option "Position" "0 0" +EndSection diff --git a/xorg/xorg.conf.d/20-intel.conf b/xorg/xorg.conf.d/20-intel.conf new file mode 100644 index 0000000000000000000000000000000000000000..1d473970ff410e7177e83f28b56349406df86bf1 --- /dev/null +++ b/xorg/xorg.conf.d/20-intel.conf @@ -0,0 +1,7 @@ +Section "Device" + Identifier "Intel Graphics" + Driver "intel" + Option "AccelMethod" "sna" + Option "TearFree" "true" + Option "DRI" "2" +EndSection diff --git a/xorg/xorg.conf.d/99-touchscreen.conf b/xorg/xorg.conf.d/99-touchscreen.conf new file mode 100644 index 0000000000000000000000000000000000000000..9145450e0b1ddb08586c07de1e42aa5de1898fdf --- /dev/null +++ b/xorg/xorg.conf.d/99-touchscreen.conf @@ -0,0 +1,7 @@ +Section "InputClass" + Identifier "calibration" + Driver "wacom" + MatchProduct "GXTP7380" + Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1" + Option "Button2" "3" +EndSection