archcraft-os / archcraft

// Source : ISO
https://archcraft.io
GNU General Public License v3.0
3.01k stars 103 forks source link

Terminal Broken (Mod+x won't start foot) (Sway Edition) #373

Closed skunkfox closed 1 year ago

skunkfox commented 1 year ago

Basically what it says on the tin. I don't remember the last time I logged into my machine and noticed that I can't open up the terminal with mod+enter I updated all my packages (yay -Syyu) and I still can't. I can launch foot directly from the menu (mod+d) as well as alacritty. I noticed I have the following in my sway config:

##-- Variables ---------------------------
set $term ~/.config/sway/scripts/terminal
set $menu ~/.config/sway/scripts/menu
set $powermenu ~/.config/sway/scripts/powermenu
set $volume ~/.config/sway/scripts/volume
set $backlight ~/.config/sway/scripts/brightness
set $screenshot ~/.config/sway/scripts/screenshot
set $lockscreen ~/.config/sway/scripts/lockscreen
set $wlogout ~/.config/sway/scripts/wlogout
set $colorpicker ~/.config/sway/scripts/colorpicker
set $files thunar
set $editor geany
set $browser firefox

##-- Startup Programs --------------------
exec_always ~/.config/sway/scripts/startup
#exec_always ~/.config/sway/scripts/clamshell

##-- Keybindings -------------------------

# -- Terminal --
bindsym $mod+Return             exec $term
bindsym $mod+Shift+Return       exec $term -f
bindsym $mod+$alt+Return        exec $term -s
bindsym $mod+t                  exec $term -F

None of the shortcuts under the 'Terminal' section function. If I inspect ~/.config/sway/scripts/terminal I find:

#!/usr/bin/env bash

## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
##
## launch terminal with alt config
CONFIG="$HOME/.config/sway/foot/foot.ini"

if [ "$1" == "-f" ]; then
    foot --app-id='foot-float' --config="$CONFIG"
elif [ "$1" == "-F" ]; then
    foot --fullscreen --app-id='foot-full' --config="$CONFIG"
elif [ "$1" == "-s" ]; then
    foot --app-id='foot-float' --config="$CONFIG" \
    --window-size-pixels=$(slurp -b 1B1F28CC -c E06B74ff -s C778DD0D -w 2 -f "%wx%h")
else
    foot --config="$CONFIG"
fi

And If I launch the script directly from Alacritty I see:

   ~ .config/sway/scripts/terminal
 err: config.c:409: /home/fox/.config/sway/foot/fonts.ini:15: [main].dpi-aware: auto: invalid boolean value
warn: wayland.c:1493: fractional scaling not available
warn: wayland.c:1501: no server-side cursors available, falling back to client-side cursors
 err: wayland.c:1381: failed to read events from the Wayland socket: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1945: failed to flush wayland socket: Broken pipe

Any ideas? Google has been non-helpful so far. Let me know if there is anything else I can provide.

skunkfox commented 1 year ago

I just tried this on a different laptop, I upgraded my other laptop with yay and the same thing happened.

dnkl commented 1 year ago

err: config.c:409: /home/fox/.config/sway/foot/fonts.ini:15: [main].dpi-aware: auto: invalid boolean value

From the changelog:

I.e, if the configuration explicitly sets dpi-aware=auto (instead of relying on its default value), foot will no longer launch. Change it to either yes or no, depending on what you want.

skunkfox commented 1 year ago

Thanks for the response. I actually did previously try removing the dpi-aware line but didn't notice it made a difference. After your reply I tried both options but I'm still seeing the same issue:

   sway cat foot/fonts.ini
## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
##
## --------------------------------------------------

font=JetBrainsMono Nerd Font:size=8
#font-bold=JetBrainsMono Nerd Font:size=8
#font-italic=JetBrainsMono Nerd Font:size=8
#font-bold-italic=JetBrainsMono Nerd Font:size=8
#line-height=10
#letter-spacing=0
#horizontal-letter-offset=0
#vertical-letter-offset=0
#underline-offset=0
#box-drawings-uses-font-glyphs=no
dpi-aware=no
   sway ./scripts/terminal
warn: wayland.c:1493: fractional scaling not available
warn: wayland.c:1501: no server-side cursors available, falling back to client-side cursors
 err: wayland.c:1381: failed to read events from the Wayland socket: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1945: failed to flush wayland socket: Broken pipe
   sway cat foot/fonts.ini
## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
##
## --------------------------------------------------

font=JetBrainsMono Nerd Font:size=8
#font-bold=JetBrainsMono Nerd Font:size=8
#font-italic=JetBrainsMono Nerd Font:size=8
#font-bold-italic=JetBrainsMono Nerd Font:size=8
#line-height=10
#letter-spacing=0
#horizontal-letter-offset=0
#vertical-letter-offset=0
#underline-offset=0
#box-drawings-uses-font-glyphs=no
dpi-aware=yes
   sway ./scripts/terminal
warn: wayland.c:1493: fractional scaling not available
warn: wayland.c:1501: no server-side cursors available, falling back to client-side cursors
 err: wayland.c:1381: failed to read events from the Wayland socket: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1980: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:1945: failed to flush wayland socket: Broken pipe
skunkfox commented 1 year ago

I am pleased to say that after a recent update this issue no longer occurs.