From e979d2ddde0b83c050b896eb567800fba1d1c649 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Mon, 19 Aug 2024 17:54:02 -0600 Subject: [PATCH 01/19] internet update --- .config/ssh/90-internet.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/ssh/90-internet.conf b/.config/ssh/90-internet.conf index ccba5d6..c87be09 100644 --- a/.config/ssh/90-internet.conf +++ b/.config/ssh/90-internet.conf @@ -4,7 +4,7 @@ Host gitea Hostname git.ezri.dev - User gitea + User git Host github Hostname github.com From 1651aa91b76db104229736b454f4ef886ae5bcc9 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Wed, 21 Aug 2024 18:39:44 -0600 Subject: [PATCH 02/19] encrypted changes --- .local/share/yadm/archive | Bin 656 -> 796 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive index cee847a27b4303c60de5dd9adb1fdea8bf6c0aff..9dc8056d7ac6f60d697a0304f4b70f256d95c75a 100644 GIT binary patch literal 796 zcmV+%1LORR4Fm}T2&7kL7vF*&AOF(n0YgN~VfD@hzkkL1Jgj?vJd?{7fN=X5cZOlt zlo$u)u9DZppW86#?6j;OZ%4~=`UiS2ug9F(A(3fmpKBG@4*jpp5QH_ZBB`BCzMHpj z*gn;a?RCa6mp$<2Qb2keIw2=;(ImSMkxQ0_WmX?_98nGFkUHqt-AJzek>ko1!0Sr} zqpsxrNv9(ck<{Iy-(VCI{QURQ2d?+uri+2!sH9gK zJCE}~UALvyu&C=QP;<-wiBQ|XJJv>mOjh#8)!U{FC@Fp7W_)3jMinY+)tiDcy@__s zwf6qF@Vh6Ci`QfcZNxX6xT!LuZ&WS1zn9p8K4nuB>)Y0!DWN)&e1s}SISZlu+FlP} zOe#p$3%*cs?z|EdX#q`>%513PjG2EG=K z08yXg0py009nQekI4ltWz)9W4j1I$N;r*jBo&^$s&)`zzJAw*KX>-<_MNpQgWtki~ za?{m&6F$IY3hsn<{K(F!oRfHNy(W7_rbKz0Fg`}>Q85t@slbB}6NQ2#eU5*o*;yms zX9#7v*mP^+UI|VR_E35a-$%ZkmiOrJmiMRinVpptbva$G1a}Jl!Zi{L7MBhznhGa5 z7pPjy>Y=ITXJO)m%)M3Yx!MANIiZ`F{%ff_Q{>`H`vs literal 656 zcmV;B0&o3{4Fm}T2(SOZNL2o^P5;vA0e>WLb9Gx@t#rL2uGe%X# zeX$K05+W9LSXL$Rb%OA1VHKK)rPHOMa%8_4LT_#?b=6sOhOO-(5rdu9sOS-YQRdVF zR(|S-8b+~bBj2@ewk0q0$tK$tPL~ygQfbv@V2p5=8SvWS`N>q67IT38W@%FO$ZcMf zCXYAy49tR4sGc%qABtudhLQnwm1>#_aqgQ#Pg2aQD`e_-3JRo1bYOT5Zh>8i%v{sq zyk>zpGVWR@^^{*Bt|qv>w+oY5JG({|?O9}+SYaZAUHN&NeE_)Hn)Wky++^(q@Z%e{ z!<1jxmNXf9nPH9uF?UsH0%R~?0gcc6k_94lQka%%x#l76TR`_JPSl*ku5G;AM7QVC znF@9^nruIflcZx=%q&g<-E1d##Vx2x5jO>~pgV1fY8E&{V#w&~XGMhw2}@{Jx|w*H z3R1mDmKTlZhzBCMJ)*N2LYsG&@dLfjv}lw*2}w>!xbB%(QNz_Sy%T0@R;qI-H?@a1 zo#g6czTIknsZ(Y0bVWNk~z(UuYbjxmQpmzfdqc)mKr$&wU_VL5oC z*_HZbdO(5KAsKUlgLGsWe#%w0G*d{Plg2hiD&X>)hRtX#B`yH>-bE8-wYV&f8l91p zb4EPpM}YbTI8bBO(R#JT@r5{ghu1g35j1W}$`bvCYb~i|S#3HTQkRR~N5sUYeKZ}+ q7#3|SXkKy-C7gzYNw&;?TN3Ut=WQ_XDgsroXa%(|+NxorG%m-kSvPqA From 5f3a867ca95d1082e1256ee4d11a5c833988b5be Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Sun, 1 Sep 2024 13:14:07 -0600 Subject: [PATCH 03/19] encrypted changes --- .local/share/yadm/archive | Bin 796 -> 725 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive index 9dc8056d7ac6f60d697a0304f4b70f256d95c75a..24d1c632450ca882c1a8608d85e36f8e3d6c2978 100644 GIT binary patch literal 725 zcmV;`0xJEC4Fm}T2>3IwEE9xE1OL+L0gXUESz6o*ywF2&ay42dTnNR6$YepGvSX%z zzn{HVL=D~PB|d=%LqAAr&yjSOI8fIMbW)fv6@h&{ty)m_oNh72$WOH{&t{ANMhIQK zh^w_B^jNhEr~n3X-)YfQz!A5PutD%(ER(7dw~(L9n=jD*Y5JIhZ3o2_SPi>ApO;4i z;Tj%gG3aW=2>S zI`oGDq|ycb;TU#8MDZl#8P|;fx9F5;Xh7{V7In?kM2E3&)2nAq`{Fdb&dl800)=;u z0eE@bqoel398vB9NYs^}EiL+9`CAyM>?6FL+=FUHR+ls6H=ovoV_BQjT_qRTL*}sb)3|*6*=Gss$^hnRoX) zvE!g~Yd7Ie=OBkP;kn*RzpWkOHa%-EI*^p_6gD=`;5s+LnaNqB0wdm+ak(FI43$8P z{>kyMBwz{W(WE<9*<`@zzycD@ddJMKq9Tp~8^WCInah=RkUz@Yx+TRfKuznAP3FLI zWI$W`L+BoZfK2ak!yrz6Mr}tl^KEv`#fh|3u&_~DjczlGXtFHDYw)Km{O5m0+#;yZ zsZYVDdQVHPp7H_np6Oko1!0Sr} zqpsxrNv9(ck<{Iy-(VCI{QURQ2d?+uri+2!sH9gK zJCE}~UALvyu&C=QP;<-wiBQ|XJJv>mOjh#8)!U{FC@Fp7W_)3jMinY+)tiDcy@__s zwf6qF@Vh6Ci`QfcZNxX6xT!LuZ&WS1zn9p8K4nuB>)Y0!DWN)&e1s}SISZlu+FlP} zOe#p$3%*cs?z|EdX#q`>%513PjG2EG=K z08yXg0py009nQekI4ltWz)9W4j1I$N;r*jBo&^$s&)`zzJAw*KX>-<_MNpQgWtki~ za?{m&6F$IY3hsn<{K(F!oRfHNy(W7_rbKz0Fg`}>Q85t@slbB}6NQ2#eU5*o*;yms zX9#7v*mP^+UI|VR_E35a-$%ZkmiOrJmiMRinVpptbva$G1a}Jl!Zi{L7MBhznhGa5 z7pPjy>Y=ITXJO)m%)M3Yx!MANIiZ`F{%ff_Q{>`H`vs From 529fe6868542dd67de65216b80398242060bc0ec Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Fri, 13 Sep 2024 15:06:01 -0600 Subject: [PATCH 04/19] Updated VPN toggle with timezone fix -- seems to work? --- .local/bin/vpn-toggle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/vpn-toggle b/.local/bin/vpn-toggle index ccedc64..3d141b3 100755 --- a/.local/bin/vpn-toggle +++ b/.local/bin/vpn-toggle @@ -6,10 +6,10 @@ if pgrep gpclient &>/dev/null; then # VPN is connected, so disconnect echo "Disconnecting from VPN..." - pkexec gpclient disconnect + pkexec env TZ=Etc/UTC gpclient disconnect else # VPN is disconnected, so connect echo "Connecting to VPN..." # pkexec doesn't pass the DISPLAY and XAUTHORITY environment variables, so we need to pass them manually - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gpclient connect gp.usu.edu + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY TZ=Etc/UTC gpclient connect gp.usu.edu fi From 9a431cf88e189f55282f765cd66710195a2132e7 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Mon, 16 Sep 2024 10:43:12 -0600 Subject: [PATCH 05/19] Updated VPN toggle to write logs to system journal --- .local/bin/vpn-toggle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.local/bin/vpn-toggle b/.local/bin/vpn-toggle index 3d141b3..1a18c20 100755 --- a/.local/bin/vpn-toggle +++ b/.local/bin/vpn-toggle @@ -1,5 +1,8 @@ #!/usr/bin/env zsh +exec >(systemd-cat -t gpclient -p info) 2>&1 + # Toggles the GlobalProtect VPN connection on and off # Get the current state of the VPN connection From 642cde6b02eba47d52e8d8f590231cd82e0fb571 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Mon, 14 Oct 2024 14:31:27 -0600 Subject: [PATCH 06/19] Minor tweaks and stuff --- .config/eww/eww.scss | 4 ++ .config/eww/eww.yuck##hostname.tycho | 6 +- .config/eww/windows.yuck | 2 +- .config/htop/htoprc | 4 +- .config/sway/config | 6 ++ .../swayidle##class.desktop,hostname.tycho | 2 +- .config/sway/workspaces.json##hostname.tycho | 9 ++- .config/systemd/user/lxpolkit.service | 2 +- .config/zsh/alias.zsh | 2 + .config/zsh/options.zsh | 4 -- .config/zsh/utils.zsh | 59 +++++++++++++++++++ 11 files changed, 85 insertions(+), 15 deletions(-) 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 + +} From e7883ff74804fb8bb952e584bbd8e2f1641748eb Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Thu, 17 Oct 2024 15:09:07 -0600 Subject: [PATCH 07/19] encrypted changes --- .config/hypr/hyprland.conf | 157 ++ .config/hypr/keymap.xkb | 1564 +++++++++++++++++ .../hypr/workspaces.json##hostname.normandy | 131 ++ .../hypr/workspaces.json##hostname.rocinante | 76 + .config/hypr/workspaces.json##hostname.tycho | 161 ++ .local/share/yadm/archive | Bin 725 -> 1266 bytes 6 files changed, 2089 insertions(+) create mode 100644 .config/hypr/hyprland.conf create mode 100644 .config/hypr/keymap.xkb create mode 100644 .config/hypr/workspaces.json##hostname.normandy create mode 100644 .config/hypr/workspaces.json##hostname.rocinante create mode 100644 .config/hypr/workspaces.json##hostname.tycho diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..e159669 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,157 @@ + +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki (basic and advanced configuring) +# + + +monitor=,preferred,auto,1 + +input { + kb_file=/home/ezri/.config/hypr/keymap.xkb + kb_layout= + kb_options=compose:caps + + follow_mouse=1 + + touchpad { + natural_scroll=no + } + + sensitivity=0 # -1.0 - 1.0, 0 means no modification. +} + +general { + main_mod=SUPER + + gaps_in=5 + gaps_out=20 + border_size=2 + col.active_border=0xff815986 + col.inactive_border=0xff2d272f + + apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) + + damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer + + layout=dwindle +} + +decoration { + rounding=5 + blur=0 + blur_size=4 # minimum 1 + blur_passes=1 # minimum 1 + blur_new_optimizations=1 +} + +animations { + bezier=overshoot,0.05,0.2,0,1.1 + bezier=overshoot2,0.05,0.3,0,1.3 + enabled=1 + animation=windows,1,3,overshoot2 + animation=windowsIn,1,3,overshoot2 + animation=border,1,3,overshoot + animation=fade,1,3,overshoot + animation=workspaces,1,3,overshoot +} + +gestures { + workspace_swipe=yes +} + +# example window rules +# for windows named/classed as abc and xyz +#windowrule=move 69 420,abc +#windowrule=size 420 69,abc +#windowrule=tile,xyz +#windowrule=float,abc +#windowrule=pseudo,abc +#windowrule=monitor 0,xyz + +# some nice mouse binds +bindm=SUPER,mouse:272,movewindow +bindm=SUPER,mouse:273,resizewindow + +# My binds +bind=SUPER,RETURN,exec,hypr-sensible-launcher +bind=SUPERSHIFT,RETURN,exec,alacritty +bind=SUPERSHIFT,Q,killactive, +bind=SUPERSHIFT,E,exit, +bind=SUPERALT,F,togglefloating, +bind=SUPER,D,exec,wofi --show drun + +bind=SUPER,B,movefocus,l +bind=SUPER,F,movefocus,r +bind=SUPER,P,movefocus,u +bind=SUPER,N,movefocus,d + +bind=SUPERSHIFT,B,movewindow,l +bind=SUPERSHIFT,F,movewindow,r +bind=SUPERSHIFT,P,movewindow,u +bind=SUPERSHIFT,N,movewindow,d + +bind=SUPER,Tab,changegroupactive,f +bind=SUPERSHIFT,Tab,changegroupactive,b +bind=SUPER,T,togglegroup, + +bind=SUPER,1,workspace,1 +bind=SUPER,2,workspace,2 +bind=SUPER,3,workspace,3 +bind=SUPER,4,workspace,4 +bind=SUPER,5,workspace,5 +bind=SUPER,6,workspace,6 +bind=SUPER,7,workspace,7 +bind=SUPER,8,workspace,8 +bind=SUPER,9,workspace,9 +bind=SUPER,0,workspace,10 + +bind=SUPERSHIFT,1,movetoworkspace,1 +bind=SUPERSHIFT,2,movetoworkspace,2 +bind=SUPERSHIFT,3,movetoworkspace,3 +bind=SUPERSHIFT,4,movetoworkspace,4 +bind=SUPERSHIFT,5,movetoworkspace,5 +bind=SUPERSHIFT,6,movetoworkspace,6 +bind=SUPERSHIFT,7,movetoworkspace,7 +bind=SUPERSHIFT,8,movetoworkspace,8 +bind=SUPERSHIFT,9,movetoworkspace,9 +bind=SUPERSHIFT,0,movetoworkspace,10 + +# Audio key bindings +bind=,XF86AudioPlay,exec,playerctl play-pause +bind=,XF86AudioNext,exec,playerctl next +bind=,XF86AudioPrev,exec,playerctl previous + +# Volume key bindings +bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +1% +bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -1% +bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle + +# Brightness key bindings +bind=,XF86MonBrightnessUp,exec,light -A 5 +bind=,XF86MonBrightnessDown,exec,light -U 5 + +# Lock screen +bind=SUPER,L,exec,loginctl lock-session + +# Notification dismissal +bind=SUPERCTRL,SPACE,exec,dunstctl close + +# Start daemons +exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP +exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP +exec=systemctl --user start hypr-session.target + +# Start status bar +exec=eww open hypr-mainbar + +wsbind=1,eDP-1 +wsbind=2,eDP-1 +wsbind=3,eDP-1 +wsbind=4,eDP-1 +wsbind=5,eDP-1 +wsbind=6,eDP-1 +wsbind=7,eDP-1 +wsbind=8,eDP-1 +wsbind=9,eDP-1 +wsbind=10,eDP-1 diff --git a/.config/hypr/keymap.xkb b/.config/hypr/keymap.xkb new file mode 100644 index 0000000..1549f23 --- /dev/null +++ b/.config/hypr/keymap.xkb @@ -0,0 +1,1564 @@ +xkb_keymap { +xkb_keycodes "(unnamed)" { + minimum = 8; + maximum = 255; + = 9; + = 10; + = 11; + = 12; + = 13; + = 14; + = 15; + = 16; + = 17; + = 18; + = 19; + = 20; + = 21; + = 22; + = 23; + = 24; + = 25; + = 26; + = 27; + = 28; + = 29; + = 30; + = 31; + = 32; + = 33; + = 34; + = 35; + = 36; + = 37; + = 38; + = 39; + = 40; + = 41; + = 42; + = 43; + = 44; + = 45; + = 46; + = 47; + = 48; + = 49; + = 50; + = 51; + = 52; + = 53; + = 54; + = 55; + = 56; + = 57; + = 58; + = 59; + = 60; + = 61; + = 62; + = 63; + = 64; + = 65; + = 66; + = 67; + = 68; + = 69; + = 70; + = 71; + = 72; + = 73; + = 74; + = 75; + = 76; + = 77; + = 78; + = 79; + = 80; + = 81; + = 82; + = 83; + = 84; + = 85; + = 86; + = 87; + = 88; + = 89; + = 90; + = 91; + = 92; + = 94; + = 95; + = 96; + = 97; + = 98; + = 99; + = 100; + = 101; + = 102; + = 103; + = 104; + = 105; + = 106; + = 107; + = 109; + = 110; + = 111; + = 112; + = 113; + = 114; + = 115; + = 116; + = 117; + = 118; + = 119; + = 120; + = 121; + = 122; + = 123; + = 124; + = 125; + = 126; + = 127; + = 128; + = 129; + = 130; + = 131; + = 132; + = 133; + = 108; + = 135; + = 136; + = 137; + = 138; + = 139; + = 140; + = 141; + = 142; + = 143; + = 144; + = 145; + = 146; + = 147; + = 148; + = 149; + = 150; + = 151; + = 152; + = 153; + = 154; + = 155; + = 156; + = 157; + = 158; + = 159; + = 160; + = 161; + = 162; + = 163; + = 164; + = 165; + = 166; + = 167; + = 168; + = 169; + = 170; + = 171; + = 172; + = 173; + = 174; + = 175; + = 176; + = 177; + = 178; + = 179; + = 180; + = 181; + = 182; + = 183; + = 184; + = 185; + = 186; + = 187; + = 188; + = 189; + = 190; + = 191; + = 192; + = 193; + = 194; + = 195; + = 196; + = 197; + = 198; + = 199; + = 200; + = 201; + = 202; + = 203; + = 204; + = 205; + = 206; + = 207; + = 208; + = 209; + = 210; + = 211; + = 212; + = 213; + = 214; + = 215; + = 216; + = 217; + = 218; + = 219; + = 220; + = 221; + = 222; + = 223; + = 224; + = 225; + = 226; + = 227; + = 228; + = 229; + = 230; + = 231; + = 232; + = 233; + = 234; + = 235; + = 236; + = 237; + = 238; + = 239; + = 240; + = 241; + = 242; + = 243; + = 244; + = 245; + = 246; + = 247; + = 248; + = 249; + = 250; + = 251; + = 252; + = 253; + = 254; + = 255; + indicator 1 = "Charging"; + indicator 2 = "Num Lock"; + indicator 3 = "Scroll Lock"; + indicator 4 = "Compose"; + indicator 5 = "Kana"; + indicator 6 = "Sleep"; + indicator 7 = "Suspend"; + indicator 8 = "Mute"; + indicator 9 = "Misc"; + indicator 10 = "Mail"; + indicator 11 = "Charging"; + indicator 12 = "Shift Lock"; + indicator 13 = "Group 2"; + indicator 14 = "Mouse Keys"; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; +}; + +xkb_types "(unnamed)" { + + virtual_modifiers NumLock,Alt,LevelThree,LevelFive,Meta,Super,Hyper,ScrollLock; + + type "ONE_LEVEL" { + modifiers= none; + level_name[Level1]= "Any"; + }; + type "TWO_LEVEL" { + modifiers= Shift; + map[Shift]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + }; + type "ALPHABETIC" { + modifiers= Shift+Lock; + map[Shift]= Level2; + map[Lock]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Caps"; + }; + type "KEYPAD" { + modifiers= Shift+NumLock; + map[NumLock]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; + }; + type "SHIFT+ALT" { + modifiers= Shift+Alt; + map[Shift+Alt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift+Alt"; + }; + type "PC_SUPER_LEVEL2" { + modifiers= Mod4; + map[Mod4]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Super"; + }; + type "PC_CONTROL_LEVEL2" { + modifiers= Control; + map[Control]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Control"; + }; + type "PC_ALT_LEVEL2" { + modifiers= Alt; + map[Alt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Alt"; + }; + type "CTRL+ALT" { + modifiers= Shift+Control+Alt+LevelThree; + map[Shift]= Level2; + preserve[Shift]= Shift; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + preserve[Shift+LevelThree]= Shift; + map[Control+Alt]= Level5; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "Ctrl+Alt"; + }; + type "LOCAL_EIGHT_LEVEL" { + modifiers= Shift+Lock+Control+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Control]= Level5; + map[Shift+Lock+Control]= Level5; + map[Shift+Control]= Level6; + map[Lock+Control]= Level6; + map[Control+LevelThree]= Level7; + map[Shift+Lock+Control+LevelThree]= Level7; + map[Shift+Control+LevelThree]= Level8; + map[Lock+Control+LevelThree]= Level8; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Level3"; + level_name[Level4]= "Shift Level3"; + level_name[Level5]= "Ctrl"; + level_name[Level6]= "Shift Ctrl"; + level_name[Level7]= "Level3 Ctrl"; + level_name[Level8]= "Shift Level3 Ctrl"; + }; + type "THREE_LEVEL" { + modifiers= Shift+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Level3"; + }; + type "EIGHT_LEVEL" { + modifiers= Shift+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "EIGHT_LEVEL_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree+LevelFive; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[Lock+LevelFive]= Level6; + map[Shift+Lock+LevelFive]= Level5; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[Lock+LevelThree+LevelFive]= Level8; + map[Shift+Lock+LevelThree+LevelFive]= Level7; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "EIGHT_LEVEL_SEMIALPHABETIC" { + modifiers= Shift+Lock+LevelThree+LevelFive; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level4; + preserve[Shift+Lock+LevelThree]= Lock; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[Lock+LevelFive]= Level6; + map[Shift+Lock+LevelFive]= Level5; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[Lock+LevelThree+LevelFive]= Level7; + preserve[Lock+LevelThree+LevelFive]= Lock; + map[Shift+Lock+LevelThree+LevelFive]= Level8; + preserve[Shift+Lock+LevelThree+LevelFive]= Lock; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "EIGHT_LEVEL_LEVEL_FIVE_LOCK" { + modifiers= Shift+Lock+NumLock+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + preserve[Shift+LevelFive]= Shift; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[NumLock]= Level5; + map[Shift+NumLock]= Level6; + preserve[Shift+NumLock]= Shift; + map[NumLock+LevelThree]= Level7; + map[Shift+NumLock+LevelThree]= Level8; + map[Shift+NumLock+LevelFive]= Level2; + map[NumLock+LevelThree+LevelFive]= Level3; + map[Shift+NumLock+LevelThree+LevelFive]= Level4; + map[Shift+Lock]= Level2; + map[Lock+LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level4; + map[Lock+LevelFive]= Level5; + map[Shift+Lock+LevelFive]= Level6; + preserve[Shift+Lock+LevelFive]= Shift; + map[Lock+LevelThree+LevelFive]= Level7; + map[Shift+Lock+LevelThree+LevelFive]= Level8; + map[Lock+NumLock]= Level5; + map[Shift+Lock+NumLock]= Level6; + preserve[Shift+Lock+NumLock]= Shift; + map[Lock+NumLock+LevelThree]= Level7; + map[Shift+Lock+NumLock+LevelThree]= Level8; + map[Shift+Lock+NumLock+LevelFive]= Level2; + map[Lock+NumLock+LevelThree+LevelFive]= Level3; + map[Shift+Lock+NumLock+LevelThree+LevelFive]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "EIGHT_LEVEL_ALPHABETIC_LEVEL_FIVE_LOCK" { + modifiers= Shift+Lock+NumLock+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + preserve[Shift+LevelFive]= Shift; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[NumLock]= Level5; + map[Shift+NumLock]= Level6; + preserve[Shift+NumLock]= Shift; + map[NumLock+LevelThree]= Level7; + map[Shift+NumLock+LevelThree]= Level8; + map[Shift+NumLock+LevelFive]= Level2; + map[NumLock+LevelThree+LevelFive]= Level3; + map[Shift+NumLock+LevelThree+LevelFive]= Level4; + map[Lock]= Level2; + map[Lock+LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level4; + map[Lock+LevelFive]= Level5; + map[Shift+Lock+LevelFive]= Level6; + map[Lock+LevelThree+LevelFive]= Level7; + map[Shift+Lock+LevelThree+LevelFive]= Level8; + map[Lock+NumLock]= Level5; + map[Shift+Lock+NumLock]= Level6; + map[Lock+NumLock+LevelThree]= Level7; + map[Shift+Lock+NumLock+LevelThree]= Level8; + map[Lock+NumLock+LevelFive]= Level2; + map[Lock+NumLock+LevelThree+LevelFive]= Level4; + map[Shift+Lock+NumLock+LevelThree+LevelFive]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X Alt Base"; + level_name[Level8]= "X Shift Alt"; + }; + type "FOUR_LEVEL" { + modifiers= Shift+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_SEMIALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level4; + preserve[Shift+Lock+LevelThree]= Lock; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_MIXED_KEYPAD" { + modifiers= Shift+NumLock+LevelThree; + map[NumLock]= Level2; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[NumLock+LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Shift+NumLock+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + }; + type "FOUR_LEVEL_X" { + modifiers= Shift+Control+Alt+LevelThree; + map[LevelThree]= Level2; + map[Shift+LevelThree]= Level3; + map[Control+Alt]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Alt Base"; + level_name[Level3]= "Shift Alt"; + level_name[Level4]= "Ctrl+Alt"; + }; + type "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level4; + preserve[Lock]= Lock; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr Base"; + level_name[Level4]= "Shift AltGr"; + }; + type "FOUR_LEVEL_PLUS_LOCK" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock]= Level5; + map[Shift+Lock]= Level2; + map[Lock+LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Shift Alt"; + level_name[Level5]= "Lock"; + }; + type "FOUR_LEVEL_KEYPAD" { + modifiers= Shift+NumLock+LevelThree; + map[Shift]= Level2; + map[NumLock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[NumLock+LevelThree]= Level4; + map[Shift+NumLock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; + level_name[Level3]= "Alt Base"; + level_name[Level4]= "Alt Number"; + }; +}; + +xkb_compatibility "(unnamed)" { + + virtual_modifiers NumLock,Alt,LevelThree,LevelFive,Meta,Super,Hyper,ScrollLock; + + interpret.useModMapMods= AnyLevel; + interpret.repeat= False; + interpret.locking= False; + interpret ISO_Level2_Latch+Exactly(Shift) { + useModMapMods=level1; + action= LatchMods(modifiers=Shift,clearLocks,latchToLock); + }; + interpret Shift_Lock+AnyOf(Shift+Lock) { + action= LockMods(modifiers=Shift); + }; + interpret Num_Lock+AnyOf(all) { + virtualModifier= NumLock; + action= LockMods(modifiers=NumLock); + }; + interpret ISO_Level3_Shift+AnyOf(all) { + virtualModifier= LevelThree; + useModMapMods=level1; + action= SetMods(modifiers=LevelThree,clearLocks); + }; + interpret ISO_Level3_Latch+AnyOf(all) { + virtualModifier= LevelThree; + useModMapMods=level1; + action= LatchMods(modifiers=LevelThree,clearLocks,latchToLock); + }; + interpret ISO_Level3_Lock+AnyOf(all) { + virtualModifier= LevelThree; + useModMapMods=level1; + action= LockMods(modifiers=LevelThree); + }; + interpret Alt_L+AnyOf(all) { + virtualModifier= Alt; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Alt_R+AnyOf(all) { + virtualModifier= Alt; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Meta_L+AnyOf(all) { + virtualModifier= Meta; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Meta_R+AnyOf(all) { + virtualModifier= Meta; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Super_L+AnyOf(all) { + virtualModifier= Super; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Super_R+AnyOf(all) { + virtualModifier= Super; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Hyper_L+AnyOf(all) { + virtualModifier= Hyper; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Hyper_R+AnyOf(all) { + virtualModifier= Hyper; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Scroll_Lock+AnyOf(all) { + virtualModifier= ScrollLock; + action= LockMods(modifiers=modMapMods); + }; + interpret ISO_Level5_Shift+AnyOf(all) { + virtualModifier= LevelFive; + useModMapMods=level1; + action= SetMods(modifiers=LevelFive,clearLocks); + }; + interpret ISO_Level5_Latch+AnyOf(all) { + virtualModifier= LevelFive; + useModMapMods=level1; + action= LatchMods(modifiers=LevelFive,clearLocks,latchToLock); + }; + interpret ISO_Level5_Lock+AnyOf(all) { + virtualModifier= LevelFive; + useModMapMods=level1; + action= LockMods(modifiers=LevelFive); + }; + interpret Mode_switch+AnyOfOrNone(all) { + action= SetGroup(group=+1); + }; + interpret ISO_Level3_Shift+AnyOfOrNone(all) { + action= SetMods(modifiers=LevelThree,clearLocks); + }; + interpret ISO_Level3_Latch+AnyOfOrNone(all) { + action= LatchMods(modifiers=LevelThree,clearLocks,latchToLock); + }; + interpret ISO_Level3_Lock+AnyOfOrNone(all) { + action= LockMods(modifiers=LevelThree); + }; + interpret ISO_Group_Latch+AnyOfOrNone(all) { + action= LatchGroup(group=2); + }; + interpret ISO_Next_Group+AnyOfOrNone(all) { + action= LockGroup(group=+1); + }; + interpret ISO_Prev_Group+AnyOfOrNone(all) { + action= LockGroup(group=-1); + }; + interpret ISO_First_Group+AnyOfOrNone(all) { + action= LockGroup(group=1); + }; + interpret ISO_Last_Group+AnyOfOrNone(all) { + action= LockGroup(group=2); + }; + interpret KP_1+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+1); + }; + interpret KP_End+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+1); + }; + interpret KP_2+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=+1); + }; + interpret KP_Down+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=+1); + }; + interpret KP_3+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+1); + }; + interpret KP_Next+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+1); + }; + interpret KP_4+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+0); + }; + interpret KP_Left+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+0); + }; + interpret KP_6+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+0); + }; + interpret KP_Right+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+0); + }; + interpret KP_7+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=-1); + }; + interpret KP_Home+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=-1); + }; + interpret KP_8+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=-1); + }; + interpret KP_Up+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=-1); + }; + interpret KP_9+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=-1); + }; + interpret KP_Prior+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=-1); + }; + interpret KP_5+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default); + }; + interpret KP_Begin+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default); + }; + interpret KP_F2+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=1); + }; + interpret KP_Divide+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=1); + }; + interpret KP_F3+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=2); + }; + interpret KP_Multiply+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=2); + }; + interpret KP_F4+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=3); + }; + interpret KP_Subtract+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=3); + }; + interpret KP_Separator+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default,count=2); + }; + interpret KP_Add+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default,count=2); + }; + interpret KP_0+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=lock); + }; + interpret KP_Insert+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=lock); + }; + interpret KP_Decimal+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=unlock); + }; + interpret KP_Delete+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=unlock); + }; + interpret F25+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=1); + }; + interpret F26+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=2); + }; + interpret F27+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=-1); + }; + interpret F29+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=-1); + }; + interpret F31+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default); + }; + interpret F33+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+1); + }; + interpret F35+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+1); + }; + interpret Pointer_Button_Dflt+AnyOfOrNone(all) { + action= PtrBtn(button=default); + }; + interpret Pointer_Button1+AnyOfOrNone(all) { + action= PtrBtn(button=1); + }; + interpret Pointer_Button2+AnyOfOrNone(all) { + action= PtrBtn(button=2); + }; + interpret Pointer_Button3+AnyOfOrNone(all) { + action= PtrBtn(button=3); + }; + interpret Pointer_DblClick_Dflt+AnyOfOrNone(all) { + action= PtrBtn(button=default,count=2); + }; + interpret Pointer_DblClick1+AnyOfOrNone(all) { + action= PtrBtn(button=1,count=2); + }; + interpret Pointer_DblClick2+AnyOfOrNone(all) { + action= PtrBtn(button=2,count=2); + }; + interpret Pointer_DblClick3+AnyOfOrNone(all) { + action= PtrBtn(button=3,count=2); + }; + interpret Pointer_Drag_Dflt+AnyOfOrNone(all) { + action= LockPtrBtn(button=default,affect=both); + }; + interpret Pointer_Drag1+AnyOfOrNone(all) { + action= LockPtrBtn(button=1,affect=both); + }; + interpret Pointer_Drag2+AnyOfOrNone(all) { + action= LockPtrBtn(button=2,affect=both); + }; + interpret Pointer_Drag3+AnyOfOrNone(all) { + action= LockPtrBtn(button=3,affect=both); + }; + interpret Pointer_EnableKeys+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeys); + }; + interpret Pointer_Accelerate+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeysAccel); + }; + interpret Pointer_DfltBtnNext+AnyOfOrNone(all) { + action= SetPtrDflt(affect=button,button=+1); + }; + interpret Pointer_DfltBtnPrev+AnyOfOrNone(all) { + action= SetPtrDflt(affect=button,button=-1); + }; + interpret AccessX_Enable+AnyOfOrNone(all) { + action= LockControls(controls=AccessXKeys); + }; + interpret AccessX_Feedback_Enable+AnyOfOrNone(all) { + action= LockControls(controls=AccessXFeedback); + }; + interpret RepeatKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=RepeatKeys); + }; + interpret SlowKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=SlowKeys); + }; + interpret BounceKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=BounceKeys); + }; + interpret StickyKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=StickyKeys); + }; + interpret MouseKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeys); + }; + interpret MouseKeys_Accel_Enable+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeysAccel); + }; + interpret Overlay1_Enable+AnyOfOrNone(all) { + action= LockControls(controls=none); + }; + interpret Overlay2_Enable+AnyOfOrNone(all) { + action= LockControls(controls=none); + }; + interpret AudibleBell_Enable+AnyOfOrNone(all) { + action= LockControls(controls=AudibleBell); + }; + interpret Terminate_Server+AnyOfOrNone(all) { + action= Terminate(); + }; + interpret Alt_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Alt,clearLocks); + }; + interpret Alt_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Alt,clearLocks); + }; + interpret Meta_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Meta,clearLocks); + }; + interpret Meta_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Meta,clearLocks); + }; + interpret Super_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Super,clearLocks); + }; + interpret Super_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Super,clearLocks); + }; + interpret Hyper_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Hyper,clearLocks); + }; + interpret Hyper_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Hyper,clearLocks); + }; + interpret Shift_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Shift,clearLocks); + }; + interpret XF86Switch_VT_1+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=1,!same); + }; + interpret XF86Switch_VT_2+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=2,!same); + }; + interpret XF86Switch_VT_3+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=3,!same); + }; + interpret XF86Switch_VT_4+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=4,!same); + }; + interpret XF86Switch_VT_5+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=5,!same); + }; + interpret XF86Switch_VT_6+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=6,!same); + }; + interpret XF86Switch_VT_7+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=7,!same); + }; + interpret XF86Switch_VT_8+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=8,!same); + }; + interpret XF86Switch_VT_9+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=9,!same); + }; + interpret XF86Switch_VT_10+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=10,!same); + }; + interpret XF86Switch_VT_11+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=11,!same); + }; + interpret XF86Switch_VT_12+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=12,!same); + }; + interpret XF86LogGrabInfo+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x50,data[1]=0x72,data[2]=0x47,data[3]=0x72,data[4]=0x62,data[5]=0x73,data[6]=0x00); + }; + interpret XF86LogWindowTree+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x50,data[1]=0x72,data[2]=0x57,data[3]=0x69,data[4]=0x6e,data[5]=0x73,data[6]=0x00); + }; + interpret XF86Next_VMode+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x2b,data[1]=0x56,data[2]=0x4d,data[3]=0x6f,data[4]=0x64,data[5]=0x65,data[6]=0x00); + }; + interpret XF86Prev_VMode+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x2d,data[1]=0x56,data[2]=0x4d,data[3]=0x6f,data[4]=0x64,data[5]=0x65,data[6]=0x00); + }; + interpret ISO_Level5_Shift+AnyOfOrNone(all) { + action= SetMods(modifiers=LevelFive,clearLocks); + }; + interpret ISO_Level5_Latch+AnyOfOrNone(all) { + action= LatchMods(modifiers=LevelFive,clearLocks,latchToLock); + }; + interpret ISO_Level5_Lock+AnyOfOrNone(all) { + action= LockMods(modifiers=LevelFive); + }; + interpret Caps_Lock+AnyOfOrNone(all) { + action= LockMods(modifiers=Lock); + }; + interpret Any+Exactly(Lock) { + action= LockMods(modifiers=Lock); + }; + interpret Any+AnyOf(all) { + action= SetMods(modifiers=modMapMods,clearLocks); + }; + indicator "Caps Lock" { + whichModState= locked; + modifiers= Lock; + }; + indicator "Num Lock" { + whichModState= locked; + modifiers= NumLock; + }; + indicator "Scroll Lock" { + whichModState= locked; + modifiers= ScrollLock; + }; + indicator "Shift Lock" { + whichModState= locked; + modifiers= Shift; + }; + indicator "Group 2" { + groups= 0xfe; + }; + indicator "Mouse Keys" { + controls= mouseKeys; + }; +}; + +xkb_symbols "(unnamed)" { + + name[group1]="English (US)"; + + key { [ Escape ] }; + key { [ 1, exclam ] }; + key { [ 2, at ] }; + key { [ 3, numbersign ] }; + key { [ 4, dollar ] }; + key { [ 5, percent ] }; + key { [ 6, asciicircum ] }; + key { [ 7, ampersand ] }; + key { [ 8, asterisk ] }; + key { [ 9, parenleft ] }; + key { [ 0, parenright ] }; + key { [ minus, underscore ] }; + key { [ equal, plus ] }; + key { [ BackSpace, BackSpace ] }; + key { [ Tab, ISO_Left_Tab ] }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ q, Q ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ w, W ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ e, E ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ r, R ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ t, T ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ y, Y ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ u, U ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ i, I ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ o, O ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ p, P ] + }; + key { [ bracketleft, braceleft ] }; + key { [ bracketright, braceright ] }; + key { [ Return ] }; + key { [ Control_L ] }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ a, A ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ s, S ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ d, D ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ f, F ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ g, G ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ h, H ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ j, J ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ k, K ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ l, L ] + }; + key { [ semicolon, colon ] }; + key { [ apostrophe, quotedbl ] }; + key { [ grave, asciitilde ] }; + key { [ Shift_L ] }; + key { [ backslash, bar ] }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ z, Z ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ x, X ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ c, C ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ v, V ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ b, B ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ n, N ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ m, M ] + }; + key { [ comma, less ] }; + key { [ period, greater ] }; + key { [ slash, question ] }; + key { [ Shift_R ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, XF86ClearGrab ] + }; + key { [ Alt_L, Meta_L ] }; + key { [ space, underscore ] }; + key { + type= "TWO_LEVEL", + symbols[Group1]= [ Multi_key, Multi_key ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F1, F1, F1, F1, XF86Switch_VT_1 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F2, F2, F2, F2, XF86Switch_VT_2 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F3, F3, F3, F3, XF86Switch_VT_3 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F4, F4, F4, F4, XF86Switch_VT_4 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F5, F5, F5, F5, XF86Switch_VT_5 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F6, F6, F6, F6, XF86Switch_VT_6 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F7, F7, F7, F7, XF86Switch_VT_7 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F8, F8, F8, F8, XF86Switch_VT_8 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F9, F9, F9, F9, XF86Switch_VT_9 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F10, F10, F10, F10, XF86Switch_VT_10 ] + }; + key { [ Num_Lock ] }; + key { [ Scroll_Lock ] }; + key { [ KP_Home, KP_7 ] }; + key { [ KP_Up, KP_8 ] }; + key { [ KP_Prior, KP_9 ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, XF86Prev_VMode ] + }; + key { [ KP_Left, KP_4 ] }; + key { [ KP_Begin, KP_5 ] }; + key { [ KP_Right, KP_6 ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Add, KP_Add, KP_Add, KP_Add, XF86Next_VMode ] + }; + key { [ KP_End, KP_1 ] }; + key { [ KP_Down, KP_2 ] }; + key { [ KP_Next, KP_3 ] }; + key { [ KP_Insert, KP_0 ] }; + key { [ KP_Delete, KP_Decimal ] }; + key { [ ISO_Level3_Shift ] }; + key { + type= "FOUR_LEVEL", + symbols[Group1]= [ less, greater, bar, brokenbar ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F11, F11, F11, F11, XF86Switch_VT_11 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F12, F12, F12, F12, XF86Switch_VT_12 ] + }; + key { [ Katakana ] }; + key { [ Hiragana ] }; + key { [ Henkan_Mode ] }; + key { [ Hiragana_Katakana ] }; + key { [ Muhenkan ] }; + key { [ KP_Enter ] }; + key { [ Control_R ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Divide, KP_Divide, KP_Divide, KP_Divide, XF86Ungrab ] + }; + key { + type= "PC_ALT_LEVEL2", + symbols[Group1]= [ Print, Sys_Req ] + }; + key { [ Alt_R, Meta_R ] }; + key { [ Linefeed ] }; + key { [ Home ] }; + key { [ Up ] }; + key { [ Prior ] }; + key { [ Left ] }; + key { [ Right ] }; + key { [ End ] }; + key { [ Down ] }; + key { [ Next ] }; + key { [ Insert ] }; + key { [ Delete ] }; + key { [ XF86AudioMute ] }; + key { [ XF86AudioLowerVolume ] }; + key { [ XF86AudioRaiseVolume ] }; + key { [ XF86PowerOff ] }; + key { [ KP_Equal ] }; + key { [ plusminus ] }; + key { + type= "PC_CONTROL_LEVEL2", + symbols[Group1]= [ Pause, Break ] + }; + key { [ XF86LaunchA ] }; + key { [ KP_Decimal, KP_Decimal ] }; + key { [ Hangul ] }; + key { [ Hangul_Hanja ] }; + key { [ Super_L ] }; + key { [ Super_R ] }; + key { [ Menu ] }; + key { [ Cancel ] }; + key { [ Redo ] }; + key { [ SunProps ] }; + key { [ Undo ] }; + key { [ SunFront ] }; + key { [ XF86Copy ] }; + key { [ XF86Open ] }; + key { [ XF86Paste ] }; + key { [ Find ] }; + key { [ XF86Cut ] }; + key { [ Help ] }; + key { [ XF86MenuKB ] }; + key { [ XF86Calculator ] }; + key { [ XF86Sleep ] }; + key { [ XF86WakeUp ] }; + key { [ XF86Explorer ] }; + key { [ XF86Send ] }; + key { [ XF86Xfer ] }; + key { [ XF86Launch1 ] }; + key { [ XF86Launch2 ] }; + key { [ XF86WWW ] }; + key { [ XF86DOS ] }; + key { [ XF86ScreenSaver ] }; + key { [ XF86RotateWindows ] }; + key { [ XF86TaskPane ] }; + key { [ XF86Mail ] }; + key { [ XF86Favorites ] }; + key { [ XF86MyComputer ] }; + key { [ XF86Back ] }; + key { [ XF86Forward ] }; + key { [ XF86Eject ] }; + key { [ XF86Eject ] }; + key { [ XF86AudioNext ] }; + key { [ XF86AudioPlay, XF86AudioPause ] }; + key { [ XF86AudioPrev ] }; + key { [ XF86AudioStop, XF86Eject ] }; + key { [ XF86AudioRecord ] }; + key { [ XF86AudioRewind ] }; + key { [ XF86Phone ] }; + key { [ XF86Tools ] }; + key { [ XF86HomePage ] }; + key { [ XF86Reload ] }; + key { [ XF86Close ] }; + key { [ XF86ScrollUp ] }; + key { [ XF86ScrollDown ] }; + key { [ parenleft ] }; + key { [ parenright ] }; + key { [ XF86New ] }; + key { [ Redo ] }; + key { [ XF86Tools ] }; + key { [ XF86Launch5 ] }; + key { [ XF86Launch6 ] }; + key { [ XF86Launch7 ] }; + key { [ XF86Launch8 ] }; + key { [ XF86Launch9 ] }; + key { [ XF86AudioMicMute ] }; + key { [ XF86TouchpadToggle ] }; + key { [ XF86TouchpadOn ] }; + key { [ XF86TouchpadOff ] }; + key { [ ISO_Level5_Shift ] }; + key { [ NoSymbol, Alt_L ] }; + key { [ NoSymbol, Meta_L ] }; + key { [ NoSymbol, Super_L ] }; + key { [ NoSymbol, Hyper_L ] }; + key { [ XF86AudioPlay ] }; + key { [ XF86AudioPause ] }; + key { [ XF86Launch3 ] }; + key { [ XF86Launch4 ] }; + key { [ XF86LaunchB ] }; + key { [ XF86Suspend ] }; + key { [ XF86Close ] }; + key { [ XF86AudioPlay ] }; + key { [ XF86AudioForward ] }; + key { [ Print ] }; + key { [ XF86WebCam ] }; + key { [ XF86AudioPreset ] }; + key { [ XF86Mail ] }; + key { [ XF86Messenger ] }; + key { [ XF86Search ] }; + key { [ XF86Go ] }; + key { [ XF86Finance ] }; + key { [ XF86Game ] }; + key { [ XF86Shop ] }; + key { [ Cancel ] }; + key { [ XF86MonBrightnessDown ] }; + key { [ XF86MonBrightnessUp ] }; + key { [ XF86AudioMedia ] }; + key { [ XF86Display ] }; + key { [ XF86KbdLightOnOff ] }; + key { [ XF86KbdBrightnessDown ] }; + key { [ XF86KbdBrightnessUp ] }; + key { [ XF86Send ] }; + key { [ XF86Reply ] }; + key { [ XF86MailForward ] }; + key { [ XF86Save ] }; + key { [ XF86Documents ] }; + key { [ XF86Battery ] }; + key { [ XF86Bluetooth ] }; + key { [ XF86WLAN ] }; + key { [ XF86UWB ] }; + key { [ XF86Next_VMode ] }; + key { [ XF86Prev_VMode ] }; + key { [ XF86MonBrightnessCycle ] }; + key { [ XF86BrightnessAuto ] }; + key { [ XF86DisplayOff ] }; + key { [ XF86WWAN ] }; + key { [ XF86RFKill ] }; + modifier_map Control { }; + modifier_map Shift { }; + modifier_map Shift { }; + modifier_map Mod1 { }; + modifier_map Mod2 { }; + modifier_map Mod5 { }; + modifier_map Control { }; + modifier_map Mod1 { }; + modifier_map Mod4 { }; + modifier_map Mod4 { }; + modifier_map Mod3 { }; + modifier_map Mod1 { }; + modifier_map Mod1 { }; + modifier_map Mod4 { }; + modifier_map Mod4 { }; +}; + +}; diff --git a/.config/hypr/workspaces.json##hostname.normandy b/.config/hypr/workspaces.json##hostname.normandy new file mode 100644 index 0000000..937dfd6 --- /dev/null +++ b/.config/hypr/workspaces.json##hostname.normandy @@ -0,0 +1,131 @@ +{ + "default_context": "personal", + "contexts": { + "personal": { + "left": [ + { + "index": 10, + "name": "config", + "exec": "pavucontrol", + "program_name": "pavucontrol" + }, + { + "index": 9, + "name": "email", + "exec": "alacritty", + "program_name": "console" + }, + { + "index": 8, + "name": "discord", + "exec": "discord", + "program_name": "discord" + }, + { + "index": 7, + "name": "music", + "exec": "feishin", + "program_name": "feishin" + }, + { + "index": 6, + "name": "documents", + "exec": "alacritty", + "program_name": "console" + }, + { + "index": 5, + "name": "VM management", + "exec": "virt-manager", + "program_name": "virt-manager" + }, + { + "index": 4, + "name": "project", + "exec": "env MOZ_ENABLE_WAYLAND=0 firefox --new-window", + "program_name": "firefox" + }, + { + "index": 3, + "name": "internet", + "exec": "env MOZ_ENABLE_WAYLAND=0 firefox --new-window", + "program_name": "firefox" + }, + { + "index": 2, + "name": "code", + "exec": "alacritty", + "program_name": "console" + }, + { + "index": 1, + "name": "terminal", + "exec": "alacritty", + "program_name": "console" + } + ], + "right": [ + { + "index": 11, + "name": "terminal", + "exec": "alacritty", + "program_name": "console" + }, + { + "index": 12, + "name": "code", + "exec": "alacritty", + "program_name": "console" + }, + { + "index": 13, + "name": "internet", + "exec": "env MOZ_ENABLE_WAYLAND=0 firefox --new-window", + "program_name": "firefox" + }, + { + "index": 14, + "name": "steam", + "exec": "steam", + "program_name": "steam" + }, + { + "index": 15, + "name": "minecraft", + "exec": "prismlauncher", + "program_name": "prismlauncher" + }, + { + "index": 16, + "name": "images", + "exec": "gimp", + "program_name": "gimp" + }, + { + "index": 17, + "name": "video", + "exec": "jellyfinmediaplayer", + "program_name": "jellyfinmediaplayer" + }, + { + "index": 18, + "name": "slack", + "exec": "slack", + "program_name": "slack" + }, + { + "index": 19, + "name": "zoom", + "exec": "zoom", + "program_name": "zoom" + }, + { + "index": 20, + "name": "config", + "exec": "pavucontrol", + "program_name": "pavucontrol" + } + ] + } + } +} diff --git a/.config/hypr/workspaces.json##hostname.rocinante b/.config/hypr/workspaces.json##hostname.rocinante new file mode 100644 index 0000000..ba2ca28 --- /dev/null +++ b/.config/hypr/workspaces.json##hostname.rocinante @@ -0,0 +1,76 @@ +{ + "default_context": "personal", + "display_ordering": ["builtin"], + "display_layout": { + "builtin": "eDP-1" + }, + "contexts": { + "personal": { + "builtin": [ + { + "index": 1, + "name": "terminal", + "exec": "console", + "program_name": "console" + }, + { + "index": 2, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 3, + "name": "internet", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 4, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 5, + "name": "servers", + "exec": "virt-manager", + "program_name": "virt-manager" + }, + { + "index": 6, + "name": "steam", + "exec": "steam", + "program_name": "steam" + }, + { + "index": 7, + "name": "media", + "exec": "jellyfinmediaplayer", + "program_name": "jellyfinmediaplayer" + }, + { + "index": 8, + "name": "real-time comms", + "exec": "discord", + "program_name": "discord" + }, + { + "index": 9, + "name": "messages", + "exec": "thunderbird", + "program_name": "thunderbird" + }, + { + "index": 10, + "name": "config", + "exec": "pavucontrol", + "program_name": "pavucontrol" + } + ] + } + } +} diff --git a/.config/hypr/workspaces.json##hostname.tycho b/.config/hypr/workspaces.json##hostname.tycho new file mode 100644 index 0000000..621ad33 --- /dev/null +++ b/.config/hypr/workspaces.json##hostname.tycho @@ -0,0 +1,161 @@ +{ + "default_context": "work", + "display_ordering": ["left", "center", "right"], + "display_layout": { + "left": "DP-5", + "right": "DP-7", + "center": "DP-4" + }, + "contexts": { + "work": { + "left": [ + { + "index": 5, + "name": "discord", + "exec": "discord", + "program_name": "discord" + }, + { + "index": 4, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 3, + "name": "documentation", + "exec": "firefox", + "args": ["--new-window"], + "environ": {}, + "program_name": "firefox" + }, + { + "index": 2, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 1, + "name": "console", + "exec": "console", + "program_name": "console" + } + ], + "center": [ + { + "index": 6, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 7, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 8, + "name": "internet", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 9, + "name": "project", + "exec": "firefox-developer-edition", + "args": ["-start-debugger-server", "--new-window"], + "program_name": "firefox-developer-edition" + }, + { + "index": 10, + "name": "server management", + "exec": "virt-manager", + "program_name": "virt-manager", + "systemd": false + }, + { + "index": 11, + "name": "password management", + "exec": "bitwarden-desktop", + "program_name": "bitwarden" + }, + { + "index": 12, + "name": "video", + "exec": "jellyfinmediaplayer", + "program_name": "jellyfinmediaplayer" + }, + { + "index": 13, + "name": "edex-ui", + "exec": "edex-ui", + "program_name": "edex-ui" + }, + { + "index": 14, + "name": "mail", + "exec": "thunderbird", + "program_name": "thunderbird", + "environ": { + "MOZ_ENABLE_WAYLAND": "1" + } + }, + { + "index": 15, + "name": "config", + "exec": "console", + "program_name": "console" + } + ], + "right": [ + { + "index": 16, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 17, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 18, + "name": "music", + "exec": "feishin", + "program_name": "feishin" + }, + { + "index": 19, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 20, + "name": "slack", + "exec": "slack", + "program_name": "slack", + "args": [ + "--enable-features=UseOzonePlatform", + "--ozone-platform=wayland", + "--enable-gpu-rasterization" + ], + "memory_profile": { + "high": "800M", + "max": "1.2G" + } + } + ] + } + } +} diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive index 24d1c632450ca882c1a8608d85e36f8e3d6c2978..0e3a26c6e2c91ece334f40add951ce1377bff9b6 100644 GIT binary patch literal 1266 zcmV`?^uX!5_s{nV6Gr-w<4^)+B#4j#oD6k z>T0}NVNjZVag6@)5iUt$89*qkB5!mF8xNXj3F~loLFkm~oJR=D?42ac*bngxxUqW; z6@Mdfo31u}Zt~e9Z?}p!z1(_>#Af2&vp?j)x9H%v7K3-hMEdic#t8f`VO>|gLYRf$ ziRC;m=|^VV@LtzcgF>m-gsbKY_Jb3j(ptYHavJ+#T8#x_H9kqox0P%ACcJxGGx<%4 z#?{EWu988sni8Wxx$2)-ySlIX@7`Br5B|B^VNx6iMJ>Obl_yk|ZweYM&;!K>_O)wBB(0WNn(Yl_24W_1R@$)_e z`^SR;L4bS{EphGW!<%>Be-7o7G1G3S&uV@^-qk5RHlsRST#j`$h*T@?vrNmiDr_WM zd{270q{Ibp68o;EUQ$1jdY!SFFEm0}2;B(ntp9*-;GUc6!xDT7yIR&_pT3IuK$2Sz z=n!#5%+-&7T;zA{?|c|%wPQ@3IwEE9xE1OL+L0gXUESz6o*ywF2&ay42dTnNR6$YepGvSX%z zzn{HVL=D~PB|d=%LqAAr&yjSOI8fIMbW)fv6@h&{ty)m_oNh72$WOH{&t{ANMhIQK zh^w_B^jNhEr~n3X-)YfQz!A5PutD%(ER(7dw~(L9n=jD*Y5JIhZ3o2_SPi>ApO;4i z;Tj%gG3aW=2>S zI`oGDq|ycb;TU#8MDZl#8P|;fx9F5;Xh7{V7In?kM2E3&)2nAq`{Fdb&dl800)=;u z0eE@bqoel398vB9NYs^}EiL+9`CAyM>?6FL+=FUHR+ls6H=ovoV_BQjT_qRTL*}sb)3|*6*=Gss$^hnRoX) zvE!g~Yd7Ie=OBkP;kn*RzpWkOHa%-EI*^p_6gD=`;5s+LnaNqB0wdm+ak(FI43$8P z{>kyMBwz{W(WE<9*<`@zzycD@ddJMKq9Tp~8^WCInah=RkUz@Yx+TRfKuznAP3FLI zWI$W`L+BoZfK2ak!yrz6Mr}tl^KEv`#fh|3u&_~DjczlGXtFHDYw)Km{O5m0+#;yZ zsZYVDdQVHPp7H_np6O Date: Sun, 20 Oct 2024 16:05:59 -0600 Subject: [PATCH 08/19] Configured third display for S.S.V. Normandy --- .config/eww/eww.scss | 1 - .config/eww/eww.yuck##hostname.normandy | 30 +++++++- .config/eww/windows.yuck | 25 +++++++ ...isplay-arrangement.conf##hostname.normandy | 6 +- ...ace-arrangement.conf##class.triple-monitor | 75 +++++++++++++++++++ .../bar-launch.conf##hostname.normandy | 2 +- 6 files changed, 132 insertions(+), 7 deletions(-) create mode 100644 .config/sway/workspace-arrangement.conf##class.triple-monitor diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index f39a56b..42558f4 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -21,7 +21,6 @@ &.side { margin: 10px; - margin-right: 0px; } &.bg { diff --git a/.config/eww/eww.yuck##hostname.normandy b/.config/eww/eww.yuck##hostname.normandy index be1188f..a1d0aa4 100644 --- a/.config/eww/eww.yuck##hostname.normandy +++ b/.config/eww/eww.yuck##hostname.normandy @@ -11,7 +11,7 @@ (include "./windows.yuck") (defwindow leftbar - :monitor 1 + :monitor 2 :geometry (geometry :width "100%" :height "36px" :anchor "top center") @@ -25,7 +25,7 @@ (normandy-leftbar--right))) (defwindow rightbar - :monitor 0 + :monitor 1 :geometry (geometry :width "100%" :height "26px" :anchor "top center") @@ -38,8 +38,22 @@ "" ;;(normandy-rightbar--center) (normandy-rightbar--right))) +(defwindow centerbar + :monitor 0 + :geometry (geometry :width "100%" + :height "26px" + :anchor "top center") + :exclusive true + :focusable false + :stacking "fg" + (centerbox :orientation "h" + :class "bar root" + (normandy-centerbar--left) + (normandy-centerbar--center) + (normandy-centerbar--right))) + (defwindow sidebar - :monitor 1 + :monitor 2 :geometry (geometry :width "210px" :height "1044px" :anchor "left bottom") @@ -48,3 +62,13 @@ :stacking "fg" (normandy-sidebar)) +(defwindow sidebar2 + :monitor 1 + :geometry (geometry :width "210px" + :height "1044px" + :anchor "right bottom") + :exclusive true + :focusable false + :stacking "fg" + (normandy-sidebar)) + diff --git a/.config/eww/windows.yuck b/.config/eww/windows.yuck index 83602e2..f06dcdd 100644 --- a/.config/eww/windows.yuck +++ b/.config/eww/windows.yuck @@ -58,6 +58,31 @@ (sway-workspace :group "left") (sway-workspaces :group "left"))) +(defwidget normandy-centerbar--left [] + (box :orientation "h" + :halign "start" + :space-evenly false + :spacing 20 + :class "leftbox" + (sway-workspaces :group "center") + (sway-workspace :group "center"))) + +(defwidget normandy-centerbar--center [] + (box :orientation "h" + :halign "end" + :space-evenly false + :spacing 20 + :class "centerbox" + (system-name))) + +(defwidget normandy-centerbar--right [] + (box :orientation "h" + :halign "end" + :space-evenly false + :spacing 20 + :class "rightbox" + (mpris2))) + (defwidget normandy-rightbar--left [] (box :orientation "h" :halign "start" diff --git a/.config/sway/display-arrangement.conf##hostname.normandy b/.config/sway/display-arrangement.conf##hostname.normandy index 88871ec..df53929 100644 --- a/.config/sway/display-arrangement.conf##hostname.normandy +++ b/.config/sway/display-arrangement.conf##hostname.normandy @@ -3,9 +3,11 @@ ### ### set $leftdisplay 'HDMI-A-1' +set $centerdisplay 'DP-1' set $rightdisplay 'DP-2' output { - $leftdisplay pos 0 0 mode --custom 1920x1080@75Hz - $rightdisplay pos 1920 0 mode --custom 1920x1080@75Hz + $leftdisplay pos 0 220 mode --custom 1920x1080@75Hz + $centerdisplay pos 1920 0 mode 2560x1440@165Hz + $rightdisplay pos 4480 230 mode --custom 1920x1080@75Hz } diff --git a/.config/sway/workspace-arrangement.conf##class.triple-monitor b/.config/sway/workspace-arrangement.conf##class.triple-monitor new file mode 100644 index 0000000..16baca7 --- /dev/null +++ b/.config/sway/workspace-arrangement.conf##class.triple-monitor @@ -0,0 +1,75 @@ +### -*-conf-space-*- ### +# Dual-Monitor Workspace Settings # +### ### + +# This file defines the workspaces and creates the keybinds to switch +# between them and move containers around between them. This version +# is for dual-monitor systems. The host-specific display-arrangement.conf +# file should declare the $leftdisplay and $rightdisplay variables used +# here. + +workspace { + # Left monitor workspaces + 1 output $leftdisplay + 2 output $leftdisplay + 3 output $leftdisplay + 4 output $leftdisplay + 5 output $leftdisplay + 6 output $leftdisplay + 7 output $leftdisplay + 8 output $leftdisplay + 9 output $leftdisplay + 10 output $leftdisplay + + # Center monitor workspaces + 11 output $centerdisplay + 12 output $centerdisplay + 13 output $centerdisplay + 14 output $centerdisplay + 15 output $centerdisplay + 16 output $centerdisplay + 17 output $centerdisplay + 18 output $centerdisplay + 19 output $centerdisplay + 20 output $centerdisplay + + # Right monitor workspaces + 21 output $rightdisplay + 22 output $rightdisplay + 23 output $rightdisplay + 24 output $rightdisplay + 25 output $rightdisplay + 26 output $rightdisplay + 27 output $rightdisplay + 28 output $rightdisplay + 29 output $rightdisplay + 30 output $rightdisplay +} + +## Workspace Switching Keybinds +bindsym { + $mod+1 exec swaymsg workspace $(sway-find-workspace 1 ) + $mod+2 exec swaymsg workspace $(sway-find-workspace 2 ) + $mod+3 exec swaymsg workspace $(sway-find-workspace 3 ) + $mod+4 exec swaymsg workspace $(sway-find-workspace 4 ) + $mod+5 exec swaymsg workspace $(sway-find-workspace 5 ) + $mod+6 exec swaymsg workspace $(sway-find-workspace 6 ) + $mod+7 exec swaymsg workspace $(sway-find-workspace 7 ) + $mod+8 exec swaymsg workspace $(sway-find-workspace 8 ) + $mod+9 exec swaymsg workspace $(sway-find-workspace 9 ) + $mod+0 exec swaymsg workspace $(sway-find-workspace 10) +} + +## Window Reassignment Keybinds +bindsym { + $mod+Shift+1 exec swaymsg move container to workspace $(sway-find-workspace 1 ) + $mod+Shift+2 exec swaymsg move container to workspace $(sway-find-workspace 2 ) + $mod+Shift+3 exec swaymsg move container to workspace $(sway-find-workspace 3 ) + $mod+Shift+4 exec swaymsg move container to workspace $(sway-find-workspace 4 ) + $mod+Shift+5 exec swaymsg move container to workspace $(sway-find-workspace 5 ) + $mod+Shift+6 exec swaymsg move container to workspace $(sway-find-workspace 6 ) + $mod+Shift+7 exec swaymsg move container to workspace $(sway-find-workspace 7 ) + $mod+Shift+8 exec swaymsg move container to workspace $(sway-find-workspace 8 ) + $mod+Shift+9 exec swaymsg move container to workspace $(sway-find-workspace 9 ) + $mod+Shift+0 exec swaymsg move container to workspace $(sway-find-workspace 10) +} diff --git a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy index da9fb01..41f8b63 100644 --- a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy +++ b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy @@ -1,4 +1,4 @@ # -*-conf-unix-*- [Service] -ExecStartPost=eww open-many leftbar rightbar sidebar +ExecStartPost=eww open-many leftbar centerbar rightbar sidebar sidebar2 From f91c45283ad9f2cff5a516f86a7042bd5b7b093c Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Sun, 20 Oct 2024 16:07:02 -0600 Subject: [PATCH 09/19] Added directional output switching keybinds --- .config/sway/config | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.config/sway/config b/.config/sway/config index c23cc59..8cdd9cd 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -91,6 +91,18 @@ bindsym { $mod+f focus right $mod+p focus up $mod+n focus down + + # Arrow key output bindings + $mod+Control+Left focus output left + $mod+Control+Right focus output right + $mod+Control+Up focus output up + $mod+Control+Down focus output down + + # Emacs output bindings + $mod+Control+b focus output left + $mod+Control+f focus output right + $mod+Control+p focus output up + $mod+Control+n focus output down } ## Containers From b7d9102f0dcc631d1271da2a16f3e79ff00b9815 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Sun, 20 Oct 2024 16:07:36 -0600 Subject: [PATCH 10/19] Removed symlink chasing on cd --- .config/zsh/options.zsh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.config/zsh/options.zsh b/.config/zsh/options.zsh index 3b68cca..f3e9b21 100644 --- a/.config/zsh/options.zsh +++ b/.config/zsh/options.zsh @@ -2,8 +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 From a3c08fd0f02967242780ff9c512a5881b4591461 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Tue, 22 Oct 2024 15:10:09 -0600 Subject: [PATCH 11/19] Tycho migration to context manager --- .config/eww/modules/workspaces.yuck | 2 +- .config/sway/config | 28 ++ ...-gaps.conf##class.has-sidebar-5-workspaces | 11 + .config/sway/workspaces.json##hostname.tycho | 323 ++++++++++-------- .local/bin/default-application-launcher | 5 +- 5 files changed, 221 insertions(+), 148 deletions(-) create mode 100644 .config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces diff --git a/.config/eww/modules/workspaces.yuck b/.config/eww/modules/workspaces.yuck index ede6b3b..7828d0e 100644 --- a/.config/eww/modules/workspaces.yuck +++ b/.config/eww/modules/workspaces.yuck @@ -1,6 +1,6 @@ ;; -*-lisp-*- (deflisten sway--data :initial '{"mode": "default"}' - `~/.config/eww/scripts/sway.py`) + `sway_listen`) (defvar hypr--data '{}') diff --git a/.config/sway/config b/.config/sway/config index baf6bb9..4b8d55b 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -61,6 +61,34 @@ mode "resize" { } } +## Workspace Switching Keybinds +bindsym { + $mod+1 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 1 + $mod+2 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 2 + $mod+3 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 3 + $mod+4 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 4 + $mod+5 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 5 + $mod+6 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 6 + $mod+7 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 7 + $mod+8 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 8 + $mod+9 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 9 + $mod+0 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager FocusWorkspace y 10 +} + +## Window Reassignment Keybinds +bindsym { + $mod+Shift+1 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 1 + $mod+Shift+2 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 2 + $mod+Shift+3 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 3 + $mod+Shift+4 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 4 + $mod+Shift+5 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 5 + $mod+Shift+6 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 6 + $mod+Shift+7 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 7 + $mod+Shift+8 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 8 + $mod+Shift+9 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 9 + $mod+Shift+0 exec busctl --user call dev.ezri.sway /ContextManager dev.ezri.sway.ContextManager MoveContainer y 10 +} + bindsym $mod+r mode "resize" ## Moving Windows diff --git a/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces b/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces new file mode 100644 index 0000000..7c2196d --- /dev/null +++ b/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces @@ -0,0 +1,11 @@ +#### -*-conf-space-*- #### +## Sidebar Gaps Config ## +#### #### + +workspace { + 1 gaps left 210 + 2 gaps left 210 + 3 gaps left 210 + 4 gaps left 210 + 5 gaps left 210 +} diff --git a/.config/sway/workspaces.json##hostname.tycho b/.config/sway/workspaces.json##hostname.tycho index 621ad33..fc9c249 100644 --- a/.config/sway/workspaces.json##hostname.tycho +++ b/.config/sway/workspaces.json##hostname.tycho @@ -1,161 +1,196 @@ { "default_context": "work", - "display_ordering": ["left", "center", "right"], - "display_layout": { - "left": "DP-5", - "right": "DP-7", - "center": "DP-4" - }, + "workspaces": [ + { + "index": 1, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 2, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 3, + "name": "documentation", + "exec": "firefox", + "args": ["--new-window"], + "environ": {}, + "program_name": "firefox" + }, + { + "index": 4, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 5, + "name": "discord", + "exec": "discord", + "program_name": "discord" + }, + { + "index": 6, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 7, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 8, + "name": "internet", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 9, + "name": "project", + "exec": "firefox-developer-edition", + "args": ["-start-debugger-server", "--new-window"], + "program_name": "firefox-developer-edition" + }, + { + "index": 10, + "name": "server management", + "exec": "virt-manager", + "program_name": "virt-manager", + "systemd": false + }, + { + "index": 11, + "name": "password management", + "exec": "bitwarden-desktop", + "program_name": "bitwarden" + }, + { + "index": 12, + "name": "video", + "exec": "jellyfinmediaplayer", + "program_name": "jellyfinmediaplayer" + }, + { + "index": 13, + "name": "edex-ui", + "exec": "edex-ui", + "program_name": "edex-ui" + }, + { + "index": 14, + "name": "mail", + "exec": "thunderbird", + "program_name": "thunderbird", + "environ": { + "MOZ_ENABLE_WAYLAND": "1" + } + }, + { + "index": 15, + "name": "config", + "exec": "console", + "program_name": "console" + }, + { + "index": 16, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 17, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 18, + "name": "music", + "exec": "feishin", + "program_name": "feishin" + }, + { + "index": 19, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 20, + "name": "slack", + "exec": "slack", + "program_name": "slack", + "args": [ + "--enable-features=UseOzonePlatform", + "--ozone-platform=wayland", + "--enable-gpu-rasterization" + ], + "memory_profile": { + "high": "800M", + "max": "1.2G" + } + } + ], "contexts": { "work": { - "left": [ + "primary": "center", + "outputs": [ { - "index": 5, - "name": "discord", - "exec": "discord", - "program_name": "discord" + "make": "HP Inc.", + "model": "HP Z27n G2", + "serial": "6CM0151FHY", + "group": "left", + "position": [0, 450], + "mode": "2560x1440@60Hz", + "eww_windows": ["sidebar", "leftbar"] }, { - "index": 4, - "name": "project", - "exec": "firefox", - "args": ["--new-window"], - "program_name": "firefox" + "make": "Hewlett Packard", + "model": "HP S340c", + "serial": "CN490508SQ", + "group": "center", + "position": [2560, 450], + "mode": "3440x1440", + "eww_windows": ["centerbar"] }, { - "index": 3, - "name": "documentation", - "exec": "firefox", - "args": ["--new-window"], - "environ": {}, - "program_name": "firefox" - }, - { - "index": 2, - "name": "code", - "exec": "emacsclient", - "args": ["-nc"], - "program_name": "emacsclient" - }, - { - "index": 1, - "name": "console", - "exec": "console", - "program_name": "console" + "make": "HP Inc.", + "model": "HP Z27n G2", + "serial": "6CM0151FD4", + "group": "right", + "position": [6000, 0], + "mode": "2560x1440@60Hz", + "transform": 90, + "eww_windows": ["rightbar"] } ], - "center": [ - { - "index": 6, - "name": "console", - "exec": "console", - "program_name": "console" + "groups": { + "left": { + "workspaces": [1, 2, 3, 4, 5], + "reverse": true }, - { - "index": 7, - "name": "code", - "exec": "emacsclient", - "args": ["-nc"], - "program_name": "emacsclient" + "center": { + "workspaces": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "reverse": false }, - { - "index": 8, - "name": "internet", - "exec": "firefox", - "args": ["--new-window"], - "program_name": "firefox" - }, - { - "index": 9, - "name": "project", - "exec": "firefox-developer-edition", - "args": ["-start-debugger-server", "--new-window"], - "program_name": "firefox-developer-edition" - }, - { - "index": 10, - "name": "server management", - "exec": "virt-manager", - "program_name": "virt-manager", - "systemd": false - }, - { - "index": 11, - "name": "password management", - "exec": "bitwarden-desktop", - "program_name": "bitwarden" - }, - { - "index": 12, - "name": "video", - "exec": "jellyfinmediaplayer", - "program_name": "jellyfinmediaplayer" - }, - { - "index": 13, - "name": "edex-ui", - "exec": "edex-ui", - "program_name": "edex-ui" - }, - { - "index": 14, - "name": "mail", - "exec": "thunderbird", - "program_name": "thunderbird", - "environ": { - "MOZ_ENABLE_WAYLAND": "1" - } - }, - { - "index": 15, - "name": "config", - "exec": "console", - "program_name": "console" + "right": { + "workspaces": [16, 17, 18, 19, 20], + "reverse": false } - ], - "right": [ - { - "index": 16, - "name": "console", - "exec": "console", - "program_name": "console" - }, - { - "index": 17, - "name": "code", - "exec": "emacsclient", - "args": ["-nc"], - "program_name": "emacsclient" - }, - { - "index": 18, - "name": "music", - "exec": "feishin", - "program_name": "feishin" - }, - { - "index": 19, - "name": "project", - "exec": "firefox", - "args": ["--new-window"], - "program_name": "firefox" - }, - { - "index": 20, - "name": "slack", - "exec": "slack", - "program_name": "slack", - "args": [ - "--enable-features=UseOzonePlatform", - "--ozone-platform=wayland", - "--enable-gpu-rasterization" - ], - "memory_profile": { - "high": "800M", - "max": "1.2G" - } - } - ] + } } } } diff --git a/.local/bin/default-application-launcher b/.local/bin/default-application-launcher index f4109ff..37e340b 100755 --- a/.local/bin/default-application-launcher +++ b/.local/bin/default-application-launcher @@ -6,9 +6,8 @@ exec 2> >(systemd-cat -t i3-sensible-launcher -p err) pyenv shell system -current_workspace=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true).name' -r) - -ws_data=$(jq <$HOME/.config/sway/workspaces.json ".contexts | [.[] | values[]] | flatten(1) | .[] | select(.index==${current_workspace})" -c) +ws_data=$(sway_get_focused_workspace) +current_workspace=$(echo $ws_data | jq -r '.index') program=$(echo $ws_data | jq -r '.exec') program_name=$(echo $ws_data | jq -r '.program_name') From 78d8ef68f69da82c0f3a1be81441c1fb79c3a96c Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Tue, 22 Oct 2024 15:16:55 -0600 Subject: [PATCH 12/19] Re-added volume keys to sway config --- .../eww/eww.yuck##hostname.gathering-storm | 26 ++++++ .../network.yuck##hostname.gathering-storm | 77 ++++++++++++++++++ .../network.py##hostname.gathering-storm | 81 +++++++++++++++++++ .config/sway/config | 4 + ...arrangement.conf##hostname.gathering-storm | 9 +++ ...0-gtk-theme.conf##hostname.gathering-storm | 3 + .../workspaces.json##hostname.gathering-storm | 76 +++++++++++++++++ .../bar-launch.conf##hostname.gathering-storm | 4 + 8 files changed, 280 insertions(+) create mode 100644 .config/eww/eww.yuck##hostname.gathering-storm create mode 100644 .config/eww/modules/network.yuck##hostname.gathering-storm create mode 100755 .config/eww/scripts/network.py##hostname.gathering-storm create mode 100644 .config/sway/display-arrangement.conf##hostname.gathering-storm create mode 100644 .config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm create mode 100644 .config/sway/workspaces.json##hostname.gathering-storm create mode 100644 .config/systemd/user/eww.service.d/bar-launch.conf##hostname.gathering-storm diff --git a/.config/eww/eww.yuck##hostname.gathering-storm b/.config/eww/eww.yuck##hostname.gathering-storm new file mode 100644 index 0000000..6f4e171 --- /dev/null +++ b/.config/eww/eww.yuck##hostname.gathering-storm @@ -0,0 +1,26 @@ +;; -*-lisp-*- Include modules +(include "./modules/workspaces.yuck") +(include "./modules/clock.yuck") +(include "./modules/system.yuck") +(include "./modules/network.yuck") +(include "./modules/volume.yuck") +(include "./modules/aggietime.yuck") +(include "./modules/timer.yuck") +(include "./modules/mpris.yuck") + +(defvar power--state "normal") + +(include "./windows.yuck") + +(defwindow builtinbar + :monitor 0 + :geometry (geometry :width "100%" + :height "36px" + :anchor "top center") + :exclusive true + :focusable false + :stacking "fg" + (centerbox :orientation "h" :class "bar root ${power--state == 'critical' ? 'reservepower' : ''}" + (rocinante-builtinbar--left) + (rocinante-builtinbar--center) + (rocinante-builtinbar--right))) diff --git a/.config/eww/modules/network.yuck##hostname.gathering-storm b/.config/eww/modules/network.yuck##hostname.gathering-storm new file mode 100644 index 0000000..dca9b60 --- /dev/null +++ b/.config/eww/modules/network.yuck##hostname.gathering-storm @@ -0,0 +1,77 @@ +;; -*-lisp-*- +(deflisten network--data + `~/.config/eww/scripts/network.py`) + +(defwidget network--wlan [device] + (box :orientation "h" + :halign "start" + :space-evenly false + :spacing 10 + (label :class "offline" + :visible {network--data["network"][device]["offline"]} + :text "offline") + (label :visible {network--data["network"][device]["connecting"]} + :class "highlight" + :text "connecting...") + (label :visible {network--data["network"][device]["online"] && !network--data.network[device].connecting} + :class "special" + :text "${network--data['wifi']['ssid']}") + (label :visible {!network--data.connection.internet && network--data.network[device].online} + :class "highlight" + :text "- no internet" + ))) + +(defwidget network--lan [device] + (box :orientation "h" + :halign "start" + :space-evenly false + :spacing 0 + (label :class "offline" + :visible {network--data["network"][device]["offline"]} + :text "offline") + (label :visible {network--data["network"][device]["connecting"]} + :class "highlight" + :text "connecting...") + (label :visible {network--data["network"][device]["online"] && !network--data.network[device].connecting} + :class "special" + :text "${network--data['network'][device]['ip4_addr']}/${network--data['network'][device]['ip4_prefix']}"))) + +(defwidget network--proxy-vpn [device ?required] + (box :orientation "h" + :halign "start" + :space-evenly false + :spacing 0 + :visible {network--data.connection.internet && (network--data["network"][device]["exists"] || required)} + (label :class "highlight" + :text "- insecure" + :visible {! network--data["network"][device]["exists"]}) + (label :class "green" + :text "- secured" + :visible {network--data["network"][device]["exists"]}))) + +(defwidget vpn-network [] + (box :orientation "v" + :halign "start" + :space-evenly false + :spacing 0 + (label :class "highlight" + :text "offline" + :visible {!network--data.connection.ezrinet}) + (label :class "green" + :text "connected" + :visible {network--data.connection.ezrinet}) + "personal network")) + +(defwidget network [] + (box :orientation "v" + :halign "start" + :space-evenly false + :spacing 0 + (box :orientation "h" + :halign "center" + :space-evenly false + :spacing 10 + (network--wlan :device "wlan0") + (network--proxy-vpn :device "wg-mullvad" :required {!network--data.trusted})) + "communications")) + diff --git a/.config/eww/scripts/network.py##hostname.gathering-storm b/.config/eww/scripts/network.py##hostname.gathering-storm new file mode 100755 index 0000000..742aa39 --- /dev/null +++ b/.config/eww/scripts/network.py##hostname.gathering-storm @@ -0,0 +1,81 @@ +#!/usr/bin/env python3 + +import subprocess +import json +from time import sleep + +TRUSTED_NETWORKS = ['gayer people'] + +def wifi(): + ssid_cmd = subprocess.run(['iwgetid', '-r'], capture_output = True) + if ssid_cmd.returncode != 0: + return {"connected": False, "ssid": None} + ssid = ssid_cmd.stdout.decode('utf-8').strip() + ssid = ssid if len(ssid) <= 15 else f"{ssid[:14]}…" + return {"connected": True, "ssid": ssid} + +def netdev(device: str): + ip_cmd = subprocess.run(['ip', '-j', 'addr', 'show', device], capture_output = True) + if ip_cmd.returncode != 0: + return {"exists": False} + ip_data = json.loads(ip_cmd.stdout.decode('utf-8'))[0] + online = ip_data["operstate"] == "UP" + ip4_addr = "" + ip4_prefix_length = 24 + addr4_info = list(filter(lambda addr: addr.get("family") == "inet", ip_data["addr_info"])) + if len(addr4_info) >= 1: + ip4_addr = addr4_info[0]["local"] + ip4_prefix_length = addr4_info[0]["prefixlen"] + connecting = ip_data["operstate"] != "DOWN" and (ip4_addr == "" or not online) + return { + "exists": True, + "online": online, + "connecting": connecting, + "offline": not online and not connecting, + "ip4_addr": ip4_addr, + "ip4_prefix": ip4_prefix_length + } + +def trusted(ssid: str | None): + # Don't throw up an "INSECURE" alert when offline + if not ssid: + return True + return ssid in TRUSTED_NETWORKS + +def ping(host: str): + ping_cmd = subprocess.Popen(['/usr/bin/ping', '-c1', '-W2', host], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + return ping_cmd + +counter = 0 +ezrinet_last = False +internet_last = False +ezrinet_ping = None +internet_ping = None + +while True: + if counter == 0: + ezrinet_ping = ping('10.242.3.1') + internet_ping = ping('1.1.1.1') + if ezrinet_ping.poll() is not None: + ezrinet_last = ezrinet_ping.returncode == 0 + if internet_ping.poll() is not None: + internet_last = internet_ping.returncode == 0 + wifi_data = wifi() + result = { + "wifi": wifi_data, + "network": { + "wlan0": netdev("wlan0"), + "ezrinet": netdev("ezrinet"), + "wg-mullvad": netdev("mullvad"), + }, + "connection": { + "ezrinet": ezrinet_last, + "internet": internet_last + }, + "trusted": trusted(wifi_data.get("ssid", None)) + } + print(json.dumps(result), flush=True) + counter += 1 + # Send pings every 10 seconds + counter %= 3 + sleep(1) diff --git a/.config/sway/config b/.config/sway/config index baf6bb9..4fc261f 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -192,6 +192,10 @@ bindsym --locked { XF86AudioPlay exec playerctl play-pause XF86AudioNext exec playerctl next XF86AudioPrev exec playerctl previous + + XF86AudioRaiseVolume exec pactl set-sink-volume @DEFUALT_SINK@ +5% + XF86AudioLowerVolume exec pactl set-sink-volume @DEFUALT_SINK@ -5% + XF86AudioMute exec pactl set-sink-mute @DEFUALT_SINK@ toggle } ## Screen Locking diff --git a/.config/sway/display-arrangement.conf##hostname.gathering-storm b/.config/sway/display-arrangement.conf##hostname.gathering-storm new file mode 100644 index 0000000..72c729e --- /dev/null +++ b/.config/sway/display-arrangement.conf##hostname.gathering-storm @@ -0,0 +1,9 @@ +### -*-conf-space-*- ### +# Gathering Storm Display Config # +### ### + +set $display eDP-1 + +output $display scale 1 pos 0 1080 +output $display color_profile icc /usr/share/color/icc/colord/BOE_CQ_______NE160QDM_NZ6.icm + diff --git a/.config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm b/.config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm new file mode 100644 index 0000000..472de82 --- /dev/null +++ b/.config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm @@ -0,0 +1,3 @@ +#-*-conf-space-*- + +exec_always gsettings set org.gnome.desktop.interface text-scaling-factor 1.25 diff --git a/.config/sway/workspaces.json##hostname.gathering-storm b/.config/sway/workspaces.json##hostname.gathering-storm new file mode 100644 index 0000000..ba2ca28 --- /dev/null +++ b/.config/sway/workspaces.json##hostname.gathering-storm @@ -0,0 +1,76 @@ +{ + "default_context": "personal", + "display_ordering": ["builtin"], + "display_layout": { + "builtin": "eDP-1" + }, + "contexts": { + "personal": { + "builtin": [ + { + "index": 1, + "name": "terminal", + "exec": "console", + "program_name": "console" + }, + { + "index": 2, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 3, + "name": "internet", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 4, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 5, + "name": "servers", + "exec": "virt-manager", + "program_name": "virt-manager" + }, + { + "index": 6, + "name": "steam", + "exec": "steam", + "program_name": "steam" + }, + { + "index": 7, + "name": "media", + "exec": "jellyfinmediaplayer", + "program_name": "jellyfinmediaplayer" + }, + { + "index": 8, + "name": "real-time comms", + "exec": "discord", + "program_name": "discord" + }, + { + "index": 9, + "name": "messages", + "exec": "thunderbird", + "program_name": "thunderbird" + }, + { + "index": 10, + "name": "config", + "exec": "pavucontrol", + "program_name": "pavucontrol" + } + ] + } + } +} diff --git a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.gathering-storm b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.gathering-storm new file mode 100644 index 0000000..f57e9d6 --- /dev/null +++ b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.gathering-storm @@ -0,0 +1,4 @@ +# -*-conf-unix-*- + +[Service] +ExecStartPost=eww open-many builtinbar From 3689599ae287d641edbf2e3bddcdb06b21219862 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Tue, 22 Oct 2024 15:18:02 -0600 Subject: [PATCH 13/19] Added context manager service file --- .config/systemd/user/sway-context-manager.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .config/systemd/user/sway-context-manager.service diff --git a/.config/systemd/user/sway-context-manager.service b/.config/systemd/user/sway-context-manager.service new file mode 100644 index 0000000..0e4522d --- /dev/null +++ b/.config/systemd/user/sway-context-manager.service @@ -0,0 +1,14 @@ +[Unit] +Description = Sway workspace context manager for dynamic-monitor setups +PartOf=sway-session.target + +[Service] +Type=dbus +BusName=dev.ezri.sway +ExecStart=/usr/bin/sway_context_manager +Slice=session.slice +Restart=on-abnormal +RestartSec=5s + +[Install] +WantedBy=sway-session.target From 42abcc1644a3c92c408f33c0b5a45fa2a7e6af2a Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Wed, 23 Oct 2024 12:15:38 -0600 Subject: [PATCH 14/19] Updated eww service to remove bar launch dropins --- .../user/eww.service.d/bar-launch.conf##hostname.normandy | 4 ---- .../user/eww.service.d/bar-launch.conf##hostname.rocinante | 4 ---- .../user/eww.service.d/bar-launch.conf##hostname.tycho | 4 ---- 3 files changed, 12 deletions(-) delete mode 100644 .config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy delete mode 100644 .config/systemd/user/eww.service.d/bar-launch.conf##hostname.rocinante delete mode 100644 .config/systemd/user/eww.service.d/bar-launch.conf##hostname.tycho diff --git a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy deleted file mode 100644 index 41f8b63..0000000 --- a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.normandy +++ /dev/null @@ -1,4 +0,0 @@ -# -*-conf-unix-*- - -[Service] -ExecStartPost=eww open-many leftbar centerbar rightbar sidebar sidebar2 diff --git a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.rocinante b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.rocinante deleted file mode 100644 index f57e9d6..0000000 --- a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.rocinante +++ /dev/null @@ -1,4 +0,0 @@ -# -*-conf-unix-*- - -[Service] -ExecStartPost=eww open-many builtinbar diff --git a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.tycho b/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.tycho deleted file mode 100644 index fa0829e..0000000 --- a/.config/systemd/user/eww.service.d/bar-launch.conf##hostname.tycho +++ /dev/null @@ -1,4 +0,0 @@ -# -*-conf-unix-*- - -[Service] -ExecStartPost=eww open-many leftbar centerbar rightbar network-status From 2488c8953ffa6289e6586fb3c829f6affaf107aa Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Wed, 30 Oct 2024 21:26:18 -0600 Subject: [PATCH 15/19] Improved prompt --- .config/discord/settings.json | 16 ++++++++++ .config/zsh/prompt.zsh | 45 ++++++++++++++++++++++------- .config/zsh/prompt.zsh##distro.arch | 1 - 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 .config/discord/settings.json delete mode 120000 .config/zsh/prompt.zsh##distro.arch diff --git a/.config/discord/settings.json b/.config/discord/settings.json new file mode 100644 index 0000000..ec8cf18 --- /dev/null +++ b/.config/discord/settings.json @@ -0,0 +1,16 @@ +{ + "BACKGROUND_COLOR": "#202225", + "IS_MAXIMIZED": true, + "IS_MINIMIZED": false, + "MINIMIZE_TO_TRAY": false, + "OPEN_ON_STARTUP": false, + "WINDOW_BOUNDS": { + "x": 0, + "y": 0, + "width": 1688, + "height": 1022 + }, + "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true, + "SKIP_HOST_UPDATE": true, + "chromiumSwitches": {} +} \ No newline at end of file diff --git a/.config/zsh/prompt.zsh b/.config/zsh/prompt.zsh index 6e117e3..7241635 100644 --- a/.config/zsh/prompt.zsh +++ b/.config/zsh/prompt.zsh @@ -63,7 +63,7 @@ eval $(awk '{print "PERSONAL_" $0}' ${HOME}/.personal-info 2>/dev/null) if [[ -z ${MACHINE_CHASSIS} ]]; then MACHINE_CHASSIS=$(hostnamectl chassis 2>/dev/null); fi if [[ -z ${MACHINE_CHASSIS} ]]; then MACHINE_CHASSIS="desktop"; fi -if [[ ${MACHINE_CHASSIS} != "container" ]]; then +if [[ ${MACHINE_CHASSIS} != "container" ]] && [[ ${OS_ID} == "arch" ]]; then # Only check if a reboot is necessary if we're not in a container precmd_functions+=(precmd_kernel_info) fi @@ -100,7 +100,7 @@ case $OS_ID in show_os_icon=0 ;; esac -prompt="▶" +prompt_char="%(?.❯.%F{red}❯%f)" host="%F{cyan}[ %F{green}${hostname}%(!.%F{red} as root.) %F{cyan}]%f" localhost="%F{cyan}[ %F{magenta}%B${hostname}%(!.%F{red} as root.)%b %F{cyan}]%f" serial_host="%F{cyan}[ %F{magenta}${hostname}%(!.%F{red} as root.) %F{cyan}] %F{red}%y%f" @@ -108,17 +108,21 @@ container_host="%F{cyan}[ %F{blue}%B${hostname}%(!.%F{red} as root.)%b %F{cyan}] returncode="%(?..%F{red}  %?%f)" prompt_line1='$kernel_info_msg_0_' -prompt_line3=$prompt +prompt_line3=" $prompt_char" # Create conditional prompt line 2 if [[ -v SSH_CLIENT ]]; then prompt_line2='${host}$pyenv_info_msg_0_ ${pwd}' + history_line="${host}" elif [[ ${TTY} =~ "tty" ]]; then prompt_line2='${serial_host}$pyenv_info_msg_0_ ${pwd}' + history_line="${serial_host}" elif [[ ${MACHINE_CHASSIS} == "container" ]]; then prompt_line2='${container_host}$pyenv_info_msg_0_ ${pwd}' + history_line="${container_host}" else prompt_line2='${localhost}$pyenv_info_msg_0_ ${pwd}' + history_line="${localhost}" fi # Inject icon if available, with ANSI color code stored in $OS_ANSI_COLOR @@ -126,15 +130,36 @@ if [[ ${show_os_icon} -eq 1 ]]; then prompt_line2=$'%{\x1b[${OS_ANSI_COLOR}m${os_icon}\x1b[0m%}'" ${prompt_line2}" fi -if [[ ${TERM} == "dumb" ]]; then - # Dumb terminal needs a dumb prompt, otherwise things like - # emacs TRAMP break - PROMPT='[%~] $ ' -else - PROMPT="${prompt_line1} +set-prompt() { + if [[ ${TERM} == "dumb" ]]; then + # Dumb terminal needs a dumb prompt, otherwise things like + # emacs TRAMP break + PROMPT='[%~] $ ' + PROMPT2='> ' + else + PROMPT="${prompt_line1} ${prompt_line2} ${prompt_line3} " -fi + PROMPT2=" %F{yellow}%_ ❯%f " + fi + +} +set-prompt + +rewrite-prompt-and-accept() { + if [[ ${TERM} == "dumb" ]]; then + return + fi + PROMPT='${history_line} %F{yellow}%T%f ${pwd}$pyenv_info_msg_0_ %F{green}${prompt_char}%f ' + # Clear any suggestions; we've committed to this command + zle autosuggest-clear + zle reset-prompt + set-prompt + zle accept-line +} + +zle -N rewrite-prompt-and-accept +bindkey '^M' rewrite-prompt-and-accept RPROMPT='$vcs_info_msg_0_$returncode' diff --git a/.config/zsh/prompt.zsh##distro.arch b/.config/zsh/prompt.zsh##distro.arch deleted file mode 120000 index 359b920..0000000 --- a/.config/zsh/prompt.zsh##distro.arch +++ /dev/null @@ -1 +0,0 @@ -prompt.zsh##distro.Arch \ No newline at end of file From 71308fd9d5dfbd4e4fe3092aecd6883639400e69 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Thu, 31 Oct 2024 16:23:48 -0600 Subject: [PATCH 16/19] R.I.P. Tycho Station --- .config/alacritty/alacritty.toml##default | 4 +- .config/alacritty/alacritty.yml | 92 --------------- .config/eww/eww.scss | 2 + .config/eww/eww.yuck##hostname.tycho | 13 +- .../eww/modules/network.yuck##hostname.tycho | 111 ++++++++++++++++++ .config/eww/scripts/sway.py | 12 +- .config/eww/windows.yuck | 14 ++- .config/htop/htoprc | 20 ++-- .config/sway/config | 4 +- .../display-arrangement.conf##hostname.tycho | 8 +- ...-gaps.conf##class.has-sidebar-5-workspaces | 10 +- ...kspace-arrangement.conf##class.tie-fighter | 28 ----- .config/sway/workspaces.json##hostname.tycho | 4 +- .config/yadm/encrypt | 1 + .local/bin/sway-find-workspace | 8 +- .local/share/yadm/archive | Bin 1266 -> 1259 bytes 16 files changed, 179 insertions(+), 152 deletions(-) delete mode 100644 .config/alacritty/alacritty.yml diff --git a/.config/alacritty/alacritty.toml##default b/.config/alacritty/alacritty.toml##default index c87e543..1f4c1a0 100644 --- a/.config/alacritty/alacritty.toml##default +++ b/.config/alacritty/alacritty.toml##default @@ -1,4 +1,3 @@ -working_directory = "/home/ezri" [bell] animation = "EaseOutSine" @@ -64,3 +63,6 @@ dynamic_padding = true dynamic_title = true opacity = 0.8 title = "Terminal" + +[general] +working_directory = "/home/ezri" diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml deleted file mode 100644 index acd84db..0000000 --- a/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,92 +0,0 @@ -colors: - # Default colors - primary: - # background: '0x1b191b' - # foreground: '0x9a7c9d' - background: '0x1e1e1e' - foreground: '0x9a7c9d' - - # Normal colors - normal: - black: '0x2d272f' - red: '0xcf6a4c' - green: '0x8f9d6a' - yellow: '0xf9ee98' - blue: '0x7587a6' - magenta: '0x9b859d' - cyan: '0xafc4db' - white: '0xa7a7a7' - - # Bright colors - bright: - black: '0x3f3242' - red: '0xcf6a4c' - green: '0x8f9d6a' - yellow: '0xf9ee98' - blue: '0x7587a6' - magenta: '0x9b859d' - cyan: '0xafc4db' - white: '0xffffff' - - # normal: - # black: '0x453f45' - # red: '0xd27377' - # green: '0x7e9d7c' - # yellow: '0xd2c377' - # blue: '0x7587a6' - # magenta: '0xae96b0' - # cyan: '0xb0c4c2' - # white: '0xd6cad7' - - # bright: - # black: '0x453f45' - # red: '0xd27377' - # green: '0x7e9d7c' - # yellow: '0xd2c377' - # blue: '0x7587a6' - # magenta: '0xae96b0' - # cyan: '0xb0c4c2' - # white: '0xd6cad7' - -cursor: - - style: - blinking: Always - shape: underline - - -font: - size: 9 - - normal: - family: JetBrainsMono Nerd Font - style: Regular - bold: - family: JetBrainsMono Nerd Font - style: Bold - italic: - family: JetBrainsMono Nerd Font - style: Italic - bold_italic: - family: JetBrainsMono Nerd Font - style: Semibold Italic - -window: - title: Terminal - dynamic_title: true - opacity: 0.98 - dynamic_padding: true - -bell: - - animation: EaseOutSine - duration: 200 - color: '0x9a7c9d' - -working_directory: /home/ezri - -draw_bold_text_with_bright_colors: false - -debug: - render_timer: false - highlight_damage: false diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 26d935f..cbe9000 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -21,6 +21,8 @@ &.side { margin: 10px; + margin-top: 20px; + margin-right: 0px; } &.bg { diff --git a/.config/eww/eww.yuck##hostname.tycho b/.config/eww/eww.yuck##hostname.tycho index ada759f..ede8402 100644 --- a/.config/eww/eww.yuck##hostname.tycho +++ b/.config/eww/eww.yuck##hostname.tycho @@ -12,7 +12,7 @@ (defwindow leftbar :monitor 1 - :geometry (geometry :width "1440px" + :geometry (geometry :width "100%" :height "36px" :anchor "top center") :exclusive true @@ -51,6 +51,17 @@ (tycho-rightbar--left) (tycho-rightbar--center) (tycho-rightbar--right))) + +(defwindow sidebar + :monitor 1 + :geometry (geometry :width "200px" + :height "100%" + :anchor "left center") + :exclusive true + :focusable false + :stacking "fg" + (tycho-sidebar)) + (defwindow network-status diff --git a/.config/eww/modules/network.yuck##hostname.tycho b/.config/eww/modules/network.yuck##hostname.tycho index 6fede46..a92f2cd 100644 --- a/.config/eww/modules/network.yuck##hostname.tycho +++ b/.config/eww/modules/network.yuck##hostname.tycho @@ -234,3 +234,114 @@ (label :class {network--data.last_update.unix < clock--data.unix - 30 ? "highlight" : "special"} :text "${network--data.last_update.month}-${network--data.last_update.day} ${network--data.last_update.hour}:${network--data.last_update.minute}:${network--data.last_update.second}"))) )) + +(defwidget network-sidebar-details [] + (box :orientation "v" + :halign "start" + :class "module" + :space-evenly false + :spacing 5 + :width 200 + (box :orientation "h" + :halign "center" + :class "nebula" + :spacing 10 + :space-evenly false + (label :class "medium special" + :text "Comms")) + (box :orientation "h" + :halign "center" + :class "nebula" + :spacing 10 + :space-evenly false + (label :class "nebula green" + :text "Online" + :visible {network--data.online}) + (label :class "nebula highlight" + :text "Offline" + :visible {!network--data.online})) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Route On:") + "" + (box :halign "end" + (label :text "No Route" + :class "highlight" + :visible {network--data.online && !network--data.have_default_route}) + (label :text "${network--data.default_route}" + :class "special" + :visible {network--data.online && network--data.have_default_route}))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :valign "start" + :class "nebula" + "Address:") + "" + (box :halign "end" + :orientation "v" + (label :text "${network--data.default_interface.addresses[0].address}" + :class "special") + (label :text "/${network--data.default_interface.addresses[0].prefixlen}" + :halign "end" + :class "special"))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Public IP:") + "" + (box :halign "end" + (label :text "Offline" + :class "highlight" + :visible {!network--data.have_public_ip}) + (label :text {network--data.public_ip.ip} + :class "special" + :visible {network--data.have_public_ip}))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Gateway:") + "" + (box :halign "end" + (label :text "Error" + :class "highlight nebula" + :visible {!network--data.have_gateway}) + (label :text {network--data.gateway} + :class "special" + :visible {network--data.have_gateway}))) + (centerbox :orientation "h" + :halign "start" + :class "nebula" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + "VPN:") + "" + (box :halign "end" + (label :text "Offline" + :class "highlight" + :visible {!network--data.interfaces.ezrinet.online}) + (label :text "Online" + :class "green" + :visible {network--data.interfaces.ezrinet.online}))) + + )) + + diff --git a/.config/eww/scripts/sway.py b/.config/eww/scripts/sway.py index 0e62c3c..7eb13d9 100755 --- a/.config/eww/scripts/sway.py +++ b/.config/eww/scripts/sway.py @@ -48,7 +48,9 @@ class Workspace: self.alerted = False @classmethod - def parse_file(cls: type, filename: str) -> Tuple[WorkspaceTree, WorkspaceList]: + def parse_file( + cls: type, filename: str + ) -> Tuple[WorkspaceTree, WorkspaceList, str]: result = {} initial: dict = None @@ -75,7 +77,9 @@ class Workspace: for context, groups in initial["contexts"].items() } - return result, workspaces + default_context = initial.get("default_context", "personal") + + return result, workspaces, default_context @staticmethod def full_dictify(tree: WorkspaceTree): @@ -99,7 +103,7 @@ class Workspace: } -workspace_tree, workspace_list = Workspace.parse_file( +workspace_tree, workspace_list, default_context = Workspace.parse_file( f"{os.environ['HOME']}/.config/sway/workspaces.json" ) @@ -107,7 +111,7 @@ data = { "ws": {}, "mode": "default", "current": {}, - "context": "work" if gethostname() == "tycho.vpn.ezri.dev" else "personal", + "context": default_context, "visible": {}, } diff --git a/.config/eww/windows.yuck b/.config/eww/windows.yuck index cd88f73..a98918b 100644 --- a/.config/eww/windows.yuck +++ b/.config/eww/windows.yuck @@ -115,13 +115,23 @@ ;; Bars for Tycho Station ;; ;;; ;;; +(defwidget tycho-sidebar [] + (box :orientation "v" + :valign "start" + :space-evenly false + :spacing 20 + :class "root side" + (sideclock) + (network-sidebar-details) + (system-gauges))) + (defwidget tycho-leftbar--left [] (box :orientation "h" :halign "start" :space-evenly false :spacing 20 :class "leftbox" - (clock) + (system-name) )) (defwidget tycho-leftbar--center [] @@ -130,7 +140,7 @@ :space-evenly false :spacing 20 :class "centerbox" - (system-name) + )) (defwidget tycho-leftbar--right [] diff --git a/.config/htop/htoprc b/.config/htop/htoprc index a0a4d7a..d673940 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -38,20 +38,20 @@ column_meters_0=Hostname Blank Tasks LoadAverage Uptime Clock 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=47 -tree_sort_key=46 -sort_direction=-1 -tree_sort_direction=-1 +tree_view=1 +sort_key=0 +tree_sort_key=0 +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_MEM -.tree_sort_key=PERCENT_CPU +.sort_key=PID +.tree_sort_key=PID .tree_view_always_by_pid=0 -.tree_view=0 -.sort_direction=-1 -.tree_sort_direction=-1 +.tree_view=1 +.sort_direction=1 +.tree_sort_direction=1 .all_branches_collapsed=0 screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command .sort_key=IO_RATE diff --git a/.config/sway/config b/.config/sway/config index 4b8d55b..e1564d6 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -30,8 +30,8 @@ set $colorwallpaper '#1e1e1e' output * bg '#1e1e1e' solid_color ## Include Device-Specific Configs -include display-arrangement.conf -include workspace-arrangement.conf +#include display-arrangement.conf +#include workspace-arrangement.conf ### ### # Window Management Keybinds # diff --git a/.config/sway/display-arrangement.conf##hostname.tycho b/.config/sway/display-arrangement.conf##hostname.tycho index 8e31ef1..5c4a657 100644 --- a/.config/sway/display-arrangement.conf##hostname.tycho +++ b/.config/sway/display-arrangement.conf##hostname.tycho @@ -7,10 +7,10 @@ set $centerdisplay "Hewlett Packard HP S340c CN490508SQ" set $rightdisplay "HP Inc. HP Z27n G2 6CM0151FD4" output { - $leftdisplay pos 0 0 mode 2560x1440@60Hz transform 270 - $leftdisplay bg ~/Images/Sidepaper.png center - $centerdisplay pos 1440 450 mode 3440x1440 transform 0 + $leftdisplay pos 0 450 mode 2560x1440@60Hz + $leftdisplay bg ~/Images/Wallpaper.png center + $centerdisplay pos 2560 450 mode 3440x1440 transform 0 $centerdisplay bg ~/Images/Wallpaper.png center - $rightdisplay pos 4880 0 mode 2560x1440@60Hz transform 90 + $rightdisplay pos 6000 0 mode 2560x1440@60Hz transform 90 $rightdisplay bg ~/Images/Sidepaper.png center } \ No newline at end of file diff --git a/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces b/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces index 7c2196d..9e2e779 100644 --- a/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces +++ b/.config/sway/local-config.d/50-sidebar-gaps.conf##class.has-sidebar-5-workspaces @@ -3,9 +3,9 @@ #### #### workspace { - 1 gaps left 210 - 2 gaps left 210 - 3 gaps left 210 - 4 gaps left 210 - 5 gaps left 210 + # 1 gaps left 260 + # 2 gaps left 260 + # 3 gaps left 260 + # 4 gaps left 260 + # 5 gaps left 260 } diff --git a/.config/sway/workspace-arrangement.conf##class.tie-fighter b/.config/sway/workspace-arrangement.conf##class.tie-fighter index 467d0e4..3714e9a 100644 --- a/.config/sway/workspace-arrangement.conf##class.tie-fighter +++ b/.config/sway/workspace-arrangement.conf##class.tie-fighter @@ -36,31 +36,3 @@ workspace { 19 output $rightdisplay 20 output $rightdisplay } - -## Workspace Switching Keybinds -bindsym { - $mod+1 exec swaymsg workspace $(sway-find-workspace 1 ) - $mod+2 exec swaymsg workspace $(sway-find-workspace 2 ) - $mod+3 exec swaymsg workspace $(sway-find-workspace 3 ) - $mod+4 exec swaymsg workspace $(sway-find-workspace 4 ) - $mod+5 exec swaymsg workspace $(sway-find-workspace 5 ) - $mod+6 exec swaymsg workspace $(sway-find-workspace 6 ) - $mod+7 exec swaymsg workspace $(sway-find-workspace 7 ) - $mod+8 exec swaymsg workspace $(sway-find-workspace 8 ) - $mod+9 exec swaymsg workspace $(sway-find-workspace 9 ) - $mod+0 exec swaymsg workspace $(sway-find-workspace 10) -} - -## Window Reassignment Keybinds -bindsym { - $mod+Shift+1 exec swaymsg move container to workspace $(sway-find-workspace 1 ) - $mod+Shift+2 exec swaymsg move container to workspace $(sway-find-workspace 2 ) - $mod+Shift+3 exec swaymsg move container to workspace $(sway-find-workspace 3 ) - $mod+Shift+4 exec swaymsg move container to workspace $(sway-find-workspace 4 ) - $mod+Shift+5 exec swaymsg move container to workspace $(sway-find-workspace 5 ) - $mod+Shift+6 exec swaymsg move container to workspace $(sway-find-workspace 6 ) - $mod+Shift+7 exec swaymsg move container to workspace $(sway-find-workspace 7 ) - $mod+Shift+8 exec swaymsg move container to workspace $(sway-find-workspace 8 ) - $mod+Shift+9 exec swaymsg move container to workspace $(sway-find-workspace 9 ) - $mod+Shift+0 exec swaymsg move container to workspace $(sway-find-workspace 10) -} diff --git a/.config/sway/workspaces.json##hostname.tycho b/.config/sway/workspaces.json##hostname.tycho index fc9c249..45312f2 100644 --- a/.config/sway/workspaces.json##hostname.tycho +++ b/.config/sway/workspaces.json##hostname.tycho @@ -154,7 +154,7 @@ "serial": "6CM0151FHY", "group": "left", "position": [0, 450], - "mode": "2560x1440@60Hz", + "mode": "2560x1440@75Hz", "eww_windows": ["sidebar", "leftbar"] }, { @@ -172,7 +172,7 @@ "serial": "6CM0151FD4", "group": "right", "position": [6000, 0], - "mode": "2560x1440@60Hz", + "mode": "2560x1440@75Hz", "transform": 90, "eww_windows": ["rightbar"] } diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt index c056182..34662f3 100644 --- a/.config/yadm/encrypt +++ b/.config/yadm/encrypt @@ -1 +1,2 @@ .config/ssh/1*.conf +.config/ssh/3*.conf diff --git a/.local/bin/sway-find-workspace b/.local/bin/sway-find-workspace index 69be005..8f6ddba 100755 --- a/.local/bin/sway-find-workspace +++ b/.local/bin/sway-find-workspace @@ -10,10 +10,16 @@ done echo "Output sets: $output_sets" >&2 +if [[ -f $XDG_RUNTIME_DIR/wm_context ]]; then + wm_context=$(<$XDG_RUNTIME_DIR/wm_context) +else + wm_context=$(jq <~/.config/sway/workspaces.json '.default_context' -r) +fi + workspace_counts=() total_workspaces=0 for output in {1..${#output_sets[@]}}; do - workspace_counts+=$(jq <~/.config/sway/workspaces.json ".contexts[.default_context] | [values[]][$((output - 1))] | length" -r) + workspace_counts+=$(jq <~/.config/sway/workspaces.json ".contexts.${wm_context} | [values[]][$((output - 1))] | length" -r) ((total_workspaces += workspace_counts[output])) done diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive index 0e3a26c6e2c91ece334f40add951ce1377bff9b6..dc8f39327e9719ea7fea9efa379455cc197da155 100644 GIT binary patch literal 1259 zcmV4Fm}T2n0Uxa>9MkYX8#e0qw$sK|gi^$W(C0_3x+u`!}J$rKoRT77*GkT%Ev3_yydFLu#V58-3b%zaH-FNG` zBTJ0qNz~|#>(>{ktf$M3*t8Rg!K%EK4rR3*fvEBw7B9Q$;o`)YNbqy@x;SBx7VFO} zwv`XA*Z#jr(T`9|BT5rn)OZA+lu3(SaPhD7saR^8k$e{k_UraUxsO2nT9slRB)N17 zAUkC@zuOB-uIs2`>?J`rI3t1wZ_cA_!Nr< z*?WdF_RamipbPx@f70m{A1=iZ(y7b3a(h$d3{;n1%)~(ceabmSJOi>jYHu=!k0 zc(VzADY;s@G-qN$)Y;|R?3NrtOkL6v-~*VY=?}&+^a4{OxS0JPDzCCu*!IYy27P3T z0apPjX@n+90ikTJ(X2W_!%<5!0jF-u-2pPzaSk0xZ~a)e*IH?QrsSg@#POU_ieT&i9@@mUJiGr3r{H-b$VuCSYpjIoP}WUS`BSx z+zlpQnfX+e!foTG}*QC9<&KOiu>_x_qKfy}O>n7`2IgXe#gJscQFXkODn8 ztEZS*wR1ezfe;g=${J5uU~;?B4>C}M2u9KprcPb`<%4dF#%JysRm z`Z-nOwm4lU1nXRZyWUp|1XoG?FXGEq534FUD)Uw$7jh42{p8(mYdiQUKllk zhw7|GhNXBpxn)vPJSw4MvSWBEe)C_7%^Up}?-eC>b!vGRtUa^BN49yfy}=YM@Ta{F zMzbkv7|QiWz!=Xmqiz&T-#{QxR=Kjqp_rPN_RsE*|Jgh~%0yVcJn>_yd2O}^O+xjOo z|8A6>e~U#P^e;1~r{i4pF0g95TyMU#*RWw7K5SQbfSLZni;m=JbY<_AO2|_(W`E*V zm(jw-v`rTZZPK)@hMFQ6^%bVkRT&TOgQi=FxYT=f%e|6|^Gv+_I7^gBi4tE6vlAoy V&L#_!)KBzrQbP+SdX79=yqT5KeHZ`$ literal 1266 zcmV`?^uX!5_s{nV6Gr-w<4^)+B#4j#oD6k z>T0}NVNjZVag6@)5iUt$89*qkB5!mF8xNXj3F~loLFkm~oJR=D?42ac*bngxxUqW; z6@Mdfo31u}Zt~e9Z?}p!z1(_>#Af2&vp?j)x9H%v7K3-hMEdic#t8f`VO>|gLYRf$ ziRC;m=|^VV@LtzcgF>m-gsbKY_Jb3j(ptYHavJ+#T8#x_H9kqox0P%ACcJxGGx<%4 z#?{EWu988sni8Wxx$2)-ySlIX@7`Br5B|B^VNx6iMJ>Obl_yk|ZweYM&;!K>_O)wBB(0WNn(Yl_24W_1R@$)_e z`^SR;L4bS{EphGW!<%>Be-7o7G1G3S&uV@^-qk5RHlsRST#j`$h*T@?vrNmiDr_WM zd{270q{Ibp68o;EUQ$1jdY!SFFEm0}2;B(ntp9*-;GUc6!xDT7yIR&_pT3IuK$2Sz z=n!#5%+-&7T;zA{?|c|%wPQ@ Date: Thu, 7 Nov 2024 13:38:53 -0700 Subject: [PATCH 17/19] Updates for gathering storm --- .config/alacritty/alacritty.toml##default | 3 - .../eww/eww.yuck##hostname.gathering-storm | 70 ++++ .../network.yuck##hostname.gathering-storm | 358 ++++++++++++++--- .../network.py##hostname.gathering-storm | 361 ++++++++++++++---- .config/htop/htoprc | 20 +- .config/sway/config | 3 + ...0-gtk-theme.conf##hostname.gathering-storm | 3 - ...ace-arrangement.conf##class.single-monitor | 27 -- .../workspaces.json##hostname.gathering-storm | 299 ++++++++++++--- .config/systemd/user/emacs.service | 4 +- .config/systemd/user/eww.service | 4 +- .config/zsh/alias.zsh | 2 +- .config/zsh/env.zsh | 2 +- .config/zsh/zz-asdf.zsh | 2 - .emacs.d/settings.org | 49 +-- 15 files changed, 958 insertions(+), 249 deletions(-) delete mode 100644 .config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm delete mode 100644 .config/zsh/zz-asdf.zsh diff --git a/.config/alacritty/alacritty.toml##default b/.config/alacritty/alacritty.toml##default index 1f4c1a0..0df2ef1 100644 --- a/.config/alacritty/alacritty.toml##default +++ b/.config/alacritty/alacritty.toml##default @@ -63,6 +63,3 @@ dynamic_padding = true dynamic_title = true opacity = 0.8 title = "Terminal" - -[general] -working_directory = "/home/ezri" diff --git a/.config/eww/eww.yuck##hostname.gathering-storm b/.config/eww/eww.yuck##hostname.gathering-storm index 6f4e171..448f7a0 100644 --- a/.config/eww/eww.yuck##hostname.gathering-storm +++ b/.config/eww/eww.yuck##hostname.gathering-storm @@ -12,6 +12,76 @@ (include "./windows.yuck") +(defwindow leftbar + :monitor 1 + :geometry (geometry :width "100%" + :height "36px" + :anchor "top center") + :exclusive true + :focusable false + :stacking "fg" + (centerbox :orientation "h" + :class "bar root" + (tycho-leftbar--left) + (tycho-leftbar--center) + (tycho-leftbar--right))) + +(defwindow centerbar + :monitor 0 + :geometry (geometry :width "100%" + :height "26px" + :anchor "top center") + :exclusive true + :focusable false + :stacking "fg" + (centerbox :orientation "h" + :class "bar root" + (tycho-centerbar--left) + (tycho-centerbar--center) + (tycho-centerbar--right))) + +(defwindow rightbar + :monitor 2 + :geometry (geometry :width "100%" + :height "36px" + :anchor "top center") + :exclusive true + :focusable false + :stacking "fg" + (centerbox :orientation "h" + :class "bar root" + (tycho-rightbar--left) + (tycho-rightbar--center) + (tycho-rightbar--right))) + +(defwindow sidebar + :monitor 1 + :geometry (geometry :width "200px" + :height "100%" + :anchor "left center") + :exclusive true + :focusable false + :stacking "fg" + (tycho-sidebar)) + + + +(defwindow network-status + :monitor 0 + :geometry (geometry :width "200px" + :height "0px" + :x "300px" + :y "0px" + :anchor "top right") + :exclusive false + :focusable false + :stacking "overlay" + (box :orientation "v" + :class "bar root bg outline" + :visible {network--show-details} + (network-detail))) + + (defwindow builtinbar :monitor 0 :geometry (geometry :width "100%" diff --git a/.config/eww/modules/network.yuck##hostname.gathering-storm b/.config/eww/modules/network.yuck##hostname.gathering-storm index dca9b60..a92f2cd 100644 --- a/.config/eww/modules/network.yuck##hostname.gathering-storm +++ b/.config/eww/modules/network.yuck##hostname.gathering-storm @@ -1,77 +1,347 @@ ;; -*-lisp-*- (deflisten network--data - `~/.config/eww/scripts/network.py`) + `~/.config/eww/scripts/network.py`) -(defwidget network--wlan [device] +(defvar network--show-details false) + +(defwidget network--interface + [device] + (box :orientation "v" + :halign "center" + :space-evenly false + :spacing 0 + (label :class "offline" + :visible {!device.online} + :text "offline") + (label :visible {device.online} + :class "special" + :text "${device.addresses[0].address}/${device.addresses[0].prefixlen}"))) + +(defwidget network-big--online + [] (box :orientation "h" :halign "start" + :valign "center" :space-evenly false :spacing 10 - (label :class "offline" - :visible {network--data["network"][device]["offline"]} - :text "offline") - (label :visible {network--data["network"][device]["connecting"]} - :class "highlight" - :text "connecting...") - (label :visible {network--data["network"][device]["online"] && !network--data.network[device].connecting} - :class "special" - :text "${network--data['wifi']['ssid']}") - (label :visible {!network--data.connection.internet && network--data.network[device].online} - :class "highlight" - :text "- no internet" - ))) + (label :class "medium green nebula" + :visible {network--data.online} + :text "online") + (label :class "medium offline nebula" + :visible {network--data.offline} + :text "offline") + (label :class "medium highlight nebula" + :visible {network--data.configuring} + :text "configuring"))) -(defwidget network--lan [device] +(defwidget network-big--lan + [device] + (label :visible {network--data + [device] + .online} + :class "" + :text "${network--data.interfaces[device].addresses[0].address}/${network--data.interfaces[device].addresses[0].prefixlen}")) + +(defwidget network--wlan + [device] (box :orientation "h" :halign "start" :space-evenly false :spacing 0 (label :class "offline" - :visible {network--data["network"][device]["offline"]} - :text "offline") - (label :visible {network--data["network"][device]["connecting"]} - :class "highlight" - :text "connecting...") - (label :visible {network--data["network"][device]["online"] && !network--data.network[device].connecting} - :class "special" - :text "${network--data['network'][device]['ip4_addr']}/${network--data['network'][device]['ip4_prefix']}"))) + :visible {network--data + ["network"] + [device] + ["offline"] + } + :text "offline") + (label :visible {network--data + ["network"] + [device] + ["connecting"] + } + :class "highlight" + :text "connecting...") + (label :visible {network--data + ["network"] + [device] + ["online"] + } + :class "special" + :text "${network--data['wifi']['ssid']}"))) -(defwidget network--proxy-vpn [device ?required] +(defwidget network--lan + [device] + (box :orientation "h" + :halign "start" + :space-evenly false + :spacing 0 + (label :class "offline" + :visible {!device.online} + :text "offline") + (label :visible {device.online} + :class {network--data.last_update.unix < clock--data.unix - 30 ? "highlight" : "special"} + :text "${device.addresses[0].address}/${device.addresses[0].prefixlen}"))) + +(defwidget network--secure + [] (box :orientation "h" :halign "start" :space-evenly false :spacing 0 - :visible {network--data.connection.internet && (network--data["network"][device]["exists"] || required)} (label :class "highlight" - :text "- insecure" - :visible {! network--data["network"][device]["exists"]}) + :text "- insecure" + :visible {! + network--data.secure }) (label :class "green" - :text "- secured" - :visible {network--data["network"][device]["exists"]}))) + :text "- secured via ${network--data.secure_msg}" + :visible {network--data.secure}))) -(defwidget vpn-network [] +(defwidget vpn-network + [] (box :orientation "v" :halign "start" :space-evenly false :spacing 0 + :visible {network--data + != + ''} (label :class "highlight" - :text "offline" - :visible {!network--data.connection.ezrinet}) + :text "offline" + :visible {! + network--data.interfaces.ezrinet.online }) (label :class "green" - :text "connected" - :visible {network--data.connection.ezrinet}) + :text "connected" + :visible {network--data.interfaces.ezrinet.online}) "personal network")) -(defwidget network [] +(defwidget network + [] + (button :onclick "eww update network--show-details=${!network--show-details}" + (box :orientation "v" + :halign "start" + :space-evenly false + :spacing 0 + :visible {network--data != ''} + (box :orientation "h" + :halign "center" + :space-evenly false + :spacing 10 + (network--lan :device {network--data.default_interface})) + "communications"))) + +(defwidget network--public-ip + [] + (centerbox :orientation "h" + :halign "start" + :width 200 + (box :halign "start" + "public ip:") + "" + (box :halign "end" + :spacing 0 + :space-evenly false + (label :class "highlight" + :text "offline" + :visible {!network--data.online}) + (label :class "highlight" + :text "no response" + :visible {network--data.online && !network--data.have_public_ip}) + (label :class "special" + :text {network--data.public_ip.ip} + :visible {network--data.online && network--data.have_public_ip})))) + +(defwidget network--default-route + [] + (centerbox :orientation "h" + :halign "start" + :width 200 + (box :halign "start" + "route on:") + "" + (box :halign "end" + :spacing 0 + :space-evenly false + (label :class "highlight" + :text "offline" + :visible {!network--data.online}) + (label :class "highlight" + :text "no route" + :visible {network--data.online && !network--data.have_default_route}) + (label :class "special" + :text {network--data.default_route} + :visible {network--data.online && network--data.have_default_route})))) + +(defwidget network--gateway + [] + (centerbox :orientation "h" + :halign "start" + :width 200 + (box :halign "start" + "gateway:") + "" + (box :halign "end" + :spacing 0 + :space-evenly false + (label :class "highlight" + :text "no response" + :visible {!network--data.have_gateway}) + (label :class "special" + :text {network--data.gateway} + :visible {network--data.have_gateway})))) + +(defwidget network--status-summary + [] + (centerbox :orientation "h" + :halign "start" + :width 200 + (box :halign "start" + "status:") + "" + (box :halign "end" + :spacing 0 + :space-evenly false + (label :class "highlight" + :text "offline" + :visible {!network--data.online}) + (label :class "special" + :text "online" + :visible {network--data.online && !network--data.secure}) + (label :class "green" + :text {network--data.secure_msg == "usu" ? "vpn online" : "secure"} + :visible {network--data.online && network--data.secure})))) + + +(defwidget network-detail + [] (box :orientation "v" :halign "start" :space-evenly false :spacing 0 - (box :orientation "h" - :halign "center" - :space-evenly false - :spacing 10 - (network--wlan :device "wlan0") - (network--proxy-vpn :device "wg-mullvad" :required {!network--data.trusted})) - "communications")) - + (network--status-summary) + (network--public-ip) + (network--default-route) + (network--gateway) + (centerbox :orientation "h" + :halign "start" + :width 200 + (box :halign "start" + "last update:") + "" + (box :halign "end" + :spacing 0 + :space-evenly false + (label :class {network--data.last_update.unix < clock--data.unix - 30 ? "highlight" : "special"} + :text "${network--data.last_update.month}-${network--data.last_update.day} ${network--data.last_update.hour}:${network--data.last_update.minute}:${network--data.last_update.second}"))) + )) + +(defwidget network-sidebar-details [] + (box :orientation "v" + :halign "start" + :class "module" + :space-evenly false + :spacing 5 + :width 200 + (box :orientation "h" + :halign "center" + :class "nebula" + :spacing 10 + :space-evenly false + (label :class "medium special" + :text "Comms")) + (box :orientation "h" + :halign "center" + :class "nebula" + :spacing 10 + :space-evenly false + (label :class "nebula green" + :text "Online" + :visible {network--data.online}) + (label :class "nebula highlight" + :text "Offline" + :visible {!network--data.online})) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Route On:") + "" + (box :halign "end" + (label :text "No Route" + :class "highlight" + :visible {network--data.online && !network--data.have_default_route}) + (label :text "${network--data.default_route}" + :class "special" + :visible {network--data.online && network--data.have_default_route}))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :valign "start" + :class "nebula" + "Address:") + "" + (box :halign "end" + :orientation "v" + (label :text "${network--data.default_interface.addresses[0].address}" + :class "special") + (label :text "/${network--data.default_interface.addresses[0].prefixlen}" + :halign "end" + :class "special"))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Public IP:") + "" + (box :halign "end" + (label :text "Offline" + :class "highlight" + :visible {!network--data.have_public_ip}) + (label :text {network--data.public_ip.ip} + :class "special" + :visible {network--data.have_public_ip}))) + (centerbox :orientation "h" + :halign "start" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + :class "nebula" + "Gateway:") + "" + (box :halign "end" + (label :text "Error" + :class "highlight nebula" + :visible {!network--data.have_gateway}) + (label :text {network--data.gateway} + :class "special" + :visible {network--data.have_gateway}))) + (centerbox :orientation "h" + :halign "start" + :class "nebula" + :spacing 10 + :width 200 + :space-evenly false + (box :halign "start" + "VPN:") + "" + (box :halign "end" + (label :text "Offline" + :class "highlight" + :visible {!network--data.interfaces.ezrinet.online}) + (label :text "Online" + :class "green" + :visible {network--data.interfaces.ezrinet.online}))) + + )) + + diff --git a/.config/eww/scripts/network.py##hostname.gathering-storm b/.config/eww/scripts/network.py##hostname.gathering-storm index 742aa39..99db78e 100755 --- a/.config/eww/scripts/network.py##hostname.gathering-storm +++ b/.config/eww/scripts/network.py##hostname.gathering-storm @@ -1,81 +1,306 @@ #!/usr/bin/env python3 -import subprocess +import trparse +from subprocess import run, PIPE, DEVNULL import json -from time import sleep +import sys +import os +import re +from time import sleep, time as now +from ipaddress import ( + IPv4Address as IPAddress, + IPv4Network as IPNetwork, + IPv4Interface as IPInterface, + AddressValueError, +) +from netifaces import interfaces, ifaddresses, AF_INET, AF_LINK, gateways +import dbus +from datetime import datetime -TRUSTED_NETWORKS = ['gayer people'] -def wifi(): - ssid_cmd = subprocess.run(['iwgetid', '-r'], capture_output = True) - if ssid_cmd.returncode != 0: - return {"connected": False, "ssid": None} - ssid = ssid_cmd.stdout.decode('utf-8').strip() - ssid = ssid if len(ssid) <= 15 else f"{ssid[:14]}…" - return {"connected": True, "ssid": ssid} +# These are networks that are considered secure. All traffic being routed +# through one of these networks is being encrypted and routed through an +# anonymizing service. +SECURE_FIRSTHOP_NETWORKS = { + "home": IPNetwork("10.242.0.0/16"), # Personal network + "mullvad": IPNetwork("10.64.0.1/32"), # Mullvad VPN + "usu": IPNetwork("129.123.8.126/32"), # USU VPN +} -def netdev(device: str): - ip_cmd = subprocess.run(['ip', '-j', 'addr', 'show', device], capture_output = True) - if ip_cmd.returncode != 0: - return {"exists": False} - ip_data = json.loads(ip_cmd.stdout.decode('utf-8'))[0] - online = ip_data["operstate"] == "UP" - ip4_addr = "" - ip4_prefix_length = 24 - addr4_info = list(filter(lambda addr: addr.get("family") == "inet", ip_data["addr_info"])) - if len(addr4_info) >= 1: - ip4_addr = addr4_info[0]["local"] - ip4_prefix_length = addr4_info[0]["prefixlen"] - connecting = ip_data["operstate"] != "DOWN" and (ip4_addr == "" or not online) +# Interfaces that we should check +DEFAULT_INTERFACES_TO_WATCH = ["lan", "ezrinet"] +# Interfaces that we should use when determining if we are online +DEFAULT_INTERFACES_TO_COUNT = ["lan"] +# Overrides for IP addresses to ping to determine if an interface is +# online This is useful for interfaces that don't have or report a +# gateway, but we still want to check if they're online, such as the +# ezrinet interface. +INTERFACE_PING_OVERRIDES = {"ezrinet": IPAddress("10.242.3.1")} + +INTERFACES_TO_WATCH = os.environ.get( + "NETWORK_INTERFACES_TO_WATCH", ",".join(DEFAULT_INTERFACES_TO_WATCH) +).split(",") +INTERFACES_TO_COUNT = os.environ.get( + "NETWORK_INTERFACES_TO_COUNT", ",".join(DEFAULT_INTERFACES_TO_COUNT) +).split(",") + +for key, value in os.environ.items(): + if key[: len("NETWORK_PING_OVERRIDE_")] == "NETWORK_PING_OVERRIDE_": + INTERFACE_PING_OVERRIDES[key[len("NETWORK_PING_OVERRIDE_") :]] = IPAddress( + value + ) + + +class Interface: + name: str + mac: str + addresses: list[IPInterface] + gateway: IPAddress | None + + @property + def online(self): + # If we have no addresses, we're not online + if len(self.addresses) == 0: + return False + # If we have an override, ping that + if self.name in INTERFACE_PING_OVERRIDES: + return ping(INTERFACE_PING_OVERRIDES[self.name]) + # If we have no gateway, this interface is likely not intended + # to route beyond the local network, so we'll assume it's + # online, at least for whatever it's used for. + if self.gateway is None: + return True + return ping(self.gateway) + + def asdict(self): + return { + "name": self.name, + "mac": self.mac, + "addresses": [ + { + "address": str(addr.ip), + "netmask": str(addr.netmask), + "network": str(addr.network), + "prefixlen": addr._prefixlen, + } + for addr in self.addresses + ], + "online": self.online, + } + + +def get_first_hop() -> IPAddress | None: + """Get the first network hop.""" + # Use ping to get the first hop + cmd = ["/usr/bin/ping", "-c1", "-W0.3", "-t1", "1.1.1.1"] + result = run(cmd, stdout=PIPE, stderr=PIPE) + try: + ip = IPAddress(result.stdout.decode("utf-8").split("\n")[1].split()[1]) + except (IndexError, AddressValueError): + # If we can't parse the output, return None + return None + return ip + + +def validate_first_hop_is_secure(first_hop: IPAddress): + """Check if the first hop is in a secure network.""" + for name, network in SECURE_FIRSTHOP_NETWORKS.items(): + if first_hop in network: + return name + + +def get_gateways(): + """Get gateways on each interface.""" + gw = gateways().get(AF_INET, []) + result = {} + for iface in INTERFACES_TO_WATCH: + for gateway in gw: + if gateway[1] == iface: + result[iface] = gateway[0] + + return result + + +def interface_status(interface: str, gw): + """Get the status of an interface.""" + try: + addrs = ifaddresses(interface) + except: + addrs = {} + result = Interface() + result.name = interface + result.gateway = gw.get(interface, None) + if AF_LINK in addrs: + result.mac = addrs[AF_LINK][0]["addr"] + else: + result.mac = None + if AF_INET in addrs: + result.addresses = [ + IPInterface(f'{addr["addr"]}/{addr["netmask"]}') + for addr in addrs.get(AF_INET, []) + ] + else: + result.addresses = [] + return result + + +def ping(host: IPAddress) -> bool: + cmd = ["/usr/bin/ping", "-c1", "-w1", str(host)] + result = run(cmd, stdout=DEVNULL, stderr=DEVNULL) + return result.returncode == 0 + + +def get_public_ip(): + """Get the public IP address.""" + cmd = ["/usr/bin/curl", "-s", "https://ipinfo.io"] + result = run(cmd, stdout=PIPE, stderr=PIPE) + try: + data = json.loads(result.stdout.decode("utf-8")) + except (IndexError, ValueError): + return None + try: + # If the IP address is invalid, don't return anything + IPAddress(data["ip"]) + except (AddressValueError, KeyError): + if data.get("status", None) == 429: + # We're rate limited, so return something indicating that + return {"rate_limited": True} + return None + return data + + +def get_default_route(): + """Get the default route.""" + cmd = ["/usr/bin/ip", "route", "show", "default"] + result = run(cmd, stdout=PIPE, stderr=PIPE) + try: + # Get first line (might have multiple gateway routes) + line = result.stdout.decode("utf-8").split("\n")[0] + # Get the gateway link (following "dev") + link = re.search(r"dev\s+(\S+)", line).group(1) + # We already know the gateway IP based on our firsthop check earlier, and that's more reliable since it will respect any routing rules + except (IndexError, AttributeError): + return None + return link + + +def format_time(time: datetime) -> dict[str, str | int]: + """Format a datetime object for display.""" return { - "exists": True, - "online": online, - "connecting": connecting, - "offline": not online and not connecting, - "ip4_addr": ip4_addr, - "ip4_prefix": ip4_prefix_length + "hour": f"{time.hour:02}", + "minute": f"{time.minute:02}", + "second": f"{time.second:02}", + "year": f"{time.year:04}", + "month": f"{time.month:02}", + "day": f"{time.day:02}", + "unix": int(time.timestamp()), } -def trusted(ssid: str | None): - # Don't throw up an "INSECURE" alert when offline - if not ssid: - return True - return ssid in TRUSTED_NETWORKS -def ping(host: str): - ping_cmd = subprocess.Popen(['/usr/bin/ping', '-c1', '-W2', host], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - return ping_cmd +# system_bus = dbus.SystemBus() +# networkd = system_bus.get_object( +# "org.freedesktop.network1", "/org/freedesktop/network1" +# ) +# manager = dbus.Interface(networkd, "org.freedesktop.network1.Manager") -counter = 0 -ezrinet_last = False -internet_last = False -ezrinet_ping = None -internet_ping = None + +# def get_dbus_interfaces(): +# for iface in INTERFACES_TO_WATCH: +# dbus_object = system_bus.get_object( +# "org.freedesktop.network1", manager.GetLinkByName(iface) +# ) +# dbus_interface = dbus.Interface(dbus_object, "org.freedesktop.network1.Link") +# yield dbus_interface + +runtime_dir = os.environ.get("XDG_RUNTIME_DIR", "/tmp") + + +def load_last_data(var_name: str): + try: + if os.path.exists(f"{runtime_dir}/{var_name}.json"): + with open(f"{runtime_dir}/{var_name}.json", "r") as f: + return json.load(f), os.path.getmtime(f"{runtime_dir}/{var_name}.json") + + except: + pass + return None, None + + +def store_last_data(var_name: str, data): + with open(f"{runtime_dir}/{var_name}.json", "w") as f: + json.dump(data, f) + + +last_default_route = load_last_data("default_route")[0] +last_ip_data, last_request = load_last_data("ip_data") +try: + last_first_hop = IPAddress(load_last_data("first_hop")[0]) +except: + last_first_hop = None while True: - if counter == 0: - ezrinet_ping = ping('10.242.3.1') - internet_ping = ping('1.1.1.1') - if ezrinet_ping.poll() is not None: - ezrinet_last = ezrinet_ping.returncode == 0 - if internet_ping.poll() is not None: - internet_last = internet_ping.returncode == 0 - wifi_data = wifi() - result = { - "wifi": wifi_data, - "network": { - "wlan0": netdev("wlan0"), - "ezrinet": netdev("ezrinet"), - "wg-mullvad": netdev("mullvad"), - }, - "connection": { - "ezrinet": ezrinet_last, - "internet": internet_last - }, - "trusted": trusted(wifi_data.get("ssid", None)) - } - print(json.dumps(result), flush=True) - counter += 1 - # Send pings every 10 seconds - counter %= 3 - sleep(1) + try: + online = ping("1.1.1.1") + except: + online = False + hop = get_first_hop() + gw = get_gateways() + default_route = get_default_route() + # public IP shouldn't change often, so only check every 2 hours or + # if the default route or first hop changes + if ( + default_route != last_default_route + or last_ip_data is None + or last_request is None + or now() - last_request > (2 * 60 * 60) + or (hop != last_first_hop and hop is not None) + ): + print("refreshing public IP", file=sys.stderr, flush=True) + public_ip_data = get_public_ip() + if public_ip_data is None: + print("failed to get public IP", file=sys.stderr, flush=True) + elif public_ip_data.get("rate_limited", False): + last_ip_data = public_ip_data + public_ip_data = None + else: + last_ip_data = public_ip_data + # Write the public IP data to a file + store_last_data("ip_data", public_ip_data) + last_default_route = default_route + store_last_data("default_route", default_route) + last_request = now() + last_first_hop = hop + store_last_data("first_hop", str(hop)) + else: + public_ip_data = last_ip_data + if hop is not None: + secure_msg = validate_first_hop_is_secure(hop) + secure = secure_msg is not None + else: + # If we can't reach the router, assume insecure + secure = False + iface_data = [interface_status(iface, gw) for iface in INTERFACES_TO_WATCH] + iface_dict = {iface.name: iface.asdict() for iface in iface_data} + + default_route_iface_data = interface_status(default_route, gw) + + print( + json.dumps( + { + "online": online, + "secure": secure, + "interfaces": iface_dict, + "public_ip": public_ip_data or {}, + "have_public_ip": public_ip_data is not None and "ip" in public_ip_data, + "default_route": default_route, + "default_interface": default_route_iface_data.asdict(), + "have_default_route": default_route is not None, + "gateway": str(hop), + "have_gateway": hop is not None, + "last_update": format_time(datetime.now()), + } + ), + flush=True, + ) + + sleep(5) diff --git a/.config/htop/htoprc b/.config/htop/htoprc index d673940..e918bed 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -38,20 +38,20 @@ column_meters_0=Hostname Blank Tasks LoadAverage Uptime Clock 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=1 -sort_key=0 -tree_sort_key=0 -sort_direction=1 -tree_sort_direction=1 +tree_view=0 +sort_key=46 +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=PID -.tree_sort_key=PID +.sort_key=PERCENT_CPU +.tree_sort_key=PERCENT_CPU .tree_view_always_by_pid=0 -.tree_view=1 -.sort_direction=1 -.tree_sort_direction=1 +.tree_view=0 +.sort_direction=-1 +.tree_sort_direction=-1 .all_branches_collapsed=0 screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command .sort_key=IO_RATE diff --git a/.config/sway/config b/.config/sway/config index 59b8f97..1f90343 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -199,6 +199,9 @@ for_window [floating] border normal 1 ## Thunderbird New.* windows should float for_window [app_id="thunderbird" title="(New|Write)"] floating enable +## Bitwarden extension windows should float by default +for_window [app_id="firefox" title="Extension: \(Bitwarden Password Manager\)"] floating enable + ### ### # Application Keybinds # ### ### diff --git a/.config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm b/.config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm deleted file mode 100644 index 472de82..0000000 --- a/.config/sway/local-config.d/10-gtk-theme.conf##hostname.gathering-storm +++ /dev/null @@ -1,3 +0,0 @@ -#-*-conf-space-*- - -exec_always gsettings set org.gnome.desktop.interface text-scaling-factor 1.25 diff --git a/.config/sway/workspace-arrangement.conf##class.single-monitor b/.config/sway/workspace-arrangement.conf##class.single-monitor index f8c15d9..163810c 100644 --- a/.config/sway/workspace-arrangement.conf##class.single-monitor +++ b/.config/sway/workspace-arrangement.conf##class.single-monitor @@ -20,30 +20,3 @@ workspace { 10 output $display } -## Workspace Switching Keybinds -bindsym { - $mod+1 exec swaymsg workspace 1 - $mod+2 exec swaymsg workspace 2 - $mod+3 exec swaymsg workspace 3 - $mod+4 exec swaymsg workspace 4 - $mod+5 exec swaymsg workspace 5 - $mod+6 exec swaymsg workspace 6 - $mod+7 exec swaymsg workspace 7 - $mod+8 exec swaymsg workspace 8 - $mod+9 exec swaymsg workspace 9 - $mod+0 exec swaymsg workspace 10 -} - -## Window Reassignment Keybinds -bindsym { - $mod+Shift+1 exec swaymsg move container to workspace 1 - $mod+Shift+2 exec swaymsg move container to workspace 2 - $mod+Shift+3 exec swaymsg move container to workspace 3 - $mod+Shift+4 exec swaymsg move container to workspace 4 - $mod+Shift+5 exec swaymsg move container to workspace 5 - $mod+Shift+6 exec swaymsg move container to workspace 6 - $mod+Shift+7 exec swaymsg move container to workspace 7 - $mod+Shift+8 exec swaymsg move container to workspace 8 - $mod+Shift+9 exec swaymsg move container to workspace 9 - $mod+Shift+0 exec swaymsg move container to workspace 10 -} diff --git a/.config/sway/workspaces.json##hostname.gathering-storm b/.config/sway/workspaces.json##hostname.gathering-storm index ba2ca28..fa70f06 100644 --- a/.config/sway/workspaces.json##hostname.gathering-storm +++ b/.config/sway/workspaces.json##hostname.gathering-storm @@ -1,76 +1,249 @@ { - "default_context": "personal", - "display_ordering": ["builtin"], - "display_layout": { - "builtin": "eDP-1" - }, + "default_context": "personal-portable", + "workspaces": [ + { + "index": 1, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 2, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 3, + "name": "documentation", + "exec": "firefox", + "args": ["--new-window"], + "environ": {}, + "program_name": "firefox" + }, + { + "index": 4, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 5, + "name": "discord", + "exec": "discord", + "program_name": "discord" + }, + { + "index": 6, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 7, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 8, + "name": "internet", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 9, + "name": "project", + "exec": "firefox-developer-edition", + "args": ["-start-debugger-server", "--new-window"], + "program_name": "firefox-developer-edition" + }, + { + "index": 10, + "name": "server management", + "exec": "virt-manager", + "program_name": "virt-manager", + "systemd": false + }, + { + "index": 11, + "name": "password management", + "exec": "bitwarden-desktop", + "program_name": "bitwarden" + }, + { + "index": 12, + "name": "video", + "exec": "jellyfinmediaplayer", + "program_name": "jellyfinmediaplayer" + }, + { + "index": 13, + "name": "edex-ui", + "exec": "edex-ui", + "program_name": "edex-ui" + }, + { + "index": 14, + "name": "mail", + "exec": "thunderbird", + "program_name": "thunderbird", + "environ": { + "MOZ_ENABLE_WAYLAND": "1" + } + }, + { + "index": 15, + "name": "config", + "exec": "console", + "program_name": "console" + }, + { + "index": 16, + "name": "console", + "exec": "console", + "program_name": "console" + }, + { + "index": 17, + "name": "code", + "exec": "emacsclient", + "args": ["-nc"], + "program_name": "emacsclient" + }, + { + "index": 18, + "name": "music", + "exec": "feishin", + "program_name": "feishin" + }, + { + "index": 19, + "name": "project", + "exec": "firefox", + "args": ["--new-window"], + "program_name": "firefox" + }, + { + "index": 20, + "name": "slack", + "exec": "slack", + "program_name": "slack", + "args": [ + "--enable-features=UseOzonePlatform", + "--ozone-platform=wayland", + "--enable-gpu-rasterization" + ], + "memory_profile": { + "high": "800M", + "max": "1.2G" + } + }, + { + "index": 21, + "name": "ferrets", + "exec": "firefox", + "args": ["--new-window", "https://www.twitch.tv/ferretsoftware"], + "program_name": "firefox" + } + ], "contexts": { - "personal": { - "builtin": [ + "docked": { + "primary": "center", + "outputs": [ { - "index": 1, - "name": "terminal", - "exec": "console", - "program_name": "console" + "names": ["eDP-1"], + "group": "builtin", + "position": [0, 600], + "eww_windows": ["builtinbar"], + "mode": "2560x1600@165Hz scale 1.5 color_profile icc /usr/share/color/icc/colord/BOE_CQ_______NE160QDM_NZ6.icm" }, { - "index": 2, - "name": "code", - "exec": "emacsclient", - "args": ["-nc"], - "program_name": "emacsclient" + "make": "Acer Technologies", + "model": "XV271U M3", + "serial": "1322131231233", + "group": "left", + "position": [1707, 0], + "mode": "2560x1440@120Hz", + "eww_windows": ["leftbar", "sidebar"] }, { - "index": 3, - "name": "internet", - "exec": "firefox", - "args": ["--new-window"], - "program_name": "firefox" + "make": "Dell Inc.", + "model": "DELL U3818DW", + "serial": "97F8P9350W0L", + "group": "center", + "position": [4267, 0], + "mode": "3840x1600", + "eww_windows": ["centerbar"] }, { - "index": 4, - "name": "project", - "exec": "firefox", - "args": ["--new-window"], - "program_name": "firefox" - }, - { - "index": 5, - "name": "servers", - "exec": "virt-manager", - "program_name": "virt-manager" - }, - { - "index": 6, - "name": "steam", - "exec": "steam", - "program_name": "steam" - }, - { - "index": 7, - "name": "media", - "exec": "jellyfinmediaplayer", - "program_name": "jellyfinmediaplayer" - }, - { - "index": 8, - "name": "real-time comms", - "exec": "discord", - "program_name": "discord" - }, - { - "index": 9, - "name": "messages", - "exec": "thunderbird", - "program_name": "thunderbird" - }, - { - "index": 10, - "name": "config", - "exec": "pavucontrol", - "program_name": "pavucontrol" + "make": "Acer Technologies", + "model": "XV271U M3", + "serial": "1431038964205", + "group": "right", + "position": [8107, 0], + "mode": "2560x1440@120Hz", + "eww_windows": ["rightbar"] } - ] + ], + "groups": { + "builtin": { + "workspaces": [21], + "reverse": false + }, + "left": { + "workspaces": [1, 2, 3, 4, 5], + "reverse": true + }, + "center": { + "workspaces": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "reverse": false + }, + "right": { + "workspaces": [16, 17, 18, 19, 20], + "reverse": false + } + } + }, + "work-portable": { + "primary": "builtin", + "outputs": [ + { + "names": ["eDP-1"], + "group": "builtin", + "position": [0, 0], + "eww_windows": ["builtinbar"], + "mode": "2560x1600@165Hz scale 1.25 color_profile icc /usr/share/color/icc/colord/BOE_CQ_______NE160QDM_NZ6.icm" + } + ], + "groups": { + "builtin": { + "workspaces": [6, 7, 8, 9, 10, 11, 18, 20, 14, 15], + "reverse": false + } + } + }, + "personal-portable": { + "primary": "builtin", + "outputs": [ + { + "names": ["eDP-1"], + "group": "builtin", + "position": [0, 0], + "eww_windows": ["builtinbar"], + "mode": "2560x1600@165Hz scale 1.25 color_profile icc /usr/share/color/icc/colord/BOE_CQ_______NE160QDM_NZ6.icm" + } + ], + "groups": { + "builtin": { + "workspaces": [6, 7, 8, 9, 10, 11, 18, 5, 14, 15], + "reverse": false + } + } } } } diff --git a/.config/systemd/user/emacs.service b/.config/systemd/user/emacs.service index da18f78..056cba3 100644 --- a/.config/systemd/user/emacs.service +++ b/.config/systemd/user/emacs.service @@ -13,8 +13,8 @@ Restart=on-failure Slice=session.slice MemoryAccounting=yes # Tide eats memory like crazy, so lets put it on a diet. -MemoryHigh=3G -MemoryMax=5G +MemoryHigh=8G +MemoryMax=10G [Install] WantedBy=graphical-session.target diff --git a/.config/systemd/user/eww.service b/.config/systemd/user/eww.service index 36510b3..55e5b2c 100644 --- a/.config/systemd/user/eww.service +++ b/.config/systemd/user/eww.service @@ -3,8 +3,8 @@ Description=eww status bars PartOf=sway-session.target [Service] -Type=forking -ExecStart=eww daemon +Type=simple +ExecStart=eww daemon --no-daemonize ExecReload=eww reload ExecStop=eww kill ExecStopPost=sleep 1 diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index eadfc2b..9e51fd3 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -7,7 +7,7 @@ alias userctl="\systemctl --user" alias ujournalctl="\journalctl --user" -alias reconf="source $HOME/.zshrc" +alias reconf="exec $SHELL" alias cp="cp -i --reflink=auto" alias mv="mv -i" diff --git a/.config/zsh/env.zsh b/.config/zsh/env.zsh index 0eccad7..1b6b5a2 100644 --- a/.config/zsh/env.zsh +++ b/.config/zsh/env.zsh @@ -11,7 +11,7 @@ PATH_wincmake=/opt/msvcmake/bin:/opt/msvc/bin/x64 cdpath=(~ ~/src) -export PATH=.:$PATH_asdf:$PATH_node:$PATH_pyenv:$PATH_java:$PATH_user:$PATH_system +export PATH=.:$PATH_node:$PATH_pyenv:$PATH_java:$PATH_user:$PATH_system # Function to run a command with only the "safe" system PATH element function safeexec { diff --git a/.config/zsh/zz-asdf.zsh b/.config/zsh/zz-asdf.zsh deleted file mode 100644 index fdba167..0000000 --- a/.config/zsh/zz-asdf.zsh +++ /dev/null @@ -1,2 +0,0 @@ -# source $HOME/.local/lib/asdf/asdf.sh -# source $HOME/.local/lib/asdf/completions/asdf.bash diff --git a/.emacs.d/settings.org b/.emacs.d/settings.org index 66cced0..8f8919a 100644 --- a/.emacs.d/settings.org +++ b/.emacs.d/settings.org @@ -513,26 +513,29 @@ Indent using tabs, render with tab-width of 2. :config (setq company-idle-delay 0.3)) #+END_SRC -** LSP Mode +** LSP #+BEGIN_SRC emacs-lisp - (use-package lsp-mode - :ensure t - :init - ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") - (setq lsp-keymap-prefix "C-c l") - :hook ((python-mode . lsp) ;; pip install python-lsp-server pyls-black pyls-isort pyls-mypy - (elixir-mode . lsp) - (rust-mode . lsp) - (java-mode . lsp) - (php-mode . lsp) - (typescript-mode . lsp) ;; npm install -g typescript typescript-language-server - (lsp-mode . lsp-enable-which-key-integration)) - :config (lsp-register-custom-settings - '(("pyls.plugins.pyls_mypy.enabled" t t) - ("pyls.plugins.pyls_mypy.live_mode" nil t) - ("pyls.plugins.pyls_black.enabled" t t) - ("pyls.plugins.pyls_isort.enabled" t t))) - :commands lsp) + ;; (use-package lsp-mode + ;; :ensure t + ;; :init + ;; ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") + ;; (setq lsp-keymap-prefix "C-c l") + ;; :hook ((python-mode . lsp) ;; pip install python-lsp-server pyls-black pyls-isort pyls-mypy + ;; (elixir-mode . lsp) + ;; (rust-mode . lsp) + ;; (java-mode . lsp) + ;; (php-mode . lsp) + ;; (typescript-mode . lsp) ;; npm install -g typescript typescript-language-server + ;; ) + ;; :config (lsp-register-custom-settings + ;; '(("pyls.plugins.pyls_mypy.enabled" t t) + ;; ("pyls.plugins.pyls_mypy.live_mode" nil t) + ;; ("pyls.plugins.pyls_black.enabled" t t) + ;; ("pyls.plugins.pyls_isort.enabled" t t))) + ;; :commands lsp) + + (use-package eglot + :ensure t) #+END_SRC ** Languages @@ -570,11 +573,11 @@ After installing the ~rust-analyzer~ program, the following can be used: (add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode)) - (add-hook 'tsx-ts-mode-hook #'lsp) - (add-hook 'tsx-ts-mode-hook #'setup-tide-mode) + ;; (add-hook 'tsx-ts-mode-hook #'eglot) + ;; (add-hook 'tsx-ts-mode-hook #'setup-tide-mode) - (add-hook 'typescript-ts-mode-hook #'lsp) - (add-hook 'typescript-ts-mode-hook #'setup-tide-mode) + ;; (add-hook 'typescript-ts-mode-hook #'eglot) + ;; (add-hook 'typescript-ts-mode-hook #'setup-tide-mode) #+END_SRC **** TIDE #+BEGIN_SRC emacs-lisp From 00d4b171252a4056d9b5b1fd8d321950423760e1 Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Fri, 10 Jan 2025 15:48:36 -0700 Subject: [PATCH 18/19] Updates --- .../eww/eww.yuck##hostname.gathering-storm | 11 +++ .config/eww/scripts/mpris.py | 8 +- .config/eww/scripts/network.py | 1 + .config/eww/windows.yuck | 3 + .../workspaces.json##hostname.gathering-storm | 69 ++++++++++++++---- .config/systemd/user/kdeconnect.service | 4 +- .config/zsh/alias.zsh | 7 +- .config/zsh/prompt.zsh | 2 +- .emacs.d/settings.org | 44 +++++------ .local/bin/default-application-launcher | 2 +- .local/bin/vpn-toggle | 2 +- .local/share/yadm/archive | Bin 1259 -> 1637 bytes .zshrc | 1 + 13 files changed, 109 insertions(+), 45 deletions(-) create mode 120000 .config/eww/scripts/network.py diff --git a/.config/eww/eww.yuck##hostname.gathering-storm b/.config/eww/eww.yuck##hostname.gathering-storm index 448f7a0..94cd9f2 100644 --- a/.config/eww/eww.yuck##hostname.gathering-storm +++ b/.config/eww/eww.yuck##hostname.gathering-storm @@ -94,3 +94,14 @@ (rocinante-builtinbar--left) (rocinante-builtinbar--center) (rocinante-builtinbar--right))) + + +(defwindow polkit + :geometry (geometry + :anchor "center") + :focusable true + :exclusive false + :stacking "overlay" + (box :orientation "v" + :class "bar root bg outline" + "testing")) diff --git a/.config/eww/scripts/mpris.py b/.config/eww/scripts/mpris.py index c27155a..73fd61e 100755 --- a/.config/eww/scripts/mpris.py +++ b/.config/eww/scripts/mpris.py @@ -13,6 +13,10 @@ except: sys.exit(1) from gi.repository import Playerctl, GLib +from gi.events import GLibEventLoopPolicy +import asyncio + +asyncio.set_event_loop_policy(GLibEventLoopPolicy()) title_maxlen = 40 title_end_at = ["(", "-"] @@ -56,8 +60,8 @@ class StatusDisplay: def show(self): self._init_player() - main = GLib.MainLoop() - main.run() + loop = asyncio.get_event_loop() + loop.run_forever() def _get_status(self, playing=None): if self._player: diff --git a/.config/eww/scripts/network.py b/.config/eww/scripts/network.py new file mode 120000 index 0000000..3885fee --- /dev/null +++ b/.config/eww/scripts/network.py @@ -0,0 +1 @@ +network.py##hostname.gathering-storm \ No newline at end of file diff --git a/.config/eww/windows.yuck b/.config/eww/windows.yuck index a98918b..ec77b2a 100644 --- a/.config/eww/windows.yuck +++ b/.config/eww/windows.yuck @@ -2,6 +2,9 @@ ;; Top-Level Module Definitions ;; ;;;; ;;;; +;;; ;;; +;; PolKit Auth Window ;; +;;; ;;; ;;; ;;; ;; Bars for Rocinante ;; diff --git a/.config/sway/workspaces.json##hostname.gathering-storm b/.config/sway/workspaces.json##hostname.gathering-storm index fa70f06..5237547 100644 --- a/.config/sway/workspaces.json##hostname.gathering-storm +++ b/.config/sway/workspaces.json##hostname.gathering-storm @@ -83,9 +83,9 @@ }, { "index": 13, - "name": "edex-ui", - "exec": "edex-ui", - "program_name": "edex-ui" + "name": "comms", + "exec": "zoom", + "program_name": "zoom" }, { "index": 14, @@ -123,7 +123,7 @@ }, { "index": 19, - "name": "project", + "name": "internet", "exec": "firefox", "args": ["--new-window"], "program_name": "firefox" @@ -137,11 +137,7 @@ "--enable-features=UseOzonePlatform", "--ozone-platform=wayland", "--enable-gpu-rasterization" - ], - "memory_profile": { - "high": "800M", - "max": "1.2G" - } + ] }, { "index": 21, @@ -149,6 +145,18 @@ "exec": "firefox", "args": ["--new-window", "https://www.twitch.tv/ferretsoftware"], "program_name": "firefox" + }, + { + "index": 22, + "name": "encrypted comms", + "exec": "signal-desktop", + "program_name": "signal" + }, + { + "index": 23, + "name": "steam", + "exec": "steam", + "program_name": "steam" } ], "contexts": { @@ -192,19 +200,19 @@ ], "groups": { "builtin": { - "workspaces": [21], + "workspaces": [21, 22], "reverse": false }, "left": { - "workspaces": [1, 2, 3, 4, 5], + "workspaces": [6, 2, 3, 4, 5], "reverse": true }, "center": { - "workspaces": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "workspaces": [1, 7, 8, 9, 10, 11, 12, 13, 14, 15], "reverse": false }, "right": { - "workspaces": [16, 17, 18, 19, 20], + "workspaces": [16, 17, 19, 18, 20, 13], "reverse": false } } @@ -222,7 +230,7 @@ ], "groups": { "builtin": { - "workspaces": [6, 7, 8, 9, 10, 11, 18, 20, 14, 15], + "workspaces": [1, 7, 8, 9, 10, 13, 18, 20, 14, 15], "reverse": false } } @@ -240,7 +248,38 @@ ], "groups": { "builtin": { - "workspaces": [6, 7, 8, 9, 10, 11, 18, 5, 14, 15], + "workspaces": [1, 7, 8, 9, 23, 22, 18, 5, 14, 15], + "reverse": false + } + } + }, + "spawnpoint": { + "primary": "external", + "outputs": [ + { + "names": ["eDP-1"], + "group": "builtin", + "position": [2560, 0], + "eww_windows": ["builtinbar"], + "mode": "2560x1600@165Hz scale 1.5 color_profile icc /usr/share/color/icc/colord/BOE_CQ_______NE160QDM_NZ6.icm" + }, + { + "make": "LG Electronics", + "model": "LG UltraFine", + "serial": "111NTRL2Y030", + "group": "external", + "position": [0, 0], + "eww_windows": ["centerbar"], + "mode": "3840x2160@60Hz scale 1.5" + } + ], + "groups": { + "builtin": { + "workspaces": [6, 2, 3, 18, 5], + "reverse": false + }, + "external": { + "workspaces": [1, 7, 8, 9, 23, 22, 19, 20, 14, 15], "reverse": false } } diff --git a/.config/systemd/user/kdeconnect.service b/.config/systemd/user/kdeconnect.service index e605c68..7decd0c 100644 --- a/.config/systemd/user/kdeconnect.service +++ b/.config/systemd/user/kdeconnect.service @@ -3,7 +3,7 @@ Description=KDE Connect Daemon [Service] Type=simple -ExecStart=/usr/lib/kdeconnectd +ExecStart=/usr/bin/kdeconnectd [Install] -WantedBy=default.target +WantedBy=sway-session.target diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 9e51fd3..33f5827 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -9,6 +9,9 @@ alias ujournalctl="\journalctl --user" alias reconf="exec $SHELL" +# Use safeexec to ensure we are using system binaries (required for some AUR packages) +alias paru="safeexec paru" + alias cp="cp -i --reflink=auto" alias mv="mv -i" alias rm="rm -i" @@ -30,7 +33,7 @@ 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] + echo $fg[blue]Apologies, milady. Right away.$fg[default] # Run the last command as root last_cmd=$(fc -ln -1) # if last command was emacs, use TRAMP rather than running as root @@ -39,7 +42,7 @@ function didifuckingstutter { echo "> $fg[white]$cmd$fg[default]" $=cmd else - cmd="sudo $(fc -ln -1)" + cmd="sudo zsh -c '$(fc -ln -1)'" echo "> $fg[white]$cmd$fg[default]" sudo -p "$fg[red]I'll need your authorization:$fg[default] " $last_cmd fi diff --git a/.config/zsh/prompt.zsh b/.config/zsh/prompt.zsh index 7241635..d7caa8c 100644 --- a/.config/zsh/prompt.zsh +++ b/.config/zsh/prompt.zsh @@ -117,7 +117,7 @@ if [[ -v SSH_CLIENT ]]; then elif [[ ${TTY} =~ "tty" ]]; then prompt_line2='${serial_host}$pyenv_info_msg_0_ ${pwd}' history_line="${serial_host}" -elif [[ ${MACHINE_CHASSIS} == "container" ]]; then +elif [[ ${MACHINE_CHASSIS} == "container" ]] || [[ ${MACHINE_CHASSIS} == "vm" ]]; then prompt_line2='${container_host}$pyenv_info_msg_0_ ${pwd}' history_line="${container_host}" else diff --git a/.emacs.d/settings.org b/.emacs.d/settings.org index 8f8919a..13f6bd1 100644 --- a/.emacs.d/settings.org +++ b/.emacs.d/settings.org @@ -515,27 +515,29 @@ Indent using tabs, render with tab-width of 2. #+END_SRC ** LSP #+BEGIN_SRC emacs-lisp - ;; (use-package lsp-mode - ;; :ensure t - ;; :init - ;; ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") - ;; (setq lsp-keymap-prefix "C-c l") - ;; :hook ((python-mode . lsp) ;; pip install python-lsp-server pyls-black pyls-isort pyls-mypy - ;; (elixir-mode . lsp) - ;; (rust-mode . lsp) - ;; (java-mode . lsp) - ;; (php-mode . lsp) - ;; (typescript-mode . lsp) ;; npm install -g typescript typescript-language-server - ;; ) - ;; :config (lsp-register-custom-settings - ;; '(("pyls.plugins.pyls_mypy.enabled" t t) - ;; ("pyls.plugins.pyls_mypy.live_mode" nil t) - ;; ("pyls.plugins.pyls_black.enabled" t t) - ;; ("pyls.plugins.pyls_isort.enabled" t t))) - ;; :commands lsp) - (use-package eglot - :ensure t) + :ensure t + :defer t + :bind (:map eglot-mode-map + ("C-c C-e" . eglot-rename) + ("C-." . eglot-code-actions)) + :hook ((python-mode . eglot-ensure) + (python-mode . flyspell-prog-mode) + (python-mode . superword-mode) + (python-mode . hs-minor-mode)) + :config + (setq-default eglot-workspace-configuration + '((:pylsp . (:configurationSources ["flake8"] + :plugins ( + :mccabe (:enabled :json-false) + :pyflakes (:enabled :json-false) + :flake8 (:enabled :json-false + :maxLineLength 88) + :ruff (:enabled t :lineLength 88) + :pydocstyle (:enabled t :convention "numpy") + :yapf (:enabled :json-false) + :autopep8 (:enabled :json-false) + :black (:enabled t :line_length 88 :cache_config t))))))) #+END_SRC ** Languages @@ -662,7 +664,7 @@ After installing the ~rust-analyzer~ program, the following can be used: #+RESULTS: -** Format All The Buffers +* Format All The Buffers #+BEGIN_SRC emacs-lisp (use-package format-all :ensure t) diff --git a/.local/bin/default-application-launcher b/.local/bin/default-application-launcher index 37e340b..65e0304 100755 --- a/.local/bin/default-application-launcher +++ b/.local/bin/default-application-launcher @@ -4,7 +4,7 @@ exec >(systemd-cat -t i3-sensible-launcher -p info) exec 2> >(systemd-cat -t i3-sensible-launcher -p err) -pyenv shell system +export PATH=$HOME/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin ws_data=$(sway_get_focused_workspace) current_workspace=$(echo $ws_data | jq -r '.index') diff --git a/.local/bin/vpn-toggle b/.local/bin/vpn-toggle index 1a18c20..65ae582 100755 --- a/.local/bin/vpn-toggle +++ b/.local/bin/vpn-toggle @@ -14,5 +14,5 @@ else # VPN is disconnected, so connect echo "Connecting to VPN..." # pkexec doesn't pass the DISPLAY and XAUTHORITY environment variables, so we need to pass them manually - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY TZ=Etc/UTC gpclient connect gp.usu.edu + TZ=Etc/UTC sudo /usr/sbin/gpclient --fix-openssl connect gp.usu.edu fi diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive index dc8f39327e9719ea7fea9efa379455cc197da155..d1590ea7ac3ea11d43af2e2de1d0d83387be8a7f 100644 GIT binary patch literal 1637 zcmV-r2AcVd4Fm}T2+KMc!qkRLpa0V80XlrZs)!S6I)`zzGN$(~oH4x8@?d2sGNY=- z64hOr`aa#9T)jPlN9hNd>!Vwv9?5mibDp%Txx62~gK`vAB5*ZJ1?9sJgh*rqQuC`! zD6zn~(J;ZCLy|FHgW^u^DV8_SB~PU|73~m?qd9C_5OEc1HgIC|rV_#ZFI*=$2?`8Xj9ll!V z|0wK+XLAFhU^?;-Vx-DjT;9ym$_Tl>^UW4Qr&TLnDzt*f7ifU2O3znmOG|Do&Lffj z^3pfTDr1o~StQZ)VH;!)>i`+Fb0w6`MOS78&V&C+-Cz9k_JkG(sEZ`1{FyjH=!v0R2hW5S!;rqPgzn~)TC{~A* zGmsN<>gE~_tv3;dst)H6wgM3y2JKr6h1u}YVxT#;4NR{|JJKd^0|Lx!Dml6@UGH5& zvwf4t18PGIXH)(%>;`nalSM>Z!WkdDr#-h173YPC9MkFqt}8fg7TsXeJ;nl`NoHbE z%(N=jR>3Xcp-AB!4X?H2U@M_{Hjjs>S&Q0Jy=dD*_l<_5zCqW7bYQq~^oZAaws90= zq{{D!!HxsE!k}QB8X_yU$L7g`vc5{S!1h+p8tW%ocp{F<&a>Qr#(z!KZ@{~{y&I!* z=ijLLh4%cBJgrj5U^X993M$>MzWFrWYumV_#A*s2Z+2NjCAFaJ%8hK+KP&$52+=9m zZZG~akVNwlwFa)DCqp#}B*fBldo0iCyHbcHHsNGthnx(R#;(TO9u2Rau5QR>jq~%XOMoMVQK)j2c=Ub@(d4qtME=T;85Jbfkb^ zNYfeT0hJiWqvbP1XgclJRY8yl&=+R!Mg(%>T-mEKLTf=6er85tu0D5(@Kx39#K-mx zOYMUDEuV+0Mab+@0?zq#1HF431YGqEWQu|584~1xhV#a@un!Pk=XvVyloxS2Fc%P8 zfE6LWU>j1X1ZZK%@y2r4nO>icHdw`6;5Oz;sd6D>kB57%ytBopNtEX-|6L}c2E`&5 ziYOv!T3@6B`8x0%czel;;i&i2!4@@NR5RfW$Tx1{@O z7J!-r;a)6G>2>_pnjZ9Ke*GPj*b0xfMz%dtJnpr2CS^W6eHo$KI*ywsl|gT0b*LC1 z_39;Y676TIyT$c@5;aW#X5u$Q8+Q0=9eIhi8$!L>bP-|O{D!1hfJ`}O<*P^_A1<*V zBF8o)x9f*bbtR;s&)ySvXK;4i&P2xioJ0x(q3KHNK9*@G*De(>2d!;#mB<$LF76g^lC-px+}1mDwMFYvVl z#S2=Z0n}vCBsO4-hFF2`CSXDCNT_?V3La&z>;rIO)y5tHYwd?AgA88#rdT7g7iU6< z!TbCWv^GmMC(thLtoN_ts~r5dPrumU6ToP558hY!Rs_Jn6xH+D&Xoyob`dUs8r(jV z)z=1x)$;b$N9LzYVikFQL#wLF-hDscnXM_kSYD&If>Y}@9QM$k+tzq=jzB|v>(+rN zUNkl?@i;8gUw_t2;nw<^IJT6z)rkotit^V&ft@k=$fkj^8B6zNFl?deV~jlulpLQu z;B;4M$Ux$_(aH4Zat66+RhsX@;a~N=gS6^$^yRYHPM6rPb_oE-Le@P_0~`DF&EVR{ zh*Chia9Sy{utyY6+hyx{YQ#zMPt#6QS*Ij#l(}`T#CpZ)3)wmGsA!85{362>;9$1R jJGG8FwvR9m?bmyC$heddHPOrO;!+-l6?j?}yZu*4d$T$E literal 1259 zcmV4Fm}T2n0Uxa>9MkYX8#e0qw$sK|gi^$W(C0_3x+u`!}J$rKoRT77*GkT%Ev3_yydFLu#V58-3b%zaH-FNG` zBTJ0qNz~|#>(>{ktf$M3*t8Rg!K%EK4rR3*fvEBw7B9Q$;o`)YNbqy@x;SBx7VFO} zwv`XA*Z#jr(T`9|BT5rn)OZA+lu3(SaPhD7saR^8k$e{k_UraUxsO2nT9slRB)N17 zAUkC@zuOB-uIs2`>?J`rI3t1wZ_cA_!Nr< z*?WdF_RamipbPx@f70m{A1=iZ(y7b3a(h$d3{;n1%)~(ceabmSJOi>jYHu=!k0 zc(VzADY;s@G-qN$)Y;|R?3NrtOkL6v-~*VY=?}&+^a4{OxS0JPDzCCu*!IYy27P3T z0apPjX@n+90ikTJ(X2W_!%<5!0jF-u-2pPzaSk0xZ~a)e*IH?QrsSg@#POU_ieT&i9@@mUJiGr3r{H-b$VuCSYpjIoP}WUS`BSx z+zlpQnfX+e!foTG}*QC9<&KOiu>_x_qKfy}O>n7`2IgXe#gJscQFXkODn8 ztEZS*wR1ezfe;g=${J5uU~;?B4>C}M2u9KprcPb`<%4dF#%JysRm z`Z-nOwm4lU1nXRZyWUp|1XoG?FXGEq534FUD)Uw$7jh42{p8(mYdiQUKllk zhw7|GhNXBpxn)vPJSw4MvSWBEe)C_7%^Up}?-eC>b!vGRtUa^BN49yfy}=YM@Ta{F zMzbkv7|QiWz!=Xmqiz&T-#{QxR=Kjqp_rPN_RsE*|Jgh~%0yVcJn>_yd2O}^O+xjOo z|8A6>e~U#P^e;1~r{i4pF0g95TyMU#*RWw7K5SQbfSLZni;m=JbY<_AO2|_(W`E*V zm(jw-v`rTZZPK)@hMFQ6^%bVkRT&TOgQi=FxYT=f%e|6|^Gv+_I7^gBi4tE6vlAoy V&L#_!)KBzrQbP+SdX79=yqT5KeHZ`$ diff --git a/.zshrc b/.zshrc index b743d91..bf28d25 100644 --- a/.zshrc +++ b/.zshrc @@ -12,3 +12,4 @@ fi setopt INC_APPEND_HISTORY_TIME + From 20d31ef694387ed058a07d50f8b7fd030ac5a6ec Mon Sep 17 00:00:00 2001 From: Ezri Brimhall Date: Fri, 10 Jan 2025 15:49:12 -0700 Subject: [PATCH 19/19] removed symlink --- .config/eww/scripts/network.py | 1 - 1 file changed, 1 deletion(-) delete mode 120000 .config/eww/scripts/network.py diff --git a/.config/eww/scripts/network.py b/.config/eww/scripts/network.py deleted file mode 120000 index 3885fee..0000000 --- a/.config/eww/scripts/network.py +++ /dev/null @@ -1 +0,0 @@ -network.py##hostname.gathering-storm \ No newline at end of file