switching from kde -> sway

This commit is contained in:
Rudis Muiznieks 2024-05-15 13:34:29 -05:00
parent 20db05dc86
commit e6d6a2a1ff
Signed by: rudism
GPG key ID: CABF2F86EF7884F9
24 changed files with 214 additions and 103 deletions

32
foot/foot.ini Normal file
View file

@ -0,0 +1,32 @@
font=monospace:size=14
[colors]
foreground=cdd6f4
background=1e1e2e
regular0=bac2de
regular1=f38ba8
regular2=a6e3a1
regular3=f9e2af
regular4=89b4fa
regular5=f5c2e7
regular6=94e2d5
regular7=585b70
bright0=a6adc8
bright1=f38ba8
bright2=a6e3a1
bright3=f9e2af
bright4=89b4fa
bright5=f5c2e7
bright6=94e2d5
bright7=45475a
selection-foreground=cdd6f4
selection-background=414356
search-box-no-match=11111b f38ba8
search-box-match=cdd6f4 313244
jump-labels=11111b fab387
urls=89b4fa

8
fuzzel/fuzzel.ini Normal file
View file

@ -0,0 +1,8 @@
[colors]
background=1e1e2edd
text=cdd6f4ff
match=f38ba8ff
selection=585b70ff
selection-match=f38ba8ff
selection-text=cdd6f4ff
border=b4befeff

View file

@ -1,17 +0,0 @@
#!/bin/sh
# 1. run this script to clear all default KDE shortcuts
# 2. add missing applications to shortcuts config
# (yakuake, flameshot, konsole, bitwarden)
# 3. import kde-shortcuts.kksrc
hotkeysRC="$HOME/.config/kglobalshortcutsrc"
# Remove application launching shortcuts.
sed -i 's/_launch=[^,]*/_launch=none/g' "$hotkeysRC"
# Remove other global shortcuts.
sed -i 's/^\([^_][^=]*\)=[^,]*,/\1=none,/g' "$hotkeysRC"
# Reload hotkeys.
kquitapp5 kglobalaccel && sleep 2s && kglobalaccel5 &

View file

