TA的每日心情 | 开心 2021-4-11 18:44 |
---|
签到天数: 88 天 [LV.6]常住居民II
|

楼主 |
发表于 2019-10-21 20:55:38
|
显示全部楼层
本帖最后由 我突然想拉屎 于 2019-12-13 09:13 编辑 " Q* n3 t: K# F
0 w* X9 k7 K; H5 K( J. w" `; E
关于美化。也就是修复字体问题, ctrl->command拷贝。! A% z7 S9 R' x# A5 |) ]
大部分可以跳过。我只执行了1,3,10, ; n% C* B8 Z5 Z! V% S
我一开始用8,9,现在不用了,改用11
$ N# a+ ~1 v0 s% E1 H( M: n" r5 G5 O1 g2 e' L3 |0 C2 b7 P
1。$ h o: s, R7 \1 K
打开terminal 安装winetricks: [' c9 W5 Y3 t6 |+ g+ k- ~8 M
3。安装文泉驿中文字体 (更多字体请看6)
( j5 a& x- V; D5 yfakechinese是文泉驿的包装,亲测此命令已经包含了winetricks wenquanyi0 Q1 D( E. V% z2 d
: o6 \- T) S3 W. ]& Z& q
4。系统设置
0 z" T0 |: H# `& V( W将 DirectDrawRenderer 设置为 opengl , 据说会高效一些, 还有开启字体平滑 (非必要,可跳过)
; S k! e& n+ v1 p }' P- winetricks ddr=opengl0 E5 m6 a1 V; Z* r6 s8 P9 h
- winetricks fontsmooth=rgb
复制代码 2 p9 v' k9 p* b
5。把macos系统字体tff otf ttc全部创建软链接到wine里(非必要,可跳过)- cd ~/.wine/drive_c/windows/Fonts && for i in /Library/Fonts/*.{ttf,otf,ttc}; do ln -s "$i" ; done
复制代码 默认 〜/.wine/drive_c/windows/Fonts是空文件夹, M" n+ A- v, C& I
- V8 @# ^$ T3 i! h9 G+ Y X! S
6。查看或者安装更多的字体 (非必要,可跳过)5 ^& M' ]2 f" K U) q$ t3 m& j) h0 T
- brew install zenity
/ S( h" h9 }. e8 U9 g% S" N - winetricks --gui
复制代码 选择install fonts
& N& t) j+ W0 j$ K; Q
/ v' n3 f; c/ F7。调整windows系统级别的字体大小(比如窗口菜单字体大小) 非必要 可跳过
K" n8 X- t9 D7 m7 w8 i! P调整DPI。默认是96,菜单字体非常小,根据个人屏幕分辨率和喜好调整。$ w* v; ], Z5 E
7 [8 c% m! n) m. X7 W ~4 \: @8。windows默认copy&paste是ctrl, macos默认是command, 这里通过修改windows注册表进行整合 (非必要,可跳过)+ S! B5 l3 X6 T$ o
- REGEDIT41 g/ }2 {7 }0 m0 e/ n/ q. x
" u6 a' p# S+ ?' G$ O- [HKEY_CURRENT_USER\Software\Wine\Mac Driver]) N1 d+ P B; V
- "LeftCommandIsCtrl"="Y"
3 m5 H6 n: o" Q4 h5 F% I - "RightCommandIsCtrl"="Y"
复制代码 将上述文件保存为任意名,比如 ctrl.reg
, S" I. I p% M打开wineHQ应用,在弹出的terminal中输入- [0 i" y: n" z- D* _
, X3 X/ F, Y, z1 _& {
所以现在在 goldendict里面,
/ R7 j# M" L- ^command + c就是copy, - M7 l1 W6 |! o( r& Q; e7 [
command + shift +c 就是 copy as text,
3 V# B' @# g4 J( y( O- |command +v 就是paste
( ]2 [/ g5 M% r4 `6 T3 \+ C6 ^: x. d
6 w' y. W) ~: {+ F
7 y# |/ v: w& ^0 U1 Z3 z0 P' B9. 添加option键,在goldendict应用内变成windows的alt键。操作如8 (非必要,可跳过)' P5 e* e9 q" u% \" m
- REGEDIT4$ }4 K% S/ X) r Z' \: e
' ~1 J+ m) l( n; M- [HKEY_CURRENT_USER\Software\Wine\Mac Driver]% n& P, P1 L1 u5 B" G& I
- "LeftOptionIsAlt"="Y"
- h: ]! J6 T! \6 e& y - "RightOptionIsAlt"="Y"
复制代码 $ B+ a+ k" Q. x5 c1 S" x; y
\+ V7 q' ]$ C6 @
10. 强制全局,默认字体为微软雅黑,默认字体大小为36px, UI字体为18px (非必要,可跳过) R A9 n! x$ {. T: K
创建一个文件 article-style.css
s. j1 d J( |1 k! n0 H, W4 i- * {
[% a3 m' w* \# S+ f9 N - font-family: Arial, "Microsoft Yahei" !important;: V+ P+ D, e. e* |
- font-size: 36px !important;
1 K T! {2 v# M0 n - /* background: red !important; */
1 Q1 u; ~! t% G4 P& j. y - }
复制代码 ! F( R) V, {$ T* F2 J
: x Y/ d* W/ m9 X, U
创建一个文件 qt-style.css: q5 B% q& d2 y+ {% k @. n
- * {0 i1 h2 s. Q9 R6 I1 r8 n% k
- font-family: Arial, "Microsoft Yahei" !important;
4 p) i7 J& g2 C9 z$ s - font-size: 18px !important;1 W* ?" {& V* B$ g. J
- }
复制代码
+ r8 N! A0 c/ j& c% c( C& _( y
* G/ k9 o( u2 v o0 t我用的是64位绿色版,默认路径为
& n# v4 f( p$ h$ `〜/.wine/drive_c/users/用户名/Application Data/GoldenDict
8 w4 T/ B6 }6 P! o: v0 V- o将上面 qt-style.css 和 article-style.css 保存于上述路径
0 E& h+ \) |' w+ E& n2 }; l$ B# l' m* s8 ]5 l$ t; {0 Y! X
你的可能不同。可以在GoldenDict -> help -> Configuration Folder看看默认路径,将文件保存于默认路径。
}; v) [2 r* b I/ E n; ^; c4 x$ `3 H
/ L) j! S/ l8 ^; p8 G. s
css中的!important 是强制使用这条命令,覆盖所有字典,相当于全局。6 S( P3 D8 I* H5 ~% t8 u1 C2 v% ~
可以把36px 18px 改成自己喜欢的默认字体大小
- K/ [+ K) a0 T+ \/* */ 为注释,可以去掉
0 _# G- O' j4 J" m
5 j, j. s* P7 u如不明白第10步,请看! o; s' i1 y! t* N4 x% D
https://www.pdawiki.com/forum/thread-23016-1-1.html0 T' S/ _6 R( b# _5 r- s
+ z0 h; c @% C' Z; t/ S
11。 用karabiner-elements来交换command和ctrl (可跳过)
3 y. ^! A, s+ y2 D+ w+ I4 U7 _因为windows的 ctrl - c 为复制,而macos复制为 command - c, 可以在wine应用中单独交换,而其他应用保持正常激活的组合cmd+c, cmd+v, cmd+f, cmd+shift+f- {
1 h9 g" ]. l! H0 ?$ y8 j; | - "title": "cmd cvfF -> ctrl cvfF in wine",1 L$ k P8 [2 c" z( L
- "rules": [
% s( Z, w( G6 T - {
5 ~/ ?4 I2 W$ f3 }, F - "description": "in wine, command cv -> ctrl cv",% X% ]2 }) V6 d. I/ c
- "manipulators": [! q0 W! ~, O# U. |" @
- {
3 W! B- C2 D1 w1 t; c1 ` - "type": "basic",
+ J9 g) r' o% z) ?9 `1 ?/ k3 b2 y - "from": {
% }! ~/ P6 A2 i6 k - "key_code": "c",
& Y. d" w5 V$ q# W - "modifiers": {
9 R( M. C* o, V% Y! |! s - "mandatory": [
8 M* A o' v9 w - "left_command"
* j" W K! k( } T# C w - ],
4 t+ F9 Z4 i: ^) Z" H - "optional": [
- M4 L2 ?' o. ? - "caps_lock". @, C. ^* X( }! m8 i5 g! L
- ]
7 }0 a+ c: s% M, U4 N, h7 k+ ]& W5 T - }: ~) \; r8 q' a
- },
6 F) p1 o$ r. @3 |9 ?0 E: { t - "to": [- L1 I7 D0 a% D" a( V
- {# U6 t# F1 L9 a3 f: o
- "key_code": "c",4 t8 h; j, g4 q5 B, t( _
- "modifiers": [2 q0 l' H: B+ S! ^! j
- "left_control"
+ y- v4 c. I1 u* \" a3 c+ H; O - ]2 M+ w$ H" t/ P! P. E4 @
- }
8 d/ R# [. ~6 W+ y0 r7 t6 k - ],. B( {8 |% S v( I- w" l1 r
- "conditions": [* D9 q1 _( I" i; c8 ~$ A& e
- {
4 C# S6 \+ y& Y - "type": "frontmost_application_if",1 m, [3 x, l3 d4 ~
- "bundle_identifiers": [) r2 O, ?; q5 e) }4 o6 c( N' V
- "^$"
# k: U4 _" q9 X$ ]: X - ],# R6 k, q: m% a5 ]( }- L4 l# H
- "file_paths": [
& ]0 L6 L; Y$ W" B- q' H8 H8 i - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",; u8 C7 D) G, q
- "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"5 }/ C8 _6 `! S+ V$ m8 v- N
- ]) K" M+ M! D' I( ?) l: q* |
- }2 \2 \4 G( f0 |# i5 M) P) }8 e
- ] Y& J* ]( T. X9 [6 o: ^( r: D
- },' K) Q+ w2 v: c$ S) F" S( x
- {
) v& P5 ^. G3 ^) _; D& S - "type": "basic",
( G# Q+ R! A; G" [* R - "from": {
3 V3 T7 u7 l* A9 P& |' h - "key_code": "v",
8 l$ j' E8 ] c4 z& `" P - "modifiers": {
$ o' k, U2 i5 x3 [$ K, l8 a( d$ e - "mandatory": [0 j4 P V+ q3 }/ x# S" ]- C5 \
- "left_command"
. p& i: B, I: E7 B' ^1 {: O - ],
/ i5 s4 g; B/ [7 b - "optional": [) V( }1 j, u5 b+ F8 G
- "caps_lock": v! B+ Y& z& h3 \9 L$ L
- ]
1 x. D. W9 m, Q, r6 e - }$ `* \, G( k) b2 o. O
- },
7 H" k$ A; W# Q8 ` - "to": [
. a5 z, t6 a$ G. Q7 K - {
- X) t9 q* I4 P. ] - "key_code": "v",
7 K- c% X. V' _7 { - "modifiers": [
2 a8 E7 [' D' \. B* ?8 Z& ~ - "left_control"& z. R* S8 \0 p
- ]
. w7 _( ]* O2 M0 g5 W - }9 P* U1 J8 l( y! ?# P! @
- ],8 C$ f1 \# G+ ?$ G- x
- "conditions": [
6 Z( E# N0 t! w: D }8 g7 ? - {
" _. M1 r9 Y; I5 |) T - "type": "frontmost_application_if",7 {( D$ z; e4 w5 V
- "bundle_identifiers": [* q0 G9 j* w7 l& I3 ]! a
- "^$"
$ `- z6 ~3 S, ]* u: P; X( d - ], A. B9 _) c3 Y4 P; M2 h1 |$ f
- "file_paths": [
" i* U/ m' Z1 F4 a8 Y( P8 w1 W* t - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",
3 n: c& \. {1 O8 A3 b - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"1 V" Y3 O* K8 Q- p/ M% G1 \
- ]4 \% ~; G) |% V- g1 V- Q. Y0 V
- }
0 t0 a6 _$ s) \6 ]+ p - ]
8 k( N) Z/ S4 g8 B - }
; ?& \8 I) F4 }3 T - ]& _4 w: ~1 q1 m. u% l
- },; M b( x, y2 v
- {$ Y, B" g5 D2 u' W4 w* P5 k4 @9 }& c8 R; p- g
- "description": "in wine, command fF -> ctrl fF",
9 W+ e/ d, D0 W6 | - "manipulators": [/ E2 j5 j2 H, q, `
- {
7 N3 f1 |: S& @ Y - "type": "basic",
6 r+ n1 M3 x3 Z, J! {/ M& ? - "from": {
) r0 m$ _* `& O6 c. T/ f W! `. ^5 h - "key_code": "f",
! d$ D) ]3 a0 }6 k - "modifiers": {
- t8 t1 Y- b2 U i - "mandatory": [
" Z8 u8 K+ h, b6 ]5 k - "left_command"- N6 S6 u9 k _7 Q: I* m
- ],
# E! f: b, B" @; x$ x3 m$ z - "optional": [) Z. y& {9 ~0 k; ~3 q6 d4 R% y( l; X
- "caps_lock"; m7 Q3 Z9 G9 ^2 f3 f5 }
- ]- ]/ G" f, m6 F; b) q- V6 `& T7 R
- }
7 x" n) Y( ]; Y/ a - },
0 e n- B; _4 ?; q3 `( E - "to": [ w+ h) ~* X+ x8 m# j
- {
0 U. x! j+ Z! Z5 l( Z+ N - "key_code": "f",! l' b6 U6 \$ U4 `
- "modifiers": [
: k3 o& Q* q1 { - "left_control"( ?) K* V7 ?7 x) m( O1 k
- ]* T6 @6 F- _) }
- }
: A4 u, V' h1 z - ],
2 {% `# c; V' I4 y - "conditions": [: n' A6 c& i$ `$ i1 H8 G$ p& |
- {
. A' G, P7 N: P - "type": "frontmost_application_if",
* o/ d: @% R. ~6 @9 x - "bundle_identifiers": [# V1 j- ]4 H5 C. W
- "^$", D) z. P" Z/ e" G( ^7 B
- ]," [! P) H4 i! G% Z5 x/ {
- "file_paths": [
# P3 n0 ~% ^1 H9 [- z: Q, B; w - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",
( R; I- X2 m% Y" V1 u3 B8 u - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"
5 ]: o2 x5 l3 @' I" f4 i9 P) E2 y - ]
) y" c% D# j! ^9 P9 l2 i3 f6 _ - }1 ~5 }2 G ?1 S p" u) l5 p9 ]
- ]1 T2 V4 \2 J7 A( k5 F
- },+ ^/ d$ b" Q* b& X
- {
1 q8 d& t8 P/ [8 s - "type": "basic",
' n, Q8 P* N1 C - "from": {
* z' P$ }9 j7 H1 |! x9 x0 I# ] - "key_code": "f",; H, ~' D; J4 P0 d: b! N
- "modifiers": {
1 M. V" f! C' b# v" i' Z: g - "mandatory": [- _$ V2 T8 y U, _3 a
- "left_command",
* t" r1 k6 H7 r9 J* Z, b1 D - "shift"
0 i& q9 B- ^# J9 u4 P( ? Q+ s1 f - ],. N t5 }2 x" p9 S- L8 M5 J
- "optional": [% R$ ^: t5 `+ T5 W; m" t. l0 V
- "caps_lock"
. R. ~' i# d' D) p# n- a1 c6 d' \ - ]) w% b7 y4 i; L( q
- }
9 A9 u3 x) u0 v' B - },( r+ [! N+ X/ w# X
- "to": [# z1 U) M& I0 c& V7 i
- {
# \$ f: [" z* _ - "key_code": "f",
/ e4 W$ I8 Y+ w$ c$ A) [/ U: e& h - "modifiers": [3 \4 F+ f! \ l1 h# q
- "left_control",! P2 m8 L" W/ T; d
- "shift"
9 J2 S5 G' W0 R1 N, J - ]
7 F* c- E0 F( K% C - }( R4 E* ~1 X( J+ `2 n! ]
- ],
# Q5 N# H4 x# `: E" k4 P5 H - "conditions": [8 g; Y$ \1 W7 l: y$ X! _
- {
( M6 p5 g& K% w9 E' v- v - "type": "frontmost_application_if",; i$ i! ]$ D* A3 A' q0 g, y
- "bundle_identifiers": [
" y2 u! x" l5 d; f. Z. R9 g - "^$"
9 T5 Y2 z( C5 T - ],
8 l/ V0 ~& `* p3 r. B4 T n+ G - "file_paths": [
4 c! T' s- l9 C - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",2 k1 y7 ^) b# f) t( H
- "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"4 A. R" ?# @. u3 z+ w( X
- ]
) k9 h0 R; O8 r5 a+ l& N& Q - }
+ `7 ~$ N) \6 b' F+ @: V n3 F - ]
- }6 Z% ~8 M( i - }
]/ L* ] ^7 F/ ^' O. A+ Z - ]
( G6 p. E# }; a$ \% q- } - }# m o6 t+ g. W
- ]: f( G) Z# d3 e3 v* ^* h( ~6 x: O
- }
8 U& Z7 C9 G7 F& R
复制代码
# Z# g m, n; v% L2 A: v# 修改自 https://github.com/npyl/swap-command-with-control-for-wine 直接交换cmd和ctrl3 }- `6 Z' P. V" N
这karabiner-elements说起来太麻烦。只是简单提一下。给高级用户使用。
4 Q0 U# L7 T. T; Z* x: q
- Q4 s0 m0 o% O5 h关于删除/重置wine, 待续) Z" h- ]7 ^" j9 k% _: H
5 R& ~- l: }8 x$ Q( H. s+ v# D5 G, q7 ]
' A; `% X( |) v1 k/ j
, o+ \ l' Q1 H8 l, B7 A
# D6 |( }8 ?* v [- p4 Z" u. ]$ [ g- G& H- |! Y- z
2 C0 j4 q% Z' T" X0 R
+ t. ^5 g( q g7 N
3 Z9 M; N3 C( E9 L ] q
4 A2 J0 h, b' h+ S7 j9 @" c# M |
|