This file is indexed.

/etc/gEDA/system-gschemrc is in geda-gschem 1:1.8.2-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
;                                                         -*-Scheme-*-
; 
; Init file for gschem
;

(use-modules (gschem deprecated))

;  ;'s are comments
;  keywords are case sensitive (guile feature)
;  mode strings are case sensitive
;  colors are not case sensitive 
;  

; gschem-version string
;
; Specifies the version of this file.  This number is used to make sure 
; that the rc file is compatible with the version of gschem that is 
; being run. The end user should *not* change this value.
;
(gschem-version "20130925")

;
; Start of color section 
;

;; Make the gschem color maps more user-friendly
(color-map-make-friendly display-color-map)
(color-map-make-friendly display-outline-color-map)

; Load up a color scheme which has a dark (black) background.
; Comment out the first line and comment in the second line for a
; light (almost white) background.  The dark background is the
; original look.
;
(load (build-path geda-rc-path "gschem-colormap-darkbg")) ; dark background
;(load (build-path geda-rc-path "gschem-colormap-lightbg")) ; light background
;(load (build-path geda-rc-path "gschem-colormap-bw")) ; light background, bw

;
; End of color section
;

;
; Start of mode related keywords
;

; toolbars string
;
; Controls if the toolbars are visible or not.
;
(toolbars "enabled")
;(toolbars "disabled")

; handleboxes string
;
; Controls if the handleboxes (which contain the menu and toolbar) are 
; visible or not.
;
(handleboxes "enabled")
;(handleboxes "disabled")

; undo-control string
;
; Controls if the undo is enabled or not
;
(undo-control "enabled")
;(undo-control "disabled")

; undo-levels number
;
; Determines the number of levels of undo.  Basically this number decides 
; how many backup schematics are saved on disk.
;
(undo-levels 10)

; undo-type string
;
; Controls which kind of undo is used.  The default is to use the disk as 
; the storing medium (ie after every action the undo information is stored
; to disk).  The other mechanism uses only memory.  The disk mechanism is
; nice because you get undo-level number of backups of the schematic written
; to disk as backups so you should never lose a schematic due to a crash.
;
(undo-type "disk")
;(undo-type "memory")

; undo-panzoom string
;
; Controls if pan or zoom commands are saved in the undo list.  If this 
; is enabled then a pan or zoom command will be considered a command and
; can be undone.  If this is false, then panning and zooming is not saved
; in the undo list and cannot be undone.  Note, the current viewport 
; information is saved for every command, so the display will change to the
; viewport before a command is executed.
;
(undo-panzoom "enabled")
;(undo-panzoom "disabled")


; autosave interval
;
; Controls if a backup copy is made every "interval" seconds.
; Note that the backup copy is made when you make some change to the schematic,
; and there were more than "interval" seconds from the last autosave.
; Autosaving will not be allowed if setting it to zero.
(auto-save-interval 120)

; draw-grips string
;
; Controls if the editing grips are drawn when selecting objects
;
(draw-grips "enabled")
;(draw-grips "disabled")

; net-endpoint-mode string
;
; Not user changable.
(net-endpoint-mode "filledbox")

;  net-midpoint-mode string
;
; Not user changable.
(net-midpoint-mode "filled")

;  net-direction-mode string
;
;  Controlls if the net direction mode is used. This mode tries to guess
;  the best continuation direction of a L-shape net when adding a net.
;
(net-direction-mode "enabled")
;(net-direction-mode "disabled")

;  net-selection-mode string
;
; Controls how many net segments are selected when you click at a net
; If one of the enabled items is used, the selection state will toggle 
; through all selection states. The mode defines the maximum search depth
; for the net selection mode
;
;(net-selection-mode "disabled")
(net-selection-mode "enabled_net")
;(net-selection-mode "enabled_all")

;  net-consolidate string
;
;  Controls if the net consolidation code is used when schematics are read
;  in, written to disk, and when nets are being drawn (does not consolidate
;  when things are being copied or moved yet).  Net consolidation is the 
;  connection of nets which can be combined into one.
;  Comment out if you want the default mode 
;
(net-consolidate "enabled")
;(net-consolidate "disabled")

;  net-style string
;
;  Set to thin if you want thin nets.
;  Set to thick if you want thick nets.
;  This mode also determines what net style gets printed
;
;(net-style "thin")
(net-style "thick")

; netconn-rubberband string
;
; Controls if net connections are maintained when you move a connecting 
; component or net.   
;
(netconn-rubberband "enabled")
;(netconn-rubberband "disabled")

; magnetic-net-mode string
;
; Controls the initial setting of the magnetic net mode. The magnetic
; net mode marks a possible connection that is close to the current
; cursor position
(magnetic-net-mode "enabled")
;(magnetic-net-mode "disabled")

;  bus-style string
;
;  Set to thin if you want thin buses.
;  Set to thick if you want thick buses.
;  This mode also determines what bus style gets printed
;
;(bus-style "thin")
(bus-style "thick")

; pin-style string
;
; Set to thin if you want thin pins
; Set to thick if you want thick pins.
; This mode also determines what pin style gets printed
;
;(pin-style "thin")
(pin-style "thick")

; line-style string
;
; Set to thin if you want thin lines
; Set to thick if you want thick lines.
; This mode also determines what line style gets printed
;
;(line-style "thin")
(line-style "thick")

; zoom-with-pan string
;
; Sets the zoom in and zoom out functions to pan the display and then zoom.
; Basically zoom in / out where the mouse pointer sits on the display.
; Comment out if you want the default mode.
;
(zoom-with-pan "enabled")
;(zoom-with-pan "disabled")

; zoom-gain integer
;
; Controls the percentage size increase when zooming into the page.
; Un-zooming uses the inverse factor such that a zoom in / zoom out
; pair will return the schematic to the same size.
;  E.g:
;    20% increment => x 1.2 original size when zooming in
;                  => x 1 / 1.2 x original size when zooming out
;
(zoom-gain 20)
;(zoom-gain 50) ; Hard-coded behaviour up to version 1.5.0.20080706

; fast-mousepan string
;
; Controls if text is drawn properly or if a simplified version (a line which
; represents the text string) is drawn during mouse pan.  Drawing a simple
; line speeds up mousepan a lot for big schematics
(fast-mousepan "enabled")
;(fast-mousepan "disabled")

; mousepan-gain integer
;
; Controls how much the display pans when using mousepan.  A larger value
; provides greater pan distance when moving the mouse, while a smaller value
; provides a smoother, but smaller pan distance when moving the mouse.
(mousepan-gain 1)
;(mousepan-gain 5)
;(mousepan-gain 10)

; keyboardpan-gain integer
;
; Controls how much the display pans when using the keyboard cursor keys.  
; A larger value provides greater pan distance when pressing the cursor 
; keys, while a smaller value provides a smoother, but smaller pan 
; distance when moving the cursor keys.
(keyboardpan-gain 20)
;(keyboardpan-gain 10)
;(keyboardpan-gain 1)
;(keyboardpan-gain 5)

; select-slack-pixels integer
;
; Controls how many pixels around an object can still be clicked as part of
; that object.
; A larger value gives greater ease in selecting small, or narrow objects.
(select-slack-pixels 10)
;(select-slack-pixels 4)
;(select-slack-pixels 0)
;(select-slack-pixels 1)


