#!/bin/bash # set background color (doesnt work with compositor) #xsetroot -solid "#222222" hsetroot -solid "#222222" #feh --bg-scale /home/jon/Pictures/christmas_tree_minimal.jpg ## fix trackball left and middle click #ELECOM_ID=$(xinput list | grep -E -i "elecom.*pointer" | sed -r 's/.*id=([0-9]+).*/\1/') #xinput set-button-map 9 1 2 3 4 5 6 7 8 1 10 11 2 # launch ime for typing in japanese #ibus-daemon --xim & ## triple monitor setup #xrandr --output DP-2 --primary --auto \ # --output DP-3 --auto --right-of DP-2 \ # --output DP-1 --auto --left-of DP-2 # set default pulseaudio "sink" (output device) to index 21 #pacmd set-default-sink 21 ## this worked prior to Fedora 35 (and PipeWire) #pacmd set-default-sink alsa_output.usb-Audioengine_Audioengine_2_-00.iec958-stereo ## this worked on Fedora 35, not pretty but I cobbled it together. ## it will find the first sink that contains audioengine and pipewire and set ## as default. also fixed my vol up/down keybinds in dwm #pactl set-default-sink $(pactl list short | grep -i audioengine | grep -i pipewire | head -n 1 | awk '{print $1}') ### 2021-12-13 #pactl list sinks short pactl set-default-sink 46 ### apply monitor calibration xcalib /s/misc/monitor_calibration/dell.icc ############################################# # Launch scripts # Check if running first for idempotency ############################################# # compositor - for true transparency # compton is dead, picom is a fork if pgrep -x -u $USERNAME "picom" > /dev/null then #already running - do nothing echo "picom - Already Running ..." else # not running - launch picom & fi # pasystray - volume control if pgrep -x -u $USERNAME "pasystray" > /dev/null then #already running - do nothing echo "pasystray - Already Running ..." else # not running - launch pasystray & fi # clipboard manager if pgrep -x -u $USERNAME "copyq" > /dev/null then #already running - do nothing echo "copyq - Already Running ..." else # not running - launch # 2021-08-18 JMD - commented out its making gimp crash when i copy #copyq & echo "Not really starting, it breaks gimp!" fi # launch menu bar status script if pgrep -x "jstat" >/dev/null then echo "jstat - Already Running ..." else echo "jstat stopped - starting now" jstat & fi # launch keepassxc if pgrep -x "keepassxc" >/dev/null then echo "keepassxc - Already Running ..." else echo "keepassxc stopped - starting now" keepassxc & fi # launch nextcloud if pgrep -x "nextcloud" >/dev/null then echo "nextcloud - Already Running ..." else echo "nextcloud stopped - starting now" nextcloud & fi # launch solaar - mouse tool if pgrep -x "solaar" >/dev/null then echo "solaar - Already Running ..." else echo "solaar stopped - starting now" /usr/bin/solaar -w hide & fi # launch playerctld - keyboard shortcuts for play/pause if pgrep -x "playerctld" >/dev/null then if [ -f "/usr/bin/playerctld" ] then echo "playerctld - Already Running ..." else echo "playerctld - Error - playerctld binary not found!" fi else echo "playerctld stopped - starting now" /usr/bin/playerctld & fi # launch fcitx5 if we're on wayland if [ "$XDG_SESSION_TYPE" == "wayland" ]; then if pgrep -x "fcitx5" >/dev/null; then echo "fcitx5 - Already running ..." else if [ -f "/usr/bin/fcitx5" ]; then echo "fcitx5 - Starting ..." /usr/bin/fcitx5 & else echo "fcitx5 - binary not found." fi fi # else run ibus-daemon fi