diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index f39a56b..cca51a8 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -28,6 +28,10 @@ background-color: $bg0; padding: 10px; } + + &.outline { + border: 1px solid $bg1; + } } .nebula { diff --git a/.config/eww/eww.yuck##hostname.tycho b/.config/eww/eww.yuck##hostname.tycho index 4e2ae5d..ada759f 100644 --- a/.config/eww/eww.yuck##hostname.tycho +++ b/.config/eww/eww.yuck##hostname.tycho @@ -54,17 +54,17 @@ (defwindow network-status - :monitor 2 + :monitor 0 :geometry (geometry :width "200px" :height "0px" - :x "407px" + :x "300px" :y "0px" :anchor "top right") :exclusive false :focusable false :stacking "overlay" (box :orientation "v" - :class "bar root bg" + :class "bar root bg outline" :visible {network--show-details} (network-detail))) diff --git a/.config/eww/windows.yuck b/.config/eww/windows.yuck index 83602e2..ba54add 100644 --- a/.config/eww/windows.yuck +++ b/.config/eww/windows.yuck @@ -142,8 +142,8 @@ :spacing 20 :class "rightbox" (vpn-network) - (network) (mpris2) + (network) (system-memory) (system-cpu-avg) (clock))) diff --git a/.config/htop/htoprc b/.config/htop/htoprc index e918bed..a0a4d7a 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -39,14 +39,14 @@ column_meter_modes_0=2 2 2 2 2 2 column_meters_1=AllCPUs2 Blank MemorySwap column_meter_modes_1=1 2 1 tree_view=0 -sort_key=46 +sort_key=47 tree_sort_key=46 sort_direction=-1 tree_sort_direction=-1 tree_view_always_by_pid=0 all_branches_collapsed=0 screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command -.sort_key=PERCENT_CPU +.sort_key=PERCENT_MEM .tree_sort_key=PERCENT_CPU .tree_view_always_by_pid=0 .tree_view=0 diff --git a/.config/sway/config b/.config/sway/config index c23cc59..220bfb7 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -153,6 +153,12 @@ for_window [app_id="Alacritty"] { client.unfocused $colorbackground $colorwallpaper $colorprimary $colorbackground $colorbackground } +## Floating windows should have titles +for_window [floating] border normal 1 + +## Thunderbird New.* windows should float +for_window [app_id="thunderbird" title="(New|Write)"] floating enable + ### ### # Application Keybinds # ### ### diff --git a/.config/sway/swayidle##class.desktop,hostname.tycho b/.config/sway/swayidle##class.desktop,hostname.tycho index b23c007..15c6e5d 100644 --- a/.config/sway/swayidle##class.desktop,hostname.tycho +++ b/.config/sway/swayidle##class.desktop,hostname.tycho @@ -2,7 +2,7 @@ timeout 10 'pgrep swaylock &> /dev/null && swaymsg "output * power off"' resume 'pgrep swaylock &> /dev/null && swaymsg "output * power on" && gpg-connect-agent UPDATESTARTUPTTY /bye' timeout 15 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGSTOP electron' resume 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGCONT electron' -timeout 150 'loginctl lock-session && swaymsg "output * power off"' +timeout 300 'loginctl lock-session && swaymsg "output * power off"' lock ~/.local/bin/screenlock before-sleep 'loginctl lock-session' unlock 'pkill -SIGUSR1 swaylock' diff --git a/.config/sway/workspaces.json##hostname.tycho b/.config/sway/workspaces.json##hostname.tycho index f210cd7..621ad33 100644 --- a/.config/sway/workspaces.json##hostname.tycho +++ b/.config/sway/workspaces.json##hostname.tycho @@ -101,7 +101,10 @@ "index": 14, "name": "mail", "exec": "thunderbird", - "program_name": "thunderbird" + "program_name": "thunderbird", + "environ": { + "MOZ_ENABLE_WAYLAND": "1" + } }, { "index": 15, @@ -127,8 +130,8 @@ { "index": 18, "name": "music", - "exec": "spotify", - "program_name": "spotify" + "exec": "feishin", + "program_name": "feishin" }, { "index": 19, diff --git a/.config/systemd/user/lxpolkit.service b/.config/systemd/user/lxpolkit.service index 3292d95..ede0b5b 100644 --- a/.config/systemd/user/lxpolkit.service +++ b/.config/systemd/user/lxpolkit.service @@ -4,7 +4,7 @@ BindTo=sway-session.target [Service] Type=simple -ExecStart=/usr/bin/lxpolkit +ExecStart=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 [Install] WantedBy=sway-session.target diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 5080219..eadfc2b 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -27,6 +27,8 @@ alias sudo='sudo ' alias sign='gpg --sign-with ezri@ezri.dev --detach-sign' alias verify='gpg --verify' +alias bw-personal='BITWARDENCLI_APPDATA_DIR=~/.config/bw-cli-personal bw' + function didifuckingstutter { echo $fg[blue]Apologies, right away.$fg[default] # Run the last command as root diff --git a/.config/zsh/options.zsh b/.config/zsh/options.zsh index 3b68cca..64bbec6 100644 --- a/.config/zsh/options.zsh +++ b/.config/zsh/options.zsh @@ -2,10 +2,6 @@ setopt auto_cd # Use directory stack setopt auto_pushd -# Always resolve symlinks when changing directory -setopt chase_links - # Ignore duplicate commands and commands starting with space setopt hist_ignore_dups setopt hist_ignore_space - diff --git a/.config/zsh/utils.zsh b/.config/zsh/utils.zsh index b502c99..903a4f4 100644 --- a/.config/zsh/utils.zsh +++ b/.config/zsh/utils.zsh @@ -75,3 +75,62 @@ function lsssh() { echo "$user@$host" done } + +function bwunlock() { + # Unlock Bitwarden vault and export session key + local bwfd + local bwpasswd + local secretstore + local bwcmd + local skipkeyring + + # Use default Bitwarden account + secretstore="bw" + bwcmd="bw" + skipkeyring=0 + + while [[ $# -gt 0 ]]; do + case $1 in + --personal) + # Use personal Bitwarden account + secretstore="bw-personal" + bwcmd="env BITWARDENCLI_APPDATA_DIR=$HOME/.config/bw-cli-personal bw" + ;; + --debug) + # Enable debug output + set -x + ;; + --ask) + # Prompt for Bitwarden password + skipkeyring=1 + ;; + *) + echo "Unknown option: $1" >&2 + ;; + esac + shift + done + + # Attempt to read Bitwarden password from keyring + if ! (( skipkeyring )); then + bwpasswd=$(secret-tool lookup service $secretstore 2>/dev/null) + fi + if [[ -z "${bwpasswd}" ]]; then + # If password is not found in keyring, prompt for it + read -s -p "Enter Bitwarden password: " bwpasswd + echo + # Store Bitwarden password in keyring + if ! (( skipkeyring )); then + secret-tool store --label="Bitwarden" service $secretstore + fi + fi + # Unlock Bitwarden vault and export session key + export BW_SESSION=$(eval $bwcmd unlock --raw "'$bwpasswd'" 2>/dev/tty) + if [[ -z "${BW_SESSION}" ]]; then + echo "Failed to unlock Bitwarden vault" >&2 + return 1 + else + echo "Bitwarden vault unlocked" + fi + +}