From ec709032c0bb05264874cc0935616ff88d4fe491 Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Mon, 25 Nov 2024 23:18:08 +0800 Subject: [PATCH] Clean up unused sway configuration --- .config/git/config | 5 +++ .config/sway/framework | 25 ++++++++++++- .config/sway/home | 39 -------------------- .config/sway/triple | 44 ---------------------- .config/sway/work | 65 --------------------------------- .gitignore | 7 ++++ .local/bin/iptables-vis | 16 ++++++++ .local/share/MultiMC/install.sh | 19 ++++------ 8 files changed, 60 insertions(+), 160 deletions(-) delete mode 100644 .config/sway/home delete mode 100644 .config/sway/triple delete mode 100644 .config/sway/work create mode 100755 .local/bin/iptables-vis diff --git a/.config/git/config b/.config/git/config index 30ed710..63a5c2b 100644 --- a/.config/git/config +++ b/.config/git/config @@ -9,3 +9,8 @@ rebase = true [alias] lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' +[filter "lfs"] + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process diff --git a/.config/sway/framework b/.config/sway/framework index bc82c6a..6dcedcb 100644 --- a/.config/sway/framework +++ b/.config/sway/framework @@ -3,6 +3,29 @@ # Output configuration: # set $output_laptop "BOE 0x095F Unknown" -output $output_laptop position 0 0 transform 0 scale 1.25 +output $output_laptop position 1080 0 transform 0 scale 1.25 bindsym $mod+XF86MonBrightnessDown output $output_laptop scale 1.25 bindsym $mod+XF86MonBrightnessUp output $output_laptop scale 1.5 + +set $output_primary "Hewlett Packard HP E240 6CM73329XK" +output $output_primary position 0 0 transform 270 +bindsym $mod+Shift+F4 output $output_primary transform 90 clockwise +bindsym $mod+F4 output $output_primary transform 90 anticlockwise + +# +# Display controls: +# +# Remember to configure udev. See https://blog.tcharles.fr/ddc-ci-screen-control-on-linux/ +set $monitor_global --noverify --sleep-multiplier 0.1 +set $monitor_primary --bus 8 +# Display brightness controls: +set $monitor_brightness_step 0x0a +bindsym --locked $mod+F2 exec ddcutil $monitor_global $monitor_primary setvcp 0x10 - $monitor_brightness_step +bindsym --locked $mod+F3 exec ddcutil $monitor_global $monitor_primary setvcp 0x10 + $monitor_brightness_step + +# +# Display output toggle: +# +# This is so crazy performant that I did not notice it worked. Was expecting my main display to go blank for a while but it didn't even flash +bindswitch --reload --locked lid:on output $output_laptop disable +bindswitch --reload --locked lid:off output $output_laptop enable diff --git a/.config/sway/home b/.config/sway/home deleted file mode 100644 index af59c7a..0000000 --- a/.config/sway/home +++ /dev/null @@ -1,39 +0,0 @@ - -# -# Output configuration: -# -set $output_primary "Unknown PL270 0000000000001" -set $output_secondary "Samsung Electric Company SME2020 HMDZ800146" -set $output_laptop "Apple Computer Inc Color LCD 0x00000000" -output $output_primary position 1600 0 transform 90 -output $output_secondary position 0 800 transform 0 -#output $output_laptop position 3760 1800 transform 0 scale 1.5 -bindsym $mod+Shift+F4 output $output_primary transform 90 clockwise -bindsym $mod+F4 output $output_primary transform 90 anticlockwise - -# -# Workspaces -# -workspace 10 output $output_secondary - -# -# Display controls: -# -# Remember to configure udev. See https://blog.tcharles.fr/ddc-ci-screen-control-on-linux/ -set $monitor_global --noverify --sleep-multiplier 0.1 -set $monitor_primary --bus 8 -# Display brightness controls: -set $monitor_brightness_step 0x0a -bindsym --locked $mod+F2 exec ddcutil $monitor_global $monitor_primary setvcp 0x10 - $monitor_brightness_step -bindsym --locked $mod+F3 exec ddcutil $monitor_global $monitor_primary setvcp 0x10 + $monitor_brightness_step - -# -# Display output toggle: -# -bindsym --locked $mod+Shift+F1 output $output_primary disable -bindsym --locked $mod+F1 output $output_primary enable -# This is so crazy performant that I did not notice it worked. Was expecting my main display to go blank for a while but it didn't even flash -bindswitch --reload --locked lid:on output $output_laptop disable -bindswitch --reload --locked lid:off output $output_laptop enable - -# vim: ai ts=4 sw=4 et diff --git a/.config/sway/triple b/.config/sway/triple deleted file mode 100644 index 0380d42..0000000 --- a/.config/sway/triple +++ /dev/null @@ -1,44 +0,0 @@ - -# -# Output configuration: -# -set $output_mini "Philips Consumer Electronics Company Philips 19B4 UK51344100785" -set $output_left "Dell Inc. DELL P2719H 974YPS2" -set $output_right "Dell Inc. DELL P2719H DNJQPS2" -output $output_mini position 56 800 transform 270 -output $output_left position 1080 0 transform 270 -output $output_right position 2160 0 transform 90 -# output * bg ~/.local/wallpaper/daniel-j-schwarz-a4M-Vegh7Y4-unsplash.jpg fill - -# -# Workspaces -# -#workspace 1 output $output_left -#workspace 2 output $output_right - -# -# Display controls: -# -# Remember to configure udev. See https://blog.tcharles.fr/ddc-ci-screen-control-on-linux/ -set $monitor_global --noverify --sleep-multiplier 0.1 -set $monitor_mini --bus 0 -set $monitor_left --bus 5 -set $monitor_right --bus 4 -# Display source controls: -set $monitor_prefix Mod4+Alt -bindsym $monitor_prefix+F1 exec ddcutil $monitor_global $monitor_left setvcp 0x60 0x0f -bindsym $monitor_prefix+F2 exec ddcutil $monitor_global $monitor_right setvcp 0x60 0x0f -bindsym $monitor_prefix+F3 exec ddcutil $monitor_global $monitor_left setvcp 0x60 0x01 -bindsym $monitor_prefix+F4 exec ddcutil $monitor_global $monitor_right setvcp 0x60 0x01 -# Display brightness controls: -set $monitor_brightness_step 0x0a -set $monitor_mini_brightness_step 0x03 -bindsym --locked $mod+F2 exec (ddcutil $monitor_global $monitor_left setvcp 0x10 - $monitor_brightness_step) & (ddcutil $monitor_global $monitor_right setvcp 0x10 - $monitor_brightness_step) & (ddcutil $monitor_global $monitor_mini setvcp 0x10 - $monitor_mini_brightness_step) -bindsym --locked $mod+F3 exec (ddcutil $monitor_global $monitor_left setvcp 0x10 + $monitor_brightness_step) & (ddcutil $monitor_global $monitor_right setvcp 0x10 + $monitor_brightness_step) & (ddcutil $monitor_global $monitor_mini setvcp 0x10 + $monitor_mini_brightness_step) - -# -# Media controls: -# -bindsym $mod+m exec "playerctl play-pause" - -# vim: ai ts=4 sw=4 et diff --git a/.config/sway/work b/.config/sway/work deleted file mode 100644 index 80f9932..0000000 --- a/.config/sway/work +++ /dev/null @@ -1,65 +0,0 @@ -# -# Output configuration: -# -set $output_primary "Dell Inc. DELL P2319H 7C8XMM2" -set $output_secondary "Dell Inc. DELL P2317H F4VYG7561H1S" -set $output_laptop "Unknown 0x573D 0x00000000" -set $output_tv "Unknown Beyond TV 0x00000100" -set $output_home "Unknown W280 Ultra 0000000000000" -output $output_primary position 2760 120 transform 90 -output $output_secondary position 1680 120 transform 270 -output $output_laptop position 3840 540 transform 0 scale 1 -output $output_tv position 5760 360 mode --custom 2560x1440@60Hz -output $output_home position 0 0 mode 3840x2160@60Hz scale 1 -bindsym $mod+Shift+F4 output $output_primary transform 90 clockwise -bindsym $mod+F4 output $output_primary transform 90 anticlockwise - -# -# Output render configuration: -# -output * max_render_time 5 - -# -# Workspaces -# -workspace 1 output $output_secondary -workspace 2 output $output_primary -workspace 10 output $output_laptop -workspace 7 output $output_tv $output_laptop - -# -# Windows -# -assign [app_id="org.telegram.desktop.*"] workspace 9 -for_window [instance="spotify"] move to workspace 9 -assign [instance="mattermost"] workspace 10 -assign [instance="google-chrome"] workspace 1 -for_window [instance="google-chrome" title="^Meet – ...-....-..."] move container to workspace 7 -for_window [instance="google-chrome" title="^apps$"] move container to workspace 10 -# -# Shortcuts -# -bindsym XF86Favorites exec google-chrome --password-store=gnome --new-window $MICROSEC_DAILY -bindsym $mod+Shift+Control+a exec google-chrome --password-store=gnome --new-window $MICROSEC_PAGES - -# -# Display controls: -# -# Remember to configure udev. See https://blog.tcharles.fr/ddc-ci-screen-control-on-linux/ -set $monitor_global --noverify --sleep-multiplier 0.1 -set $monitor_primary --bus 8 -# Display brightness controls: -set $monitor_brightness_step 0x0a -bindsym --locked $mod+F2 exec ddcutil $monitor_global $monitor_primary setvcp 0x10 - $monitor_brightness_step -bindsym --locked $mod+F3 exec ddcutil $monitor_global $monitor_primary setvcp 0x10 + $monitor_brightness_step - -# -# Display output toggle: -# -bindsym --locked $mod+Shift+F1 output $output_primary disable -bindsym --locked $mod+F1 output $output_primary enable -# This is so crazy performant that I did not notice it worked. Was expecting my main display to go blank for a while but it didn't even flash -bindswitch --reload --locked lid:on output $output_laptop disable -bindswitch --reload --locked lid:off output $output_laptop enable - -# vim: ai ts=4 sw=4 et diff --git a/.gitignore b/.gitignore index 80706bd..07ca976 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ .cargo/registry .cargo/.crates.toml .cargo/.crates2.json +.cargo/.global-cache .cargo/.package-cache .cargo/.package-cache-mutate .cert/nm-openvpn @@ -112,10 +113,13 @@ .local/bin/poetry .local/bin/pygmentize .local/bin/step +.local/bin/tilt .local/bin/turn_usb +.local/bin/vagrant .local/bin/virtualenv .local/bin/yadm .local/bin/yq +.local/bin/zed .local/lib .local/share/* !.local/share/MultiMC @@ -126,6 +130,7 @@ !.local/share/yadm/archive .local/state .local/zephyr* +.local/zed-preview.app .mc/share .mozilla/* !.mozilla/firefox @@ -159,6 +164,8 @@ .terraform.d .tflint.d .thunderbird +.tilt-dev +.vagrant.d .var/app .viminfo .vscode diff --git a/.local/bin/iptables-vis b/.local/bin/iptables-vis new file mode 100755 index 0000000..f55e252 --- /dev/null +++ b/.local/bin/iptables-vis @@ -0,0 +1,16 @@ +#!/bin/sh + +set -euo pipefail + +install=/tmp/iptables-vis + +mkdir -p $install +if ! [ -f $install/iptables-vis.awk ]; then + wget -O $install/iptables-vis.awk https://github.com/Nudin/iptable_vis/raw/b89e0ca5e30679c8b350b44879637eff9562cdf6/iptables-vis.awk >&2 +fi +if ! [ -f $install/venv/bin/pip ]; then + python -m virtualenv $install/venv >&2 + $install/venv/bin/pip install Pillow==9.5.0 blockdiag==3.0.0 >&2 +fi + +awk -f $install/iptables-vis.awk | $install/venv/bin/blockdiag /dev/stdin -T svg -o /dev/stdout diff --git a/.local/share/MultiMC/install.sh b/.local/share/MultiMC/install.sh index dc0a4c3..593052e 100755 --- a/.local/share/MultiMC/install.sh +++ b/.local/share/MultiMC/install.sh @@ -5,29 +5,26 @@ set -euo pipefail echo "Installing MultiMC" INSTALL_LOCATION="$HOME/.local/share/MultiMC" -DOWNLOAD_URL="https://files.multimc.org/downloads/mmc-stable-lin64.tar.gz" -LOGO_URL="https://avatars2.githubusercontent.com/u/5411890" +DOWNLOAD_URL="https://files.multimc.org/downloads/mmc-develop-lin64.tar.gz" # Paths mkdir -p "$INSTALL_LOCATION" # Package wget --output-document /tmp/multimc.tar.gz "$DOWNLOAD_URL" -tar --extract --strip-components 1 --file /tmp/multimc.tar.gz --directory "$INSTALL_LOCATION" - -# Logo -wget --output-document $HOME/.local/share/icons/multimc.png "$LOGO_URL" +tar --verbose --extract --strip-components 1 --file /tmp/multimc.tar.gz --directory "$INSTALL_LOCATION" # Desktop Entry -cat > $HOME/.local/share/applications/multimc.desktop < $HOME/.local/share/applications/MultiMC.desktop <