; action-feedback-mode string
;
; Set the default action feedback mode (for copy/move/component place).
; Set to outline to get an outline of the selection. 
; Set to boundingbox to get a bounding box of the selection. 
; For a fast machines with fast video use outline (it looks good).
; For a slow machine use boundingbox; it is much faster.
; Comment out if you want the default mode.
;
(action-feedback-mode "outline")
;(action-feedback-mode "boundingbox")

; continue-component-place string
;
; If this enabled then multiple instances of the same component can be placed
; immediately without having to click on the name or Apply in the Component
; Place... dialog box.  If this is disabled then only one component can be
; placed (the user must then press Apply in the dialog box to place multiple
; instances of the same component)
;
(continue-component-place "enabled")
;(continue-component-place "disabled")

; sort-components-library string
;
; If this is enabled, then the component library will be sorted in
; alphanumeric order.  Bear in mind that this option is totally
; cosmetic, and will not alter the component search order (latest
; added gets scanned first).
;
(sort-component-library "disabled")
;(sort-component-library "enabled")

; text-feedback string
;
; Controls if text is drawn when doing an xor action (like copy/move)
; Comment out if you want the default mode.
; Not in production yet.
;
(text-feedback "only-when-readable")
;(text-feedback "always")

; text-display-zoomfactor number
;
; Sets the zoomfactor number (~150 being the most zoomed out factor) 
; (zoom factors get smaller as you zoom in) at which text is displayed
; completely (not a line).  This is only valid if above is set to
; "only-when-readable" 
;
(text-display-zoomfactor 30)

; text-origin-marker string
;
; Controls if the text origin markers are displayed (or not)
;
(text-origin-marker "enabled")
;(text-origin-marker "disabled")

; scrollbars string
;
; Controls if the scrollbars are displayed (enabled) or not (disabled)
; If you disable the scrollbars, you will not be able to use the scroll 
; wheel on your mouse.  This is an unfortunate side effect of how the
; code is implemented.
;
(scrollbars "enabled")
;(scrollbars "disabled")

; scrollbar-update string
;
; Specifies the behavior of the scrollbars in the main window.
;    continuous - display is redrawn as you move the scrollbar
;    delayed - display is redrawn once you stop moving the scrollbar
; Default is continuous
;
(scrollbar-update "continuous")
;(scrollbar-update "delayed")

; raise-dialog-boxes-on-expose string
;
; Controls if dialog boxes are raised whenever an expose event happens
; Default is disabled since gtk2 supposedly handles the raising of these
; dialogs correctly now.
;
;(raise-dialog-boxes-on-expose "enabled")
(raise-dialog-boxes-on-expose "disabled")

; object-clipping string
;
; Determines if the object clipping code is executed or not
; This code does speed up redraws a bit.
;   Possible options: enabled or disabled
; Default is enabled, I do not recommend turning this off, since some X
; servers don't handle clipping correctly.
;
(object-clipping "enabled")
;(object-clipping "disabled")

; embed-components string
;
; Determines if the newly placed components are embedded in the schematic 
; or if only the filename is specified and the component is searched for 
; instead.  If it is enabled, then all new components will be embedded 
; othewise they are not embedded.  This can be controlled on the fly during
; runtime with the "Embed Component" checkbox on the select component dialog
; box
;
;(embed-components "enabled")
(embed-components "disabled")

