summaryrefslogtreecommitdiff
path: root/home-configuration/managed/xserver/default.nix
blob: 79502d8d76be67fa22c4c8c612efb9c2a3602f8c (plain)
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
{ ... }:
{
  xsession.windowManager.bspwm.settings = {
    border_width = 2;
    focused_border_color = "#383838";
    normal_border_color = "#282828";
    window_gap = 10;
    split_ratiop = 0.5;
    smart_gap = true;
    focus_follows_pointer = false;
    click_to_focus = true;
    pointer_follows_monitor = true;
    remove_disabled_monitors = true;
    auto_cancel = true;
    auto_alternate = true;
    bottom_padding = 0;
  };
  xsession.windowManager.bspwm.extraConfig = ''
              pidb() {
            	pgrep -x "$1" >/dev/null 2>&1
            }

            run() {
            	proc="$1"
            	cmd="$2"

            	if ! pidb "$proc"; then
            		sh -c "$cmd" &
            	fi
            }

            ### }}}


            ### {{{ rerun/start processes

            # piss
            #run "piss" "piss"
    		sxhkd

            # picom
            run "picom" "picom --backend glx"

            # dunst
            # run "dunst" "dunst"

            # bspbar
            # run "bspbar" "bspbar"

        	xwallpaper --center "$HOME/Wallpapers/nature2art.png"
  '';
}