~tardypad/dotfiles

407dc4419e91a91f2fdc62d98bca6fff39373e41 — Damien Tardy-Panis 4 months ago a1f1caa
Add some tools, bindings and configs for presentations
M Makefile => Makefile +1 -1
@@ 8,7 8,7 @@ CACHE_DIR  = $(HOME)/.cache
CONFIG_DIR = $(HOME)/.config
DATA_DIR   = $(HOME)/.local/share

setup_file = { setup/substitute-colors $(THEME) | setup/substitute-dirs | setup/substitute-apps | setup/substitute-keys; } < files
setup_file = { setup/substitute-apps | setup/substitute-colors $(THEME) | setup/substitute-dirs | setup/substitute-keys; } < files

include files/configs/aerc/Makefile
include files/configs/alacritty/Makefile

M config/apps => config/apps +1 -0
@@ 8,3 8,4 @@ terminal_emulator alacritty -e tmux new-session
text_editor       alacritty -e vim
web_browser       qutebrowser -l warning
gemini_browser    alacritty -e amfora
presentation      alacritty -t=sway_presentation -o "colors.primary.background='#{color/base01/hex}'" -o "colors.primary.foreground='#{color/base05/hex}'" -o font.size=48

M doc/PACKAGES.md => doc/PACKAGES.md +1 -0
@@ 64,6 64,7 @@ Note that it is not an exact match as extra patches might be added by the distro
| weechat                | chat client                          | [GitHub](https://github.com/weechat/weechat)                                           | [3.1](https://github.com/weechat/weechat/releases/tag/v3.1)                                                                                 |
| wl-clipboard           | clipboard utilities                  | [GitHub](https://github.com/bugaevc/wl-clipboard)                                      | [1:2.0.0](https://github.com/bugaevc/wl-clipboard/releases/tag/v2.0.0)                                                                      |
| xdg-utils              | applications manager                 | [freedesktop.org](https://cgit.freedesktop.org/xdg/xdg-utils/)                         | [1.1.3+19+g9816ebb](https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=9816ebb3e6fd9f23e993b8b7fcbd56f92d9c9197)                         |
| ydotool                | keyboard and mouse automation        | [GitHub](https://github.com/ReimuNotMoe/ydotool)                                       | [0.2.0](https://github.com/ReimuNotMoe/ydotool/releases/tag/v0.2.0)                                                                         |
| yubikey-manager        | Yubikey manager                      | [GitHub](https://github.com/Yubico/yubikey-manager)                                    | [3.1.2](https://github.com/Yubico/yubikey-manager/releases/tag/yubikey-manager-3.1.2)                                                       |
| zathura                | document viewer                      | [pwmt.org](https://git.pwmt.org/pwmt/zathura)                                          | [0.4.7](https://git.pwmt.org/pwmt/zathura/tags/0.4.7)                                                                                       |
| zsh                    | shell                                | [GitHub](https://github.com/zsh-users/zsh)                                             | [5.8](https://github.com/zsh-users/zsh/releases/tag/zsh-5.8)                                                                                |

M files/configs/sway/config.d/bindings => files/configs/sway/config.d/bindings +8 -0
@@ 43,6 43,12 @@ bindsym --locked $mod+{key/t} exec night-mode toggle
# toggle presentation mode
bindsym $mod+Ctrl+{key/p} exec presentation-mode toggle

# Press enter in the presentation window
bindsym $mod+{key/bracketright} exec "swaymsg -q -- mark --add presentation_main \
                                && swaymsg -q '[title=\"sway_presentation\"]' focus \
                                && ydotool sleep 100 , key enter 2> /dev/null \
                                && swaymsg -q '[con_mark=\"presentation_main\"]' focus"


## notifications



@@ 68,6 74,8 @@ mode "-- Commands --" {
    bindsym {key/t} mode "default", exec sway-quick-command start-task
    bindsym {key/w} mode "default", exec {app/web_browser}

    bindsym Ctrl+{key/p} mode "default", exec {app/presentation}

    bindsym {key/return/Return} mode "default"
    bindsym {key/escape/Escape} mode "default"
}

M files/configs/sway/config.d/inputs => files/configs/sway/config.d/inputs +4 -0
@@ 7,3 7,7 @@ input "2:7:SynPS/2_Synaptics_TouchPad" {
input "1:1:AT_Translated_Set_2_keyboard" {
    xkb_options caps:escape
}

# Needed to make use of ydotool in bindings
# otherwise a "mod+x exec ydotool key n" binding would somehow trigger "mod+n" binding...
seat * keyboard_grouping none

M files/configs/sway/config.d/rules => files/configs/sway/config.d/rules +4 -0
@@ 5,3 5,7 @@ for_window [title="sway_monitor"] floating enable, \
# display quick command as floating window
for_window [title="sway_quick_command"] floating enable, \
                                        resize set width 40 ppt height 40 ppt

# display presentation as floating window
for_window [title="sway_presentation"] floating enable, \
                                       resize set width 30 ppt height 30 ppt

M files/configs/systemd/Makefile => files/configs/systemd/Makefile +9 -8
@@ 21,14 21,15 @@ systemd-configs:
	$(setup_file)/configs/systemd/user/qutebrowser_update_adblock.timer   > $(DESTDIR)$(CONFIG_DIR)/systemd/user/qutebrowser_update_adblock.timer

    # enable paths, timers and services
	ln -sf ../backup_bookmarks.path            $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_bookmarks.path
	ln -sf ../backup_contacts.path             $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_contacts.path
	ln -sf ../backup_notes.path                $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_notes.path
	ln -sf ../backup_time_tracker_logs.path    $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_time_tracker_logs.path
	ln -sf ../notify_break.timer               $(DESTDIR)$(CONFIG_DIR)/systemd/user/timers.target.wants/notify_break.timer
	ln -sf ../notify_low_battery.timer         $(DESTDIR)$(CONFIG_DIR)/systemd/user/timers.target.wants/notify_low_battery.timer
	ln -sf ../qutebrowser_update_adblock.timer $(DESTDIR)$(CONFIG_DIR)/systemd/user/timers.target.wants/qutebrowser_update_adblock.timer
	ln -sf /usr/lib/systemd/user/mpd.service   $(DESTDIR)$(CONFIG_DIR)/systemd/user/default.target.wants/mpd.service
	ln -sf ../backup_bookmarks.path              $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_bookmarks.path
	ln -sf ../backup_contacts.path               $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_contacts.path
	ln -sf ../backup_notes.path                  $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_notes.path
	ln -sf ../backup_time_tracker_logs.path      $(DESTDIR)$(CONFIG_DIR)/systemd/user/paths.target.wants/backup_time_tracker_logs.path
	ln -sf ../notify_break.timer                 $(DESTDIR)$(CONFIG_DIR)/systemd/user/timers.target.wants/notify_break.timer
	ln -sf ../notify_low_battery.timer           $(DESTDIR)$(CONFIG_DIR)/systemd/user/timers.target.wants/notify_low_battery.timer
	ln -sf ../qutebrowser_update_adblock.timer   $(DESTDIR)$(CONFIG_DIR)/systemd/user/timers.target.wants/qutebrowser_update_adblock.timer
	ln -sf /usr/lib/systemd/user/mpd.service     $(DESTDIR)$(CONFIG_DIR)/systemd/user/default.target.wants/mpd.service
	ln -sf /usr/lib/systemd/user/ydotool.service $(DESTDIR)$(CONFIG_DIR)/systemd/user/default.target.wants/ydotool.service

    # reload daemon
	if [ -z $(DESTDIR) ] ; then \