; component-dialog-attributes stringlist
;
; Sets a list of attributs that are visible in the component select dialog.
; The attributes are sorted in the same order as they appear in the list.
; If the first list element is an asterisk "*", all attributes will be 
; displayed in alphabetical order.
; An empty list will disable the attribute view in the dialog.
;
;(component-dialog-attributes '("device" "description" "footprint" "comment"
;			       "net" "model" "model-name" "file" "value"
;			       "numslots" "slotdef" "slot"
;			       "documentation" "symversion" "author"
;			       "use-license=" "dist-license="))
(component-dialog-attributes '("*"))
;(component-dialog-attributes '())

; logging string
;
; Determines if the logging mechanism is enabled or disabled
;   Possible options: enabled or disabled
; Default is enabled.
; See below for the logging-destination keyword for control over
; where the messages go.
;
(logging "enabled")
;(logging "disabled")


; log-window string
;
; Controls if the log message window is mapped when gschem is started up
; Possible options:
;       startup - opened up when gschem starts
;       later   - NOT opened up when gschem starts
;                 (can be opened by Options/Show Log Window)
;
(log-window "startup")
;(log-window "later")


; log-window-type string
;
; Controls if the log message window is a transient or if it is decorated 
; as a normal window (this is dependant on the window manager doing decoration
; right)
;
; Possible options:
;       decorated       - log window is a normal decorated window
;       transient       - log window is a transient dialog box, typically
;                         not decorated by the window manager
;
(log-window-type "decorated")
;(log-window-type "transient")


; logging-destination string
;
; Specifies where log message go during run time.
; Possible options are:
;      log_window      The log window (if it's visible)
;      tty             The stdout of the terminal where gschem was run from
;      both            Both of the above locations
; Message are always written to the log file (unless logging is disabled)
; by the above keyword
;
; Default is log_window
;
(logging-destination "log_window")
;(logging-destination "tty")
;(logging-destination "both")

; text-size number
;
; Sets the default text size.
;
(text-size 10)

; snap-size number
;
; Sets the default grid spacing at start-up of gschem.
; 
(snap-size 100)

; text-caps-style string
;
; Sets the default caps style used for the input of text
; lower specifies that all inputed text is in lowercase
; upper specifies that all inputed text is in uppercase
; both specifies that all inputed text is used as is (no case conversion)
;
(text-caps-style "both")
;(text-caps-style "lower")
;(text-caps-style "upper")

;  file-preview string
;
;  Controls if the preview area in the File Open/Save As and Component 
;  dialog boxes is enabled by default or not
;
(file-preview "enabled")
;(file-preview "disabled")

;  enforce-hierarchy string
;
;  Controls if the movement between hierarchy levels (of the same underlying
;  schematics) is allowed or not.
;  If this is enabled, then the user cannot (without using the page manager)
;  move between hierarchy levels otherwise, if enabled, the user sees all
;  the hierarchy levels as being flat.
;
(enforce-hierarchy "enabled")
;(enforce-hierarchy "disabled")

; untitled-name string
;
; Specify the default untitled basename (usually only used a startup time)
; And typically not changed at runtime
;
(untitled-name "untitled")

; window-size width height 
;
; Specifies the size of the drawing area window.  The width and height
; are specified in pixels and do not include the three menu bars and 
; scrollbars (so the window will be larger than the specified 
; measurements). Try to keep an aspect ratio of 1.333333 if at all possible. 
; These numbers are NOT the true size of the window, but of the drawing area.
;
;(window-size 650 487)  ; Good size for 800x600
(window-size 900 650)   ; Good size for 1024x768
;(window-size 950 712)  ; Good size for 1152x864
;(window-size 1100 825) ; Good size for 1280x1024

; world-size width height border
;
; Specifies the size of the world and a border (in world space units)
; Be sure all inputs are reals (floats/doubles) and don't try to reverse
; the values: to get a portrait mode.  Code to support that needs to be added
; The code that implements this automatically transforms the dimensions into
; the proper aspect ratio.  All units are in inches.
; This is not the paper size.  That is specified elsewhere.  End users should
; not change this at all.
;
(world-size 120.0 90.0 1.0)
;(world-size 60.0 45.0 1.0)

; page-size width height 
;
; Specifies the size of the default paper size
; Be sure all inputs are reals (floats/doubles) and don't try to reverse
; the values: to get a portrait mode.  Code to support that needs to be added
; The code that implements this automatically transforms the dimensions into
; the proper aspect ratio.  All units are in inches. (use output-orientation
; to get portrait mode)
;
(paper-size 11.0 8.5) ; letter
;(paper-size 14.0 8.5) ; legal 
;(paper-size 8.5 5.5) ; statement
;(paper-size 17.0 11.0) ; tabloid
;(paper-size 11.0 17.0) ; ledger
;(paper-size 13.0 8.5) ; folio
;(paper-size 10.833 8.472) ; quarto 
;(paper-size 14 10) ; 10x14
;(paper-size 10.0 7.5) ; executive
;(paper-size 11.0 8.5) ; A
;(paper-size 17.0 11.0) ; B 
;(paper-size 22.0 17.0) ; C 
;(paper-size 34.0 22.0) ; D 
;(paper-size 44.0 34.0) ; E 
;(paper-size 46.81 33.11) ; A0 
;(paper-size 33.11 23.39) ; A1
;(paper-size 23.39 16.54) ; A2
;(paper-size 16.54 11.69) ; A3
;(paper-size 11.69 8.27) ; A4
;(paper-size 8.27 5.83) ; A5
;(paper-size 5.83 4.13) ; A6
;(paper-size 4.13 2.91) ; A7 
;(paper-size 2.91 2.05) ; A8
;(paper-size 2.05 1.46) ; A9 
;(paper-size 1.46 1.02) ; A10
;(paper-size 1.02 0.71) ; A11
;(paper-size 0.71 0.51) ; A12

; paper-sizes string width height
;
; Specifies which paper sizes are available for printing.
; The width and height parameters are in the order for landscape printing,
; so reversing them for portrait won't work just yet. (and that will be 
; implemented differently. 
; The default paper size is set above.  All units are in inches (forgiveness
; please).
;
; You MUST change this list in this file (gschem-systemrc) if you want
; any reordering changes to take effect.
;
(paper-sizes "Letter : 8.5 in x 11 in" 11.0 8.5)
(paper-sizes "Legal : 8.5 in x 14 in" 14.0 8.5)
(paper-sizes "Statement : 5.5 in x 8.5 in" 8.5 5.5)
(paper-sizes "Tabloid : 11 in x 17 in" 17.0 11.0) 
(paper-sizes "Ledger : 17 in x 11 in" 11.0 17.0) 
(paper-sizes "Folio : 8.5 in x 13 in" 13.0 8.5) 
(paper-sizes "Quarto : 8.472 in x 10.833 in" 10.833 8.472) 
(paper-sizes "10x14 : 10 in x 14 in " 14.0 10.0) 
(paper-sizes "Executive : 7.5 x 10" 10.0 7.5) 
(paper-sizes "A : 8.5 in x 11 in" 11.0 8.5)
(paper-sizes "B : 11 in x 17 in" 17.0 11.0)
(paper-sizes "C : 17 in x 22 in" 22.0 17.0)
(paper-sizes "D : 22 in x 34 in" 34.0 22.0)
(paper-sizes "E : 34 in x 44 in" 44.0 34.0)
(paper-sizes "A0  84.10 cm x 118.90 cm" 46.81 33.11)
(paper-sizes "A1  59.40 cm x 84.10 cm" 33.11 23.39)
(paper-sizes "A2  42.00 cm x 59.40 cm" 23.39 16.54)
(paper-sizes "A3  29.70 cm x 42.00 cm" 16.54 11.69)
(paper-sizes "A4  21.00 cm x 29.70 cm" 11.69 8.27)
(paper-sizes "A5  14.80 cm x 21.00 cm" 8.27 5.83)
(paper-sizes "A6  10.50 cm x 14.80 cm" 5.83 4.13)
(paper-sizes "A7  7.40 cm x 10.50 cm" 4.13 2.91)
(paper-sizes "A8  5.20 cm x 7.40 cm" 2.91 2.05)
(paper-sizes "A9  3.70 cm x 5.20 cm" 2.05 1.46)
(paper-sizes "A10 2.60 cm x 3.70 cm" 1.46 1.02)
(paper-sizes "A11 1.80 cm x 2.60 cm" 1.02 0.71)
(paper-sizes "A12 1.30 cm x 1.80 cm" 0.71 0.51)

; print-command string 
;
; The command to send data to in order to print to a printer.  On most
; systems, this will be "lpr".
;
(print-command "lpr")


; output-type string
;
; Controls what is actually printed
;	string is either "extents" or "extents no margins" or 
;       "current window"
;
(output-type "extents")
;(output-type "extents no margins")
;(output-type "current window")
;;; (output-type "limits")  "limits" is considered deprecated and should 
;;;                         not be used.

; output-orientation string
;
; Controls which way the output page is layed out (landscape or portrait)
;
;(output-orientation "portrait")
(output-orientation "landscape")

; output-color string
;
; Controls if output (postscript) is color (enabled) or black/white (disabled)
;
(output-color "disabled")
;(output-color "enabled")


; output-capstyle string
;
; Controls the capstyle at the end of lines in the postscript output
;
(output-capstyle "square")
;(output-capstyle "round")
;(output-capstyle "butt")


; setpagedevice-orientation string
;
; If enabled, puts a << /Orientation x >> setpagedevice into the postscript
; output.  x is either 1 for landscape or 0 for portrait.
;
(setpagedevice-orientation "disabled")
;(setpagedevice-orientation "enabled")


; setpagedevice-pagesize string
;
; If enabled, puts a << /PageSize XxY >> setpagedevice into the postscript
; output.  XxY is the size of the paper in points.
;
(setpagedevice-pagesize "disabled")
;(setpagedevice-pagesize "enabled")


; image-color string
;
; Controls if image (png) is color (enabled) or black/white (disabled)
;
(image-color "enabled")
;(image-color "disabled")

; middle-button string
;
; Controls if the middle mouse button draws strokes, repeats the last 
; command, does an action (move and copy (holding down the ALT key) 
; are supported) on a single objects, or if it does the mouse panning.
;
(middle-button "mousepan")
;(middle-button "action")
;(middle-button "stroke")
;(middle-button "repeat")

; third-button string
;
; Controls if the third mouse button performs the popup ("popup") or 
; if it does the mouse panning ("mousepan")
;
(third-button "popup")
;(third-button "mousepan")

; scroll-wheel string
;
; Controls the binding of the mouse scroll wheel.
; "classic" style is the gschem default, where scrolling with no modifier
; key is mapped to zoom, + CTRL -> x-axis pan, + SHIFT -> y-axis pan.
; "gtk" style changes the behaviour to be more like other GTK appliactions,
; no modifier -> y-axis pan, + CTRL -> zoom, + SHIFT -> x-axis pan.
(scroll-wheel "classic")
;(scroll-wheel "gtk")


; scrollpan-steps integer
;
; Controls the number of scroll pan events required to traverse the viewed
; schematic area. Larger numbers mean more scroll steps are required to
; pan across the viewed area and giving finer control over positioning.
(scrollpan-steps 8)
;(scrollpan-steps 4) ; Hard-coded behaviour up to version 1.5.0.20080706

; warp-cursor string
;
; Controls if the cursor is warped (or moved) when you zoom in and out.
; Some people find this forced cursor movement annoying.
;
(warp-cursor "enabled")
;(warp-cursor "disabled")


; Bus ripper controls
; The following keywords control the auto bus ripper addition code
;
; bus-ripper-size  : Sets the size of the auto bus rippers.  
; bus-ripper-type  : Sets the bus ripper type either a "component" or 
;                    plain "net"
; bus-ripper-syname  : If above is set to component, specify the symbol name.
;                      The symbol must exist in a component library
; bus-ripper-rotation  : Either "symmetric" or "non-symmetric".  This deals 
;                        with how the bus ripper symbol is rotated when it 
;                        is auto added to a schematic.
;   

; The default bus ripper
(bus-ripper-size 200)
(bus-ripper-type "component")
(bus-ripper-symname "busripper-1.sym")
(bus-ripper-rotation "non-symmetric")

; A symmetric alternative 
;(bus-ripper-size 200)
;(bus-ripper-type "component")
;(bus-ripper-symname "busripper-2.sym")
;(bus-ripper-rotation "symmetric")

; A simple net 
;(bus-ripper-size 200)
;(bus-ripper-type "net")

; Dots grid dot size
;
; The dots-grid-dot-size keyword controls the size of the grid dots in the
; dots grid display. The units are in pixels. The default (min) value of 1
; is the best performing as the grid dot size is rendered as a single pixel.
; Values of 2 and 3 are good values to try if the default grid dot size is
; too small for your tastes. Anything larger than 3 is probably too large.
;
(dots-grid-dot-size 1)
;(dots-grid-dot-size 2)
;(dots-grid-dot-size 3)

; Dots grid mode
;
; The dots-grid-mode keyword controls the mode of the dotted grid, either
; variable or fixed. In the variable mode, the grid spacing changes
; depending on the zoom factor. In the fixed mode, the grid always
; represents the same number of units as the snap-spacing. You can
; control the density of the grid using the dots-grid-fixed-threshold.
(dots-grid-mode "variable")
;(dots-grid-mode "fixed")

; Dots grid fixed threshold
;
; The dots-grid-fixed-threshold specifies the minimum number of pixels
; grid-spacing for the grid to be displayed. Using this parameter you can
; control thedensity of the displayed grid (smaller numbers will cause the
; grid to be drawn denser). This mode is only used when grid-mode is fixed.
;
(dots-grid-fixed-threshold 10)

; Mesh grid display threshold
;
; The mesh-grid-display-threshold specifies the minimum line pitch for a the
; grid to be displayed. Using this parameter you can control maximum density
; of the displayed before the minor, then major grid-lines are switched off.
;
(mesh-grid-display-threshold 3)

; force-boundingbox string
;
; Controls if the entire bounding box of a symbol is used when figuring out
; whichend of the pin is considered the active port.  Enable this when 
; gschem is guessing incorrectly.
;
(force-boundingbox "disabled")
;(force-boundingbox "enabled")


; add-attribute-offset integer
;
; This has not been implemented/debugged yet.  
; This has not been implemented/debugged yet.  
; This has not been implemented/debugged yet.  
;
; Controls a offset which is added to the location of text items that are
; added to an object as an attribute.  This offset is added when the following
; conditions occur:
;
;  1) Add/Attribute... has been invoked via the hotkey
;  2) It is the the "netname" attribute being added
;  3) It is being attached to a horizontal or vertical net segment
;  4) The initial mouse position is at or near the actual net (with one
;     grid unit).
;
; If these four conditions are not met, then this offset is not added. 
;(add-attribute-offset 50)


