summary refs log tree commit diff
path: root/README.org
blob: 2d782e206b3bc0efb091e050c0894f49db093b2a (plain) (blame)
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
#+TITLE: Personal configurations, scripts and tools.

* goals
- keep it simple
- configurations work the same way, everywhere
* emacs
** go
*** compile
You can compile a go binary using =M-x compile= inside a go buffer.
*** debugging
We need to install =dlv= first:
#+begin_src sh
go install github.com/go-delve/delve/cmd/dlv@latest
#+end_src

For =dap-mode= you also need to install =nodejs=. On arch you do this with
#+begin_src sh
sudo pacman -Syu nodejs
#+end_src

Then from emacs =M-x dap-go-set= to install the dependencies.

It's unclear as to why =node= is still in the picture since it looks like =dlv= seems to support =dap= directly (see [[https://github.com/go-delve/delve/issues/1515][delve/issues/1515]]).

To debug a program, you can set breakpoints where you need with =M-x dap-breakpoint-add=. To start the debugger hit =M-x dap-debug=.

If the program you debug needs argument, call =M-x dap-debug-edit-template=. Add the argument(s) you need to the program and evaluate the buffer (=C-c C-e=). Next time you call the debugger, the argument(s) will be passed to the program. You can also set environment variables if you need.

The binding =C-c d= will bring an hydra menu for debugging.

The REPL is not brought on by default when starting a debugging session, but =M-x dap-ui-repl= will start a REPL (the position is controlled by the variable =dap-ui-buffer-configurations=).
* Linux
** installed packages
Under arch linux, you can run the following to get the list of installed packages:
,
#+begin_src sh
pacman -Qqe
#+end_src

#+RESULTS:
| alacritty              |
| alsa-utils             |
| base                   |
| btrfs-progs            |
| chromium               |
| dmenu                  |
| docker                 |
| easytag                |
| emacs                  |
| ethtool                |
| feh                    |
| firefox                |
| fwupd                  |
| gcc                    |
| git                    |
| gnome-keyring          |
| go                     |
| htop                   |
| hugo                   |
| i3-wm                  |
| i3lock                 |
| i3status               |
| intel-ucode            |
| iwd                    |
| jq                     |
| lightdm                |
| lightdm-gtk-greeter    |
| linux                  |
| linux-firmware         |
| make                   |
| man-db                 |
| mc                     |
| mg                     |
| mpc                    |
| mpd                    |
| mupdf                  |
| network-manager-applet |
| noto-fonts             |
| noto-fonts-cjk         |
| noto-fonts-emoji       |
| openssh                |
| podman                 |
| pulseaudio             |
| pulseaudio-alsa        |
| racket-minimal         |
| redshift               |
| restic                 |
| ripgrep                |
| rsync                  |
| smbclient              |
| strace                 |
| sudo                   |
| tcpdump                |
| tmux                   |
| ttf-bitstream-vera     |
| ttf-dejavu             |
| ttf-droid              |
| unzip                  |
| vi                     |
| w3m                    |
| wavemon                |
| wireshark-cli          |
| wireshark-qt           |
| xclip                  |
| xdg-user-dirs          |
| xorg-server            |
| xorg-xmodmap           |
| xorg-xrandr            |
| xorg-xrdb              |
| xorg-xsetroot          |
| xss-lock               |
| xterm                  |
| zsh                    |

** xorg
To fix the touchpad (use reverse / natural scrolling and faster movement):
#+begin_src
#/etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    MatchIsTouchpad "on"
    Option "NaturalScrolling" "true"
    Option "AccelSpeed" "0.3"
EndSection
#+end_src

In case it's needed, the configuration for the DELL 4k monitor:
#+begin_src
#/etc/X11/xorg.conf.d/25-dell-monitor-U2718Q.conf
# Dell 4k home monitors (U2718Q)
Section "Monitor"
    Identifier "DP-3"
    Option "DPMS" "true"
EndSection
#+end_src

The following udev rules:
#+begin_src
#/etc/udev/rules.d/99-monitor-hotplug.rules
KERNEL=="card0", ACTION=="change", SUBSYSTEM=="drm", ENV{DISPLAY}=":0" ENV{HOTPLUG}=="1", RUN+="/usr/local/bin/monitor-hotplug"
#+end_src