Advertisement
4ndr0666

Picom.conf for i915

Apr 21st, 2023 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 18.57 KB | Source Code | 0 0
  1. #################################
  2. #          Animations           #
  3. #################################
  4. # requires https://github.com/jonaburg/picom
  5. # (These are also the default values)
  6. transition-length = 500
  7. transition-pow-x = 0.1
  8. transition-pow-y = 0.1
  9. transition-pow-w = 0.1
  10. transition-pow-h = 0.1
  11. size-transition = true
  12.  
  13.  
  14. #################################
  15. #             Corners           #
  16. #################################
  17. # requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom
  18. corner-radius = 30.0;
  19. rounded-corners-exclude = [
  20.  
  21.   "window_type = 'dock'",
  22.   "window_type = 'desktop'",
  23.   "window_type = 'menu'",
  24.   "window_type = 'tooltip'",
  25.   "class_g = 'AltTab'",
  26.   "class_g = 'Notification-daemon'",
  27.   "class_g = 'Alacritty'",
  28.   "class_g = 'Xfce-terminal'",
  29.   "class_g = 'Polybar'",
  30.   "class_g = 'code-oss'",
  31.   "QTILE_INTERNAL:32c = 1",
  32.  
  33.  
  34. #  "class_g = 'Dunst'",
  35.   #"class_g = 'TelegramDesktop'",
  36. #  "class_g = 'brave-browser'",
  37. #  "class_g = 'Thunderbird'"
  38. ];
  39. round-borders = 1;
  40. round-borders-exclude = [
  41.   #"class_g = 'TelegramDesktop'",
  42. ];
  43.  
  44. #################################
  45. #             Shadows           #
  46. #################################
  47.  
  48.  
  49. # Enabled client-side shadows on windows. Note desktop windows
  50. # (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
  51. # unless explicitly requested using the wintypes option.
  52. #
  53. # shadow = false
  54. shadow = true;
  55.  
  56. # The blur radius for shadows, in pixels. (defaults to 12)
  57. # shadow-radius = 12
  58. shadow-radius = 7;
  59.  
  60. # The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
  61. # shadow-opacity = .75
  62.  
  63. # The left offset for shadows, in pixels. (defaults to -15)
  64. # shadow-offset-x = -15
  65. shadow-offset-x = -7;
  66.  
  67. # The top offset for shadows, in pixels. (defaults to -15)
  68. # shadow-offset-y = -15
  69. shadow-offset-y = -7;
  70.  
  71. # Avoid drawing shadows on dock/panel windows. This option is deprecated,
  72. # you should use the *wintypes* option in your config file instead.
  73. #
  74. # no-dock-shadow = false
  75.  
  76. # Don't draw shadows on drag-and-drop windows. This option is deprecated,
  77. # you should use the *wintypes* option in your config file instead.
  78. #
  79. # no-dnd-shadow = false
  80.  
  81. # Red color value of shadow (0.0 - 1.0, defaults to 0).
  82. # shadow-red = 0
  83.  
  84. # Green color value of shadow (0.0 - 1.0, defaults to 0).
  85. # shadow-green = 0
  86.  
  87. # Blue color value of shadow (0.0 - 1.0, defaults to 0).
  88. # shadow-blue = 0
  89.  
  90. # Do not paint shadows on shaped windows. Note shaped windows
  91. # here means windows setting its shape through X Shape extension.
  92. # Those using ARGB background is beyond our control.
  93. # Deprecated, use
  94. #   shadow-exclude = 'bounding_shaped'
  95. # or
  96. #   shadow-exclude = 'bounding_shaped && !rounded_corners'
  97. # instead.
  98. #
  99. # shadow-ignore-shaped = ''
  100.  
  101. # Specify a list of conditions of windows that should have no shadow.
  102. #
  103. # examples:
  104. #   shadow-exclude = "n:e:Notification";
  105. #
  106. # shadow-exclude = []
  107. shadow-exclude = [
  108.   "name = 'Notification'",
  109.   "class_g = 'Conky'",
  110.   "class_g ?= 'Notify-osd'",
  111.   "class_g = 'Cairo-clock'",
  112.   "class_g = 'slop'",
  113.   "class_g = 'Polybar'",
  114.   "_GTK_FRAME_EXTENTS@:c"
  115. ];
  116.  
  117. # Specify a X geometry that describes the region in which shadow should not
  118. # be painted in, such as a dock window region. Use
  119. #    shadow-exclude-reg = "x10+0+0"
  120. # for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
  121. #
  122. # shadow-exclude-reg = ""
  123.  
  124. # Crop shadow of a window fully on a particular Xinerama screen to the screen.
  125. # xinerama-shadow-crop = false
  126.  
  127.  
  128. #################################
  129. #           Fading              #
  130. #################################
  131.  
  132.  
  133. # Fade windows in/out when opening/closing and when opacity changes,
  134. #  unless no-fading-openclose is used.
  135. # fading = false
  136. fading = true;
  137.  
  138. # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
  139. # fade-in-step = 0.028
  140. fade-in-step = 0.03;
  141.  
  142. # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
  143. # fade-out-step = 0.03
  144. fade-out-step = 0.03;
  145.  
  146. # The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
  147. # fade-delta = 10
  148.  
  149. # Specify a list of conditions of windows that should not be faded.
  150. # don't need this, we disable fading for all normal windows with wintypes: {}
  151. fade-exclude = [
  152.   "class_g = 'slop'"   # maim
  153. ]
  154.  
  155. # Do not fade on window open/close.
  156. # no-fading-openclose = false
  157.  
  158. # Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
  159. # no-fading-destroyed-argb = false
  160.  
  161.  
  162. #################################
  163. #   Transparency / Opacity      #
  164. #################################
  165.  
  166.  
  167. # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
  168. # inactive-opacity = 1
  169. inactive-opacity = 0.2;
  170. # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
  171. active-opacity = 0.8;
  172.  
  173.  
  174. # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
  175. # frame-opacity = 1.0
  176. frame-opacity = 0.7;
  177.  
  178. # Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
  179. # menu-opacity = 1.0
  180. # menu-opacity is depreciated use dropdown-menu and popup-menu instead.
  181.  
  182. #If using these 2 below change their values in line 510 & 511 aswell
  183. popup_menu = { opacity = 0.8; }
  184. dropdown_menu = { opacity = 0.8; }
  185.  
  186.  
  187. # Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
  188. # inactive-opacity-override = true
  189. inactive-opacity-override = true;
  190. mark-ovredir-focused = false;
  191. # Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
  192. # inactive-dim = 0.0
  193.  
  194. # Specify a list of conditions of windows that should always be considered focused.
  195. # focus-exclude = []
  196. focus-exclude = [
  197.   "class_g = 'Cairo-clock'",
  198.   "class_g = 'Bar'",                    # lemonbar
  199.   "class_g = 'slop'"                    # maim
  200. ];
  201.  
  202. # Use fixed inactive dim value, instead of adjusting according to window opacity.
  203. # inactive-dim-fixed = 1.0
  204.  
  205. # Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
  206. # like `50:name *= "Firefox"`. picom-trans is recommended over this.
  207. # Note we don't make any guarantee about possible conflicts with other
  208. # programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
  209. # example:
  210. #    opacity-rule = [ "80:class_g = 'URxvt'" ];
  211. #
  212. # opacity-rule = []
  213. opacity-rule = [
  214.    "100:class_g    = 'brave'",
  215.    "100:class_g    = 'brave-browser'",
  216.    "100:class_g    = 'steam'",
  217.    "100:class_g    = 'Steam'",
  218.    "100:class_g    = 'chromium'",
  219.    "100:class_g    = 'firefox'",
  220.    "100:class_g    = 'jdownloader'",
  221.    "100:class_g    = 'Thunar'",
  222.    "100:class_g    = 'Virt-manager'",
  223.    "100:class_g    = 'Chrome'",
  224.    "100:class_g    = 'DarkPlaces'",
  225.    "100:class_g    = 'xonotic-sdl'",
  226.    "60:class_g = 'AltTab'",
  227.    "60:class_g = 'nvim' && !focused",
  228.    "60:class_g = 'Thunderbird' && !focused",
  229.    "60:class_g = 'Alacritty' && !focused",
  230.    "60:class_g = 'ranger' && !focused",
  231.  
  232.  
  233. ];
  234.  
  235.  
  236. #################################
  237. #     Background-Blurring       #
  238. #################################
  239.  
  240.  
  241. # Parameters for background blurring, see the *BLUR* section for more information.
  242. # blur-method =
  243. # blur-size = 12
  244. #
  245. # blur-deviation = false
  246.  
  247. # Blur background of semi-transparent / ARGB windows.
  248. # Bad in performance, with driver-dependent behavior.
  249. # The name of the switch may change without prior notifications.
  250. #
  251. blur-background = false;
  252.  
  253. # Blur background of windows when the window frame is not opaque.
  254. # Implies:
  255. #    blur-background
  256. # Bad in performance, with driver-dependent behavior. The name may change.
  257. #
  258. # blur-background-frame = false;
  259.  
  260.  
  261. # Use fixed blur strength rather than adjusting according to window opacity.
  262. # blur-background-fixed = false;
  263.  
  264.  
  265. # Specify the blur convolution kernel, with the following format:
  266. # example:
  267. #   blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
  268. #
  269. # blur-kern = ''
  270. # blur-kern = "3x3box";
  271.  
  272. #blur: {
  273.   # requires: https://github.com/ibhagwan/picom
  274.   #-method = "dual_kawase";
  275.   #-strength = 8;
  276.   # deviation = 1.0;
  277.   # kernel = "11x11gaussian";
  278.   #-background = true;
  279.   #-background-frame = true;
  280.   #-background-fixed = true;
  281.   #-kern = "3x3box";
  282. #-}
  283.  
  284. # Exclude conditions for background blur.
  285. blur-background-exclude = [
  286.   #"window_type = 'dock'",
  287.   #"window_type = 'desktop'",
  288.   #"class_g = 'URxvt'",
  289.   #
  290.   # prevents picom from blurring the background
  291.   # when taking selection screenshot with `main`
  292.   # https://github.com/naelstrof/maim/issues/130
  293.   "class_g = 'slop'",
  294.   "class_g = 'Alacritty'",
  295.   "_GTK_FRAME_EXTENTS@:c"
  296. ];
  297.  
  298.  
  299. #################################
  300. #       General Settings        #
  301. #################################
  302.  
  303. # Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
  304. # daemon = false
  305.  
  306. # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
  307. # `xrender` is the default one.
  308. #
  309. experimental-backends = true;
  310. backend = "glx";
  311. #backend = "xrender";
  312.  
  313.  
  314. # Enable/disable VSync.
  315. # vsync = false
  316. vsync = true
  317.  
  318. # Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
  319. # dbus = false
  320.  
  321. # Try to detect WM windows (a non-override-redirect window with no
  322. # child that has 'WM_STATE') and mark them as active.
  323. #
  324. # mark-wmwin-focused = false
  325. mark-wmwin-focused = true;
  326.  
  327. # Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
  328. # mark-ovredir-focused = false
  329. #mark-ovredir-focused = true;
  330.  
  331. # Try to detect windows with rounded corners and don't consider them
  332. # shaped windows. The accuracy is not very high, unfortunately.
  333. #
  334. # detect-rounded-corners = false
  335. detect-rounded-corners = true;
  336.  
  337. # Detect '_NET_WM_OPACITY' on client windows, useful for window managers
  338. # not passing '_NET_WM_OPACITY' of client windows to frame windows.
  339. #
  340. # detect-client-opacity = false
  341. detect-client-opacity = true;
  342.  
  343. # Specify refresh rate of the screen. If not specified or 0, picom will
  344. # try detecting this with X RandR extension.
  345. #
  346. # refresh-rate = 60 - My note: The picom output stated this was deprecated and to remove it, so I did.
  347.  
  348. # Limit picom to repaint at most once every 1 / 'refresh_rate' second to
  349. # boost performance. This should not be used with
  350. #   vsync drm/opengl/opengl-oml
  351. # as they essentially does sw-opti's job already,
  352. # unless you wish to specify a lower refresh rate than the actual value.
  353. #
  354. # sw-opti =
  355.  
  356. # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
  357. # rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
  358. # provided that the WM supports it.
  359. #
  360. # use-ewmh-active-win = false
  361.  
  362. # Unredirect all windows if a full-screen opaque window is detected,
  363. # to maximize performance for full-screen windows. Known to cause flickering
  364. # when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
  365. #
  366. # unredir-if-possible = false
  367.  
  368. # Delay before unredirecting the window, in milliseconds. Defaults to 0.
  369. # unredir-if-possible-delay = 0
  370.  
  371. # Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
  372. # unredir-if-possible-exclude = []
  373.  
  374. # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
  375. # in the same group focused at the same time.
  376. #
  377. # detect-transient = false
  378. detect-transient = true
  379.  
  380. # Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
  381. # group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
  382. # detect-transient is enabled, too.
  383. #
  384. # detect-client-leader = false
  385. detect-client-leader = true
  386.  
  387. # Resize damaged region by a specific number of pixels.
  388. # A positive value enlarges it while a negative one shrinks it.
  389. # If the value is positive, those additional pixels will not be actually painted
  390. # to screen, only used in blur calculation, and such. (Due to technical limitations,
  391. # with use-damage, those pixels will still be incorrectly painted to screen.)
  392. # Primarily used to fix the line corruption issues of blur,
  393. # in which case you should use the blur radius value here
  394. # (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
  395. # with a 5x5 one you use `--resize-damage 2`, and so on).
  396. # May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
  397. #
  398. # resize-damage = 1
  399.  
  400. # Specify a list of conditions of windows that should be painted with inverted color.
  401. # Resource-hogging, and is not well tested.
  402. #
  403. # invert-color-include = []
  404.  
  405. # GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
  406. # Might cause incorrect opacity when rendering transparent content (but never
  407. # practically happened) and may not work with blur-background.
  408. # My tests show a 15% performance boost. Recommended.
  409. #
  410. # glx-no-stencil = false
  411.  
  412. # GLX backend: Avoid rebinding pixmap on window damage.
  413. # Probably could improve performance on rapid window content changes,
  414. # but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
  415. # Recommended if it works.
  416. #
  417. # glx-no-rebind-pixmap = false
  418.  
  419. # Disable the use of damage information.
  420. # This cause the whole screen to be redrawn everytime, instead of the part of the screen
  421. # has actually changed. Potentially degrades the performance, but might fix some artifacts.
  422. # The opposing option is use-damage
  423. #
  424. # no-use-damage = false
  425. #use-damage = true (Causing Weird Black semi opaque rectangles when terminal is opened)
  426. #Changing use-damage to false fixes the problem
  427. use-damage = false
  428.  
  429. # Use X Sync fence to sync clients' draw calls, to make sure all draw
  430. # calls are finished before picom starts drawing. Needed on nvidia-drivers
  431. # with GLX backend for some users.
  432. #
  433. # xrender-sync-fence = false
  434.  
  435. # GLX backend: Use specified GLSL fragment shader for rendering window contents.
  436. # See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
  437. # in the source tree for examples.
  438. #
  439. # glx-fshader-win = ''
  440.  
  441. # Force all windows to be painted with blending. Useful if you
  442. # have a glx-fshader-win that could turn opaque pixels transparent.
  443. #
  444. # force-win-blend = false
  445.  
  446. # Do not use EWMH to detect fullscreen windows.
  447. # Reverts to checking if a window is fullscreen based only on its size and coordinates.
  448. #
  449. # no-ewmh-fullscreen = false
  450.  
  451. # Dimming bright windows so their brightness doesn't exceed this set value.
  452. # Brightness of a window is estimated by averaging all pixels in the window,
  453. # so this could comes with a performance hit.
  454. # Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
  455. #
  456. # max-brightness = 1.0
  457.  
  458. # Make transparent windows clip other windows like non-transparent windows do,
  459. # instead of blending on top of them.
  460. #
  461. # transparent-clipping = false
  462.  
  463. # Set the log level. Possible values are:
  464. #  "trace", "debug", "info", "warn", "error"
  465. # in increasing level of importance. Case doesn't matter.
  466. # If using the "TRACE" log level, it's better to log into a file
  467. # using *--log-file*, since it can generate a huge stream of logs.
  468. #
  469. # log-level = "debug"
  470. log-level = "info";
  471.  
  472. # Set the log file.
  473. # If *--log-file* is never specified, logs will be written to stderr.
  474. # Otherwise, logs will to written to the given file, though some of the early
  475. # logs might still be written to the stderr.
  476. # When setting this option from the config file, it is recommended to use an absolute path.
  477. #
  478. # log-file = '/path/to/your/log/file'
  479.  
  480. # Show all X errors (for debugging)
  481. # show-all-xerrors = false
  482.  
  483. # Write process ID to a file.
  484. # write-pid-path = '/path/to/your/log/file'
  485.  
  486. # Window type settings
  487. #
  488. # 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
  489. #     "unknown", "desktop", "dock", "toolbar", "menu", "utility",
  490. #     "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
  491. #     "tooltip", "notification", "combo", and "dnd".
  492. #
  493. # Following per window-type options are available: ::
  494. #
  495. #   fade, shadow:::
  496. #     Controls window-type-specific shadow and fade settings.
  497. #
  498. #   opacity:::
  499. #     Controls default opacity of the window type.
  500. #
  501. #   focus:::
  502. #     Controls whether the window of this type is to be always considered focused.
  503. #     (By default, all window types except "normal" and "dialog" has this on.)
  504. #
  505. #   full-shadow:::
  506. #     Controls whether shadow is drawn under the parts of the window that you
  507. #     normally won't be able to see. Useful when the window has parts of it
  508. #     transparent, and you want shadows in those areas.
  509. #
  510. #   redir-ignore:::
  511. #     Controls whether this type of windows should cause screen to become
  512. #     redirected again after been unredirected. If you have unredir-if-possible
  513. #     set, and doesn't want certain window to cause unnecessary screen redirection,
  514. #     you can set this to `true`.
  515. #
  516. wintypes:
  517. {
  518.   normal = { fade = false; shadow = false; }
  519.   tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; corner-radius = 0.0; };
  520.   dock = { shadow = false; }
  521.   dnd = { shadow = false; }
  522.   popup_menu = { opacity = 0.8; corner-radius = 0.0; }
  523.   dropdown_menu = { opacity = 0.8; }
  524. };
  525. ##################################################################################################################################
  526. ## Modify the source code to load the glx_sgi_swap_control extension: In the src/glx.c file of the picom-ibhagwan source code, you need to modify the glx_bind_display function to load the glx_sgi_swap_control extension using the glXGetProcAddress function:
  527.  
  528. arduino
  529. Copy code
  530. #include <GL/glx.h>
  531.  
  532. typedef int (*PFNGLXSWAPINTERVALSGIPROC)(int);
  533. PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;
  534.  
  535. static void glx_bind_display(session_t *ps, Display *dpy, XVisualInfo *pvis) {
  536.     // ...
  537.  
  538.     // Load the glx_sgi_swap_control extension
  539.     glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC) glXGetProcAddress((const GLubyte*) "glXSwapIntervalSGI");
  540.     if (glXSwapIntervalSGI == NULL) {
  541.         // Error: the extension is not supported
  542.     }
  543.  
  544.     // Set the swap interval to enable or disable VSync
  545.     int interval = ps->o.vsync ? 1 : 0;
  546.     glXSwapIntervalSGI(interval);
  547.  
  548.     // ...
  549. }
  550.  
  551. ## This code defines a function pointer type (PFNGLXSWAPINTERVALSGIPROC) and a global variable (glXSwapIntervalSGI) to store the address of the glXSwapIntervalSGI function. It then loads the function using the glXGetProcAddress function, and sets the swap interval to enable or disable VSync based on the value of the ps->o.vsync option in the Picom configuration file.
  552.  
  553. ## Build and install picom-ibhagwan: Once you have modified the source code, you can build and install picom-ibhagwan using the following commands:
  554.  
  555. cd picom
  556. meson --buildtype=release . build
  557. ninja -C build
  558. sudo ninja -C build install
  559.  
Tags: picom
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement