#+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 | | aspell | | aspell-en | | base | | btrfs-progs | | chromium | | dmenu | | docker | | easytag | | emacs | | ethtool | | faac | | feh | | firefox | | fwupd | | gcc | | git | | gnome-keyring | | go | | htop | | hugo | | i3-wm | | i3lock | | i3status | | intel-ucode | | iwd | | jq | | kubectl | | lightdm | | lightdm-gtk-greeter | | linux | | linux-firmware | | make | | man-db | | mc | | mg | | mpc | | mpd | | mupdf | | nautilus | | network-manager-applet | | nodejs | | noto-fonts | | noto-fonts-cjk | | noto-fonts-emoji | | openssh | | podman | | pulseaudio | | pulseaudio-alsa | | qrencode | | racket-minimal | | redshift | | restic | | rhythmbox | | ripgrep | | rsync | | sane-airscan | | simple-scan | | smbclient | | strace | | sudo | | syncthing | | systemd-resolvconf | | tcpdump | | tmux | | ttf-bitstream-vera | | ttf-dejavu | | ttf-droid | | unzip | | vi | | vlc | | w3m | | wavemon | | wireguard-tools | | wireshark-cli | | wireshark-qt | | xclip | | xdg-user-dirs | | xf86-video-intel | | 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