diff --git a/files/.config/fontconfig/fonts.conf b/files/.config/fontconfig/fonts.conf
index b849f67..161a601 100644
--- a/files/.config/fontconfig/fonts.conf
+++ b/files/.config/fontconfig/fonts.conf
@@ -77,4 +77,10 @@
IPAGothic
+
+ Lucida Console
+
+ monospace
+
+
diff --git a/files/.config/gamemode.ini b/files/.config/gamemode.ini
new file mode 100644
index 0000000..add6196
--- /dev/null
+++ b/files/.config/gamemode.ini
@@ -0,0 +1,3 @@
+[custom]
+start=gamemode-start
+end=gamemode-stop
\ No newline at end of file
diff --git a/files/.config/pipewire/pipewire.conf b/files/.config/pipewire/pipewire.conf
index 91a423b..a8acc8b 100644
--- a/files/.config/pipewire/pipewire.conf
+++ b/files/.config/pipewire/pipewire.conf
@@ -27,7 +27,7 @@ context.properties = {
## Properties for the DSP configuration.
#default.clock.rate = 48000
- default.clock.allowed-rates = [ 44100 :wq48000 ]
+ default.clock.allowed-rates = [ 44100 48000 ]
#default.clock.quantum = 1024
default.clock.min-quantum = 16
#default.clock.max-quantum = 2048
diff --git a/files/.config/spotifyd/onevent.sh b/files/.config/spotifyd/onevent.sh
deleted file mode 100755
index b7dd529..0000000
--- a/files/.config/spotifyd/onevent.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-
-client_id='d9c43c00ff914624a02151e43ab5a16c'
-client_secret=''
-
-output="$XDG_RUNTIME_DIR/spotify_status"
-
-token=""
-get_token() {
- echo -n 'Bearer '
- if [[ -z "$token" ]]; then
- authorization="$(base64 -w 0 <(echo -n "$client_id:$client_secret"))"
- token="$(curl -s -H "Authorization: Basic $authorization" -d 'grant_type=client_credentials' https://accounts.spotify.com/api/token | jq --join-output --raw-output .access_token)"
- fi
- echo -n "$token"
-}
-
-track_data=""
-get_track_data() {
- if [[ -z "$track_data" ]]; then
- track_data="$(curl -s -H "Authorization: $(get_token)" "https://api.spotify.com/v1/tracks/$TRACK_ID")"
- fi
- echo -n "$track_data"
-}
-
-get_artists() {
- echo "$(get_track_data)" | jq --join-output --raw-output '[.artists[].name] | join(", ")'
-}
-
-get_track() {
- echo "$(get_track_data)" | jq --join-output --raw-output '.name'
-}
-
-play() {
- echo " $(get_track)" >$output
- echo "$(get_artists) - $(get_track)" >>$output
-}
-
-stop() {
- echo " $(get_track)" >$output
- echo "$(get_artists) - $(get_track)" >>$output
-}
-
-pause() {
- echo " $(get_track)" >$output
- echo "$(get_artists) - $(get_track)" >>$output
-}
-
-case "$PLAYER_EVENT" in
- "start")
- play
- ;;
- "stop")
- pause
- ;;
- "load")
- ;;
- "play")
- play
- ;;
- "pause")
- pause
- ;;
- "preload")
- ;;
- "endoftrack")
- stop
- ;;
- "volumeset")
- ;;
- "change")
- play
- ;;
- *)
- ;;
-esac
-
diff --git a/files/.config/spotifyd/spotifyd.conf b/files/.config/spotifyd/spotifyd.conf
deleted file mode 100644
index 3319509..0000000
--- a/files/.config/spotifyd/spotifyd.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[global]
-username = werhudpj20xndltxqfb95b8dw
-#password_cmd = pass web/spotify.com | head -n 1
-use_keyring = true
-
-backend = pulseaudio
-#onevent=~/.config/spotifyd/onevent.sh
diff --git a/files/.config/sway/config b/files/.config/sway/config
index c74077f..cea953e 100644
--- a/files/.config/sway/config
+++ b/files/.config/sway/config
@@ -91,43 +91,34 @@ output "*" {
background ~/.local/share/wallpaper fill
}
-# defaults, laptop mode
-workspace $ws1 output eDP-1
-workspace $ws2 output eDP-1
-workspace $ws3 output VGA-1
-workspace $ws4 output VGA-1
-workspace $ws5 output VGA-1
-workspace $ws6 output VGA-1
-workspace $ws7 output VGA-1
-workspace $ws8 output VGA-1
-workspace $ws9 output VGA-1
-workspace $ws10 output VGA-1
-
-set $output1 "Goldstar Company Ltd LG QHD 0x00001F95"
-workspace $ws3 output $output1
-workspace $ws4 output $output1
-workspace $ws5 output $output1
-workspace $ws6 output $output1
-workspace $ws7 output $output1
-workspace $ws8 output $output1
-workspace $ws9 output $output1
-workspace $ws10 output $output1
+set $output1 "LG Electronics LG QHD 0x00001F95"
+workspace $ws3 output $output1 VGA-1
+workspace $ws4 output $output1 VGA-1
+workspace $ws5 output $output1 VGA-1
+workspace $ws6 output $output1 VGA-1
+workspace $ws7 output $output1 VGA-1
+workspace $ws8 output $output1 VGA-1
+workspace $ws9 output $output1 VGA-1
+workspace $ws10 output $output1 VGA-1
output $output1 {
# we need to explicitly select the mode, otherwise
# sway will select 4k 30Hz
+ position 0 0
mode 2560x1440@60Hz
adaptive_sync on
- position 1080 220
}
set $output2 "Ancor Communications Inc ASUS VH238 BALMIB547836"
-workspace $ws1 output $output2
-workspace $ws2 output $output2
+workspace $ws1 output $output2 eDP-1
+workspace $ws2 output $output2 eDP-1
output $output2 {
- position 0 0
+ position 2560 -270
transform 270
}
+# Disable this output for consistency when running with discrete GPU enabled
+output "DP-3" disable
+
### Input configuration
# mod key
set $mod Mod4
@@ -263,16 +254,16 @@ assign [class="^[Dd]iscord$"] $ws1
#assign [class="^looking-glass-client$"] $ws3
# screen
-workspace $ws1 output HDMI-2
-workspace $ws2 output HDMI-2
-workspace $ws3 output HDMI-1
-workspace $ws4 output HDMI-1
-workspace $ws5 output HDMI-1
-workspace $ws6 output HDMI-1
-workspace $ws7 output HDMI-1
-workspace $ws8 output HDMI-1
-workspace $ws9 output HDMI-1
-workspace $ws10 output HDMI-1
+# workspace $ws1 output HDMI-A-2
+# workspace $ws2 output HDMI-A-2
+# workspace $ws3 output HDMI-A-1
+# workspace $ws4 output HDMI-A-1
+# workspace $ws5 output HDMI-A-1
+# workspace $ws6 output HDMI-A-1
+# workspace $ws7 output HDMI-A-1
+# workspace $ws8 output HDMI-A-1
+# workspace $ws9 output HDMI-A-1
+# workspace $ws10 output HDMI-A-1
# reload the configuration file
bindsym $mod+Shift+r reload
@@ -333,6 +324,9 @@ exec /bin/dex -a
# run a terminal
exec $terminal
+# setup outputs
+exec_always ~/.local/bin/setup-outputs
+
bar {
swaybar_command waybar
}
diff --git a/files/.config/systemd/user/swayidle.service b/files/.config/systemd/user/swayidle.service
index 7767815..da3632e 100644
--- a/files/.config/systemd/user/swayidle.service
+++ b/files/.config/systemd/user/swayidle.service
@@ -6,8 +6,8 @@ PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/swayidle -w \
- timeout 600 'echo RELOADAGENT | gpg-connect-agent; swaylock -f' \
- timeout 60 'swaymsg "output * dpms off"' \
+ timeout 1200 'echo RELOADAGENT | gpg-connect-agent; swaylock -f' \
+ timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'echo RELOADAGENT | gpg-connect-agent; swaylock -f'
diff --git a/files/.config/termite/config b/files/.config/termite/config
deleted file mode 100644
index 749c97b..0000000
--- a/files/.config/termite/config
+++ /dev/null
@@ -1,84 +0,0 @@
-[options]
-#allow_bold = true
-#audible_bell = false
-#clickable_url = true
-#dynamic_title = true
-font = Monospace 11
-font = Hack 11
-font = Hack Nerd Font 11
-#fullscreen = true
-#geometry = 640x480
-#icon_name = terminal
-#mouse_autohide = false
-#scroll_on_output = false
-#scroll_on_keystroke = true
-# Length of the scrollback buffer, 0 disabled the scrollback buffer
-# and setting it to a negative value means "infinite scrollback"
-scrollback_lines = 10000
-#search_wrap = true
-#urgent_on_bell = true
-hyperlinks = true
-
-# $BROWSER is used by default if set, with xdg-open as a fallback
-#browser = xdg-open
-
-# "system", "on" or "off"
-#cursor_blink = system
-
-# "block", "underline" or "ibeam"
-#cursor_shape = block
-
-# Hide links that are no longer valid in url select overlay mode
-#filter_unmatched_urls = true
-
-# Emit escape sequences for extra modified keys
-#modify_other_keys = false
-
-# set size hints for the window
-#size_hints = false
-
-# "off", "left" or "right"
-#scrollbar = off
-
-[colors]
-background = rgba(17, 19, 20, 0.85)
-cursor = #BBBBBB
-foreground = #EBDBB2
-
-# black
-color0 = #2C2F33
-color8 = #4B5056
-# red
-color1 = #B04C50
-color9 = #B04C50
-# green
-color2 = #919652
-color10 = #94985B
-# yellow
-color3 = #E2995C
-color11 = #E2995C
-# blue
-color4 = #66899D
-color12 = #66899D
-# magenta
-color5 = #8D6494
-color13 = #8D6494
-# cyan
-color6 = #527C77
-color14 = #527C77
-# white
-color7 = #A6ABA6
-color15 = #DDE3DC
-
-[hints]
-#font = Monospace 12
-#foreground = #dcdccc
-#background = #3f3f3f
-#active_foreground = #e68080
-#active_background = #3f3f3f
-#padding = 2
-#border = #3f3f3f
-#border_width = 0.5
-#roundness = 2.0
-
-# vim: ft=dosini cms=#%s
diff --git a/files/.config/waybar/style.css b/files/.config/waybar/style.css
index 0a9a021..96419c8 100644
--- a/files/.config/waybar/style.css
+++ b/files/.config/waybar/style.css
@@ -37,7 +37,7 @@ label, button {
}
#idle_inhibitor, #tray, #custom-vpn {
- padding-right: 0;
+ padding-right: 6px;
min-width: 23px;
color: white;
}
diff --git a/files/.config/xdg-desktop-portal-wlr/config b/files/.config/xdg-desktop-portal-wlr/config
deleted file mode 100644
index 9f03206..0000000
--- a/files/.config/xdg-desktop-portal-wlr/config
+++ /dev/null
@@ -1,2 +0,0 @@
-chooser_type = none
-output_name = HDMI-A-2
diff --git a/files/.drirc b/files/.drirc
new file mode 100644
index 0000000..497aba3
--- /dev/null
+++ b/files/.drirc
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/files/.local/bin/gamemode-start b/files/.local/bin/gamemode-start
new file mode 100755
index 0000000..2a1e9b1
--- /dev/null
+++ b/files/.local/bin/gamemode-start
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+systemctl --user stop gammastep
diff --git a/files/.local/bin/gamemode-stop b/files/.local/bin/gamemode-stop
new file mode 100755
index 0000000..0c3d8a0
--- /dev/null
+++ b/files/.local/bin/gamemode-stop
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+systemctl --user start gammastep
diff --git a/files/.local/bin/lsiommu b/files/.local/bin/lsiommu
index 9f293d6..2f50d80 100755
--- a/files/.local/bin/lsiommu
+++ b/files/.local/bin/lsiommu
@@ -1,8 +1,8 @@
#!/bin/bash
shopt -s nullglob
-for d in /sys/kernel/iommu_groups/*/devices/*; do
- n=${d#*/iommu_groups/*}; n=${n%%/*}
- printf 'IOMMU Group %s ' "$n"
- lspci -nns "${d##*/}"
+for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
+ echo "IOMMU Group ${g##*/}:"
+ for d in $g/devices/*; do
+ echo -e "\t$(lspci -nns ${d##*/})"
+ done;
done;
-
diff --git a/files/.local/bin/setup-outputs b/files/.local/bin/setup-outputs
new file mode 100755
index 0000000..76ae136
--- /dev/null
+++ b/files/.local/bin/setup-outputs
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# find displays with duplicate output
+# for each displays with duplicate output found, disable the HDMI output
+# assuming the other output is DisplayPort (prefered)
+while read -r display_with_dup_output; do
+ while read -r hdmi_output; do
+ # disable the hdmi output
+ swaymsg "output $hdmi_output disable"
+ done < <(swaymsg -t get_outputs | jq --raw-output '.[] | [.name, .make + " " + .model] | @tsv' | grep -E "$display_with_dup_output$" | awk '{print $1}' | grep HDMI) # find the hdmi output
+done < <(swaymsg -t get_outputs | jq --raw-output '.[] | [.make + " " + .model] | @tsv' | sort | uniq -d) # list all displays with duplicate outputs
diff --git a/files/.local/bin/sway b/files/.local/bin/sway
index 2f42936..b9fdeaa 100755
--- a/files/.local/bin/sway
+++ b/files/.local/bin/sway
@@ -11,6 +11,11 @@ import-gsettings() {
eval sed -E $expressions "${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini >/dev/null
}
+# list DRM device priority
+# Set intel graphics as lowest priority
+# https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start
+export WLR_DRM_DEVICES="$(drm_info -j | jq --raw-output 'to_entries[] | [if .value.driver.desc == "Intel Graphics" then 1 else 0 end, .key] | @tsv' | awk '{printf "%s:", $2}' | sed -e 's/:$//')"
+
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
diff --git a/files/.local/profile.d/.gitignore b/files/.local/profile.d/.gitignore
index d6b7ef3..f935021 100644
--- a/files/.local/profile.d/.gitignore
+++ b/files/.local/profile.d/.gitignore
@@ -1,2 +1 @@
-*
!.gitignore
diff --git a/files/.config/sway/autostart.sh b/files/.local/profile.d/autostart-sway
similarity index 96%
rename from files/.config/sway/autostart.sh
rename to files/.local/profile.d/autostart-sway
index 51aa402..d07eb92 100755
--- a/files/.config/sway/autostart.sh
+++ b/files/.local/profile.d/autostart-sway
@@ -1,4 +1,4 @@
-#/bin/bash
+#!/bin/bash
# Autostart sway if we are on tty1
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
@@ -10,4 +10,3 @@ if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
exec ~/.local/bin/sway 2>"$log_stderr" >"$log_stdout"
fi
-
diff --git a/files/.profile b/files/.profile
index 88c42aa..91307bb 100644
--- a/files/.profile
+++ b/files/.profile
@@ -10,11 +10,10 @@ export PAGER=less
export DIFFPROG=meld
# motd
-export MOTD_SERVICES="$MOTD_SERVICES docker.socket"
+export MOTD_SERVICES="$MOTD_SERVICES docker.socket sshd.service"
# java
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dsun.java2d.opengl=true"
export JAVA_FONTS=/usr/share/fonts/TTF
source ~/.local/profile.d/*
-
diff --git a/files/.zshrc b/files/.zshrc
index 5540ca4..0da966e 100644
--- a/files/.zshrc
+++ b/files/.zshrc
@@ -1,5 +1,3 @@
-source ~/.config/sway/autostart.sh
-
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH