8 Commits

Author SHA1 Message Date
0b3ce90e74 sxmo_rotate: don't restart lisgd on sway
AFAICT we restart lisgd because it learns the orientation via its
`-o <orientation>` CLI argument. but we only pass that flag on dwm/x11,
not sway. restarting it on sway is wasteful, and potentially racy (i'm
able to get multiple lisgd's running just by enabling autorotate and
flipping the phone rapidly), so don't do that.
2023-07-16 12:45:54 +00:00
bf00570117 sxmo_wmmenu: respect SXMO_WORKSPACE_WRAPPING
sxmo_wm.sh uses the `SXMO_WORKSPACE_WRAPPING` variable to control
relative movements. for example, set this to "5" and then the "Next
Workspace" option in the switch menu will cycle WS 1 -> 2 ... -> 5 -> 1.
same for one- and two-finger left/right swipe to switch/move workspaces.

however, absolute movements (via the move menu) only allowed moving to
WS 1-4. a user with non-default `SXMO_WORKSPACE_WRAPPING` could move a
window from WS 5 to WS 4 with this menu, but not from WS 4 back to WS 5.
this patch brings consistency by using `SXMO_WORKSPACE_WRAPPING`
anywhere we would otherwise assume the number of possible workspaces.
2023-07-15 21:36:58 +00:00
0cffdeafab sxmo_hook_rotate.sh: update docs for CLI args
see `swayrotinvert()` in sxmo_rotate.sh, which calls this hook with "invert"
2023-07-12 00:30:26 +00:00
e2d0cedd21 sxmo_hook_apps: add a few 2023-07-09 22:13:14 +00:00
021462a4a5 sxmo_autorotate: allow all four orientations 2023-07-09 07:25:31 +00:00
6027263770 sxmo_swayinitconf: fix xkb paths
the xkb files were moved in 6a529751 but not all references were updated
2023-07-09 07:25:31 +00:00
2e8504c5e0 NOT FOR UPSTREAM: sxmo_hook_start: don't start audio daemons
these are managed by the OS
2023-07-09 07:25:31 +00:00
c2cf64e7ca NOT FOR UPSTREAM: remove explicit busybox calls 2023-07-09 07:25:31 +00:00
8 changed files with 27 additions and 29 deletions

View File

@@ -31,6 +31,7 @@ write_line_app audacity "$icon_mic Audacity" "audacity"
write_line_app gnome-calculator "$icon_clc Calculator" "gnome-calculator"
write_line_app calcurse "$icon_clk Calcurse" "sxmo_terminal.sh calcurse"
write_line_app cmus "$icon_mus Cmus" "sxmo_terminal.sh cmus"
write_line_app cozy "$icon_mus Cozy" "com.github.geigi.cozy"
write_line_app dino "$icon_msg Dino" "GDK_SCALE=1 dino"
write_line_app dolphin "$icon_dir Dolphin" "dolphin"
write_line_app emacs "$icon_edt Emacs (Terminal)" "sxmo_terminal.sh emacs -nw"
@@ -54,19 +55,25 @@ write_line_app giara "$icon_red Giara" "giara"
write_line_app gnome-chess "$icon_chs Gnome Chess" "gnome-chess"
write_line_app gomuks "$icon_msg Gomuks" "sxmo_terminal.sh gomuks"
write_line_app gpodder "$icon_rss gPodder" "gpodder"
write_line_app gthumb "$icon_img gThumb" "gthumb"
write_line_app gucharmap "$icon_inf Gucharmap" "gucharmap"
write_line_app hexchat "$icon_msg Hexchat" "hexchat"
write_line_app htop "$icon_cfg Htop" "sxmo_terminal.sh htop"
write_line_app irssi "$icon_msg Irssi" "sxmo_terminal.sh irssi"
write_line_app ii "$icon_msg Ii" "sxmo_terminal.sh ii"
write_line_app ipython "$icon_trm IPython" "sxmo_terminal.sh ipython"
write_line_app jellyfinmediaplayer "$icon_mvi Jellyfin" "jellyfinmediaplayer"
write_line_app kasts "$icon_rss Kasts" "kasts"
write_line_app kmail "$icon_eml KMail" "kmail"
write_line_app komikku "$icon_bok Komikku" "komikku"
write_line_app kontact "$icon_msg Kontact" "kontact"
write_line_app konversation "$icon_msg Konversation" "konversation"
write_line_app koreader "$icon_bok KOReader" "koreader"
write_line_app kwrite "$icon_edt Kwrite" "kwrite"
write_line_app lagrange "$icon_glb Lagrange" "lagrange"
write_line_app lemoa "$icon_grp Lemoa" "lemoa"
write_line_app lf "$icon_dir Lf" "sxmo_terminal.sh lf"
write_line_app librewolf "$icon_glb Librewolf" "librewolf"
write_line_app lollypop "$icon_mus Lollypop" "lollypop"
write_line_app luakit "$icon_glb Luakit" "luakit"
write_line_app marble "$icon_map Marble" "marble"
@@ -97,6 +104,7 @@ write_line_app senpai "$icon_msg Senpai" "sxmo_terminal.sh senpai"
write_line_app sic "$icon_msg Sic" "sxmo_terminal.sh sic"
([ "$SXMO_WM" = dwm ] && command -v st >/dev/null) && \
write_line "$icon_trm St" "st -e $SHELL"
write_line_app sublime-music "$icon_mus Sublime Music" "sublime-music"
write_line_app surf "$icon_glb Surf" "surf"
write_line_app syncthing "$icon_rld Syncthing" "syncthing"
write_line_app telegram-desktop "$icon_tgm Telegram" "telegram-desktop"
@@ -104,7 +112,9 @@ write_line_app termite "$icon_trm Termite" "termite -e $SHELL"
write_line_app thunar "$icon_dir Thunar" "sxmo_terminal.sh thunar"
write_line_app thunderbird "$icon_eml Thunderbird" "thunderbird"
write_line_app com.github.bleakgrey.tootle "$icon_msg Tootle" "com.github.bleakgrey.tootle"
write_line_app re.sonny.Tangram "$icon_glb Tangram" "re.sonny.Tangram"
write_line_app totem "$icon_mvi Totem" "totem"
write_line_app dev.geopjr.Tuba "$icon_grp Tuba" "dev.geopjr.Tuba"
write_line_app tuir "$icon_red Tuir" "sxmo_terminal.sh tuir"
write_line_app tut "$icon_msg Tut" "sxmo_terminal.sh tut"
write_line_app waydroid "$icon_and Waydroid" "waydroid show-full-ui"

View File

@@ -8,4 +8,4 @@
# The following parameters are provided:
# $1 = the new orientation
# possible values are "normal", "left" and "right"
# possible values are "normal", "invert", "left" and "right"

View File

@@ -16,16 +16,6 @@ while ! superctl status > /dev/null 2>&1; do
sleep 0.5
done
# Load our sound daemons
if [ "$(command -v pulseaudio)" ]; then
superctl start pulseaudio
elif [ "$(command -v pipewire)" ]; then
# pipewire-pulse will start pipewire
superctl start pipewire-pulse
superctl start wireplumber
fi
# Periodically update some status bar components
sxmo_hook_statusbar.sh all
sxmo_daemons.sh start statusbar_periodics sxmo_run_aligned.sh 60 \

View File

@@ -18,6 +18,8 @@ while true; do
x_raw="$(cat "$FILE_X")"
if [ "$x_raw" -ge "$RIGHT_SIDE_UP" ] && sxmo_rotate.sh isrotated ; then
sxmo_rotate.sh rotnormal
elif [ "$x_raw" -le "$UPSIDE_DOWN" ] && [ "$(sxmo_rotate.sh isrotated)" != "invert" ]; then
sxmo_rotate.sh rotinvert
elif [ "$y_raw" -le "$UPSIDE_DOWN" ] && [ "$(sxmo_rotate.sh isrotated)" != "right" ]; then
sxmo_rotate.sh rotright
elif [ "$y_raw" -ge "$RIGHT_SIDE_UP" ] && [ "$(sxmo_rotate.sh isrotated)" != "left" ]; then

View File

@@ -52,7 +52,6 @@ xorgrotinvert() {
swayrotinvert() {
swaymsg -- output "-" transform 180
superctl restart sxmo_hook_lisgd
sxmo_hook_rotate.sh invert
exit 0
}
@@ -68,7 +67,6 @@ xorgrotnormal() {
swayrotnormal() {
swaymsg -- output "-" transform 0
superctl restart sxmo_hook_lisgd
sxmo_hook_rotate.sh normal
exit 0
}
@@ -84,7 +82,6 @@ xorgrotright() {
swayrotright() {
swaymsg -- output "-" transform 90
superctl restart sxmo_hook_lisgd
sxmo_hook_rotate.sh right
exit 0
}
@@ -100,7 +97,6 @@ xorgrotleft() {
swayrotleft() {
swaymsg -- output "-" transform 270
superctl restart sxmo_hook_lisgd
sxmo_hook_rotate.sh left
exit 0
}

View File

@@ -60,13 +60,13 @@ focused_name="$(
swaymsg -- input type:touch map_to_output "$focused_name"
swaymsg -- input type:tablet_tool map_to_output "$focused_name"
swaymsg -- input "$pwr" xkb_file "$(xdg_data_path sxmo/sway/xkb_mobile_normal_buttons)"
swaymsg -- input "$pwr" xkb_file "$(xdg_data_path sxmo/xkb/xkb_mobile_normal_buttons)"
if ! [ "$vols" = "none" ]; then
for vol in $vols; do
swaymsg -- input "$vol" repeat_delay 200
swaymsg -- input "$vol" repeat_rate 15
swaymsg -- input "$vol" xkb_file "$(xdg_data_path sxmo/sway/xkb_mobile_normal_buttons)"
swaymsg -- input "$vol" xkb_file "$(xdg_data_path sxmo/xkb/xkb_mobile_normal_buttons)"
done
fi

View File

@@ -12,6 +12,12 @@
set -e
_movetowssubmenu() {
for ws in $(seq "${SXMO_WORKSPACE_WRAPPING:-4}"); do
printf "%s Move to WS %s\n" "$ws" "$ws"
done
}
# A menu which allows to move windows or toggle floating.
swaymovemenu() {
CHOICES="$(cat <<EOF
@@ -22,10 +28,7 @@ $icon_arl Move Left
$icon_arr Move Right
$icon_wn2 Toggle Floating
$icon_ac1 Move Scratchpad
1 Move to WS 1
2 Move to WS 2
3 Move to WS 3
4 Move to WS 4
$(_movetowssubmenu)
EOF
)"
@@ -125,10 +128,7 @@ dwmwmmenu() {
CHOICES="$(
cat <<EOF
$icon_cls Close Menu
1 Move to WS 1
2 Move to WS 2
3 Move to WS 3
4 Move to WS 4
$(_movetowssubmenu)
$icon_rld Shift stack
$icon_grd Toggle Layout
EOF

View File

@@ -8,7 +8,7 @@ case "$1" in
exit
esac
case "$(busybox head -n1 "$1")" in
case "$(head -n1 "$1")" in
"#"*)
comment="#"
;;
@@ -23,7 +23,7 @@ case "$(busybox head -n1 "$1")" in
;;
esac
busybox md5sum "$1" | \
busybox cut -d" " -f1 | \
busybox xargs -I{} busybox sed -i "2i$comment configversion: {}" \
md5sum "$1" | \
cut -d" " -f1 | \
xargs -I{} sed -i "2i$comment configversion: {}" \
"$1"