diff --git a/.bashrc b/.bashrc index 2d721c6..7b33e35 100644 --- a/.bashrc +++ b/.bashrc @@ -10,10 +10,6 @@ alias grep='grep --color=auto' alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' PS1='[\u@\h \W]\$ ' -if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] ; then - exec sway --unsupported-gpu -fi - # pnpm export PNPM_HOME="/home/pmcc/.local/share/pnpm" case ":$PATH:" in @@ -25,3 +21,13 @@ esac eval "$(starship init bash)" export PATH=~/.npm-global/bin:~/.local/bin:$PATH +export SSH_AUTH_SOCK=~/.1password/agent.sock + +if uwsm check may-start; then + exec uwsm start -- sway.desktop --unsupported-gpu +fi + +#if [ -z "$WAYLAND_DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] ; then +# exec sway +#fi +alias claude="/home/pmcc/.config/claude/local/claude" diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 191a35a..1d09392 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -1,6 +1,3 @@ -[font] -size = 22.0 - [font.normal] family = "JetBrainsMono Nerd Font" diff --git a/.config/sway/config b/.config/sway/config index c979090..bb824f7 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -56,10 +56,10 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # Basics: # # Start a terminal - bindsym $mod+Return exec $term + bindsym $mod+Return exec uwsm app -- $term # Start your launcher - bindsym $mod+space exec $menu + bindsym $mod+space exec uwsm app -- $menu # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -72,7 +72,7 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill bindsym $mod+Shift+c reload # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+backspace exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' + bindsym $mod+Shift+backspace exec uwsm stop # # Layout stuff: @@ -143,9 +143,6 @@ bindsym $mod+r mode "resize" bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle - # Special keys to adjust brightness via brightnessctl - # Special key to take a screenshot with grim - bindsym Print exec grim for_window [shell="xwayland"] title_format "[XWayland] %title" diff --git a/.config/sway/config.d/50-systemd-user.conf b/.config/sway/config.d/50-systemd-user.conf new file mode 100644 index 0000000..8781db9 --- /dev/null +++ b/.config/sway/config.d/50-systemd-user.conf @@ -0,0 +1,16 @@ +# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment +# See FS#63021 +# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal. + +# Upstream refuses to set XDG_CURRENT_DESKTOP so we have to. +exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway +exec systemctl --user import-environment DISPLAY \ + SWAYSOCK \ + WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP + +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY \ + SWAYSOCK \ + XDG_CURRENT_DESKTOP=sway \ + WAYLAND_DISPLAY diff --git a/.config/sway/config.d/keybinds.conf b/.config/sway/config.d/keybinds.conf index 3010dcf..26d8483 100644 --- a/.config/sway/config.d/keybinds.conf +++ b/.config/sway/config.d/keybinds.conf @@ -36,9 +36,14 @@ bindsym $mod+Shift+s move down bindsym $mod+Shift+w move up bindsym $mod+Shift+d move right +bindsym $mod+Shift+f floating toggle + ## Layout management bindsym $mod+tab layout tabbed ## Laptop bindsym --locked XF86MonBrightnessUp exec brightnessctl -e4 -n2 -d amdgpu_bl2 set 5%+ bindsym --locked XF86MonBrightnessDown exec brightnessctl -e4 -n2 -d amdgpu_bl2 set 5%- + +## Utils +bindsym Print exec ~/.local/bin/snag -d ~/screenshots/ diff --git a/.config/sway/config.d/outputs.conf b/.config/sway/config.d/outputs.conf new file mode 100644 index 0000000..6024985 --- /dev/null +++ b/.config/sway/config.d/outputs.conf @@ -0,0 +1,2 @@ +output eDP-2 mode 2880x1800@120.000Hz pos 0 0 scale 2 adaptive_sync on allow_tearing yes +output * max_render_time off diff --git a/.config/sway/config.d/theme.conf b/.config/sway/config.d/theme.conf index 9ce1063..4338232 100644 --- a/.config/sway/config.d/theme.conf +++ b/.config/sway/config.d/theme.conf @@ -28,19 +28,21 @@ set $mantle #181825 set $crust #11111b # Warm Sunset Window Colors -client.focused $peach $base $text $yellow $peach -client.focused_inactive $surface1 $base $subtext1 $yellow $surface1 -client.unfocused $surface0 $base $subtext0 $yellow $surface0 -client.urgent $red $base $text $surface0 $red -client.placeholder $surface0 $base $text $surface0 $surface0 +client.focused $peach $peach $mantle $yellow $peach +client.focused_inactive $surface2 $lavender $mantle $yellow $lavender +client.unfocused $surface2 $blue $mantle $yellow $blue +client.urgent $crust $red $crust $surface0 $red +client.placeholder $surface0 $surface0 $text $surface0 $surface0 client.background $base # Gaps and borders -gaps inner 8 -gaps outer 5 -default_border normal 2 +gaps inner 4 +gaps outer 10 +default_border normal 4 default_floating_border normal 4 +#font pango:"JetBrainsMono Nerd Font" Normal 14 + # Status bar bar { swaybar_command waybar diff --git a/.config/sway/config.d/windows.conf b/.config/sway/config.d/windows.conf new file mode 100644 index 0000000..0931278 --- /dev/null +++ b/.config/sway/config.d/windows.conf @@ -0,0 +1,5 @@ +for_window [shell="xwayland"] title_format "[XWayland] %title" + +assign [class="Unity"] workspace number 2 +for_window [title="Unity"] no_focus, move position 400 400 +for_window [title="Picture-in-Picture"] floating enable diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..f0eb97c --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,61 @@ +{ + "layer": "top", // Waybar at top layer + "position": "top", // Waybar position (top|bottom|left|right) + // "width": 1280, // Waybar width + // Choose the order of the modules + "modules-left": ["sway/workspaces"], + "modules-center": ["pulseaudio", "clock"], + "modules-right": ["tray"], + "sway/workspaces": { + "disable-scroll": true, + "sort-by-name": true, + "format": " {index} {icon} ", + "format-icons": { + "default": "○", + "focused": "◉", + }, + }, + "tray": { + "icon-size": 21, + "spacing": 10 + }, + "custom/music": { + "format": " {}", + "escape": true, + "interval": 5, + "tooltip": false, + "exec": "playerctl metadata --format='{{ title }}'", + "on-click": "playerctl play-pause", + "max-length": 50 + }, + "clock": { + "timezone": "America/Montreal", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": " {:%H:%M %d/%m/%y} " + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon}", + "format-charging": "", + "format-plugged": "", + "format-alt": "{icon}", + "format-icons": ["", "", "", "", "", "", "", "", "", "", "", ""] + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{icon} {volume}%", + "format-muted": "", + "format-icons": { + "default": ["", "", " "] + }, + "on-click": "pavucontrol" + }, +} diff --git a/.config/waybar/mocha.css b/.config/waybar/mocha.css new file mode 100644 index 0000000..75cfb9d --- /dev/null +++ b/.config/waybar/mocha.css @@ -0,0 +1,26 @@ +@define-color rosewater #f5e0dc; +@define-color flamingo #f2cdcd; +@define-color pink #f5c2e7; +@define-color mauve #cba6f7; +@define-color red #f38ba8; +@define-color maroon #eba0ac; +@define-color peach #fab387; +@define-color yellow #f9e2af; +@define-color green #a6e3a1; +@define-color teal #94e2d5; +@define-color sky #89dceb; +@define-color sapphire #74c7ec; +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color text #cdd6f4; +@define-color subtext1 #bac2de; +@define-color subtext0 #a6adc8; +@define-color overlay2 #9399b2; +@define-color overlay1 #7f849c; +@define-color overlay0 #6c7086; +@define-color surface2 #585b70; +@define-color surface1 #45475a; +@define-color surface0 #313244; +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..49ddf4e --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,101 @@ +@import "mocha.css"; + +* { + font-family: JetBrainsMono Nerd Font; + min-height: 0; +} + +#waybar { + background: transparent; + color: @text; + margin: 5px 5px; +} + +#workspaces { + border-radius: 1rem; + margin: 5px; + background-color: @surface0; + margin-left: 1rem; +} + +#workspaces button { + color: @lavender; + border-radius: 1rem; + padding: 0.4rem; +} + +#workspaces button.active { + color: @sky; + border-radius: 1rem; +} + +#workspaces button:hover { + color: @sapphire; + border-radius: 1rem; +} + +#custom-music, +#tray, +#backlight, +#clock, +#battery, +#pulseaudio, +#custom-lock, +#custom-power { + background-color: @surface0; + padding: 0.5rem 1rem; + margin: 5px 0; +} + +#clock { + color: @blue; + border-radius: 0px 1rem 1rem 0px; + margin-right: 1rem; +} + +#battery { + color: @green; +} + +#battery.charging { + color: @green; +} + +#battery.warning:not(.charging) { + color: @red; +} + +#backlight { + color: @yellow; +} + +#backlight, #battery { + border-radius: 0; +} + +#pulseaudio { + color: @maroon; + border-radius: 1rem 0px 0px 1rem; + margin-left: 1rem; +} + +#custom-music { + color: @mauve; + border-radius: 1rem; +} + +#custom-lock { + border-radius: 1rem 0px 0px 1rem; + color: @lavender; +} + +#custom-power { + margin-right: 1rem; + border-radius: 0px 1rem 1rem 0px; + color: @red; +} + +#tray { + margin-right: 1rem; + border-radius: 1rem; +} diff --git a/.config/waybar/waybar-roon.json b/.config/waybar/waybar-roon.json new file mode 100644 index 0000000..dc06f79 --- /dev/null +++ b/.config/waybar/waybar-roon.json @@ -0,0 +1,12 @@ +{ + "zone_name": "SMSL 400", + "format": { + "playing": "󰐊 {artist} - {title}", + "paused": "󰏤 {artist} - {title}", + "stopped": "󰓛 Stopped", + "loading": "󰄰 Loading...", + "no_zone": "󰓛 No Zone" + }, + "max_length": 60, + "update_interval": 1 +} \ No newline at end of file