weixin_39722917
2020-11-28 11:23 阅读 4

tty login

While i love being able to use vim-fu to jump around the terminal, this is sadly quite annoying.

I use startx to open my x enviroment, but post-login in the tty, it is messed up. Theres an issue with vimbed indicated in red at the bottom, and the first letter i type is the only letter any of my keys will produce. When i manage to startx by finding it in my history of previously run commands everything runs fine again.

I noticed that my zsh plugins DO work in the tty (double pressing ESC gives me a sudo infront of my text), and this does not work in urxvt with athame installed. I tried putting

"function zle-line-init(){ echoti rmkx } zle -N zle-line-init " into my .zshrc, to see if that did anything, but it said something about rmkx not being found in the tty.

tl;dr tty is broken with athame and zsh

该提问来源于开源项目:ardagnir/athame

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

7条回答 默认 最新

  • weixin_39722917 weixin_39722917 2020-11-28 11:23

    "Why doesn't Athame work on my hipster terminal? It has this supercool terminfo that you've probably never heard of.

    I hardcoded all the terminal codes. Sorry, I was lazy. Athame only works on xterm-like terminals."

    I guess this answers that.

    Any chance this could be added? I wouldn't call it that hipster as everyone has it :P..

    点赞 评论 复制链接分享
  • weixin_39632982 weixin_39632982 2020-11-28 11:23

    I would like to second this issue. I like to play with my desktop environment quite a lot, and such I rely on the tty to fix stuff quite a lot. Having access to the full athame there would be great.

    点赞 评论 复制链接分享
  • weixin_39632982 weixin_39632982 2020-11-28 11:23

    I'd also like to add for other people using the ttys, the workaround I currently use is to use a plain bash instead of the zsh I usually have in order to have a minimally functioning shell at least. I put this in my zprofile:

    
    [[ -z $DISPLAY ]] && bash
    
    点赞 评论 复制链接分享
  • weixin_39802132 weixin_39802132 2020-11-28 11:23

    There are two issues here: 1) Athame doesn't work without X. This is a vim clientserver constraint. 2) When Athame fails in Zsh, it is stopping you from typing text. This should be fixed now.

    There is still a 1 second delay for athame to realize it failed. Eventually, I'll have it check the display env and break early rather than waiting a second if there's no X running.

    点赞 评论 复制链接分享
  • weixin_39722917 weixin_39722917 2020-11-28 11:23

    That sounds great! I'd be all cool with just having Athame disabled in the TTY.

    Not sure if i should close the issue or not, guess you can, or i'll do it when the 1 second delay is removed.

    Awesome with the fast responses! Looking forward to play with this. I assume not, but is there any chance there is an existing solution for having this work with the Powerline ZSH theme :P? (and where am i even supposed to ask this? It isn't an issue)

    点赞 评论 复制链接分享
  • weixin_39802132 weixin_39802132 2020-11-28 11:23

    Thanks, I'll close this once the 1 second delay is removed.

    Feature requests count as issues. Just create a seperate one for the Powerline theme.

    点赞 评论 复制链接分享
  • weixin_39802132 weixin_39802132 2020-11-28 11:23

    Athame now shortcircuits the one-second timeout if it detects that DISPLAY is missing.

    点赞 评论 复制链接分享

相关推荐