@ -1,67 +0,0 @@
[bitwarden.desktop][Global Shortcuts]
_launch=Meta+B
[kwin][Global Shortcuts]
Switch Window Down=Meta+T
Switch Window Left=Meta+H
Switch Window Right=Meta+N
Switch Window Up=Meta+C
Switch to Desktop 1=Meta+1
Switch to Desktop 10=Meta+0
Switch to Desktop 2=Meta+2
Switch to Desktop 3=Meta+3
Switch to Desktop 4=Meta+4
Switch to Desktop 5=Meta+5
Switch to Desktop 6=Meta+6
Switch to Desktop 7=Meta+7
Switch to Desktop 8=Meta+8
Switch to Desktop 9=Meta+9
Walk Through Windows=Meta+Tab
Walk Through Windows (Reverse)=Meta+Shift+Tab
Window Close=Meta+X
Window Maximize=Meta+F
Window Quick Tile Bottom=Meta+E
Window Quick Tile Left=Meta+O
Window Quick Tile Right=Meta+U
Window Quick Tile Top=Meta+.
Window to Desktop 1=Meta+F1
Window to Desktop 10=Meta+F10
Window to Desktop 2=Meta+F2
Window to Desktop 3=Meta+F3
Window to Desktop 4=Meta+F4
Window to Desktop 5=Meta+F5
Window to Desktop 6=Meta+F6
Window to Desktop 7=Meta+F7
Window to Desktop 8=Meta+F8
Window to Desktop 9=Meta+F9
view_zoom_in=Meta+_
view_zoom_out=Meta+-
[org.kde.konsole.desktop][Global Shortcuts]
_launch=Meta+Return
[yakuake][Global Shortcuts]
toggle-window-state=Meta+`
[org.kde.krunner.desktop][Global Shortcuts]
_launch=Meta+Space
[org.flameshot.Flameshot.desktop][Global Shortcuts]
Capture=Print
[kmix][Global Shortcuts]
decrease_volume=Volume Down
increase_volume=Volume Up
mute=Volume Mute
[org_kde_powerdevil][Global Shortcuts]
Decrease Screen Brightness=Monitor Brightness Down
Increase Screen Brightness=Monitor Brightness Up
PowerOff=Power Off
[mediacontrol][Global Shortcuts]
nextmedia=Media Next
pausemedia=Media Pause
playpausemedia=Media Play
previousmedia=Media Previous
stopmedia=Media Stop

View file

@ -1,6 +0,0 @@
#!/bin/sh
sleep 1
pipewire &
pipewire-pulse &
wireplumber &

View file

@ -1,5 +0,0 @@
#!/bin/sh
killall pipewire || true;
killall pipewire-pulse || true;
killall wireplumber || true;

View file

@ -1 +0,0 @@
export DOTNET_ROOT=$HOME/dotnet

View file

@ -1,3 +0,0 @@
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
export MOZ_ENABLE_WAYLAND=1
fi

View file

@ -1 +0,0 @@
export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH

View file

@ -1 +0,0 @@
export PATH=$HOME/.local/bin:$HOME/dotnet:$HOME/.dotnet/tools:$HOME/go/bin:$PATH

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View file

@ -125,12 +125,12 @@ lsp.omnisharp.setup {
lsp.tsserver.setup {
capabilities = lspcap,
on_attach = lspatt,
cmd = { "npx", "typescript-language-server", "--stdio" },
cmd = { "npx", "typescript-language-server@latest", "--stdio" },
}
lsp.yamlls.setup {
capabilities = lspcap,
on_attach = lspatt,
cmd = { "npx", "yaml-language-server", "--stdio" },
cmd = { "npx", "yaml-language-server@latest", "--stdio" },
}
lsp.ccls.setup {
capabilities = lspcap,

2
scripts/startsway Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env zsh
dbus-run-session sway --unsupported-gpu

17
scripts/swaystatus.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
status=$(
if [ "$(timew get dom.active)" = "1" ]; then
echo -n '+'
else
echo -n '-'
fi
time=$(timew summary | tail -n2 | head -n1 | awk '{ print $1 }' | sed 's/:[0-9]\+$//')
if [ "$time" != "No" ]; then
echo -n "$time"
else
echo -n '0:00'
fi
echo -n ' | '
date +'%a %b %d %H:%M'
)
echo "$status"

13
sway/config Normal file
View file

@ -0,0 +1,13 @@
set $mod Mod4
set $term foot
set $menu fuzzel
set $wobpipe /run/user/1000/wobpipe
exec mkfifo $wobpipe
exec tail -f $wobpipe | wob
exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' before-sleep 'swaylock -f -c 000000'
floating_modifier $mod normal
include /home/rudism/.config/sway/config.d/*

38
sway/config.d/01-theme Normal file
View file

@ -0,0 +1,38 @@
output * bg /home/rudism/skynet/wallpaper/wallpaper.png fill
default_border pixel 2
set $rosewater #f5e0dc
set $flamingo #f2cdcd
set $pink #f5c2e7
set $mauve #cba6f7
set $red #f38ba8
set $maroon #eba0ac
set $peach #fab387
set $yellow #f9e2af
set $green #a6e3a1
set $teal #94e2d5
set $sky #89dceb
set $sapphire #74c7ec
set $blue #89b4fa
set $lavender #b4befe
set $text #cdd6f4
set $subtext1 #bac2de
set $subtext0 #a6adc8
set $overlay2 #9399b2
set $overlay1 #7f849c
set $overlay0 #6c7086
set $surface2 #585b70
set $surface1 #45475a
set $surface0 #313244
set $base #1e1e2e
set $mantle #181825
set $crust #11111b
# target title bg text indicator border
client.focused $lavender $base $text $blue $green
client.focused_inactive $overlay0 $base $text $blue $surface1
client.unfocused $overlay0 $base $text $blue $surface1
client.urgent $peach $base $peach $red $red
client.placeholder $overlay0 $base $text $overlay0 $surface1
client.background $base

View file

@ -0,0 +1,12 @@
set $qterm-id quaketerm
set $qterm $term -a $qterm-id
set $qterm-resize resize set 100ppt 40ppt, move position 0 0
for_window [app_id="$qterm-id"] {
floating enable
$qterm-resize
move to scratchpad
scratchpad show
}
bindsym $mod+grave exec swaymsg '[app_id="$qterm-id"] scratchpad show' || $qterm && sleep .1 && swaymsg '[app_id="$qterm-id"] $qterm-resize'

View file

@ -0,0 +1,48 @@
bindsym $mod+Return exec $term
bindsym $mod+Space exec $menu
bindsym $mod+Backspace kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+x exit
bindsym $mod+o focus left
bindsym $mod+e focus down
bindsym $mod+period focus up
bindsym $mod+u focus right
bindsym $mod+Shift+o move left
bindsym $mod+Shift+e move down
bindsym $mod+Shift+period move up
bindsym $mod+Shift+u move right
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
bindsym $mod+F1 move container to workspace number 1
bindsym $mod+F2 move container to workspace number 2
bindsym $mod+F3 move container to workspace number 3
bindsym $mod+F4 move container to workspace number 4
bindsym $mod+F5 move container to workspace number 5
bindsym $mod+F6 move container to workspace number 6
bindsym $mod+F7 move container to workspace number 7
bindsym $mod+F8 move container to workspace number 8
bindsym $mod+F9 move container to workspace number 9
bindsym $mod+F10 move container to workspace number 10
bindsym $mod+f fullscreen
bindsym XF86AudioRaiseVolume exec pamixer -i 5 && pamixer --get-volume > $wobpipe
bindsym XF86AudioLowerVolume exec pamixer -d 5 && pamixer --get-volume > $wobpipe
bindsym XF86AudioMute exec pamixer --toggle-mute && if [ "$(pamixer --get-mute)" = "true" ]; then echo 0 > $wobpipe; else pamixer --get-volume > $wobpipe; fi
bindsym XF86AudioPlay exec playerctl play-pause
bindsym Print exec grim -g "$(slurp)" - | swappy -f -
bindsym $mod+c exec clipman pick --tool=CUSTOM --tool-args="fuzzel -d"

View file

@ -0,0 +1,3 @@
for_window [app_id="org.speedcrunch.speedcrunch"] floating enable, sticky enable
for_window [app_id="Firefox" title="Picture-in-Picture"] floating enable, sticky enable
for_window [instance="bitwarden"] floating enable, sticky enable

17
sway/config.d/05-swaybar Normal file
View file

@ -0,0 +1,17 @@
bar {
position top
font monospace 13
status_command while ~/skynet/scripts/swaystatus.sh; do sleep 1; done
colors {
background $base
statusline $text
focused_statusline $text
focused_separator $base
focused_workspace $base $green $base
active_workspace $base $blue $base
inactive_workspace $base $base $surface1
urgent_workspace $base $red $base
binding_mode $base $red $base
}
}

5
sway/config.d/06-startup Normal file
View file

@ -0,0 +1,5 @@
exec dbus-update-activation-environment DISPLAY
exec wl-paste -t text --watch clipman store
exec wl-paste -p -t text --watch clipman store --histpath="~/.local/share/clipman-primary.json"
exec pipewire
exec blueman-applet

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -7,6 +7,8 @@ hash -d gql=/home/rudism/mri/cosmic/graphql-server
hash -d as2=/home/rudism/mri/appdat/as2
hash -d oot=/home/rudism/mri/cosmic/nasa/oot/api
hash -d risk=/home/rudism/mri/cosmic/nasa/risk/api
hash -d og=/home/rudism/mri/cosmic/nasa/og
hash -d schema=/home/rudism/mri/cosmic/api-schema
hash -d a=/mnt/agrajag
hash -d b=/mnt/beeblebrox
@ -16,6 +18,14 @@ alias dockerrm='docker stop $(docker ps -aq); docker rm $(docker ps -aq); docker
alias webcamfix='sudo modprobe v4l2loopback devices=1 video_nr=9 card_label=VirtualCam exclusive_caps=1 && ffmpeg -f video4linux2 -framerate 25 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -f v4l2 -pix_fmt yuv420p /dev/video9; sudo rmmod v4l2loopback'
alias syncmusic='rsync -av --size-only --ignore-times --no-perms --no-owner --no-group --delete /mnt/agrajag/music/ /mnt/usb/Music'
alias watchsync='watch -d grep -e Dirty: -e Writeback: /proc/meminfo'
alias localai='COMPOSE_FILE=~/.local/share/local-ai/docker-compose.yaml docker compose up -d --force-recreate'
# llm aliases that use aichat
if command -v aichat >/dev/null; then
alias ask='f() { echo "$@" | aichat };f'
alias define='f() { echo "briefly define $1" | aichat };f'
alias synonym='f() { echo "list some synonyms of $1" | aichat };f'
fi
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/rudism/.local/share/google-cloud-sdk/path.zsh.inc' ]; then . '/home/rudism/.local/share/google-cloud-sdk/path.zsh.inc'; fi

View file

@ -44,6 +44,13 @@ eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
source ~/skynet/zsh/catppuccin_mocha-zsh-syntax-highlighting.zsh
source ~/skynet/zsh/zsh-grc
# env and path
export DOTNET_ROOT=$HOME/dotnet
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORMTHEME=qt6ct
export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH
export PATH=$HOME/.local/bin:$HOME/dotnet:$HOME/.dotnet/tools:$HOME/go/bin:$HOME/.cargo/bin:$HOME/node/node_modules/.bin:$PATH
# keybindings
bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line