Start sway on startup, fix command-list launching apps

This commit is contained in:
Karol Krzosa
2026-06-17 22:33:39 +02:00
parent bd9506a9be
commit a67e7b0aa1
4 changed files with 13 additions and 9 deletions

View File

@@ -4,6 +4,10 @@
set -g extended-keys on
set -g extended-keys-format csi-u
# Index from 1
set -g base-index 1
setw -g pane-base-index 1
# Use 256-colour tmux terminfo and advertise truecolour support to apps.
set -g default-terminal "tmux-256color"
set -as terminal-features ",*:RGB"
@@ -20,12 +24,6 @@ bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Optional no-prefix pane navigation with Alt+hjkl
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R
# Mouse support: scroll with the wheel, resize/select panes, and make mouse
# selections pane-aware instead of selecting across the whole terminal window.
set-option -g mouse on

View File

@@ -30,3 +30,9 @@ fi
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
export WLR_NO_HARDWARE_CURSORS=1
exec sway --unsupported-gpu
fi

View File

@@ -48,8 +48,7 @@ for appdir in appsdir:
if _nodisplay == "true" or _hidden == "true":
continue
vals[_name] = {"kind": "app", "exec": _exec, "path": path}
vals[_name] = {"kind": "app", "exec": _exec, "path": path, "name": appfile[:-8]}
bindir = f"{home}/bin"
@@ -97,6 +96,6 @@ val = vals[choice]
if val["kind"] == "bin":
subprocess.run([val["path"]])
elif val["kind"] == "app":
subprocess.run(["gtk-launch", choice])
subprocess.run(["gtk-launch", val["name"]])
elif val["kind"] == "url":
subprocess.run(["xdg-open", val["url"]])

View File

@@ -15,6 +15,7 @@
# - [x] bookmarks
#
# - [ ] Kakoune setup
# - [ ] Ideas for Chinese learning integration
#
# Solutions in search for problems:
# - [ ] tmux automation