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

楼主 |
发表于 2019-10-21 20:55:38
|
显示全部楼层
本帖最后由 我突然想拉屎 于 2019-12-13 09:13 编辑 ' d+ ?6 a' C9 E9 e9 {
) ]3 O1 z* O s1 G. {" L关于美化。也就是修复字体问题, ctrl->command拷贝。
' O% D( O/ F5 \% k! d+ G" p4 s/ l大部分可以跳过。我只执行了1,3,10,
+ }+ Z; B. j8 r* D" v: H我一开始用8,9,现在不用了,改用11" M# R9 X3 a5 d6 ~. F8 U
( q) b% P `5 N+ [9 O1。
9 \* d; s4 H2 l6 k打开terminal 安装winetricks
/ w" H1 ?; y" J5 k/ F3。安装文泉驿中文字体 (更多字体请看6)
5 H. G8 x. z3 Gfakechinese是文泉驿的包装,亲测此命令已经包含了winetricks wenquanyi$ B0 ]) s3 s" d# d9 p. M
- H' v' o' L( m5 b& k/ f( v- P& [! k4。系统设置
3 f; ]& A0 a/ `( q% }6 a将 DirectDrawRenderer 设置为 opengl , 据说会高效一些, 还有开启字体平滑 (非必要,可跳过)
& L' ^' |2 c8 e, s. w- winetricks ddr=opengl
d- Q, D. P0 a - winetricks fontsmooth=rgb
复制代码 4 e {8 R( ]+ Y2 W' Z
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是空文件夹
: A+ C* o7 h$ q! W c ]
0 T7 N' a# d) A& |, n6。查看或者安装更多的字体 (非必要,可跳过)
- W- K! V5 a+ W$ l8 ?1 ^; t- brew install zenity
8 i4 w0 n' ^5 j0 l4 K6 o - winetricks --gui
复制代码 选择install fonts% |' |* @0 u2 k- y
1 Z$ W( S" F$ L! O" u; p
7。调整windows系统级别的字体大小(比如窗口菜单字体大小) 非必要 可跳过" z* V! A. F8 z
调整DPI。默认是96,菜单字体非常小,根据个人屏幕分辨率和喜好调整。
$ }3 O; s$ [( ^. ]% q6 T! N8 L: `3 h. h) F! c
8。windows默认copy&paste是ctrl, macos默认是command, 这里通过修改windows注册表进行整合 (非必要,可跳过) A; e$ i- B D7 E& S6 b& N" y* k
- REGEDIT4
8 J# b' q) L' ]; D( W8 U: J e
: w# s/ V% n9 K( A- [HKEY_CURRENT_USER\Software\Wine\Mac Driver]
2 P- c, M* J @* d4 Y - "LeftCommandIsCtrl"="Y"7 C7 |+ |5 ^- c
- "RightCommandIsCtrl"="Y"
复制代码 将上述文件保存为任意名,比如 ctrl.reg
/ |$ G. `1 b7 ?+ ?打开wineHQ应用,在弹出的terminal中输入- q5 ^% N k& R& S8 M& J
& w6 Q8 h$ F/ g6 \* b2 \所以现在在 goldendict里面,
+ \7 r w N4 Ccommand + c就是copy, - ?3 K3 p! [5 T' b: x
command + shift +c 就是 copy as text,! k! O$ o/ d( I
command +v 就是paste# ?* T# y) m# S* y
. C! N& [7 @" T0 I- y
0 i/ G1 H, M$ r- L. N& e. E7 Q7 z9. 添加option键,在goldendict应用内变成windows的alt键。操作如8 (非必要,可跳过). x0 F" ^4 j7 t3 k4 K
- REGEDIT4. r( H! y! }, H; }1 c- k' T4 ]
- 2 ?3 {9 k! V# t# a" |
- [HKEY_CURRENT_USER\Software\Wine\Mac Driver]+ J9 h- ~$ t, ^' v
- "LeftOptionIsAlt"="Y"
) J- b. r" p' H/ `; q - "RightOptionIsAlt"="Y"
复制代码
0 [0 I+ Q! l. a' o( L. c y) N% Q3 @3 `- {' ]3 I, t, l
10. 强制全局,默认字体为微软雅黑,默认字体大小为36px, UI字体为18px (非必要,可跳过)
% ]1 U' a& T$ l% b* Y5 N) ^创建一个文件 article-style.css3 r8 A5 c% H8 {
- * {7 G2 T( H+ l0 e( j
- font-family: Arial, "Microsoft Yahei" !important;
' T( Z$ Q7 F4 ?6 w0 d - font-size: 36px !important;
) J, F: a2 ^# w/ Q - /* background: red !important; */, I+ p! P: i% s+ \6 N
- }
复制代码
# `5 m& J" |2 F# D1 h$ \5 C6 x
+ Q( ?! X- E0 n1 w; q/ b创建一个文件 qt-style.css7 a) U3 x- j* R3 l7 c
- * {
+ o/ E7 S9 g7 R - font-family: Arial, "Microsoft Yahei" !important;
- Y! s( m) f. t - font-size: 18px !important;
7 m/ w7 `' N2 D/ w; i2 D: b( y - }
复制代码 - {* K6 j1 Y4 X% Y
6 o% q- h: w& K6 T. {' f我用的是64位绿色版,默认路径为
( m" b. ?5 o" R5 a: J〜/.wine/drive_c/users/用户名/Application Data/GoldenDict
9 y. ^' S# ~6 L& g' y. N将上面 qt-style.css 和 article-style.css 保存于上述路径
# M7 v+ L0 N1 ^2 g& i7 Z1 L/ E4 S, B B, m* F8 n; i& E: L" {
你的可能不同。可以在GoldenDict -> help -> Configuration Folder看看默认路径,将文件保存于默认路径。7 y- x- k7 g! H, T/ ^* }2 {- c
% F# i$ z) {7 w) Q* G# E6 m8 V) }; R& |' v3 ]7 p
css中的!important 是强制使用这条命令,覆盖所有字典,相当于全局。& d4 b2 d% p% f; E- j
可以把36px 18px 改成自己喜欢的默认字体大小6 V5 M- t6 L4 H! J3 G) ^7 e2 p
/* */ 为注释,可以去掉
! s- u7 X( i; z! Y3 q& v5 E+ J& o5 }3 [, j
如不明白第10步,请看
, {" z# E: X% u | _5 N, Qhttps://www.pdawiki.com/forum/thread-23016-1-1.html
9 g" P f8 }1 A" Q& Y( S
6 P) b [2 Q. i& r: ?3 C& ~11。 用karabiner-elements来交换command和ctrl (可跳过)
" Y: b; d; Y7 S; O2 P4 q因为windows的 ctrl - c 为复制,而macos复制为 command - c, 可以在wine应用中单独交换,而其他应用保持正常激活的组合cmd+c, cmd+v, cmd+f, cmd+shift+f- {
2 v- b6 Y, r1 _/ E0 z3 m5 j - "title": "cmd cvfF -> ctrl cvfF in wine",
0 s5 {/ g9 n/ l - "rules": [. b1 t; s, C2 g7 Z* q6 _
- {5 v* G5 T' S s! \+ ~
- "description": "in wine, command cv -> ctrl cv",* N7 A, E Q+ K* }
- "manipulators": [
1 L5 _' d$ D/ ^ C, O0 p - {1 c4 i& t& I' D% R1 b
- "type": "basic",
% ?7 G0 g+ L5 s9 u3 r0 K0 ` - "from": {
& ]6 q+ e5 j6 B' B/ r( E - "key_code": "c",& v2 n/ \2 Z5 v: ^
- "modifiers": {
& {( m7 h/ ?" P+ T - "mandatory": [! f# ^$ B p4 X6 e3 o
- "left_command"/ U/ _7 w; [' |2 V3 K
- ],) B, z5 a8 {. t2 s7 ~
- "optional": [
( W* ~% k: N0 e5 X4 Y - "caps_lock"
4 c; `" ]( L% U, c - ]
7 ]' T: j. ~; n - }
6 E K2 Q. p" p1 K( q; e - },* ~0 l+ m9 [% P* C$ W( W; t
- "to": [, e P( Z3 W, N( w5 H# M2 q
- {% p/ |, B. G; s
- "key_code": "c",' u- r. ?5 j. {2 ]6 T
- "modifiers": [
8 C( _# F; P# T* J" J2 T& q3 } - "left_control"" ]+ y. a4 C6 h( i7 Q
- ]
z- C6 @' ?# n6 ?% N# c4 ? - }
" b6 L0 d8 O7 v& z - ],
9 f/ G4 X; W# z7 e9 I. m - "conditions": [9 B' d1 y: n4 }, {
- {& m/ b7 Z+ C, i
- "type": "frontmost_application_if",; D7 ]( L6 ?. \& G" {8 n0 [
- "bundle_identifiers": [/ s* w+ o Y$ C, H) t
- "^$": e7 v6 o' y- F: f2 M% K
- ],. F2 q% l- s% U+ g. }" f- i
- "file_paths": [
; Q, r0 _) _1 m - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",
5 s" A- `; Y9 c% {, N; w' r - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"
' v+ l1 H" @0 o: d, s( t - ]
3 u" P; L/ F. O - }& F7 S, h1 l8 Z* |1 C
- ]' k5 C4 O+ p; O. x; k
- },+ m3 {/ s& L6 B: O8 f) ]
- {
7 D$ Z" \9 {4 m - "type": "basic",1 T, S& u* O0 ^ u8 Y+ n
- "from": {' f7 C3 _* x3 ?5 }% r* D4 C( s
- "key_code": "v",8 R# N7 C3 e/ m# I: M4 T% D
- "modifiers": {
+ N+ x4 j$ Q9 M$ n7 H' m5 t - "mandatory": [
4 V0 d7 r9 c6 d1 m7 S# B/ ~ - "left_command"5 C6 K+ m2 @+ H. N- H/ M9 e0 S# I
- ],1 c1 d5 v( t( c6 x3 F- x( o5 R1 j
- "optional": [) K8 f. T+ N, [) v4 {
- "caps_lock"
4 w" d% k! |9 W" w1 t; H) Y - ]
% `; {. M0 i, t+ x - }
) y3 G% w$ ~4 G1 i) N \; ^ - },+ C2 B+ C/ |2 k9 f
- "to": [( G, u1 X* p4 G& T
- {$ s/ q- N# x# N
- "key_code": "v",2 \5 _) G% q* c
- "modifiers": [
. I& g" m& n# U- I1 q( J - "left_control"
5 U% D: r! v6 ?4 |. P. M \9 ^2 v - ]
3 i0 P: Q& E/ Y; O: y - }* q2 c0 n9 e. d( @
- ]," l# S4 m- x% ~4 T+ ~, G2 D
- "conditions": [
) f! p$ Z( W$ `( J; c - { m: n6 M! q/ c% z; Z
- "type": "frontmost_application_if",
! r' w. O8 T# X$ U% p' F - "bundle_identifiers": [ @$ H9 k( U, P6 {
- "^$"
: I+ _/ Y* w; Q$ A' d6 h - ],
1 Q7 l. D) I, J+ U6 Z0 V" b3 \* F - "file_paths": [+ z8 C& G1 S( A( ]' y; K# p
- "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",
$ H6 s# O# x- }" w/ m( {) ?7 `8 x - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"$ t4 A$ B# T1 _$ |. q' \
- ]. ^0 A: r# c" x' ?
- }6 J7 A( U) C# B1 s B! i2 e
- ]- g9 M4 ~5 M+ y. L L8 A4 [
- }% _( n1 e+ m% d. Z
- ]
D: C! B4 c4 W! E9 \ - }," `$ ^; r" [/ n5 [) e7 t8 w! g
- {& [) U, {' H( P, C
- "description": "in wine, command fF -> ctrl fF",' H6 I: `1 ]- ^( e8 S
- "manipulators": [
, `7 ]8 f! m. c: L- M n: f7 ^ - { q( m8 s# R- m$ n d
- "type": "basic",( i/ s* U; y& a) _- |- m
- "from": {
3 O# t& c0 I. o7 W! `. y1 X - "key_code": "f",
6 I0 F8 {! O$ s - "modifiers": {
1 K4 a& s& }; N2 d6 B3 |" F - "mandatory": [- Y: {& U/ U& K; I2 i O- y: @
- "left_command". a8 i( i0 p4 n" M; m
- ],
1 M7 e- P! l) h8 a, a - "optional": [* O1 q$ R$ i6 x, w
- "caps_lock"8 G" P5 m2 Q3 }- n7 E
- ]
: ^1 A. m: Z( c) V `* ^( a% P - }: P3 F5 Q# u$ X3 K* H. N
- },
0 B1 a4 O2 W) x7 ]! q: Z, ]% W - "to": [
+ [. q5 A5 ]6 Y, e+ C - {
( b+ S; V2 T1 b1 w, ]; k - "key_code": "f",
. K0 y3 R0 l; z; B! L - "modifiers": [! I+ ^" a8 K# o# f
- "left_control"/ c! Q; [- } K+ L
- ]
' }5 s' ~7 P5 E7 @8 W6 @ - }/ F" }1 O6 T" J7 Z( t7 Z- b" f
- ],0 }' e; D5 f' m% ~. X5 d' u
- "conditions": [
7 b. u, |( e4 ?" p - {
2 O& W1 T* S% n0 X2 r - "type": "frontmost_application_if",# ^- Z8 h6 ` f8 |+ o$ M& ?
- "bundle_identifiers": [
+ B- `1 P: k: u2 V( p. T - "^$" L* |+ g3 g+ v
- ],9 b8 c) v. W# {* q& @. c
- "file_paths": [
# y, U) S+ `, a; D: L' Z - "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",% c9 B% q9 p# r+ b* J" \
- "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"
3 G$ Y4 s8 o6 D* N$ j6 T - ]+ \3 h& g1 F F
- }3 H% c) A" C8 m& I
- ]& j( R3 C4 u" b5 h. R3 j- ~1 S
- },& u. b/ W. ^0 A6 i8 ?- a
- {% {3 V& w% ~+ D- l: G& F9 {1 n
- "type": "basic",& I: W, b7 o# g+ T
- "from": {
/ e) F1 O# ~7 L) B V- r8 @ l - "key_code": "f",
7 k; G& k4 v, y L5 m1 J c - "modifiers": {
) f! J' b. E% j$ T: R' l, w9 ]4 ` - "mandatory": [
2 @/ `- Q. C) L4 Y5 O5 `$ \! i) w - "left_command",/ c0 o! Q, [/ `2 ?' f/ w- K; q# e
- "shift"6 Z/ Z; R/ H/ `) J& O: d5 C
- ],: V6 R1 [8 M- @9 l0 `
- "optional": [, W) t0 N9 r! L) x/ `
- "caps_lock"& z% k' A/ i, G! ]
- ]
- W z! w) ]) \+ K - }
?1 c2 e! v Q, a - },1 C6 L4 n, Q( L) }3 T6 m
- "to": [
! j3 g" S& w1 q1 x5 V6 ` - {3 ~9 g9 [' Z' M' B* \4 r6 T
- "key_code": "f",
# L8 K& N! y% A+ I; } - "modifiers": [9 }# ^1 Q3 Y, z! ]. m6 N
- "left_control",
! E: a" f" z# i3 Y - "shift"
2 W' X4 j' \4 V) T; D% @ x - ]
! h$ |; e. {2 E6 P; g: _ - }
, S" G9 j) K0 q# f/ s' I - ],
. d! E3 a- b4 Q) h7 @ - "conditions": [- s" C. {& Y. G3 k4 Z" T% ^# W
- {1 I' o% C* _# @% j
- "type": "frontmost_application_if",8 r8 ~) Y2 W! H3 W, m
- "bundle_identifiers": [3 d! x/ M* `' c. x, {
- "^$"
+ o* {- |) x; m" G: [ - ],
0 {$ b8 R7 e% s. K3 P2 T9 b7 _2 O - "file_paths": [) S3 r# g7 h- d3 h7 p% V
- "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine-preloader",) J! `! M0 p$ E; ]' [+ w8 z# b
- "^/Applications/Wine Stable.app/Contents/Resources/wine/bin/wine64-preloader"
6 `! N! z2 a6 G3 T - ]$ @0 L; d$ J8 i
- }
7 V; H% x/ ` T" l# w7 z - ]5 s/ Q5 o) h$ c/ ?
- }
+ }; e1 G2 j* y+ l - ]
( T6 D6 n J5 `5 h - }1 t+ D; l2 s5 G- A$ m9 d$ b/ P" O
- ]7 M- Z, Q( b: D7 n3 I& B
- }+ \0 g3 t! ] ?) \( L! y
复制代码 2 h u% A+ u4 l3 L
# 修改自 https://github.com/npyl/swap-command-with-control-for-wine 直接交换cmd和ctrl
8 L9 o9 y( I9 D% ~2 R这karabiner-elements说起来太麻烦。只是简单提一下。给高级用户使用。4 M8 E ]0 u4 s. j: ~8 f5 d, _0 Y
0 T3 [' n( V) Y9 i( I5 S关于删除/重置wine, 待续' H" T2 ~1 {: E4 c9 e
# v" O7 G6 p, \" ^, O2 \
, A- Q0 d6 Y& C9 o1 s" Z6 ], ?' G# p! {, s; f% z
& I7 w9 z' y. T/ r: @# ]7 q# Q
4 q+ ~6 c: h; z! i% C9 I+ s! v1 r- {4 l* r& X& O* D
2 @& \5 E: }2 L1 l7 r$ D
3 x) x" c8 k' c3 d. V0 y) g
0 |, v+ Z! g! D I) _6 Q
8 \7 a% T8 {2 b0 \ |
|