logo

badwolf

minimalist and privacy-oriented web browser based on WebKitGTK git clone https://anongit.hacktivis.me/git/badwolf.git/

config.h (4125B)


  1. // SPDX-FileCopyrightText: 2019-2022 Badwolf Authors <https://hacktivis.me/projects/badwolf>
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. #ifndef CONFIG_H_INCLUDED
  4. #define CONFIG_H_INCLUDED
  5. /* BADWOLF_TAB_POSITION: Position of the tab listing, can be one of:
  6. * - GTK_POS_TOP
  7. * - GTK_POS_BOTTOM
  8. * - GTK_POS_RIGHT
  9. * - GTK_POS_LEFT
  10. *
  11. * See https://docs.gtk.org/gtk3/enum.PositionType.html
  12. */
  13. #define BADWOLF_TAB_POSITION GTK_POS_TOP
  14. /* BADWOLF_TAB_LABEL_CHARWIDTH: Amount of characters the tab label text fits
  15. * Quite conflicts with BADWOLF_TAB_BOX_WIDTH, recommended to only define one
  16. */
  17. #define BADWOLF_TAB_LABEL_CHARWIDTH 26
  18. /* BADWOLF_TAB_BOX_WIDTH: Requested width (in pixels) for the whole tab
  19. * Quite conflicts with BADWOLF_TAB_LABEL_CHARWIDTH, recommended to only define one
  20. */
  21. //#define BADWOLF_TAB_BOX_WIDTH 120
  22. // BADWOLF_TAB_HEXPAND: Should the tab try to fill the available horizontal space?
  23. #define BADWOLF_TAB_HEXPAND FALSE
  24. /* BADWOLF_TAB_LABEL_ELLIPSIZE: pango ellipsize mode of the tab label text, can be one of:
  25. * - PANGO_ELLIPSIZE_NONE
  26. * - PANGO_ELLIPSIZE_START
  27. * - PANGO_ELLIPSIZE_MIDDLE
  28. * - PANGO_ELLIPSIZE_END
  29. *
  30. * See https://docs.gtk.org/Pango/enum.EllipsizeMode.html
  31. */
  32. #define BADWOLF_TAB_LABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE
  33. // BADWOLF_BOX_PADDING: Amount of padding between browser’s box (tab child) elements
  34. #define BADWOLF_BOX_PADDING 0
  35. // BADWOLF_TOOLBAR_PADDING: Amount of padding between toolbar elements
  36. #define BADWOLF_TOOLBAR_PADDING 0
  37. // BADWOLF_TOOLBAR_PADDING: Amount of padding between toolbar elements
  38. #define BADWOLF_TOOLBAR_SEPARATOR_PADDING 4
  39. // BADWOLF_STATUSBAR_PADDING: Amount of padding between statusbar elements
  40. #define BADWOLF_STATUSBAR_PADDING 0
  41. // BADWOLF_DOWNLOAD_PADDING: Amount of padding between download list row-elements
  42. #define BADWOLF_DOWNLOAD_PADDING 5
  43. /* BADWOLF_DEFAULT_WIDTH / BADWOLF_DEFAULT_HEIGHT:
  44. * Used to define the default width/height of the window,
  45. * useful for floating Window Managers, probably useless in tiling ones
  46. *
  47. * See https://docs.gtk.org/gtk3/method.Window.set_default_size.html
  48. */
  49. #define BADWOLF_DEFAULT_WIDTH 800
  50. #define BADWOLF_DEFAULT_HEIGHT 600
  51. /* BADWOLF_WEBKIT_SETTINGS:
  52. * Used when creating a new view with webkit_settings_new_with_settings the usage is:
  53. * setting-name, setting-value, setting-name, …, NULL
  54. *
  55. * See: https://webkitgtk.org/reference/webkit2gtk/stable/class.Settings.html#properties
  56. */
  57. // clang-format off
  58. #define BADWOLF_WEBKIT_SETTINGS \
  59. "default-charset", "utf-8", \
  60. "enable-caret-browsing", FALSE, \
  61. "enable-developer-extras", TRUE, \
  62. "enable-dns-prefetching", FALSE, \
  63. "enable-hyperlink-auditing", FALSE, \
  64. "enable-java", FALSE, \
  65. "enable-javascript-markup", FALSE, \
  66. "enable-javascript", TRUE, \
  67. "enable-plugins", FALSE, \
  68. "javascript-can-access-clipboard", FALSE, \
  69. "javascript-can-open-windows-automatically", FALSE, \
  70. "media-playback-requires-user-gesture", TRUE, \
  71. "minimum-font-size", 9, \
  72. "allow-top-navigation-to-data-urls", FALSE, \
  73. NULL
  74. // clang-format on
  75. /* BADWOLF_STATUSLABEL_ELLIPSIZE: pango ellipsize mode of the status bar label text, can be one of:
  76. * - PANGO_ELLIPSIZE_NONE
  77. * - PANGO_ELLIPSIZE_START
  78. * - PANGO_ELLIPSIZE_MIDDLE
  79. * - PANGO_ELLIPSIZE_END
  80. *
  81. * See https://docs.gtk.org/Pango/enum.EllipsizeMode.html
  82. */
  83. #define BADWOLF_STATUSLABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE
  84. /* BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE: pango ellipsize mode of the download destination path,
  85. * can be one of:
  86. * - PANGO_ELLIPSIZE_NONE
  87. * - PANGO_ELLIPSIZE_START
  88. * - PANGO_ELLIPSIZE_MIDDLE
  89. * - PANGO_ELLIPSIZE_END
  90. *
  91. * See https://docs.gtk.org/Pango/enum.EllipsizeMode.html
  92. */
  93. #define BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE
  94. // BADWOLF_LOCATION_INLINE_SELECTION: show selected completion as a selection in location entry
  95. #define BADWOLF_LOCATION_INLINE_SELECTION TRUE
  96. // BADWOLF_MAN_HTML_CMD: Command to render manpages to HTML.
  97. // Needs to support `[section] name` as additional arguments.
  98. // Default one made for mandoc
  99. #define BADWOLF_MAN_HTML_CMD "man", "-Thtml", "-Oman=man:%N.%S", "-Otoc"
  100. #endif /* CONFIG_H_INCLUDED */