TomoeMami

Results 17 comments of TomoeMami

`/etc/passwd` is corrupted, just fix it manually. Change `/etc/passwd` from this: ``` root:$6$yo7XggtxSEFO8/Fg$lusug8IlSvSMQdMGwUMpiJ2wkeC4gvSqjHawgDmfzKFhPcTTCn.pyUosKiIjhWBLAKvchaFqyx6MkHt6tIfsj1:19144:::::: bin:!*:19024:::::: …… {username}:$6$b2RkmYxsuRNCF3qr$mY.4Tr6jZYuSPjkhMJnpkkMk8K8X4de0um8rhFzw6B1MCXCAsJ0V.jMg9pCv/acXBCynLy1kDGZPk1hKM9h7M1:19144:0:99999:7::: ``` into this: ``` root:x:0:0:Super User:/root:/bin/bash bin:!*:19024:::::: …… {username}:x:1000:1001::/home/{username}:/bin/bash ```

![](https://user-images.githubusercontent.com/97081809/148016287-9bb1dcbf-37c9-412f-b0ca-6f683e84ff91.png) ![](https://user-images.githubusercontent.com/97081809/148016310-e726e1bb-9aab-41e5-8146-60013a5727e7.png) repost pic

> 我也遇到此問題,改成下列程式即可 > > ``` > loop = asyncio.new_event_loop() > loop.run_until_complete(main()) > ``` ``` Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.8/site-packages/bilibili_api/utils/network.py", line 26, in __clean loop =...

``` Welcome to the Emacs shell ~/.emacs.d $ (length "周二 6 二月 2024") 12 ~/.emacs.d $ (string-bytes "周二 6 二月 2024") 20 ~/.emacs.d $ (length "Tue 6 Feb 2024") 14...

![image](https://github.com/rougier/nano-modeline/assets/16950305/92ea68ef-ea08-4392-915e-ca05df25d168) This is what I get with `string-width`. Maybe `string-width` is a better solution.

![image](https://github.com/rougier/nano-modeline/assets/16950305/bcfa4d51-7031-403c-a2d4-bbe97a287ae4) Set font to `Sarasa Term SC` or other mono font can help align

![image](https://github.com/rougier/nano-modeline/assets/16950305/ba10b378-64e0-42bc-b42d-6532f2e38e7a) Not so good. For me, a Windows Emacs user with CJK characters, it seems that `string-width` > `string-bytes` > `length` > `string-pixel-width`.

![image](https://github.com/rougier/nano-modeline/assets/16950305/53b71c40-ecc5-4dd1-9977-9df4cc07d659)

I set font-size to 32, will this effect `string-pixel-width` ?

Yes, but `string-pixel-width` is affected by the font size. ![image](https://github.com/rougier/nano-modeline/assets/16950305/4614d8e7-5bae-4ccd-ba6b-ba5edfac9144) this is the `set-font` function: ``` (defun set-font (english chinese english-size chinese-size) (set-face-attribute 'default nil :font ;; (format "%s:pixelsize=%d" english...