; reset-componet-library
;
; When reset-component-library is executed, then all known component library
; paths are erased.  This is useful if the user wants to override all the
; system provided paths and provide his/her own set.  Normally this is not
; commented in.
;
; (reset-component-library)


; reset-source-library
;
; When reset-source-library is executed, then all known source library
; paths are erased.  This is useful if the user wants to override all the
; system provided paths and provide his/her own set.  Normally this is not
; commented in.
;
; (reset-source-library)

;
; End of mode related keywords
;


;
; Start of hooks
;

;;
;; Comment in this scheme code if you want automatic numbering when
;; placing new component and copying components.
;
;(load-from-path "auto-uref.scm")
;(add-hook! add-component-hook auto-uref)
;(add-hook! copy-component-hook auto-uref)
;
;; Define value of page-offset for auto number on insert.
;; Refdeses will be numbered from integer multiples of page-offset,
;; depending on the lowest refdes value found on the page.
;; If lowest value is 323 and page offset is 100, then next refdes
;; will be 301.
;; Setting to 0 disables the feature.
;
;(auto-uref-set-page-offset 100)


; Define default pin attributes
; Attributes: 
;   - Attribute name.
;   - Value of the attribute.
;   - Visibility: #t (visible) or #f (hidden).
;   - Show_list:  a list containing what to show, using 
;                 elements like "name" or "value", or an empty list.
(define default-pin-attributes 
       '(("pintype"   "unknown" #f ())
	 ("pinlabel"  "unknown" #t ("value"))
	 ("pinnumber" "0"       #t ("value"))
	 ("pinseq"    "0"       #f ())))

; Convert a character into a string
(define char2str 
  (lambda (char)
    (list->string (list char))))

; Attribute autoplacement grid 
(define autoplace-attributes-grid 50)

; Load the default position of attributes, for attribute autoplacing 
; functions.
(load-from-path "default-attrib-positions.scm")

; Adds the default pin attributes to each newly placed pin.
(define (add-default-pin-attributes object)
  (for-each
    (lambda (a)
      (apply add-attribute-to-object object a)) default-pin-attributes))

; Comment in this hook to automatically add the default attributes to
; each newly placed pin
(add-hook! add-pin-hook add-default-pin-attributes)


; Comment in this to load the functions to place the attributes automatically.
(load-from-path "auto-place-attribs.scm")

; Autoplace pin text attributes hook. 
; Comment in these if you want the pin attributes to be automatically placed.
; There are different hooks for situations like adding a new pin and rotating
; or mirroring an existing one. 
; The #t at the end means that function is appended to the end of the hook.
(add-hook! add-pin-hook (lambda (pin)
	(autoplace-pin-attributes pin )) #t)
(add-hook! rotate-pin-hook (lambda (pin)
	(autoplace-pin-attributes pin )) #t)
(add-hook! mirror-pin-hook (lambda (pin)
	(autoplace-pin-attributes pin )) #t)

; Autoplace component/net/buses text attributes hook. 
; Comment in these if you want the component attributes to be 
; automatically placed.
; There are different hooks for situations like adding a new pin, rotating
; or mirroring an existing one, adding a new attribute or a new component.
; The #t at the end means that function is appended to the end of the hook.
;(add-hook! add-component-object-hook (lambda (object)
;	(autoplace-object-attributes object)) #t)
;(add-hook! rotate-component-object-hook (lambda (object)
;	(autoplace-object-attributes object)) #t)
;(add-hook! mirror-component-object-hook (lambda (object)
;	(autoplace-object-attributes object)) #t)
;(add-hook! add-attribute-hook (lambda (object)
;	(autoplace-object-attributes object)) #t)
;(add-hook! complex-place-list-changed-hook (lambda (object)
;         (autoplace-object-attributes object)) #t)

; Automatically place a titleblock (or other components) when creating
; a new page.
; Comment in these lines if you want gschem to automatically place a titleblock
; when you create a new _empty_ page.
; Users can customize the default titleblock by adding the following line
; (without the semi-colons at the beginning) to the gschemrc file:
;; (define default-titleblock "title-A4.sym")
;; Change "title-A4.sym" by the name of your prefered titleblock!
;
; If you don't want a titleblock to be added automatically, then add one of 
; the following lines to your gschemrc file (without the semicolon).
; There are several ways, so just choose one:
;   (define default-titleblock "")
;   (define default-titleblock '())
;   (define default-titleblock #f)
;
(define default-titleblock "title-B.sym")

; Load the regular expressions module
(if (provided? 'regex)
    (use-modules (ice-9 regex))
    (display "Your Guile installation doesn't provide the regex module.\n"))

(add-hook! (@ (gschem hook) new-page-hook) (lambda (page)
   ; Only place the titleblock if there are no objects in the page
   ; and the page filename ends in ".sym".
   (if (and (null? (get-objects-in-page page))
	    ; If the guile installation doesn't provide the regex module,
	    ; don't care about the page filename.
	    (if (provided? 'regex)
		(not (string-match ".*\\.[sS][yY][mM]" 
				   (get-page-filename page)))
		#t))
;      Syntax             Symbol name        X   Y    angle selectable mirrored
       (add-component-at-xy page default-titleblock 40000 40000   0       #f       #f))

   ;; After adding titleblock, reset page to mark as unchanged.
   ((@ (geda page) set-page-dirty!) (active-page) #f))
	   #t)

; Evaluate an expression entered in the magic-colon text box.
; In 20 years this might dispatch to an interpreter for some other language.
(define (invoke-macro s-expr)
  (gschem-log (format #f "~s\n" (eval-string-protected s-expr))))

;
; End of hooks
;

;
; Start of path related keywords
;

; attribute-name string
;
; Specifies the default attributes which are presented to the user in the
; "Add Attribute" dialog box.
; The main purpose of this keyword is to allow the user to add any attributes
; which should be in this dialog box.
; Some of these names are specific for symbols while others are for general
; components or nets.  The attribute names are case sensitive. (change this?)
;
; The order of the attribute-name keywords determines the order they
; are displayed.
;
(attribute-name "netname")
(attribute-name "footprint")
(attribute-name "value")
(attribute-name "refdes")
(attribute-name "source")
(attribute-name "model-name")
(attribute-name "model")
(attribute-name "net")
(attribute-name "device")
(attribute-name "pinnumber")
(attribute-name "pinseq")
(attribute-name "pintype")
(attribute-name "pinlabel")
(attribute-name "numslots")
(attribute-name "slot")
(attribute-name "slotdef")
(attribute-name "graphical")
(attribute-name "description")
(attribute-name "documentation")
(attribute-name "symversion")
(attribute-name "comment")
(attribute-name "author")
(attribute-name "dist-license")
(attribute-name "use-license")
(attribute-name "file")

;
; End of path related keywords
;

;
; Start of stroke related keywords
;

;
; This section defines associations between a stroke sequence and a 
; guile function which is executed when the stroke is drawn in the
; gschem window
;
; Strokes are defined as follows: 
;
; 1  2  3
;
; 4  5  6
;
; 7  8  9
;
; The sequence of number such as "852" specify how the stroke is drawn.
; Sequence "852" happens to be a vertical line drawn from the bottom going 
; up.
;
; Please see the libstroke documentation for further information on the 
; stroke description.  
;
; For the most part I went a little overboard on the stroke defs, you 
; probably can get away with many less stroke defs, but I'm a very 
; sloppy stroke drawing person. :-)  Guess my teachers were always 
; right-- my handwritting was/is awful.
;
; Be careful here, strokes is a rather large list, and make sure you maintain
; proper ( and )'s.
; 

(define strokes
; Letter L for line
  '(("14789" . add-line)

; Letter Z for zoom window
("125789" . view-zoom-box)
("1254789" . view-zoom-box)
("1235789" . view-zoom-box)
("2354789" . view-zoom-box)
("2324789" . view-zoom-box)
("12354789" . view-zoom-box)
("12324789" . view-zoom-box)
("12365789" . view-zoom-box)
("1232789" . view-zoom-box)

; line up for zoom out
("852" . view-zoom-out)
; line down for zoom in
("258" . view-zoom-in)

; Letter C for copy
("3214789" . edit-copy)
("214789" . edit-copy)
("21489" . edit-copy)
("32478" . edit-copy)

; Letter E for edit
("563214789" . edit-edit)
("53214789" . edit-edit)
("5321478" . edit-edit)
("5214789" . edit-edit)
("521478" . edit-edit)
("453214789" . edit-edit)
("45321478" . edit-edit)
("456321478" . edit-edit)
("456214789" . edit-edit)
("45621478" . edit-edit)

; Letter N for net
("415963" . add-net)
("7414863" . add-net)
("74148963" . add-net)
("74158963" . add-net)
("7415963" .  add-net)


; Letter M for move
("741236963" . edit-move)
("7412572369" . edit-move)
("7412575369" . edit-move)
("741258369" . edit-move)
("74125852369" . edit-move)
("7412585369" . edit-move)
("74125863" . edit-move)
("74126963" . edit-move)
("741475369" . edit-move)
("7414785369" . edit-move)
("74148369" . edit-move)
("7414852369" . edit-move)
("741485369" . edit-move)
("74148669" . edit-move)
("741552369" . edit-move)
("741575369" . edit-move)
("7415852369" . edit-move)
("741585369" . edit-move)
("74185369" . edit-move)
("74255369" . edit-move)
("7425852369" . edit-move)
("742585369" . edit-move)
("7426963" . edit-move)
("74585369" . edit-move)

; Letter D for delete
("14786321" . edit-delete)
("14789621" . edit-delete)
("147896321" . edit-delete)
("15896321" . edit-delete)
("257896321" . edit-delete)
("25896321" . edit-delete)
("4789621" . edit-delete)

; Letter S for select
("2145987" . edit-select )
("215987" . edit-select )
("2156987" . edit-select )
("21256987" . edit-select )
("3215987" . edit-select )
("32156987" . edit-select )
("32148987" . edit-select )
("32145987" . edit-select )))

;
; End of stroke related keywords
;

;
; Start of keymapping related keywords
;

;;;; Keymapping
;;
;; Everything is case-sensitive.  Any number of keys may be bound in
;; sequence, and each keystroke consists of a non-modifier key with
;; some number of modifiers applied.  Examples:
;;
;;  * (global-set-key "F N" 'file-new-window)
;;
;;    The "New Window" command will be run when an <F> is typed,
;;    followed by an <A>.
;;
;;  * (global-set-key "<Control><Shift>A" 'edit-deselect)
;;
;;    The "Deselect All" command will be run when the <Ctrl> and
;;    <Shift> keys are held down, and the <A> key is pressed.
;;
;;  * (global-set-key "O <Shift>S" 'options-snapsize)
;;
;;    The "Snap Size" dialog box will be shown when an <O> is typed,
;;    followed by an <S> typed with the <Shift> key held down.
;;
;; Key names can be found in /usr/include/gtk-2.0/gdk/gdkkeysyms.h on
;; most Linux systems.  For other systems, please see your platform
;; documentation.
;;
;; Later keybindings override earlier ones.

(global-set-key "A C" 'add-component)
(global-set-key "A A" 'add-attribute-hotkey)
(global-set-key "A N" 'add-net-hotkey)
(global-set-key "A U" 'add-bus-hotkey)
(global-set-key "A T" 'add-text)
(global-set-key "A L" 'add-line-hotkey)
(global-set-key "A B" 'add-box-hotkey)
(global-set-key "A I" 'add-circle-hotkey)
(global-set-key "A R" 'add-arc-hotkey)
(global-set-key "A P" 'add-pin-hotkey)
(global-set-key "A G" 'add-picture-hotkey)

(global-set-key "<Control>A" 'edit-select-all)
(global-set-key "<Control><Shift>A" 'edit-deselect)

(global-set-key "B" 'add-box-hotkey)
(global-set-key "<Shift>B" 'add-bus-hotkey)
(global-set-key "C" 'edit-copy-hotkey)
(global-set-key "<Control>C" 'clipboard-copy)
(global-set-key "D" 'edit-delete)

(global-set-key "E <Shift>U" 'edit-undo)
(global-set-key "E <Shift>R" 'edit-redo)
(global-set-key "E S" 'edit-select)
(global-set-key "E C" 'edit-copy-hotkey)
(global-set-key "E E" 'edit-edit)
(global-set-key "E Y" 'edit-mcopy-hotkey)
(global-set-key "E X" 'edit-text)
(global-set-key "E M" 'edit-move-hotkey)
(global-set-key "E D" 'edit-delete)
(global-set-key "E R" 'edit-rotate-90-hotkey)
(global-set-key "E I" 'edit-mirror-hotkey)
(global-set-key "E <Shift>S" 'edit-slot)
(global-set-key "E O" 'edit-color)
(global-set-key "E L" 'edit-lock)
(global-set-key "E <Shift>L" 'edit-unlock)
(global-set-key "E W" 'edit-linetype)
(global-set-key "E F" 'edit-filltype)
(global-set-key "E T" 'edit-translate)
(global-set-key "E <Shift>colon" 'edit-invoke-macro)
(global-set-key "E B" 'edit-embed)
(global-set-key "E U" 'edit-unembed)
(global-set-key "E P" 'edit-update)
(global-set-key "E N" 'edit-show-hidden)

(global-set-key "F W" 'file-new-window)
(global-set-key "F N" 'file-new)
(global-set-key "F O" 'file-open)
(global-set-key "F S" 'file-save)
(global-set-key "F E" 'page-close)
(global-set-key "F A" 'file-save-as)
(global-set-key "F L" 'file-save-all)
(global-set-key "F P" 'file-print)
(global-set-key "F R" 'page-revert)
(global-set-key "F I" 'file-image)
(global-set-key "F T" 'file-script)
(global-set-key "F C" 'file-close-window)
(global-set-key "F Q" 'file-quit)

(global-set-key "H A" 'help-about)
(global-set-key "H M" 'help-manual)
(global-set-key "H F" 'help-faq)
(global-set-key "H W" 'help-wiki)
(global-set-key "H H" 'help-hotkeys)
(global-set-key "H C" 'hierarchy-documentation)

(global-set-key "<Shift>H D" 'hierarchy-down-schematic)
(global-set-key "<Shift>H S" 'hierarchy-down-symbol)
(global-set-key "<Shift>H U" 'hierarchy-up)
(global-set-key "<Shift>H O" 'hierarchy-documentation)

(global-set-key "I" 'add-component)
(global-set-key "L" 'add-line-hotkey)
(global-set-key "M" 'edit-move-hotkey)
(global-set-key "N" 'add-net-hotkey)

(global-set-key "O T" 'options-text-size)
(global-set-key "O A" 'options-action-feedback)
(global-set-key "O G" 'options-grid)
(global-set-key "O S" 'options-snap)
(global-set-key "O R" 'options-rubberband)
(global-set-key "O M" 'options-magneticnet)
(global-set-key "O <Shift>S" 'options-snap-size)
(global-set-key "O L" 'options-show-log-window)
(global-set-key "O C" 'options-show-coord-window)

(global-set-key "P M" 'page-manager)
(global-set-key "P N" 'page-next)
(global-set-key "P P" 'page-prev)
(global-set-key "P E" 'page-new)
(global-set-key "P R" 'page-revert)
(global-set-key "P C" 'page-close)
(global-set-key "P D" 'page-discard)
(global-set-key "P <Shift>P" 'page-print)

(global-set-key "<Alt>Q" 'file-quit)
(global-set-key "R" 'view-redraw)
(global-set-key "<Shift>R" 'edit-redo)
(global-set-key "S" 'edit-select)

(global-set-key "T A" 'attributes-attach)
(global-set-key "T D" 'attributes-detach)
(global-set-key "T N" 'attributes-show-name)
(global-set-key "T V" 'attributes-show-value)
(global-set-key "T B" 'attributes-show-both)
(global-set-key "T T" 'attributes-visibility-toggle)
(global-set-key "T <Shift>F" 'edit-find-text)
(global-set-key "T H" 'edit-hide-text)
(global-set-key "T <Shift>H" 'edit-show-text)
(global-set-key "T U" 'edit-autonumber)

(global-set-key "U" 'edit-undo)
(global-set-key "<Shift>U" 'edit-undo)

(global-set-key "V R" 'view-redraw)
(global-set-key "V B" 'view-zoom-box-hotkey)
(global-set-key "V F" 'view-zoom-full)
(global-set-key "V E" 'view-zoom-extents)
(global-set-key "V P" 'view-pan-hotkey)
(global-set-key "V O" 'view-zoom-out-hotkey)
(global-set-key "V I" 'view-zoom-in-hotkey)
(global-set-key "V D" 'view-dark-colors)
(global-set-key "V L" 'view-light-colors)
(global-set-key "V W" 'view-bw-colors)

(global-set-key "<Control>V" 'clipboard-paste-hotkey)
(global-set-key "W" 'view-zoom-box-hotkey)
(global-set-key "X" 'view-pan-hotkey)
(global-set-key "<Control>X" 'clipboard-cut)

(global-set-key "Y C" 'buffer-copy1)
(global-set-key "Y U" 'buffer-cut1)
(global-set-key "Y P" 'buffer-paste1-hotkey)

(global-set-key "<Control>Y" 'edit-redo)
(global-set-key "Z" 'view-zoom-in-hotkey)
(global-set-key "<Shift>Z" 'view-zoom-out-hotkey)
(global-set-key "<Control>Z" 'edit-undo)

(global-set-key "Escape" 'cancel)
(global-set-key "bracketright" 'options-scale-up-snap-size)
(global-set-key "bracketleft" 'options-scale-down-snap-size)
(global-set-key "Left" 'view-pan-left)
(global-set-key "Right" 'view-pan-right)
(global-set-key "Up" 'view-pan-up)
(global-set-key "Down" 'view-pan-down)
(global-set-key "period" 'repeat-last-command)
(global-set-key "colon" 'edit-invoke-macro)
(global-set-key "comma" 'misc-misc)
(global-set-key "equal" 'misc-misc2)
(global-set-key "plus" 'misc-misc3)
(global-set-key "Delete" 'edit-delete)
(global-set-key "greater" 'page-next)
(global-set-key "Page_Down" 'page-next)
(global-set-key "less" 'page-prev)
(global-set-key "Page_Up" 'page-prev)

;
; Here are the definitions for the top pull down menu bar
;
; The "menu item name" is the name of the item as it will appear in the menu
; The "menu action" is the scheme function which is executed when the item
; is selected off of the menu.  And "menu hotkey function" is the scheme
; function which is executed when the hotkey is pressed.  
; "menu hotkey function" has no real functionality in the menuing scheme other
; than providing the information as to what hotkey to display in the menu.
; "menu hotkey function" is not executed when you select an item off of the
; list.  The hotkeys which are displayed are defined by the global-keymap.
; Actions can have several hotkeys, but the displayed keys are the last
; ones found.
;
; The SEPARATOR keyword is case sensitive and puts a seperator into the menu.
;

(or (defined? 'define-syntax)
    (use-modules (ice-9 syncase)))

;; Define a no-op macro for flagging strings as translatable.
(define-syntax N_
  (syntax-rules ()
    ((N_ expr) expr)))

(define file-menu-items
;;
;;          menu item name      menu action             menu hotkey function    menu stock icon
;;
        `( (,(N_ "_New")              file-new                file-new                "gtk-new")
           (,(N_ "_Open...")          file-open               file-open               "gtk-open")
;; The entry below will be removed from the menu if glib < 2.6 is detected
           (,(N_ "Open Recen_t")      #f                      #f                      #f)
           ("SEPARATOR"              #f                      #f                      #f)
           (,(N_ "_Save")             file-save               file-save               "gtk-save")
           (,(N_ "Save _As...")       file-save-as            file-save-as            "gtk-save-as")
           (,(N_ "Save All")          file-save-all           file-save-all           "gtk-save")
           (,(N_ "_Revert")           page-revert             page-revert             "gtk-revert-to-saved")
           ("SEPARATOR"              #f                      #f                      #f)
           (,(N_ "_Print...")         file-print              file-print              "gtk-print")
           (,(N_ "Write _image...")   file-image              file-image              #f)
           ("SEPARATOR"              #f                      #f                      #f)
           (,(N_ "Execute Script...") file-script             file-script             "gtk-execute")
           ("SEPARATOR"              #f                      #f                      #f)
           (,(N_ "New Window")        file-new-window         file-new-window         #f)
           (,(N_ "_Close Window")     file-close-window       file-close-window       "gtk-close")
           (,(N_ "_Quit")             file-quit               file-quit               "gtk-quit")))

(define edit-menu-items 
;;
;;          menu item name      menu action             menu hotkey action      menu stock icon
;;
        `( (,(N_ "_Undo")              edit-undo              edit-undo               "gtk-undo")
           (,(N_ "_Redo")              edit-redo              edit-redo               "gtk-redo")
           ("SEPARATOR"               #f                     #f                      #f)
           (,(N_ "Cu_t")               clipboard-cut          clipboard-cut           "gtk-cut")
           (,(N_ "_Copy")              clipboard-copy         clipboard-copy          "gtk-copy")
           (,(N_ "_Paste")             clipboard-paste-hotkey clipboard-paste-hotkey  "gtk-paste")
           (,(N_ "_Delete")            edit-delete            edit-delete             "gtk-delete"  )
           ("SEPARATOR"               #f                     #f                      #f)
           (,(N_ "Select Mode")        edit-select            edit-select             #f)
           (,(N_ "Select All")         edit-select-all        edit-select-all         "gtk-select-all")
           (,(N_ "Deselect")           edit-deselect          edit-deselect           #f)
           (,(N_ "Copy Mode")          edit-copy              edit-copy-hotkey        #f)
           (,(N_ "Multiple Copy Mode") edit-mcopy             edit-mcopy-hotkey       #f)
           (,(N_ "Move Mode")          edit-move              edit-move-hotkey        #f)
           (,(N_ "Rotate 90 Mode")     edit-rotate-90         edit-rotate-90-hotkey   #f)
           (,(N_ "Mirror Mode")        edit-mirror            edit-mirror-hotkey      #f)
           ("SEPARATOR"               #f                     #f                      #f)
           (,(N_ "Edit...")            edit-edit              edit-edit               #f)
           (,(N_ "Edit Text...")       edit-text              edit-text               "gtk-edit")
           (,(N_ "Slot...")            edit-slot              edit-slot               #f)
           (,(N_ "Color...")           edit-color             edit-color              "gtk-select-color")
           (,(N_ "Line Width & Type...") edit-linetype        edit-linetype           #f)
           (,(N_ "Fill Type...")         edit-filltype        edit-filltype           #f)
           (,(N_ "Symbol Translate...")  edit-translate       edit-translate          #f)
           (,(N_ "Lock")               edit-lock              edit-lock               #f)
           (,(N_ "Unlock")             edit-unlock            edit-unlock             #f)
           ("SEPARATOR"               #f                     #f                      #f)
           (,(N_ "Invoke Macro")         edit-invoke-macro    edit-invoke-macro       #f)
           (,(N_ "Embed Component/Picture")    edit-embed     edit-embed              #f)
           (,(N_ "Unembed Component/Picture")  edit-unembed   edit-unembed            #f)
           (,(N_ "Update Component")   edit-update            edit-update             "gtk-refresh")
           (,(N_ "Show/Hide Inv Text") edit-show-hidden       edit-show-hidden        #f)))

(define buffer-menu-items 
;;
;;          menu item name      menu action             menu hotkey action      menu stock icon
;;
	`( (,(N_ "Copy into 1")	buffer-copy1       	buffer-copy1)
	   (,(N_ "Copy into 2")	buffer-copy2       	buffer-copy2)
	   (,(N_ "Copy into 3")	buffer-copy3       	buffer-copy3)
	   (,(N_ "Copy into 4")	buffer-copy4       	buffer-copy4)
	   (,(N_ "Copy into 5")	buffer-copy5       	buffer-copy5)
	   (,(N_ "Cut into 1")	buffer-cut1       	buffer-cut1)
	   (,(N_ "Cut into 2")	buffer-cut2       	buffer-cut2)
	   (,(N_ "Cut into 3")	buffer-cut3       	buffer-cut3)
	   (,(N_ "Cut into 4")	buffer-cut4       	buffer-cut4)
	   (,(N_ "Cut into 5")	buffer-cut5       	buffer-cut5)
	   (,(N_ "Paste from 1")	buffer-paste1-hotkey    buffer-paste1-hotkey)
	   (,(N_ "Paste from 2")	buffer-paste2-hotkey    buffer-paste2-hotkey)
	   (,(N_ "Paste from 3")	buffer-paste3-hotkey    buffer-paste3-hotkey)
	   (,(N_ "Paste from 4")	buffer-paste4-hotkey    buffer-paste4-hotkey)
	   (,(N_ "Paste from 5")	buffer-paste5-hotkey    buffer-paste5-hotkey)))

(define view-menu-items 
;;
;;          menu item name        menu action             menu hotkey action      menu stock icon
;;
        `( (,(N_ "_Redraw")             view-redraw             view-redraw             "gtk-refresh")
           (,(N_ "_Pan")                view-pan                view-pan-hotkey         #f)
           (,(N_ "Zoom _Box")           view-zoom-box           view-zoom-box-hotkey    #f)
           (,(N_ "Zoom _Extents")       view-zoom-extents       view-zoom-extents       "gtk-zoom-fit")
           (,(N_ "Zoom _In")            view-zoom-in            view-zoom-in-hotkey     "gtk-zoom-in")
           (,(N_ "Zoom _Out")           view-zoom-out           view-zoom-out-hotkey    "gtk-zoom-out")
           (,(N_ "Zoom _Full")          view-zoom-full          view-zoom-full          #f)
           ("SEPARATOR"                #f                      #f                      #f)
           (,(N_ "_Dark color scheme")  view-dark-colors        view-dark-colors        #f)
           (,(N_ "_Light color scheme") view-light-colors       view-light-colors       #f)
           (,(N_ "B_W color scheme")    view-bw-colors          view-bw-colors          #f)
         ))

(define page-menu-items 
;;
;;          menu item name      menu action             menu hotkey action      menu stock icon
;;
        `( (,(N_ "_Manager...")       page-manager            page-manager            #f)
           (,(N_ "_Previous")         page-prev               page-prev               "gtk-go-back")
           (,(N_ "_Next")             page-next               page-next               "gtk-go-forward")
           (,(N_ "Ne_w")              page-new                page-new                "gtk-new")
           (,(N_ "_Revert")           page-revert             page-revert             "gtk-revert-to-saved")
           (,(N_ "_Close")            page-close              page-close              "gtk-close")
           ("SEPARATOR"              #f                      #f                      #f)
           (,(N_ "_Discard")          page-discard            page-discard            "gtk-discard")))

(define add-menu-items 
;;
;;          menu item name      menu action             menu hotkey action      menu stock icon
;;
	`( (,(N_ "_Component...")     add-component       	add-component)
	   (,(N_ "_Net")              add-net	  	     	add-net-hotkey)
	   (,(N_ "B_us")              add-bus	  	     	add-bus-hotkey)
	   (,(N_ "_Attribute...")     add-attribute  	     	add-attribute-hotkey)
	   (,(N_ "_Text...")          add-text  	     	add-text)
	   ("SEPARATOR"              #f                      #f)
	   (,(N_ "_Line")             add-line  	     	add-line-hotkey)
	   (,(N_ "_Box")              add-box  	     	add-box-hotkey)
	   (,(N_ "C_ircle")           add-circle  	     	add-circle-hotkey)
	   (,(N_ "A_rc")              add-arc  	     	add-arc-hotkey)
	   (,(N_ "_Pin")              add-pin  	     	add-pin-hotkey)
	   (,(N_ "Pictu_re...")       add-picture  	     	add-picture-hotkey)))

(define hierarchy-menu-items 
;;
;;          menu item name      menu action               menu hotkey action        menu stock icon
;;
        `( (,(N_ "_Down Schematic")   hierarchy-down-schematic  hierarchy-down-schematic  "gtk-go-down")
           (,(N_ "Down _Symbol")      hierarchy-down-symbol     hierarchy-down-symbol     "gtk-goto-bottom")
           (,(N_ "_Up")               hierarchy-up              hierarchy-up              "gtk-go-up")
           (,(N_ "D_ocumentation...") hierarchy-documentation   hierarchy-documentation   #f)))

(define attributes-menu-items 
;;
;;          menu item name      menu action             menu hotkey action      menu stock icon
;;
        `( (,(N_ "_Attach")           attributes-attach       attributes-attach       #f)
           (,(N_ "_Detach")           attributes-detach       attributes-detach       #f)
           (,(N_ "Show _Value")       attributes-show-value   attributes-show-value   #f)
           (,(N_ "Show _Name")        attributes-show-name    attributes-show-name    #f)
           (,(N_ "Show _Both")        attributes-show-both    attributes-show-both    #f)
           (,(N_ "_Toggle Visibility")  attributes-visibility-toggle
                                  attributes-visibility-toggle                  #f)
           (,(N_ "_Find Specific Text...")  edit-find-text    edit-find-text          "gtk-find")
           (,(N_ "_Hide Specific Text...")  edit-hide-text    edit-hide-text          #f)
           (,(N_ "_Show Specific Text...")  edit-show-text    edit-show-text          #f)
           (,(N_ "A_utonumber Text...")     edit-autonumber   edit-autonumber         #f)))

(define options-menu-items 
;;
;;          menu item name      menu action             menu hotkey action      menu stock icon
;;
	`( (,(N_ "_Text Size...")	options-text-size       options-text-size)
	   (,(N_ "Cycle _grid styles")  options-grid           options-grid)
	   (,(N_ "Toggle _Snap On/Off") options-snap       	options-snap)
	   (,(N_ "Snap Grid S_pacing...") options-snap-size   	options-snap-size)
    	   (,(N_ "Scale _up Grid Spacing") options-scale-up-snap-size 
						    options-scale-up-snap-size)
    	   (,(N_ "Scale _down Grid Spacing") options-scale-down-snap-size
						  options-scale-down-snap-size)
	   (,(N_ "Toggle _Outline/Box")   options-action-feedback   	
				   options-action-feedback)
	   (,(N_ "Toggle Net _Rubberband") options-rubberband   options-rubberband)
	   (,(N_ "Toggle _Magnetic Net") options-magneticnet options-magneticnet)
	   (,(N_ "Show _Log Window...")    options-show-log-window   
	 			    options-show-log-window)
	   (,(N_ "Show _Coord Window...")   options-show-coord-window   
				     options-show-coord-window)))

(define help-menu-items 
;;
;;          menu item name                menu action               menu hotkey action        menu stock icon
;;
        `(
           (,(N_ "gEDA Docu_mentation...") help-manual               help-manual               "gtk-help")
           (,(N_ "gschem _FAQ...")         help-faq                  help-faq                  #f)
           (,(N_ "gEDA _Wiki...")          help-wiki                 help-wiki                 #f)
           (,(N_ "Component D_ocumentation...") hierarchy-documentation   hierarchy-documentation   #f)
           ("SEPARATOR"                   #f                        #f                        #f)
           (,(N_ "_Hotkeys...")            help-hotkeys              help-hotkeys              #f)
           (,(N_ "_About...")              help-about                help-about                "gtk-about")))

;
; Now actually add the menus.  The order here defines the order in which
; the menus appear in the top menu bar.
;
(add-menu (N_ "_File") file-menu-items)
(add-menu (N_ "_Edit") edit-menu-items)
(add-menu (N_ "_Buffer") buffer-menu-items)
(add-menu (N_ "_View") view-menu-items)
(add-menu (N_ "_Page") page-menu-items)
(add-menu (N_ "_Add") add-menu-items)
(add-menu (N_ "Hie_rarchy") hierarchy-menu-items)
(add-menu (N_ "A_ttributes") attributes-menu-items)
(add-menu (N_ "_Options") options-menu-items)
(add-menu (N_ "_Help") help-menu-items)

;
; End of keymapping related keywords
;


;;
;; Major modes
;;

;; Comment in this scheme code if you want to link with pcb
;;
;; Please note that the code in pcb.scm is still highly experimental
;; and there are known (and easy) ways to crash pcb and/or gschem with this code.
;; The short answer is neither program likes a pipe to break.
;;
; (load-from-path "pcb.scm")