diff options
| -rw-r--r-- | alacritty/alacritty.yml | 16 | ||||
| -rwxr-xr-x | drawio/drawio | 10 | ||||
| -rwxr-xr-x | install.sh | 16 | ||||
| -rw-r--r-- | kanshi/config | 18 | ||||
| -rwxr-xr-x | kanshi/dual.sh | 22 | ||||
| -rwxr-xr-x | kanshi/single.sh | 13 | ||||
| -rwxr-xr-x | kanshi/work.sh | 27 | ||||
| -rw-r--r-- | nvim/init.lua | 13 | ||||
| -rw-r--r-- | python/requirements.pip311.txt | 2 | ||||
| -rw-r--r-- | qutebrowser/autoconfig.yml | 2 | ||||
| -rwxr-xr-x | radio/sljeme | 2 | ||||
| -rwxr-xr-x | river/init | 10 | ||||
| -rw-r--r-- | shell/.profile | 3 | ||||
| -rw-r--r-- | sway/config | 16 | ||||
| -rwxr-xr-x | sway/init.sh | 32 | ||||
| -rw-r--r-- | sway/outputs | 27 | ||||
| -rwxr-xr-x | sway/swayidle.sh | 4 | ||||
| -rwxr-xr-x | sway/terminal.sh | 32 | ||||
| -rwxr-xr-x | vm/openbsd/run.sh | 3 | ||||
| -rwxr-xr-x | waybar/reload.sh | 3 | ||||
| -rw-r--r-- | waybar/river.conf | 33 | ||||
| -rw-r--r-- | waybar/style.css | 12 | ||||
| -rw-r--r-- | waybar/sway.conf (renamed from waybar/config) | 0 | ||||
| -rwxr-xr-x | wofi/run.sh | 3 |
24 files changed, 224 insertions, 95 deletions
diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index e7be8b5..3969b7f 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -70,33 +70,33 @@ scrolling: font: # Normal (roman) font face normal: - family: RobotoMono + family: RobotoMono Nerd Font # family: monospace # The `style` can be specified to pick a specific face. - #style: Regular + style: Regular # Bold font face bold: - family: RobotoMono + family: RobotoMono Nerd Font # family: monospace # The `style` can be specified to pick a specific face. - #style: Bold + style: Bold # Italic font face italic: - family: RobotoMono + family: RobotoMono Nerd Font # family: monospace # The `style` can be specified to pick a specific face. - #style: Italic + style: Italic # Point size - size: 12 + size: 14 # Offset is the extra space around each character. `offset.y` can be thought of # as modifying the line spacing, and `offset.x` as modifying the letter spacing. offset: x: 0 - y: 0 + y: 4 # Glyph offset determines the locations of the glyphs within their cells with # the default being at the bottom. Increasing `x` moves the glyph to the right, diff --git a/drawio/drawio b/drawio/drawio new file mode 100755 index 0000000..1c1743f --- /dev/null +++ b/drawio/drawio @@ -0,0 +1,10 @@ +#!/bin/sh + +# TODO edit /usr/lib/draw.io/drawio/src/main/webapp/electron.js +# let argv = process.argv; +# argv = argv.filter(i => !i.startsWith('--enable-features=') && !i.startsWith('--ozone-platform=')); + +exec electron21 \ + $([ -n "$WAYLAND_DISPLAY" ] && \ + echo "--enable-features=UseOzonePlatform --ozone-platform=wayland") \ + /usr/lib/draw.io "$@" @@ -25,7 +25,9 @@ install_python_venv() { BIN_PYTHON=$BIN_DIR/$PYTHON$MAJOR.$MINOR $PYTHON_CMD -m venv --system-site-packages $VENV_DIR - $VENV_PIP -q install -U -r $REQUIREMENTS + if [ -f "$REQUIREMENTS" ]; then + $VENV_PIP -q install -U -r $REQUIREMENTS + fi echo -e "#!/bin/sh\\nexec $VENV_PYTHON \"\$@\"" > $BIN_PYTHON chmod +x $BIN_PYTHON @@ -65,6 +67,14 @@ symlink ~/.dotfiles/claws/claws-mail ~/bin/claws-mail mkdir -p ~/.config/cudatext/settings symlink ~/.dotfiles/cudatext/user.json ~/.config/cudatext/settings/user.json +# drawio +if [ -f /usr/share/applications/drawio.desktop ]; then + symlink ~/.dotfiles/drawio/drawio ~/bin/drawio + cp /usr/share/applications/drawio.desktop ~/.local/share/applications + sed -i "s/^Exec=\\S*/Exec=$(cd; pwd | sed 's/\//\\\//g')\\/bin\\/drawio/g" \ + ~/.local/share/applications/drawio.desktop +fi + # dunst symlink ~/.dotfiles/dunst ~/.config/dunst @@ -74,6 +84,9 @@ symlink ~/.dotfiles/git/.gitconfig ~/.gitconfig # i3 symlink ~/.dotfiles/i3 ~/.config/i3 +# kanshi +symlink ~/.dotfiles/kanshi ~/.config/kanshi + # lein symlink ~/.dotfiles/lein/lein ~/bin/lein @@ -95,6 +108,7 @@ symlink ~/.dotfiles/polybar ~/.config/polybar install_python_venv pypy3 install_python_venv python3.8 install_python_venv python3.9 +install_python_venv python3.11 install_python_venv python3.10 # qt-designer diff --git a/kanshi/config b/kanshi/config new file mode 100644 index 0000000..af9b675 --- /dev/null +++ b/kanshi/config @@ -0,0 +1,18 @@ + +profile single { + output eDP-1 + exec ~/.config/kanshi/single.sh +} + +profile dual { + output eDP-1 + output DP-6 + exec ~/.config/kanshi/dual.sh +} + +profile work { + output eDP-1 + output 'Dell Inc. DELL U2722DE HFMKDH3' # DP-5 + output 'Dell Inc. DELL U2722D 3ZS8XN3' # DP-6 + exec ~/.config/kanshi/work.sh +} diff --git a/kanshi/dual.sh b/kanshi/dual.sh new file mode 100755 index 0000000..c54143e --- /dev/null +++ b/kanshi/dual.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +display1=eDP-1 +display2=$(swaymsg -t get_outputs -r | + jq "map(select(.name != \"$display1\") | .name)[0]" 2> /dev/null | + tr -d "\"") + +swaymsg reload + +swaymsg output $display1 pos 0 0 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg output $display2 pos 1920 0 \ + bg ~/.pictures/bg2.jpg stretch + +for workspace in 1:1 2:2 3:3 4:4; do + swaymsg workspace $workspace output $display1 +done + +for workspace in 5:a 6:s 7:d 8:f; do + swaymsg workspace $workspace output $display2 +done diff --git a/kanshi/single.sh b/kanshi/single.sh new file mode 100755 index 0000000..238c995 --- /dev/null +++ b/kanshi/single.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +display=eDP-1 + +swaymsg reload + +swaymsg output $display pos 0 0 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch + +for workspace in 1:1 2:2 3:3 4:4 5:a 6:s 7:d 8:f; do + swaymsg workspace $workspace output $display +done diff --git a/kanshi/work.sh b/kanshi/work.sh new file mode 100755 index 0000000..083cecb --- /dev/null +++ b/kanshi/work.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +display1=eDP-1 +display2=DP-5 +display3=DP-6 + +swaymsg reload + +swaymsg output $display1 pos 0 1440 \ + res 1920x1080 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg output $display2 pos 0 0 \ + res 2560x1440 \ + bg ~/.pictures/bg1.jpg stretch +swaymsg output $display3 pos 2560 0 \ + res 2560x1440 \ + bg ~/.pictures/bg2.jpg stretch + +swaymsg workspace 1:1 output $display1 + +for workspace in 2:2 3:3 4:4; do + swaymsg workspace $workspace output $display2 +done + +for workspace in 5:a 6:s 7:d 8:f; do + swaymsg workspace $workspace output $display3 +done diff --git a/nvim/init.lua b/nvim/init.lua index 4941fbc..d852fe8 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -334,6 +334,19 @@ require('packer').startup { end } + use { + 'neovim/nvim-lspconfig', + config = function() + local lspconfig = require('lspconfig') + -- lspconfig.jedi_language_server.setup {} + -- lspconfig.bashls.setup {} + -- lspconfig.clangd.setup { + -- cmd = {'clangd', '--header-insertion=never'} + -- } + -- lspconfig.tsserver.setup {} + end + } + if bootstrap_packer then require('packer').sync() end diff --git a/python/requirements.pip311.txt b/python/requirements.pip311.txt new file mode 100644 index 0000000..eb2c599 --- /dev/null +++ b/python/requirements.pip311.txt @@ -0,0 +1,2 @@ +doit +pip diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index 17a4a21..4727ac8 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -33,4 +33,4 @@ settings: right: 5 top: 5 zoom.default: - global: 125% + global: 100% diff --git a/radio/sljeme b/radio/sljeme index e677d65..ab94d35 100755 --- a/radio/sljeme +++ b/radio/sljeme @@ -3,4 +3,4 @@ URL=https://25593.live.streamtheworld.com/SLJEMEAAC.aac # mplayer -ao pulse -quiet $URL | ts '[%Y-%m-%d %H:%M:%S]' -exec ffmpeg -i $URL -f pulse -name ffmpeg "radio sljeme" +exec ffmpeg -v trace -i $URL -f pulse -name ffmpeg "radio sljeme" @@ -9,7 +9,7 @@ riverctl map-pointer normal $mod BTN_LEFT move-view riverctl map-pointer normal $mod BTN_RIGHT resize-view riverctl map normal $mod Return spawn alacritty -riverctl map normal $mod Space spawn 'wofi --show drun --allow-images --allow-markup --gtk-dark' +riverctl map normal $mod Space spawn ~/.dotfiles/wofi/run.sh riverctl map normal $mod+Shift E exit riverctl map normal $mod+Shift Q close @@ -17,8 +17,7 @@ riverctl map normal $mod+Shift Q close riverctl map normal $mod+Shift Return toggle-fullscreen riverctl map normal $mod+Shift Space toggle-float -for i in $(seq 1 9) -do +for i in $(seq 1 9); do tags=$((1 << ($i - 1))) riverctl map normal $mod $i set-focused-tags $tags riverctl map normal $mod+Shift $i set-view-tags $tags @@ -39,9 +38,12 @@ export QT_QPA_PLATFORM=wayland systemctl --user import-environment \ QT_QPA_PLATFORM \ WAYLAND_DISPLAY \ - XDG_SESSION_TYPE + XDG_SESSION_TYPE \ + XDG_CURRENT_DESKTOP dbus-update-activation-environment --systemd --all systemctl --user restart plasma-kactivitymanagerd.service +waybar -c ~/.config/waybar/river.conf & + exec rivertile diff --git a/shell/.profile b/shell/.profile index 1e48f8e..fd3dcfb 100644 --- a/shell/.profile +++ b/shell/.profile @@ -19,12 +19,13 @@ prepend_path () { # export SWEETHOME3D_JAVA3D=1.6 # export WLR_DRM_NO_MODIFIERS=1 export EDITOR=nvim -export LIBGL_ALWAYS_SOFTWARE=1 +# export LIBGL_ALWAYS_SOFTWARE=1 export QT_QPA_PLATFORMTHEME=qt5ct export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket export VISUAL=nvim prepend_path ~/opt/python310/bin +prepend_path ~/opt/river/bin prepend_path ~/bin export PATH diff --git a/sway/config b/sway/config index a8e2ddc..a453178 100644 --- a/sway/config +++ b/sway/config @@ -1,18 +1,26 @@ set $mod Mod4 xwayland disable -bar swaybar_command waybar + seat seat0 xcursor_theme default 32 -exec_always ~/.config/sway/init.sh +input type:touchpad tap enable + +font "pango:Inter Medium 12" +floating_modifier $mod +default_border pixel 4 + +assign [app_id="^tmux_term$"] 9:term + +exec ~/.config/sway/init.sh bindsym { $mod+Return exec alacritty - $mod+space exec wofi --show drun --allow-images --allow-markup --gtk-dark + $mod+space exec ~/.dotfiles/wofi/run.sh $mod+Tab layout toggle $mod+Shift+q kill - $mod+Shift+r restart + $mod+Shift+r reload $mod+Shift+e exit $mod+Shift+space floating toggle $mod+Shift+Return fullscreen toggle diff --git a/sway/init.sh b/sway/init.sh index da76f9c..c01f216 100755 --- a/sway/init.sh +++ b/sway/init.sh @@ -1,31 +1,5 @@ #!/bin/sh -mod=Mod4 -primary=eDP-1 -secondary=$(swaymsg -t get_outputs -r | - jq "map(select(.name != \"$primary\") | .name)[0]" 2> /dev/null | - tr -d "\"") - -swaymsg output $primary pos 0 0 res 1920x1080 bg ~/.pictures/bg1.jpg stretch -[ ! -z "$secondary" ] && swaymsg output $secondary pos 1920 0 bg ~/.pictures/bg2.jpg stretch - -swaymsg workspace 1:1 output $primary -swaymsg workspace 2:2 output $primary -swaymsg workspace 3:3 output $primary -swaymsg workspace 4:4 output $primary -swaymsg workspace 5:a output ${secondary:-$primary} -swaymsg workspace 6:s output ${secondary:-$primary} -swaymsg workspace 7:d output ${secondary:-$primary} -swaymsg workspace 8:f output ${secondary:-$primary} - -swaymsg input type:touchpad tap enable - -swaymsg font "pango:Inter Medium 12" -swaymsg floating_modifier $mod -swaymsg default_border pixel 4 - -swaymsg assign "[app_id=\"^tmux_term\$\"]" 9:term - # export GDK_DPI_SCALE=0.95 gsettings set org.gnome.desktop.interface scaling-factor 1 gsettings set org.gnome.desktop.interface text-scaling-factor 1 @@ -41,3 +15,9 @@ systemctl --user import-environment \ dbus-update-activation-environment --systemd --all systemctl --user restart plasma-kactivitymanagerd.service + +~/.config/sway/swayidle.sh & + +kanshi & + +waybar -c ~/.config/waybar/sway.conf & diff --git a/sway/outputs b/sway/outputs deleted file mode 100644 index 9a26dc2..0000000 --- a/sway/outputs +++ /dev/null @@ -1,27 +0,0 @@ -output "eDP-1" { - mode 1920x1080@59.999Hz - pos 0 0 - transform normal - scale 1.0 - scale_filter nearest - adaptive_sync off - dpms on -} -output "DP-5" { - mode 2560x1440@59.951Hz - pos 1920 0 - transform normal - scale 1.0 - scale_filter nearest - adaptive_sync off - dpms on -} -output "DP-3" { - mode 1920x1080@60.0Hz - pos 4480 0 - transform normal - scale 1.0 - scale_filter nearest - adaptive_sync off - dpms on -} diff --git a/sway/swayidle.sh b/sway/swayidle.sh new file mode 100755 index 0000000..63d40c0 --- /dev/null +++ b/sway/swayidle.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +exec swayidle -w timeout 600 'swaymsg "output * power off"' \ + resume 'swaymsg "output * power on"' diff --git a/sway/terminal.sh b/sway/terminal.sh index ec864ab..2acb4ad 100755 --- a/sway/terminal.sh +++ b/sway/terminal.sh @@ -1,28 +1,26 @@ #!/bin/sh -DESKTOP=term -INSTANCE=tmux_term +term_workspace="9:term" +term_app_id=tmux_term -TERM_WORKSPACE="9:term" -TERM_APP_ID=tmux_term +focused_output=$(swaymsg -t get_outputs -r | + jq -r '.[] | select(.focused == true) | .name') +focused_workspace=$(swaymsg -t get_workspaces -r | + jq -r '.[] | select(.focused == true) | .name') -FOCUSED_OUTPUT=$(swaymsg -t get_outputs -r | - jq '.[] | select(.focused == true) | .name' | - tr -d '"') -FOCUSED_WORKSPACE=$(swaymsg -t get_workspaces -r | - jq '.[] | select(.focused == true) | .name' | - tr -d '"') - -if [ "$FOCUSED_WORKSPACE" = "$TERM_WORKSPACE" ]; then +if [ "$focused_workspace" = "$term_workspace" ]; then swaymsg workspace back_and_forth + else - swaymsg workspace $TERM_WORKSPACE - swaymsg move workspace to $FOCUSED_OUTPUT - swaymsg workspace $TERM_WORKSPACE + swaymsg workspace $term_workspace + swaymsg move workspace to $focused_output + swaymsg workspace $term_workspace if ! (swaymsg -t get_tree -r | - jq -e "recurse(.nodes[]) | select(.app_id == \"$TERM_APP_ID\")" > /dev/null); then - exec alacritty --class $TERM_APP_ID -e \ + jq -e "recurse(.nodes[]) | select(.app_id == \"$term_app_id\")" > /dev/null); then + exec alacritty --class $term_app_id -e \ tmux new-session -A -s default + # exec foot --app-id $term_app_id \ + # tmux new-session -A -s default fi fi diff --git a/vm/openbsd/run.sh b/vm/openbsd/run.sh index ac5d7a9..69cbcca 100755 --- a/vm/openbsd/run.sh +++ b/vm/openbsd/run.sh @@ -5,7 +5,7 @@ set -e cd $(dirname -- "$0") if [ ! -f openbsd.iso ]; then - curl -L -o openbsd.iso https://cdn.openbsd.org/pub/OpenBSD/6.9/i386/cd69.iso + curl -L -o openbsd.iso https://cdn.openbsd.org/pub/OpenBSD/7.3/i386/cd73.iso fi if [ ! -f openbsd.qcow2 ]; then @@ -22,4 +22,5 @@ exec qemu-system-x86_64 \ -netdev user,id=net0 \ -usb \ -device usb-tablet \ + -nographic \ "$@" diff --git a/waybar/reload.sh b/waybar/reload.sh new file mode 100755 index 0000000..78e40e3 --- /dev/null +++ b/waybar/reload.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +killall -SIGUSR2 waybar diff --git a/waybar/river.conf b/waybar/river.conf new file mode 100644 index 0000000..6c8553a --- /dev/null +++ b/waybar/river.conf @@ -0,0 +1,33 @@ +{ + "position": "top", + "modules-left": ["river/tags"], + "modules-center": ["river/window"], + "modules-right": ["network", "pulseaudio", "battery", "clock", "tray"], + + "river/tags" : { + }, + + "network": { + "format-wifi": "直 {essid}", + "format-ethernet": "ﯱ {ifname}", + "format-disconnected": " disconnected", + "on-click": "connman-gtk" + }, + + "pulseaudio": { + "format": "墳 {volume:3}%", + "format-muted": "婢 mute", + "scroll-step": 5, + "on-click": "pavucontrol", + "on-click-right": "pulsemixer --toggle-mute" + }, + + "battery": { + "format": "{icon} {capacity:3}%", + "format-icons": ["", "", ""] + }, + + "clock": { + "format": " {:%Y-%m-%d %H:%M}" + } +} diff --git a/waybar/style.css b/waybar/style.css index 2b56907..3cba0bc 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -9,24 +9,28 @@ window#waybar { padding: 5px; } -#workspaces button { +#workspaces button, +#tags button { padding: 0 10px; background-color: transparent; border-radius: 0; } -#workspaces button:hover { +#workspaces button:hover, +#tags button:hover { box-shadow: inherit; text-shadow: inherit; background: transparent; border: 1px solid rgba(255, 255, 255, 0.5); } -#workspaces button.focused { +#workspaces button.focused, +#tags button.focused { background-color: rgba(255, 255, 255, 0.3); } -#workspaces button.urgent { +#workspaces button.urgent, +#tags button.urgent { background-color: #eb4d4b; } diff --git a/waybar/config b/waybar/sway.conf index 8f0862d..8f0862d 100644 --- a/waybar/config +++ b/waybar/sway.conf diff --git a/wofi/run.sh b/wofi/run.sh new file mode 100755 index 0000000..c6378b5 --- /dev/null +++ b/wofi/run.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec wofi --show drun --allow-images --allow-markup --gtk-dark |
