├── .gitignore
├── .gitmodules
├── Dockerfile
├── Makefile
├── Makefile.config
├── Makefile.home
├── README.md
├── Xresources
├── aerc
├── aerc.conf
├── binds.conf
├── filters
│ └── img
├── notmuch-querymap
└── stylesets
│ └── mygruvbox
├── alacritty
└── alacritty.toml
├── conkyrc
├── defaults.list
├── dunst
└── dunstrc
├── emoji
├── fcitx5
├── conf
│ ├── cached_layouts
│ ├── chttrans.conf
│ ├── classicui.conf
│ ├── notifications.conf
│ ├── pinyin.conf
│ ├── punctuation.conf
│ └── quickphrase.conf
├── config
└── profile
├── fontconfig
├── conf.d
│ └── 10-powerline-symbols.conf
└── fonts.conf
├── foot
├── foot.dark.oneplus-enchilada.ini
├── foot.dark.pollux.ini
├── foot.dark.toren.ini
├── foot.dark.trantor.ini
├── foot.light.pollux.ini
└── foot.light.trantor.ini
├── gdbinit
├── gh-dash
└── config.yml
├── gtk-3.0
└── settings.ini
├── gtkrc-2.0
├── header.sty
├── homecommands
├── hypr
├── hyprland.mhysa.conf
├── hyprland.pollux.conf
├── hyprland.trantor.conf
├── hyprlock.conf
└── shaders
│ ├── blue-light-filter.glsl
│ ├── invert-colors.glsl
│ └── vibrance.glsl
├── iamb
└── config.toml
├── infertags.json
├── inputrc
├── ipython
├── extensions
│ └── vimception
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── vimception.js
│ │ └── vimception.py
├── nbextensions
│ └── vim.js
└── profile_default
│ └── static
│ └── custom
│ └── custom.js
├── jshintrc
├── kanshi
├── pollux.config
└── pollux.single.config
├── kdeglobals
├── labelmap.json
├── lf
├── lfrc
├── preview
└── scope
├── mailcap
├── mako
└── config
├── mblaze
├── filter
└── profile
├── media
├── Landscape-Iceland-Arch-4K.jpg
├── authaccept.mp3
├── beepin.wav
├── beepout.wav
├── bell.wav
├── blossom-branch.jpg
├── boing.wav
├── buddhavoid1920.png
├── centerpiece.png
├── chime.wav
├── conifer.jpg
├── cylontune_low.ogg
├── error.wav
├── expired.oga
├── floral.jpg
├── forest.jpg
├── glass.ogg
├── glass_low.ogg
├── green-leafed-closeup.jpg
├── green-tree-plant-leaves-40896.jpg
├── home
│ ├── doorbell.ogg
│ ├── intruderalert.ogg
│ ├── redalert.ogg
│ └── redalert.wav
├── hummingbird.jpg
├── hummingbird_twin.jpg
├── key.wav
├── lock.wav
├── locked.png
├── lovelyboot.ogg
├── mountain-view-krivec-ales.jpg
├── mountain.jpg
├── mountains.jpg
├── night-aurora.jpg
├── night-misty-peaks.png
├── notifyconnect.wav
├── paradox_waves_by_neaben.jpg
├── phone.wav
├── photo-of-lake-krivec-ales.jpg
├── pine.jpg
├── shirahige2.jpg
├── shutter.wav
├── submit.wav
├── trees-green-fog.jpg
├── unlock.wav
├── unlock2.wav
└── wipe.wav
├── mpv.conf
├── mpv
└── input.conf
├── mutt-compose
├── muttcol
├── muttrc
├── ncmpcpp.bindings
├── ncmpcpp.config
├── newsboat
└── config
├── newsraft
└── config
├── notmuchmap.json
├── numen
└── phrases
│ ├── app.phrases
│ ├── environment.hyprland.phrases
│ ├── environment.personal.phrases
│ ├── environment.quit.phrases
│ ├── environment.sxmo-sway.phrases
│ ├── environment.wayland.phrases
│ ├── extra.character.phrases
│ └── proycon-characters.phrases
├── nushell
├── config.nu
└── env.nu
├── nvim
├── UltiSnips
│ ├── python.snippets
│ └── rust.snippets
├── colors
│ ├── lucius.vim
│ ├── proycon.vim
│ └── proyconwhite.vim
├── init.lua
├── lua
│ └── user
│ │ ├── alpha.lua
│ │ ├── autocommands.lua
│ │ ├── autopairs.lua
│ │ ├── avante.lua
│ │ ├── bufferline.lua
│ │ ├── cmp.lua
│ │ ├── colorscheme.lua
│ │ ├── comment.lua
│ │ ├── gitsigns.lua
│ │ ├── impatient.lua
│ │ ├── indentline.lua
│ │ ├── keymaps.lua
│ │ ├── lsp
│ │ ├── configs.lua
│ │ ├── handlers.lua
│ │ ├── init.lua
│ │ ├── null-ls.lua
│ │ └── settings
│ │ │ ├── jsonls.lua
│ │ │ ├── sumneko_lua.lua
│ │ │ └── yamlls.lua
│ │ ├── lsp_signature.lua
│ │ ├── lualine.lua
│ │ ├── luasnip.lua
│ │ ├── mini.lua
│ │ ├── nvim-tree.lua
│ │ ├── octo.lua
│ │ ├── options.lua
│ │ ├── plugins.lua
│ │ ├── project.lua
│ │ ├── symbols_outline.lua
│ │ ├── telescope.lua
│ │ ├── toggleterm.lua
│ │ ├── treesitter.lua
│ │ └── whichkey.lua
└── syntax
│ ├── n3.vim
│ ├── nginx.vim
│ ├── python.vim
│ └── turtle.vim
├── openbox
├── menu.xml
└── rc.xml
├── pdbrc.py
├── proysh.zsh-theme
├── pylintrc
├── ranger
├── commands.py
├── commands_full.py
├── luke_ranger_readme.md
├── rc.conf.base
├── rifle.conf
└── scope.sh
├── river.desktop
├── river
├── env.sh
└── init
├── rofi
├── rofi.dark.rasi
└── rofi.light.rasi
├── screenshot.jpg
├── scripts
├── apkfile
├── bright_down.sh
├── bright_up.sh
├── buku-dmenu
├── bwstatus.sh
├── byzanz-record-window.sh
├── cache-dirs.sh
├── castnone.sh
├── castpi1.sh
├── castpi2.sh
├── checkmail.sh
├── colorargs.sh
├── curmail
├── darkmode.sh
├── decolor
├── dmenu-files.sh
├── emojiselect
├── fc-search.sh
├── fixworkspaces.sh
├── git-stats.sh
├── gitbranches
├── gitlog
├── gpgsetup.nu
├── gpgsetup.sh
├── handlehyprland.sh
├── histplot
├── homecommand.sh
├── homestatus.sh
├── hutlist
├── huttodo
├── ischinese.py
├── killmenu.sh
├── lf-select
├── lightmode.sh
├── linkhandler
├── lock.sh
├── lspkg
├── mblaze2pango.sh
├── minicam.sh
├── mutt-compose.sh
├── muttfzf.sh
├── network-menu.sh
├── newmail
├── notifyhandler.sh
├── nuplot.nu
├── ollama.nu
├── openinstagram.sh
├── opensxiv.sh
├── otpmenu.sh
├── passmenu.sh
├── pinentry-smart
├── plot
├── preview.nu
├── reroutetunnel.sh
├── rotdir
├── runsteam
├── scrapers.nu
├── screencast.sh
├── screencast_noaudio.sh
├── screenshot.sh
├── startchat.sh
├── starthyprland.sh
├── startnumen.sh
├── startriver.sh
├── startsway.sh
├── suspend.sh
├── switchbg.sh
├── timetracker.sh
├── tm
├── tmuxdirname.sh
├── todotxtsync.sh
├── translate.sh
├── trysuspend.sh
├── updatemail.sh
├── updatevbuf.sh
├── urlview_wrapper.sh
├── vpn-knaw.sh
├── wclock
├── wtime
└── youtubemenu.sh
├── senpai
├── highlight
└── senpai.scfg
├── signature
├── signature.knaw.txt
├── signature.ru.txt
├── signature.unilang
├── starship.toml
├── sxiv
└── exec
│ └── key-handler
├── sxmo
├── Makefile
├── bonsai_tree.json
├── conky.conf
├── guardbwusage.sh
├── hooks
│ ├── sxmo_hook_modem.sh
│ ├── sxmo_hook_network_down.sh
│ ├── sxmo_hook_network_up.sh
│ └── sxmo_hook_start.sh
├── profile
├── river
├── setup_mobile_data.sh
├── sway
├── sway.config.d
│ └── toren.config
├── userscripts
│ ├── 0-home
│ ├── 1-terminal
│ ├── gallery
│ ├── playmusic
│ └── stopmusic
└── xinit
├── tigrc
├── timetracker.tasks
├── tmux-powerline
├── .gitignore
├── AUTHORS
├── LICENSE
├── README.md
├── color_palette.sh
├── config
│ ├── defaults.sh
│ ├── helpers.sh
│ ├── paths.sh
│ └── shell.sh
├── generate_rc.sh
├── img
│ ├── full.png
│ ├── left-status.png
│ ├── right-status.png
│ ├── right-status_no_mail.png
│ ├── right-status_no_mpd.png
│ └── right-status_weather_battery.png
├── lib
│ ├── arg_processing.sh
│ ├── formatting.sh
│ ├── muting.sh
│ ├── powerline.sh
│ ├── rcfile.sh
│ ├── text_roll.sh
│ └── tmux_adapter.sh
├── mute_powerline.sh
├── powerline.sh
├── segments.disabled
│ ├── earthquake.sh
│ ├── ifstat.sh
│ ├── ifstat_sys.sh
│ ├── lan_ip.sh
│ ├── mailcount.sh
│ ├── now_playing.sh
│ ├── np_itunes.script
│ ├── np_mpd.c
│ ├── np_pithos.py
│ ├── np_rdio_mac.script
│ ├── np_spotify_mac.script
│ ├── rainbarf.sh
│ ├── vcs_branch.sh
│ ├── vcs_compare.sh
│ ├── vcs_modified.sh
│ ├── vcs_others.sh
│ ├── vcs_revision.sh
│ ├── vcs_staged.sh
│ ├── wan_ip.sh
│ └── weather.sh
├── segments
│ ├── Makefile
│ ├── battery.sh
│ ├── cpu.sh
│ ├── date.sh
│ ├── date_day.sh
│ ├── hostname.sh
│ ├── load.sh
│ ├── mailcount_apple_mail.script
│ ├── pwd.sh
│ ├── time.sh
│ ├── tmux_mem_cpu_load.sh
│ ├── tmux_session_info.sh
│ ├── uptime.sh
│ ├── utc_time.sh
│ ├── xkb_layout.c
│ └── xkb_layout.sh
└── themes
│ └── default.sh
├── tmux-powerlinerc
├── tmux.conf
├── tuir
└── tuir.cfg
├── tut
├── config.ini
└── config.toml
├── urlview
├── urxvt
└── ext
│ └── font-size
├── user-dirs.dirs
├── waybar
├── config
└── style.css
├── weechat-plugins
├── beep.pl
└── himan.py
├── xinitrc
├── xkb
├── proyar
├── proybasic
├── proyde
├── proyel
├── proyeo
├── proyhe
├── proyhr
├── proyipa
├── proylatin
├── proylatin3
├── proylogic
├── proyru
└── proysr
├── yazi
├── theme.toml
└── yazi.toml
├── ytfzf
└── conf.sh
├── zathura
└── zathurarc
└── zshrc
/.gitignore:
--------------------------------------------------------------------------------
1 | fcitx5/
2 | target
3 | #these are autogenerated symlinks to a host-specific version (or other) so don't need to be checked in
4 | hypr/hyprland.conf
5 | foot/foot.ini
6 | rofi/config.rasi
7 | #cache/autogenerated files
8 | nvim/.netrwhist
9 | nvim/plugged
10 | nvim/plugin
11 | nvim/spell
12 | nvim/lazy-lock.json
13 | #protects against accidental commits of sensitive data
14 | aliases
15 | aerc/accounts.conf
16 | afew/config
17 | newsboat/urls
18 | newsraft/feeds
19 | sxmo/contacts.tsv
20 | tut/accounts.toml
21 | personal.muttrc
22 | muttaliases
23 | mblaze/cur
24 | mblaze/curmail
25 | mblaze/seq
26 | nushell/history.txt
27 | nushell/plugin.msgpackz
28 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "zsh-syntax-highlighting"]
2 | path = zsh-syntax-highlighting
3 | url = https://github.com/zsh-users/zsh-syntax-highlighting.git
4 | [submodule "gruvbox-rofi"]
5 | path = gruvbox-rofi
6 | url = https://github.com/bardisty/gruvbox-rofi
7 | [submodule "tmux/tpm"]
8 | path = tmux/tpm
9 | url = https://github.com/tmux-plugins/tpm
10 | [submodule "zsh-autosuggestions"]
11 | path = zsh-autosuggestions
12 | url = https://github.com/zsh-users/zsh-autosuggestions
13 | [submodule "yazi/flavors"]
14 | path = yazi/flavors
15 | url = https://github.com/yazi-rs/flavors
16 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:latest
2 |
3 | RUN apk update && apk add --no-interactive zsh sudo make git && apk upgrade -a
4 | RUN adduser -u 1000 -G users -D -h /home/proycon -s /bin/zsh proycon && adduser proycon wheel && echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/10-wheel
5 |
6 | USER proycon
7 |
8 | WORKDIR /home/proycon
9 |
10 | ENV DESKTOP=1
11 |
12 | RUN git clone --recurse-submodules https://github.com/proycon/dotfiles && cd dotfiles && make install DESKTOP=$DESKTOP
13 |
14 | WORKDIR /home/proycon
15 |
16 | ENTRYPOINT ["/bin/zsh","-l"]
17 |
18 |
--------------------------------------------------------------------------------
/Makefile.config:
--------------------------------------------------------------------------------
1 | all: directories \
2 | aerc alacritty dunst foot hypr lf mako mimeapps.list ncmpcpp.config newsboat newsraft nvim openbox ranger rofi sxiv tuir tut user-dirs.dirs waybar zathura senpai mpv gh-dash iamb yazi starship.toml kanshi river ytfzf
3 |
4 | aerc alacritty dunst foot hypr lf mako mimeapps.list ncmpcpp.config newsboat newsraft nvim openbox ranger rofi sxiv tuir tut user-dirs.dirs waybar zathura senpai mpv gh-dash iamb yazi starship.toml kanshi river ytfzf kdeglobals:
5 | ln -sf ~/dotfiles/$@ $@
6 |
7 | directories:
8 | ~/dotfiles/scripts/cache-dirs.sh || true
9 |
10 | update:
11 | ~/dotfiles/scripts/cache-dirs.sh || true
12 |
--------------------------------------------------------------------------------
/Makefile.home:
--------------------------------------------------------------------------------
1 | .PHONY: bin conffiles update
2 |
3 | bin: bin/darkmode.sh bin/lightmode.sh bin/emojiselect bin/lock.sh bin/rotdir bin/screencast.sh bin/suspend.sh bin/tm bin/wtime bin/starthyprland.sh bin/network-menu.sh bin/linkhandler bin/colorargs.sh bin/buku-dmenu bin/newmail bin/curmail bin/vpn-knaw.sh bin/runsteam
4 |
5 | bin/darkmode.sh bin/lightmode.sh bin/emojiselect bin/lock.sh bin/rotdir bin/screencast.sh bin/suspend.sh bin/tm bin/wtime bin/starthyprland.sh bin/network-menu.sh bin/linkhandler bin/colorargs.sh bin/buku-dmenu bin/newmail bin/curmail bin/vpn-knaw.sh bin/runsteam bin/gitlog bin/gitbranches bin/wclock bin/hutlist bin/huttodo:
6 | ln -sf ~/dotfiles/scripts/$(shell basename "$@") $@
7 |
8 | all: bin conffiles .oh-my-zsh .oh-my-zsh/themes/proysh.zsh-theme .oh-my-zsh/plugins/zsh-autosuggestions
9 |
10 | conffiles: .zshrc .urlview .muttrc .mailcap .signature .signature.ru.txt .signature.knaw.txt .signature.unilang .tmux.conf .tmux-powerlinerc .tmux .tigrc
11 |
12 | .zshrc .urlview .muttrc .mailcap .signature .signature.ru.txt .signature.knaw.txt .signature.unilang .tmux.conf .tmux-powerlinerc .tmux .tigrc:
13 | ln -sf ~/dotfiles/$(shell echo $@ | sed s/^\.//) $@
14 |
15 | update: oh-my-zsh
16 | cd oh-my-zsh && git pull
17 |
18 | oh-my-zsh:
19 | git clone https://github.com/ohmyzsh/ohmyzsh.git oh-my-zsh
20 |
21 | .oh-my-zsh: oh-my-zsh
22 | ln -sf $< $@
23 |
24 | .oh-my-zsh/themes/proysh.zsh-theme: .oh-my-zsh
25 | ln -sf ~/dotfiles/proysh.zsh-theme $@
26 |
27 | .oh-my-zsh/plugins/zsh-autosuggestions: .oh-my-zsh
28 | ln -s ~/dotfiles/zsh-autosuggestions/
29 |
--------------------------------------------------------------------------------
/aerc/filters/img:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | exec catimg -l 1 -w 72 -
3 |
--------------------------------------------------------------------------------
/aerc/notmuch-querymap:
--------------------------------------------------------------------------------
1 | inbox=tag:inbox and not tag:spam and not tag:killed
2 | work=tag:inbox and tag:work and not tag:spam and not tag:killed
3 | personal=tag:inbox and not tag:work and not tag:sxmo and not tag:spam and not tag:killed
4 | sxmo=tag:inbox and tag:sxmo and not tag:spam and not tag:killed
5 | calendar=tag:inbox AND (mimetype:text/calendar OR mimetype:application/ics)
6 | all recent=not tag:spam and not tag:killed and date:2M..
7 |
--------------------------------------------------------------------------------
/alacritty/alacritty.toml:
--------------------------------------------------------------------------------
1 | [colors.bright]
2 | black = "0x928374"
3 | blue = "0x8fb1a4"
4 | cyan = "0x9fd18c"
5 | green = "0xc5dc85"
6 | magenta = "0xe799ae"
7 | red = "0xfb4934"
8 | white = "0xebdbb2"
9 | yellow = "0xfbbe30"
10 |
11 | [colors.normal]
12 | black = "0x282828"
13 | blue = "0x508a8d"
14 | cyan = "0x689d6a"
15 | green = "0xb5bd68"
16 | magenta = "0xb16286"
17 | red = "0xcc241d"
18 | white = "0xa89984"
19 | yellow = "0xd79921"
20 |
21 | [colors.primary]
22 | background = "0x17191a"
23 | bright_foreground = "0xffffff"
24 | dim_foreground = "0x9a9a9a"
25 | foreground = "0xebdbb2"
26 |
27 | [colors.selection]
28 | background = "0x003300"
29 | text = "0x00ff00"
30 |
31 | [env]
32 | TERM = "xterm-256color"
33 |
34 | [font]
35 | size = 10.0
36 |
37 | [font.bold]
38 | family = "Monospace"
39 | style = "Bold"
40 |
41 | [font.bold_italic]
42 | family = "Monospace"
43 | style = "Bold Italic"
44 |
45 | [font.italic]
46 | family = "Monospace"
47 | style = "Italic"
48 |
49 | [font.normal]
50 | family = "Monospace"
51 | style = "Regular"
52 |
53 | [font.offset]
54 | x = 0
55 | y = 0
56 |
57 | [[keyboard.bindings]]
58 | action = "Copy"
59 | key = "C"
60 | mods = "Super|Control"
61 |
62 | [[keyboard.bindings]]
63 | action = "Copy"
64 | key = "Y"
65 | mods = "Super|Control"
66 |
67 | [[keyboard.bindings]]
68 | action = "Paste"
69 | key = "V"
70 | mods = "Super"
71 |
72 | [[keyboard.bindings]]
73 | action = "Paste"
74 | key = "P"
75 | mods = "Super"
76 |
77 | [[keyboard.bindings]]
78 | action = "Paste"
79 | key = "V"
80 | mods = "Super|Shift"
81 |
82 | #[mouse.hints.launcher]
83 | #program = "xdg-open"
84 |
85 | [window]
86 | dynamic_title = true
87 | opacity = 0.95
88 |
--------------------------------------------------------------------------------
/dunst/dunstrc:
--------------------------------------------------------------------------------
1 | # Space to setup configversion
2 | # configversion: 6092950204b3b2a92c3435749b266816
3 | [global]
4 | width = 300
5 | height = 100
6 | offset = (5,50)
7 | padding = 2
8 | horizontal_padding = 5
9 | frame_width = 2
10 | frame_color = "#888888"
11 | idle_threshold = 120
12 | font = Monospace 12
13 | markup = full
14 | max_icon_size = 32
15 | dmenu = sxmo_dmenu.sh -p dunst:
16 | follow=mouse
17 | mouse_left_click = do_action
18 |
19 | [shortcuts]
20 | close_all = ctrl+shift+space
21 |
22 | [urgency_low]
23 | background = "#222222"
24 | foreground = "#888888"
25 | timeout = 10
26 |
27 | [urgency_normal]
28 | background = "#ffffff"
29 | foreground = "#000000"
30 | timeout = 15
31 |
32 | [urgency_critical]
33 | background = "#900000"
34 | foreground = "#ffffff"
35 | frame_color = "#ff0000"
36 | timeout = 0
37 |
--------------------------------------------------------------------------------
/fcitx5/conf/chttrans.conf:
--------------------------------------------------------------------------------
1 | # Translate engine
2 | Engine=OpenCC
3 | # Enabled Input Methods
4 | EnabledIM=
5 | # OpenCC profile for Simplified to Traditional
6 | OpenCCS2TProfile=
7 | # OpenCC profile for Traditional to Simplified
8 | OpenCCT2SProfile=
9 |
10 | [Hotkey]
11 | 0=Control+Shift+F
12 |
13 |
--------------------------------------------------------------------------------
/fcitx5/conf/classicui.conf:
--------------------------------------------------------------------------------
1 | # Vertical Candidate List
2 | Vertical Candidate List=False
3 | # Use Per Screen DPI
4 | PerScreenDPI=True
5 | # Use mouse wheel to go to prev or next page
6 | WheelForPaging=True
7 | # Font
8 | Font="Sans 28"
9 | # Menu Font
10 | MenuFont="Sans 28"
11 | # Tray Font
12 | TrayFont="Sans Bold 10"
13 | # Tray Label Outline Color
14 | TrayOutlineColor=#000000
15 | # Tray Label Text Color
16 | TrayTextColor=#ffffff
17 | # Prefer Text Icon
18 | PreferTextIcon=False
19 | # Show Layout Name In Icon
20 | ShowLayoutNameInIcon=True
21 | # Use input method language to display text
22 | UseInputMethodLangaugeToDisplayText=True
23 | # Theme
24 | Theme=default
25 | # Force font DPI on Wayland
26 | ForceWaylandDPI=92
27 |
28 |
--------------------------------------------------------------------------------
/fcitx5/conf/notifications.conf:
--------------------------------------------------------------------------------
1 | # Hidden Notifications
2 | HiddenNotifications=
3 |
4 |
--------------------------------------------------------------------------------
/fcitx5/conf/punctuation.conf:
--------------------------------------------------------------------------------
1 | # Half width punctuation after latin letter or number
2 | HalfWidthPuncAfterLetterOrNumber=True
3 | # Type paired punctuations together (e.g. Quote)
4 | TypePairedPunctuationsTogether=False
5 | # Enabled
6 | Enabled=True
7 |
8 | [Hotkey]
9 | 0=Control+period
10 |
11 |
--------------------------------------------------------------------------------
/fcitx5/conf/quickphrase.conf:
--------------------------------------------------------------------------------
1 | # Trigger Key
2 | TriggerKey=
3 | # Choose key modifier
4 | Choose Modifier=None
5 | # Enable Spell check
6 | Spell=True
7 | # Fallback Spell check language
8 | FallbackSpellLanguage=en
9 |
10 |
--------------------------------------------------------------------------------
/fcitx5/config:
--------------------------------------------------------------------------------
1 | [Hotkey]
2 | # Enumerate when press trigger key repeatedly
3 | EnumerateWithTriggerKeys=True
4 | # Skip first input method while enumerating
5 | EnumerateSkipFirst=False
6 |
7 | [Hotkey/TriggerKeys]
8 | 0=Control+space
9 |
10 | [Hotkey/AltTriggerKeys]
11 | 0=Shift_L
12 |
13 | [Hotkey/EnumerateForwardKeys]
14 | 0=Control+Shift_L
15 |
16 | [Hotkey/EnumerateBackwardKeys]
17 | 0=Control+Shift_R
18 |
19 | [Hotkey/EnumerateGroupForwardKeys]
20 | 0=Super+space
21 |
22 | [Hotkey/EnumerateGroupBackwardKeys]
23 | 0=Shift+Super+space
24 |
25 | [Hotkey/ActivateKeys]
26 | 0=Hangul_Hanja
27 |
28 | [Hotkey/DeactivateKeys]
29 | 0=Hangul_Romaja
30 |
31 | [Hotkey/PrevPage]
32 | 0=Up
33 |
34 | [Hotkey/NextPage]
35 | 0=Down
36 |
37 | [Hotkey/PrevCandidate]
38 | 0=Shift+Tab
39 |
40 | [Hotkey/NextCandidate]
41 | 0=Tab
42 |
43 | [Hotkey/TogglePreedit]
44 | 0=Control+Alt+P
45 |
46 | [Behavior]
47 | # Active By Default
48 | ActiveByDefault=False
49 | # Reset state on Focus In
50 | resetStateWhenFocusIn=No
51 | # Share Input State
52 | ShareInputState=No
53 | # Show preedit in application
54 | PreeditEnabledByDefault=True
55 | # Show Input Method Information when switch input method
56 | ShowInputMethodInformation=True
57 | # Show Input Method Information when changing focus
58 | showInputMethodInformationWhenFocusIn=False
59 | # Show compact input method information
60 | CompactInputMethodInformation=True
61 | # Show first input method information
62 | ShowFirstInputMethodInformation=True
63 | # Default page size
64 | DefaultPageSize=5
65 | # Override Xkb Option
66 | OverrideXkbOption=False
67 | # Custom Xkb Option
68 | CustomXkbOption=
69 | # Force Enabled Addons
70 | EnabledAddons=
71 | # Preload input method to be used by default
72 | PreloadInputMethod=True
73 | # Allow input method in the password field
74 | AllowInputMethodForPassword=False
75 | # Show preedit text when typing password
76 | ShowPreeditForPassword=False
77 | # Interval of saving user data in minutes
78 | AutoSavePeriod=30
79 |
80 | [Behavior/DisabledAddons]
81 | 0=emoji
82 | 1=quickphrase
83 |
84 |
--------------------------------------------------------------------------------
/fcitx5/profile:
--------------------------------------------------------------------------------
1 | [Groups/0]
2 | # Group Name
3 | Name="Group 1"
4 | # Layout
5 | Default Layout=us
6 | # Default Input Method
7 | DefaultIM=pinyin
8 |
9 | [Groups/0/Items/0]
10 | # Name
11 | Name=keyboard-us
12 | # Layout
13 | Layout=
14 |
15 | [Groups/0/Items/1]
16 | # Name
17 | Name=pinyin
18 | # Layout
19 | Layout=
20 |
21 | [Groups/1]
22 | # Group Name
23 | Name="Group 2"
24 | # Layout
25 | Default Layout=gb
26 | # Default Input Method
27 | DefaultIM=keyboard-gb
28 |
29 | [Groups/1/Items/0]
30 | # Name
31 | Name=keyboard-gb
32 | # Layout
33 | Layout=
34 |
35 | [GroupOrder]
36 | 0="Group 1"
37 | 1="Group 2"
38 |
39 |
--------------------------------------------------------------------------------
/fontconfig/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | monospace
6 |
7 | FiraMono Nerd Font Mono
8 | Symbols Nerd Font
9 | PowerlineSymbols
10 | Powerline Extra Symbols
11 | Noto Color Emoji
12 | WenQuanYi Zen Hei Mono
13 |
14 |
15 |
16 | proymono
17 |
18 | FiraMono Nerd Font Mono
19 | Symbols Nerd Font
20 | Noto Color Emoji
21 | PowerlineSymbols
22 | Powerline Extra Symbols
23 | WenQuanYi Zen Hei Mono
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/foot/foot.dark.oneplus-enchilada.ini:
--------------------------------------------------------------------------------
1 | # Space to setup configversion
2 | # configversion: 13fb3d2d9f97f4420f7506e72b90e77d
3 | font=monospace:size=11
4 | dpi-aware=no
5 |
6 | [colors]
7 | # alpha=1.0
8 | foreground=eaeaea
9 | background=303030
10 | regular0=1e1e1e # black
11 | regular1=d54e53 # red
12 | regular2=b9ca4a # green
13 | regular3=e6c547 # yellow
14 | regular4=7aa6da # blue
15 | regular5=c397d8 # magenta
16 | regular6=70c0ba # cyan
17 | regular7=eaeaea # white
18 | bright0=666666 # bright black
19 | bright1=ff3334 # bright red
20 | bright2=9ec400 # bright green
21 | bright3=e7c547 # bright yellow
22 | bright4=7aa6da # bright blue
23 | bright5=b77ee0 # bright magenta
24 | bright6=54ced6 # bright cyan
25 | bright7=ffffff # bright white
26 |
27 |
--------------------------------------------------------------------------------
/foot/foot.light.pollux.ini:
--------------------------------------------------------------------------------
1 | font=monospace:size=12
2 | line-height=18
3 | dpi-aware=yes
4 |
5 | #[colors]
6 | ## alpha=1.0
7 | #foreground=eaeaea
8 | #background=303030
9 | #regular0=1e1e1e # black
10 | #regular1=d54e53 # red
11 | #regular2=b9ca4a # green
12 | #regular3=e6c547 # yellow
13 | #regular4=7aa6da # blue
14 | #regular5=c397d8 # magenta
15 | #regular6=70c0ba # cyan
16 | #regular7=eaeaea # white
17 | #bright0=666666 # bright black
18 | #bright1=ff3334 # bright red
19 | #bright2=9ec400 # bright green
20 | #bright3=e7c547 # bright yellow
21 | #bright4=7aa6da # bright blue
22 | #bright5=b77ee0 # bright magenta
23 | #bright6=54ced6 # bright cyan
24 | #bright7=ffffff # bright white
25 |
26 | [colors]
27 | foreground = 3c3836
28 | background = eeebdc
29 | regular0 = fbf1c7
30 | regular1 = cc241d
31 | regular2 = 5d7e13
32 | regular3 = d79921
33 | regular4 = 458588
34 | regular5 = b16286
35 | regular6 = 738655
36 | regular7 = 7c6f64
37 | bright0 = 928374
38 | bright1 = 9d0006
39 | bright2 = 79740e
40 | bright3 = b57614
41 | bright4 = 076678
42 | bright5 = 8f3f71
43 | bright6 = 427b58
44 | bright7 = 3c3836
45 | selection-foreground = 00ff00
46 | selection-background = 003300
47 |
48 | ## =========== Everforest - Light - Soft ================= ##
49 | alpha=1.0
50 | background=f8f0dc
51 | foreground=5c6a72
52 |
53 | regular0=5c6a72 # black
54 | regular1=f85552 # red
55 | regular2=8da101 # green
56 | regular3=dfa000 # yellow
57 | regular4=3a94c5 # blue
58 | regular5=df69ba # magenta
59 | regular6=35a77c # cyan
60 | regular7=dfddc8 # white
61 |
62 | bright0=5c6a72 # black
63 | bright1=f85552 # red
64 | bright2=8da101 # green
65 | bright3=dfa000 # yellow
66 | bright4=3a94c5 # blue
67 | bright5=df69ba # magenta
68 | bright6=35a77c # cyan
69 | bright7=dfddc8 # white
70 |
71 | [key-bindings]
72 | show-urls-launch=Control+Shift+a
73 | clipboard-copy=Control+Shift+y
74 | clipboard-paste=Control+Shift+P
75 | primary-paste=Control+Shift+p
76 | search-start=Control+Shift+slash
77 |
78 | [search-bindings]
79 | find-prev=Control+p
80 | find-next=Control+n
81 |
--------------------------------------------------------------------------------
/foot/foot.light.trantor.ini:
--------------------------------------------------------------------------------
1 | font=monospace:size=10
2 | dpi-aware=yes
3 |
4 | #[colors]
5 | ## alpha=1.0
6 | #foreground=eaeaea
7 | #background=303030
8 | #regular0=1e1e1e # black
9 | #regular1=d54e53 # red
10 | #regular2=b9ca4a # green
11 | #regular3=e6c547 # yellow
12 | #regular4=7aa6da # blue
13 | #regular5=c397d8 # magenta
14 | #regular6=70c0ba # cyan
15 | #regular7=eaeaea # white
16 | #bright0=666666 # bright black
17 | #bright1=ff3334 # bright red
18 | #bright2=9ec400 # bright green
19 | #bright3=e7c547 # bright yellow
20 | #bright4=7aa6da # bright blue
21 | #bright5=b77ee0 # bright magenta
22 | #bright6=54ced6 # bright cyan
23 | #bright7=ffffff # bright white
24 |
25 | [colors]
26 | foreground = 3c3836
27 | background = eeebdc
28 | regular0 = fbf1c7
29 | regular1 = cc241d
30 | regular2 = 5d7e13
31 | regular3 = d79921
32 | regular4 = 458588
33 | regular5 = b16286
34 | regular6 = 738655
35 | regular7 = 7c6f64
36 | bright0 = 928374
37 | bright1 = 9d0006
38 | bright2 = 79740e
39 | bright3 = b57614
40 | bright4 = 076678
41 | bright5 = 8f3f71
42 | bright6 = 427b58
43 | bright7 = 3c3836
44 | selection-foreground = 00ff00
45 | selection-background = 003300
46 |
47 | ## =========== Everforest - Light - Soft ================= ##
48 | alpha=1.0
49 | background=f8f0dc
50 | foreground=5c6a72
51 |
52 | regular0=5c6a72 # black
53 | regular1=f85552 # red
54 | regular2=8da101 # green
55 | regular3=dfa000 # yellow
56 | regular4=3a94c5 # blue
57 | regular5=df69ba # magenta
58 | regular6=35a77c # cyan
59 | regular7=dfddc8 # white
60 |
61 | bright0=5c6a72 # black
62 | bright1=f85552 # red
63 | bright2=8da101 # green
64 | bright3=dfa000 # yellow
65 | bright4=3a94c5 # blue
66 | bright5=df69ba # magenta
67 | bright6=35a77c # cyan
68 | bright7=dfddc8 # white
69 |
70 | [key-bindings]
71 | show-urls-launch=Control+Shift+a
72 | clipboard-copy=Control+Shift+y
73 | clipboard-paste=Control+Shift+P
74 | primary-paste=Control+Shift+p
75 | search-start=Control+Shift+slash
76 |
77 | [search-bindings]
78 | find-prev=Control+p
79 | find-next=Control+n
80 |
--------------------------------------------------------------------------------
/gdbinit:
--------------------------------------------------------------------------------
1 | # keep trailing space on next line
2 | set prompt \033[0;31m(gdb)\033[0m
3 |
--------------------------------------------------------------------------------
/gh-dash/config.yml:
--------------------------------------------------------------------------------
1 | prSections:
2 | - title: My Pull Requests
3 | filters: is:open author:@me
4 | - title: Needs My Review
5 | filters: is:open review-requested:@me
6 | - title: CLARIAH
7 | filters: is:open repo:CLARIAH/clariah-plus repo:CLARIAH/tool-discovery
8 | issuesSections:
9 | - title: My Issues
10 | filters: is:open author:@me
11 | - title: Assigned
12 | filters: is:open assignee:@me
13 | - title: Team Text
14 | filters: is:open repo:knaw-huc/team-text-backlog
15 | - title: CLARIAH
16 | filters: is:open repo:CLARIAH/clariah-plus repo:CLARIAH/tool-discovery
17 | - title: STAM
18 | filters: is:open repo:annotation/stam repo:annotation/stam-rust repo:annotation/stam-python repo:annotation/stam-tools
19 | - title: FoLiA
20 | filters: is:open repo:proycon/folia repo:proycon/foliapy repo:proycon/foliatools repo:LanguageMachines/foliautils repo:LanguageMachines/libfolia
21 | - title: Frog
22 | filters: is:open repo:LanguageMachines/frog repo:LanguageMachines/ucto repo:proycon/python-frog repo:proycon/python-ucto
23 | - title: Sxmo
24 | filters: is:open repo:jjsullivan5196/wvkbd
25 | - title: Golden Agents
26 | filters: is:open repo:proycon/analiticcl repo:knaw-huc/golden-agents-htr
27 | defaults:
28 | preview:
29 | open: true
30 | width: 80
31 | prsLimit: 100
32 | issuesLimit: 100
33 | view: issues
34 | repoPaths:
35 | knaw-huc/team-text-backlog: ~/work/team-text-backlog
36 | CLARIAH/clariah-plus: ~/work/clariah-plus
37 | CLARIAH/tool-discovery: ~/work/clariah-tool-discovery
38 | proycon/*: ~/work/*
39 | annotation/*: ~/work/*
40 | jjsullivan5196/wvkbd: ~/projects/sxmo/wvkbd
41 | LanguageMachines/frog: ~/work/frog
42 | LanguageMachines/ucto: ~/work/ucto
43 | LanguageMachines/libfolia: ~/work/libfolia
44 | LanguageMachines/ticcutils: ~/work/ticcutils
45 | LanguageMachines/timbl: ~/work/timbl
46 | pager:
47 | diff: delta
48 | confirmQuit: false
49 |
--------------------------------------------------------------------------------
/gtk-3.0/settings.ini:
--------------------------------------------------------------------------------
1 | [Settings]
2 | gtk-theme-name=gruvbox-dark-gtk
3 | gtk-icon-theme-name=Gruvbox-Material-Dark
4 | gtk-font-name=Cantarell 11
5 | gtk-cursor-theme-name=Adwaita
6 | gtk-cursor-theme-size=0
7 | gtk-toolbar-style=GTK_TOOLBAR_BOTH
8 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
9 | gtk-button-images=1
10 | gtk-menu-images=1
11 | gtk-enable-event-sounds=1
12 | gtk-enable-input-feedback-sounds=1
13 | gtk-xft-antialias=1
14 | gtk-xft-hinting=1
15 | gtk-xft-hintstyle=hintfull
16 | gtk-xft-rgba=rgb
17 |
--------------------------------------------------------------------------------
/gtkrc-2.0:
--------------------------------------------------------------------------------
1 | # DO NOT EDIT! This file will be overwritten by LXAppearance.
2 | # Any customization should be done in ~/.gtkrc-2.0.mine instead.
3 |
4 | include "/home/proycon/.gtkrc-2.0.mine"
5 | gtk-theme-name="Numix"
6 | gtk-icon-theme-name="Adwaita"
7 | gtk-font-name="Sans 10"
8 | gtk-cursor-theme-name="Bluecurve"
9 | gtk-cursor-theme-size=48
10 | gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
11 | gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
12 | gtk-button-images=0
13 | gtk-menu-images=0
14 | gtk-enable-event-sounds=1
15 | gtk-enable-input-feedback-sounds=0
16 | gtk-xft-antialias=1
17 | gtk-xft-hinting=1
18 | gtk-xft-hintstyle="hintmedium"
19 | gtk-xft-rgba="none"
20 | gtk-modules="canberra-gtk-module"
21 |
--------------------------------------------------------------------------------
/header.sty:
--------------------------------------------------------------------------------
1 | \usepackage[english]{babel}
2 | \usepackage[utf8]{inputenc}
3 | \usepackage{hyperref}
4 | \usepackage{amsmath}
5 | \usepackage{datetime}
6 | \usepackage[a4paper, top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}
7 | \renewcommand{\familydefault}{\sfdefault}
8 | \hypersetup{colorlinks=true,urlcolor=blue}
9 |
--------------------------------------------------------------------------------
/hypr/hyprlock.conf:
--------------------------------------------------------------------------------
1 | # BACKGROUND
2 | background {
3 | monitor =
4 | path = $HOME/dotfiles/media/night-aurora.jpg #path to background image
5 | blur_passes = 1
6 | contrast = 0.8916
7 | brightness = 0.8172
8 | vibrancy = 0.1696
9 | vibrancy_darkness = 0.0
10 | }
11 |
12 | # GENERAL
13 | general {
14 | no_fade_in = false
15 | grace = 0
16 | disable_loading_bar = true
17 | }
18 |
19 | # INPUT FIELD
20 | input-field {
21 | monitor =
22 | size = 250, 60
23 | outline_thickness = 2
24 | dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
25 | dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
26 | dots_center = true
27 | outer_color = rgba(0, 0, 0, 0)
28 | inner_color = rgba(0, 0, 0, 0.5)
29 | font_color = rgb(200, 200, 200)
30 | fade_on_empty = false
31 | font_family = Fira Sans
32 | placeholder_text = Password #text for input password
33 | hide_input = false
34 | position = 0, -120
35 | halign = center
36 | valign = center
37 | }
38 |
39 | # TIME
40 | label {
41 | monitor =
42 | text = cmd[update:1000] echo "$(date +"%H:%M")" # get formatted date
43 | color = rgba(255, 255, 255, 0.9)
44 | font_size = 120
45 | font_family = Fira Sans
46 | position = 0, -300
47 | halign = center
48 | valign = top
49 | }
50 |
51 | # USER
52 | label {
53 | monitor =
54 | text = cmd[update:100] echo -e "$(hyprctl devices | grep -A 2 usb-keyboard | grep keymap | head -n 1)" # get current keyboard layout
55 | color = rgba(255, 255, 255, 0.9)
56 | font_size = 25
57 | font_family = Fira Sans
58 | position = 0, 40
59 | halign = center
60 | valign = bottom
61 | }
62 |
--------------------------------------------------------------------------------
/hypr/shaders/blue-light-filter.glsl:
--------------------------------------------------------------------------------
1 | // from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437
2 |
3 | precision mediump float;
4 | varying vec2 v_texcoord;
5 | uniform sampler2D tex;
6 |
7 | const float temperature = 2600.0;
8 | const float temperatureStrength = 1.0;
9 |
10 | #define WithQuickAndDirtyLuminancePreservation
11 | const float LuminancePreservationFactor = 1.0;
12 |
13 | // function from https://www.shadertoy.com/view/4sc3D7
14 | // valid from 1000 to 40000 K (and additionally 0 for pure full white)
15 | vec3 colorTemperatureToRGB(const in float temperature) {
16 | // values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693
17 | mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690),
18 | vec3(0.0, 1669.5803561666639, 2575.2827530017594),
19 | vec3(1.0, 1.3302673723350029, 1.8993753891711275))
20 | : mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690),
21 | vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594),
22 | vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275));
23 | return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)),
24 | vec3(1.0), smoothstep(1000.0, 0.0, temperature));
25 | }
26 |
27 | void main() {
28 | vec4 pixColor = texture2D(tex, v_texcoord);
29 |
30 | // RGB
31 | vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
32 |
33 | #ifdef WithQuickAndDirtyLuminancePreservation
34 | color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5),
35 | LuminancePreservationFactor);
36 | #endif
37 |
38 | color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength);
39 |
40 | vec4 outCol = vec4(color, pixColor[3]);
41 |
42 | gl_FragColor = outCol;
43 | }
44 |
--------------------------------------------------------------------------------
/hypr/shaders/invert-colors.glsl:
--------------------------------------------------------------------------------
1 | precision highp float;
2 | varying vec2 v_texcoord;
3 | uniform sampler2D tex;
4 |
5 | void main() {
6 | vec4 pixColor = texture2D(tex, v_texcoord);
7 | gl_FragColor = vec4(1.0 - pixColor.r, 1.0 - pixColor.g, 1.0 - pixColor.b, pixColor.a);
8 | }
9 |
--------------------------------------------------------------------------------
/hypr/shaders/vibrance.glsl:
--------------------------------------------------------------------------------
1 | // from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1614863627
2 |
3 | precision mediump float;
4 | varying vec2 v_texcoord;
5 | uniform sampler2D tex;
6 |
7 | // see https://github.com/CeeJayDK/SweetFX/blob/a792aee788c6203385a858ebdea82a77f81c67f0/Shaders/Vibrance.fx#L20-L30
8 | const vec3 VIB_RGB_BALANCE = vec3(1.0, 1.0, 1.0);
9 | const float VIB_VIBRANCE = 0.15;
10 |
11 | const vec3 VIB_coeffVibrance = VIB_RGB_BALANCE * -VIB_VIBRANCE;
12 |
13 | void main() {
14 | vec4 pixColor = texture2D(tex, v_texcoord);
15 | vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]);
16 |
17 | // vec3 VIB_coefLuma = vec3(0.333333, 0.333334, 0.333333); // was for `if VIB_LUMA == 1`
18 | vec3 VIB_coefLuma = vec3(0.212656, 0.715158, 0.072186); // try both and see which one looks nicer.
19 |
20 | float luma = dot(VIB_coefLuma, color);
21 |
22 | float max_color = max(color[0], max(color[1], color[2]));
23 | float min_color = min(color[0], min(color[1], color[2]));
24 |
25 | float color_saturation = max_color - min_color;
26 |
27 | vec3 p_col = vec3(vec3(vec3(vec3(sign(VIB_coeffVibrance) * color_saturation) - 1.0) * VIB_coeffVibrance) + 1.0);
28 |
29 | pixColor[0] = mix(luma, color[0], p_col[0]);
30 | pixColor[1] = mix(luma, color[1], p_col[1]);
31 | pixColor[2] = mix(luma, color[2], p_col[2]);
32 |
33 | gl_FragColor = pixColor;
34 | }
35 |
--------------------------------------------------------------------------------
/iamb/config.toml:
--------------------------------------------------------------------------------
1 | [profiles.user]
2 | user_id = "@proycon:matrix.anaproy.nl"
3 |
4 | [settings.image_preview]
5 | protocol.type = "sixel"
6 |
7 | [settings.notifications]
8 | enabled = true
9 |
10 | [settings]
11 | username_display = "displayname"
12 |
13 | [settings.sort]
14 | rooms = ["unread","name"]
15 |
16 | [macros.normal]
17 | "go" = ":open"
18 | "gc" = ":chats"
19 | "gr" = ":rooms"
20 | "gd" = ":dms"
21 | "gu" = ":unreads"
22 | "gU" = ":unreads clear"
23 |
24 |
25 |
--------------------------------------------------------------------------------
/inputrc:
--------------------------------------------------------------------------------
1 | set completion-ignore-case On
2 | set bell-style none
3 | #set editing-mode vi
4 |
5 | #$if mode=vi
6 | # set keymap vi-command
7 | # "gg": beginning-of-history
8 | # "G": end-of-history
9 | # set keymap vi-insert
10 | # "jj": vi-movement-mode
11 | # "\C-p": history-search-backward
12 | # "\C-l": clear-screen
13 |
14 | "\e[1": beginning-of-line
15 | "\e[4": end-of-line
16 | "\e[7": beginning-of-line
17 | "\e[8": end-of-line
18 | "\eOH": beginning-of-line
19 | "\eOF": end-of-line
20 | "\e[H": beginning-of-line
21 | "\e[F": end-of-line
22 | "\e[1~": beginning-of-line
23 | "\e[4~": end-of-line
24 | "\e[7~": beginning-of-line
25 | "\e[8~": end-of-line
26 |
--------------------------------------------------------------------------------
/ipython/extensions/vimception/__init__.py:
--------------------------------------------------------------------------------
1 | from .vimception import load_ipython_extension
2 |
--------------------------------------------------------------------------------
/ipython/extensions/vimception/vimception.py:
--------------------------------------------------------------------------------
1 | from __future__ import print_function
2 | """
3 | This is VimCeption
4 |
5 | When you load this extension, you will feel a kick
6 |
7 | """
8 | import os
9 | from IPython.display import display, Javascript
10 |
11 | fname = os.path.join(os.path.dirname(__file__), 'vimception.js')
12 | with open(fname) as f:
13 | vimception_js = f.read()
14 |
15 | def vimception(line=''):
16 | with open(fname) as f:
17 | vimception_js = f.read()
18 | display(Javascript(vimception_js))
19 | if line != 'off':
20 | display(Javascript(vimception_js))
21 | else:
22 | print(line)
23 | display(Javascript(vimception_js + "to('default');"));
24 |
25 | def load_ipython_extension(ip):
26 | vimception()
27 | ip.magics_manager.register_function(vimception)
28 |
--------------------------------------------------------------------------------
/ipython/profile_default/static/custom/custom.js:
--------------------------------------------------------------------------------
1 | /* disabled because of bugs
2 |
3 | $.getScript("/static/components/codemirror/keymap/vim.js", function() {
4 | if (! IPython.Cell) return;
5 | IPython.Cell.options_default.cm_config.keyMap = "vim";
6 | });
7 |
8 | require(["nbextensions/vim"], function (vim_extension) {
9 | vim_extension.load_extension();
10 | });
11 | */
12 |
--------------------------------------------------------------------------------
/kanshi/pollux.config:
--------------------------------------------------------------------------------
1 | profile default {
2 | output DP-1 enable scale 1.0 position 2160,1680
3 | output DP-2 enable transform 90 scale 1.0 position 0,0
4 | }
5 |
--------------------------------------------------------------------------------
/kanshi/pollux.single.config:
--------------------------------------------------------------------------------
1 | profile default {
2 | output DP-2 disable
3 | output DP-1 enable scale 1.0 position 2160,1680
4 | }
5 |
--------------------------------------------------------------------------------
/kdeglobals:
--------------------------------------------------------------------------------
1 | [General]
2 | TerminalApplication=foot
3 | TerminalService=foot.desktop
4 |
5 | [KDE]
6 | ShowDeleteCommand=false
7 |
8 | [KFileDialog Settings]
9 | Allow Expansion=false
10 | Automatically select filename extension=true
11 | Breadcrumb Navigation=true
12 | Decoration position=2
13 | LocationCombo Completionmode=5
14 | PathCombo Completionmode=5
15 | Show Bookmarks=false
16 | Show Full Path=false
17 | Show Inline Previews=true
18 | Show Preview=false
19 | Show Speedbar=true
20 | Show hidden files=false
21 | Sort by=Name
22 | Sort directories first=true
23 | Sort hidden files last=false
24 | Sort reversed=false
25 | Speedbar Width=148
26 | View Style=DetailTree
27 |
28 | [PreviewSettings]
29 | EnableRemoteFolderThumbnail=true
30 | MaximumRemoteSize=20971520
31 |
--------------------------------------------------------------------------------
/labelmap.json:
--------------------------------------------------------------------------------
1 | {
2 | "feature": "feat",
3 | "enhancement": "feat"
4 | }
5 |
--------------------------------------------------------------------------------
/lf/preview:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #!/bin/sh
4 |
5 | image() {
6 | chafa "$1" -f sixel -s "$(($2-2))x$(($3-2))" | sed 's/#/\n#/g'
7 | }
8 |
9 | batorcat() {
10 | file="$1"
11 | shift
12 | if command -v bat >/dev/null 2>&1; then
13 | bat --color=always --style=plain --pager=never "$file" "$@"
14 | else
15 | cat "$file"
16 | fi
17 | }
18 |
19 | CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
20 |
21 | case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
22 | *.tgz | *.tar.gz) tar tzf "$1" ;;
23 | *.tar.bz2 | *.tbz2) tar tjf "$1" ;;
24 | *.tar.txz | *.txz) xz --list "$1" ;;
25 | *.tar) tar tf "$1" ;;
26 | *.zip | *.jar | *.war | *.ear | *.oxt) unzip -l "$1" ;;
27 | *.rar) unrar l "$1" ;;
28 | *.7z) 7z l "$1" ;;
29 | *.[1-8]) man "$1" | col -b ;;
30 | *.o) nm "$1" ;;
31 | *.torrent) transmission-show "$1" ;;
32 | *.iso) iso-info --no-header -l "$1" ;;
33 | *.odt | *.ods | *.odp | *.sxw) odt2txt "$1" ;;
34 | *.doc) catdoc "$1" ;;
35 | *.docx) docx2txt "$1" - ;;
36 | *.xls | *.xlsx)
37 | ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv
38 | ;;
39 | *.wav | *.mp3 | *.flac | *.m4a | *.wma | *.ape | *.ac3 | *.og[agx] | *.spx | *.opus | *.as[fx] | *.mka)
40 | exiftool "$1"
41 | ;;
42 | *.pdf)
43 | [ ! -f "${CACHE}.jpg" ] &&
44 | pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
45 | image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
46 | ;;
47 | *.epub)
48 | [ ! -f "$CACHE" ] &&
49 | epub-thumbnailer "$1" "$CACHE" 1024
50 | image "$CACHE" "$2" "$3" "$4" "$5"
51 | ;;
52 | *.html)
53 | [ ! -f "$CACHE" ] &&
54 | wkhtmltopdf "$1" - | pdftoppm -jpeg -f 1 -singlefile - "$CACHE"
55 | image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
56 | ;;
57 | *.avi | *.mp4 | *.wmv | *.dat | *.3gp | *.ogv | *.mkv | *.mpg | *.mpeg | *.vob | *.fl[icv] | *.m2v | *.mov | *.webm | *.ts | *.mts | *.m4v | *.r[am] | *.qt | *.divx)
58 | [ ! -f "${CACHE}.jpg" ] &&
59 | ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
60 | image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
61 | ;;
62 | *.bmp | *.jpg | *.jpeg | *.png | *.xpm | *.webp | *.jfif)
63 | image "$1" "$2" "$3" "$4" "$5"
64 | ;;
65 | *.ino)
66 | batorcat --language=cpp "$1"
67 | ;;
68 | *)
69 | batorcat "$1"
70 | ;;
71 | esac
72 | exit 0
73 |
--------------------------------------------------------------------------------
/lf/scope:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -C -f -u
4 | #IFS=$'\n'
5 | IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
6 |
7 | # ANSI color codes are supported.
8 | # STDIN is disabled, so interactive scripts won't work properly
9 |
10 | # This script is considered a configuration file and must be updated manually.
11 |
12 | # Meanings of exit codes:
13 | # code | meaning | action of ranger
14 | # -----+------------+-------------------------------------------
15 | # 0 | success | Display stdout as preview
16 | # 1 | no preview | Display no preview at all
17 | # 2 | plain text | Display the plain content of the file
18 |
19 | # Script arguments
20 | FILE_PATH="${1}" # Full path of the highlighted file
21 | HEIGHT="${2}"
22 |
23 | #FILE_EXTENSION="${FILE_PATH##*.}"
24 | #FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
25 |
26 | # Settings
27 | HIGHLIGHT_SIZE_MAX=362143 # 256KiB
28 | HIGHLIGHT_TABWIDTH=8
29 | HIGHLIGHT_STYLE='pablo'
30 |
31 |
32 | handle_mime() {
33 | local mimetype="${1}"
34 | case "${mimetype}" in
35 | text/html) w3m -dump "${FILE_PATH}" ;;
36 | text/troff) man ./ "${FILE_PATH}" | col -b ;;
37 | text/* | */xml)
38 | if [ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]; then
39 | exit 2
40 | fi
41 | if [ "$( tput colors )" -ge 256 ]; then
42 | local highlight_format='xterm256'
43 | else
44 | local highlight_format='ansi'
45 | fi
46 | highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
47 | --style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" ;;
48 | application/zip) atool --list -- "${FILE_PATH}" ;;
49 | image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
50 | video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
51 | */pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;
52 | *opendocument*) odt2txt "${FILE_PATH}" ;;
53 | esac
54 | }
55 |
56 | MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
57 | handle_mime "${MIMETYPE}"
58 | exit 1
59 |
--------------------------------------------------------------------------------
/mailcap:
--------------------------------------------------------------------------------
1 | text/plain; bat --paging=always '%s'
2 | text/x-diff; bat --paging=always '%s'
3 | text/html; links %s; nametemplate=%s.html
4 | text/html; links -dump %s; nametemplate=%s.html; copiousoutput
5 | text/calendar; mutt-ics; copiousoutput
6 | text/*; bat --paging=always '%s'
7 | application/ics; mutt-ics; copiousoutput
8 | image/*; imv '%s'; edit=gimp '%s'; test=test -n "$DISPLAY"
9 | video/*; mpv '%s'
10 | audio/*; mpv --no-video '%s'
11 | application/x-pdf; zathura '%s'; test=test -n "$DISPLAY"
12 | application/pdf; zathura '%s'; test=test -n "$DISPLAY"
13 | application/vnd.openxmlformats-officedocument.wordprocessingml.document; soffice -no-oosplash --writer '%s'; edit=soffice -no-oosplash --writer '%s'; test=test -n "$DISPLAY"; description="Office Open XML Document"; nametemplate=%s.docx
14 | application/msword; soffice -no-oosplash --writer '%s'; edit=soffice -no-oosplash --writer '%s'; test=test -n "$DISPLAY"; description="Microsoft Word Document"; nametemplate=%s.doc
15 | application/vnd.openxmlformats-officedocument.presentationml.presentation; soffice -no-oosplash --impress '%s'; edit=soffice -no-oosplash --impress '%s'; test=test -n "$DISPLAY"; description="Office Open XML Presentation"; nametemplate=%s.pptx
16 |
--------------------------------------------------------------------------------
/mako/config:
--------------------------------------------------------------------------------
1 | # Space to setup configversion
2 | # configversion: 06c91bec544be9fb599acb257c559998
3 | default-timeout=5000
4 | max-visible=5
5 | max-history=5
6 | background-color=#000000cc
7 | border-color=#ff0000ff
8 | border-size=2
9 | border-radius=10
10 | width=800
11 | height=320
12 | max-icon-size=128
13 | font=Monospace 22
14 | anchor=bottom-right
15 |
--------------------------------------------------------------------------------
/mblaze/filter:
--------------------------------------------------------------------------------
1 | text/html: html2text
2 |
--------------------------------------------------------------------------------
/mblaze/profile:
--------------------------------------------------------------------------------
1 | Local-Mailbox: proycon@anaproy.nl
2 | Alternate-Mailboxes: maarten.van.gompel@di.huc.knaw.nl,maarten.vangompel@ru.nl
3 |
--------------------------------------------------------------------------------
/media/Landscape-Iceland-Arch-4K.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/Landscape-Iceland-Arch-4K.jpg
--------------------------------------------------------------------------------
/media/authaccept.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/authaccept.mp3
--------------------------------------------------------------------------------
/media/beepin.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/beepin.wav
--------------------------------------------------------------------------------
/media/beepout.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/beepout.wav
--------------------------------------------------------------------------------
/media/bell.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/bell.wav
--------------------------------------------------------------------------------
/media/blossom-branch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/blossom-branch.jpg
--------------------------------------------------------------------------------
/media/boing.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/boing.wav
--------------------------------------------------------------------------------
/media/buddhavoid1920.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/buddhavoid1920.png
--------------------------------------------------------------------------------
/media/centerpiece.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/centerpiece.png
--------------------------------------------------------------------------------
/media/chime.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/chime.wav
--------------------------------------------------------------------------------
/media/conifer.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/conifer.jpg
--------------------------------------------------------------------------------
/media/cylontune_low.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/cylontune_low.ogg
--------------------------------------------------------------------------------
/media/error.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/error.wav
--------------------------------------------------------------------------------
/media/expired.oga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/expired.oga
--------------------------------------------------------------------------------
/media/floral.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/floral.jpg
--------------------------------------------------------------------------------
/media/forest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/forest.jpg
--------------------------------------------------------------------------------
/media/glass.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/glass.ogg
--------------------------------------------------------------------------------
/media/glass_low.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/glass_low.ogg
--------------------------------------------------------------------------------
/media/green-leafed-closeup.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/green-leafed-closeup.jpg
--------------------------------------------------------------------------------
/media/green-tree-plant-leaves-40896.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/green-tree-plant-leaves-40896.jpg
--------------------------------------------------------------------------------
/media/home/doorbell.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/home/doorbell.ogg
--------------------------------------------------------------------------------
/media/home/intruderalert.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/home/intruderalert.ogg
--------------------------------------------------------------------------------
/media/home/redalert.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/home/redalert.ogg
--------------------------------------------------------------------------------
/media/home/redalert.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/home/redalert.wav
--------------------------------------------------------------------------------
/media/hummingbird.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/hummingbird.jpg
--------------------------------------------------------------------------------
/media/hummingbird_twin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/hummingbird_twin.jpg
--------------------------------------------------------------------------------
/media/key.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/key.wav
--------------------------------------------------------------------------------
/media/lock.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/lock.wav
--------------------------------------------------------------------------------
/media/locked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/locked.png
--------------------------------------------------------------------------------
/media/lovelyboot.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/lovelyboot.ogg
--------------------------------------------------------------------------------
/media/mountain-view-krivec-ales.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/mountain-view-krivec-ales.jpg
--------------------------------------------------------------------------------
/media/mountain.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/mountain.jpg
--------------------------------------------------------------------------------
/media/mountains.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/mountains.jpg
--------------------------------------------------------------------------------
/media/night-aurora.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/night-aurora.jpg
--------------------------------------------------------------------------------
/media/night-misty-peaks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/night-misty-peaks.png
--------------------------------------------------------------------------------
/media/notifyconnect.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/notifyconnect.wav
--------------------------------------------------------------------------------
/media/paradox_waves_by_neaben.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/paradox_waves_by_neaben.jpg
--------------------------------------------------------------------------------
/media/phone.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/phone.wav
--------------------------------------------------------------------------------
/media/photo-of-lake-krivec-ales.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/photo-of-lake-krivec-ales.jpg
--------------------------------------------------------------------------------
/media/pine.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/pine.jpg
--------------------------------------------------------------------------------
/media/shirahige2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/shirahige2.jpg
--------------------------------------------------------------------------------
/media/shutter.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/shutter.wav
--------------------------------------------------------------------------------
/media/submit.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/submit.wav
--------------------------------------------------------------------------------
/media/trees-green-fog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/trees-green-fog.jpg
--------------------------------------------------------------------------------
/media/unlock.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/unlock.wav
--------------------------------------------------------------------------------
/media/unlock2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/unlock2.wav
--------------------------------------------------------------------------------
/media/wipe.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/media/wipe.wav
--------------------------------------------------------------------------------
/mpv.conf:
--------------------------------------------------------------------------------
1 | script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp
2 |
3 | [1080p]
4 | ytdl-format=bestvideo[height<=?1080]+bestaudio/best
5 |
6 | [720p]
7 | ytdl-format=bestvideo[height<=?720]+bestaudio/best
8 |
9 | [480p]
10 | ytdl-format=bestvideo[height<=?480]+bestaudio/best
11 |
12 | [360p]
13 | ytdl-format=bestvideo[height<=?360]+bestaudio/best
14 |
15 |
--------------------------------------------------------------------------------
/mpv/input.conf:
--------------------------------------------------------------------------------
1 | Alt+= add video-zoom 0.1 # zoom in
2 |
--------------------------------------------------------------------------------
/mutt-compose:
--------------------------------------------------------------------------------
1 | # read main config
2 | source ~/.muttrc
3 |
4 | # remove hooks, headers and sig, they are already in the draft
5 | unhook send-hook
6 | unset signature
7 | unmy_hdr *
8 |
9 | # call the right editor immediately
10 | set autoedit=yes
11 | set editor="vim +'set tw=72' +/^$/+1"
12 |
--------------------------------------------------------------------------------
/ncmpcpp.bindings:
--------------------------------------------------------------------------------
1 | def_key "l"
2 | next_column
3 | def_key "h"
4 | previous_column
5 | def_key "k"
6 | scroll_up
7 | def_key "j"
8 | scroll_down
9 |
--------------------------------------------------------------------------------
/ncmpcpp.config:
--------------------------------------------------------------------------------
1 | ### Directories ###
2 | lyrics_directory = ~/lyrics
3 | #mpd_music_dir = ~/mus
4 | mpd_connection_timeout = 60
5 |
6 | ### Behaviour ###
7 | # execute_on_song_change = "bash ~/.config/ncmpcpp/mpd-notification"
8 | message_delay_time = 1
9 | playlist_disable_highlight_delay = 2
10 | autocenter_mode = "yes"
11 | centered_cursor = "yes"
12 | ignore_leading_the = "yes"
13 | allow_for_physical_item_deletion = "no"
14 |
15 | ### Visualizer ###
16 | visualizer_fifo_path = /tmp/mpd.fifo
17 | visualizer_output_name = "mpd_visualizer"
18 | visualizer_in_stereo = "yes"
19 | visualizer_sync_interval = 30
20 | visualizer_look = ●●
21 |
22 | ### Appearance ###
23 | colors_enabled = "yes"
24 | playlist_display_mode = "columns"
25 | user_interface = classic
26 | # user_interface = alternative
27 | volume_color = "white"
28 |
29 | # Window #
30 | #song_window_title_format = "Music"
31 | song_window_title_format = "{%a - }{%t}|{%f}"
32 | statusbar_visibility = "yes"
33 | header_visibility = "yes"
34 | titles_visibility = "yes"
35 |
36 | # Progress bar #
37 | progressbar_look = "▂▂▂"
38 | progressbar_color = "black"
39 | progressbar_elapsed_color = "yellow"
40 |
41 | # Alternative UI
42 | alternative_ui_separator_color = "black"
43 | alternative_header_first_line_format = $b$5«$/b$5« $b$8{%t}|{%f}$/b $5»$b$5»$/b
44 | alternative_header_second_line_format = {$b{$2%a$9}{ - $7%b$9}{ ($2%y$9)}}|{%D}
45 |
46 | # Song list #
47 | song_status_format= "$7%t"
48 | song_list_format = " %t $R%a %l "
49 | song_columns_list_format = "(53)[white]{tr} (45)[blue]{a}"
50 |
51 | song_library_format = {{%a - %t} (%b)}|{%f}
52 |
53 | # Colors #
54 | main_window_color = "blue"
55 | current_item_prefix = "$(blue)$r"
56 | current_item_suffix = "$/r$(end)"
57 |
58 | current_item_inactive_column_prefix = red
59 | current_item_inactive_column_suffix = red
60 |
61 | color1 = "white"
62 | color2 = "red"
63 |
64 |
--------------------------------------------------------------------------------
/newsraft/config:
--------------------------------------------------------------------------------
1 | list-entry-date-format "%d %b '%y"
2 | color-list-item yellow default
3 | color-list-item-unread default default
4 | color-list-section yellow default
5 | color-list-section-unread default default
6 | bind o exec /home/proycon/dotfiles/scripts/linkhandler "%l"
7 | bind O exec /home/proycon/dotfiles/scripts/linkhandler "%l" pi1
8 | bind p exec /home/proycon/dotfiles/scripts/linkhandler "%l" download
9 | notification-command ""
10 |
--------------------------------------------------------------------------------
/notmuchmap.json:
--------------------------------------------------------------------------------
1 | {
2 | "work": ["@work"],
3 | "personal": ["@hobby"],
4 | "sxmo": ["+sxmo", "@hobby"],
5 | "folia": ["+folia","@huc","@work"],
6 | "frog": ["+frog","@huc","@work"],
7 | "flat": ["+frog","@huc","@work"],
8 | "clam": ["+frog","@huc","@work"],
9 | "sysadmin": ["@radboud","@work"]
10 | }
11 |
--------------------------------------------------------------------------------
/numen/phrases/app.phrases:
--------------------------------------------------------------------------------
1 | # This saves your changes in vi-style text editors
2 | safeguard:press Escape colon w Return
3 |
4 | fall:press Down Down Down
5 | rise:press Up Up Up
6 |
--------------------------------------------------------------------------------
/numen/phrases/environment.hyprland.phrases:
--------------------------------------------------------------------------------
1 | #switch alt and super due to the way my default keymap works
2 | shock: mod alt
3 | hype: mod super \
4 | stick off
5 |
6 | master: eval hyprctl dispatch layoutmsg focusmaster
7 | promote: eval hyprctl dispatch layoutmsg swapwithmaster
8 | recycle: eval hyprctl dispatch layoutmsg cycleprev
9 | cycle: eval hyprctl dispatch layoutmsg cyclenext
10 |
11 | master: run hyprctl dispatch layoutmsg focusmaster
12 | promote: run hyprctl dispatch layoutmsg swapwithmaster
13 | recycle: run hyprctl dispatch layoutmsg cycleprev
14 | cycle: run hyprctl dispatch layoutmsg cyclenext
15 |
16 | desktop one: run hyprctl dispatch workspace 1
17 | desktop two: run hyprctl dispatch workspace 2
18 | desktop three: run hyprctl dispatch workspace 3
19 | desktop four: run hyprctl dispatch workspace 4
20 | desktop five: run hyprctl dispatch workspace 5
21 | desktop six: run hyprctl dispatch workspace 6
22 | desktop seven: run hyprctl dispatch workspace 7
23 | desktop eight: run hyprctl dispatch workspace 8
24 | desktop nine: run hyprctl dispatch workspace 9
25 | desktop ten: run hyprctl dispatch workspace 10
26 | desktop eleven: run hyprctl dispatch workspace 11
27 | desktop twelve: run hyprctl dispatch workspace 12
28 | desktop right: run hyprctl dispatch workspace +1
29 | desktop left: run hyprctl dispatch workspace -1
30 | desktop next: run hyprctl dispatch workspace +1
31 | desktop previous: run hyprctl dispatch workspace -1
32 | rightward: run hyprctl dispatch workspace +1
33 | leftward: run hyprctl dispatch workspace -1
34 | return: run hyprctl dispatch workspace previous
35 | exterminate: run hyprctl dispatch killactive 0
36 | onscreen: run hyprctl dispatch fullscreen 1
37 |
38 | latin: run hyprctl keyword input:kb_layout proylatin
39 | cyrillic: run hyprctl keyword input:kb_layout proyru
40 |
--------------------------------------------------------------------------------
/numen/phrases/environment.personal.phrases:
--------------------------------------------------------------------------------
1 | house: eval ~/dotfiles/homecommand.sh &
2 | periscope:eval streetcam.sh &
3 | translate:eval ~/dotfiles/translate.sh &
4 | screenshot:eval ~/dotfiles/translate.sh &
5 | emoticon:eval ~/dotfiles/emojiselect &
6 | bookmarks:eval ~/dotfiles/buku-dmenu &
7 | connectivity:eval ~/dotfiles/network-menu.sh &
8 | lockup:eval ~/dotfiles/lock.sh &
9 |
10 |
--------------------------------------------------------------------------------
/numen/phrases/environment.quit.phrases:
--------------------------------------------------------------------------------
1 | exterminate: eval killall numen
2 |
--------------------------------------------------------------------------------
/numen/phrases/environment.sxmo-sway.phrases:
--------------------------------------------------------------------------------
1 | terminal: press super+Return
2 | menu: press super+p
3 | system: run sxmo_appmenu.sh sys &
4 | scripts: run sxmo_appmenu.sh scripts &
5 | applications: run sxmo_appmenu.sh applications &
6 | abs: run sxmo_appmenu.sh applications &
7 | notifications: run sxmo_notificationsmenu.sh &
8 | messages: run sxmo_modemtext.sh &
9 | contacts: run sxmo_contactmenu.sh &
10 | telephone: run sxmo_phonemenu.sh &
11 | networks: run sxmo_networks.sh &
12 | configuration: run sxmo_appmenu.sh config &
13 | launcher:run bemenu-run -l 20 &
14 | keyboard: run sxmo_keyboard.sh toggle &
15 | rotate: run sxmo_rotate.sh
16 | exterminate: press super+shift+q
17 | force restart: run killall sway
18 |
19 | desktop one: run swaymsg workspace 1
20 | desktop two: run swaymsg workspace 2
21 | desktop three: run swaymsg workspace 3
22 | desktop four: run swaymsg workspace 4
23 | desktop next: run swaymsg workspace next
24 | desktop previous: run swaymsg workspace prev
25 | next desktop: run swaymsg workspace next
26 | previous desktop: run swaymsg workspace prev
27 | move to one: run swaymsg move workspace 1
28 | move to two: run swaymsg move workspace 2
29 | move to three: run swaymsg move workspace 3
30 | move to four: run swaymsg move workspace 4
31 | west: press super+Left
32 | east: press super+Right
33 | north: press super+Up
34 | south: press super+Down
35 |
36 | return: press super+Tab
37 | onscreen: press super+w
38 | tiles: press super+e
39 | tiled: press super+e
40 |
41 | cycle: stick off \
42 | press super+c
43 | recycle: stick off \
44 | press super+C
45 |
--------------------------------------------------------------------------------
/numen/phrases/environment.wayland.phrases:
--------------------------------------------------------------------------------
1 | terminal:eval foot &
2 | launcher:eval bemenu-run -l 20 &
3 |
--------------------------------------------------------------------------------
/numen/phrases/extra.character.phrases:
--------------------------------------------------------------------------------
1 | seven: press 7
2 | zero: press 0
3 |
4 | annihilate: run killall numen
5 |
6 |
--------------------------------------------------------------------------------
/numen/phrases/proycon-characters.phrases:
--------------------------------------------------------------------------------
1 | ape:press a
2 | bat:press b
3 | cat:press c
4 | dog:press d
5 | dove:press d
6 | eve:press e
7 | fox:press f
8 | gull:press g
9 | hawk:press h
10 | ice:press i
11 | icy:press i
12 | jay:press j
13 | kite:press k
14 | llama:press l
15 | mink:press m
16 | mule:press m
17 | newt:press n
18 | owl:press o
19 | otter:press o
20 | pig:press p
21 | quail:press q
22 | rook:press r
23 | ram:press r
24 | seal:press s
25 | toad:press t
26 | trout:press t
27 | ugly:press u
28 | viper:press v
29 | wolf:press w
30 | ox:press x
31 | yak:press y
32 | zebra:press z
33 |
--------------------------------------------------------------------------------
/nushell/env.nu:
--------------------------------------------------------------------------------
1 | # env.nu
2 | #
3 | # Installed by:
4 | # version = "0.103.0"
5 | #
6 | # Previously, environment variables were typically configured in `env.nu`.
7 | # In general, most configuration can and should be performed in `config.nu`
8 | # or one of the autoload directories.
9 | #
10 | # This file is generated for backwards compatibility for now.
11 | # It is loaded before config.nu and login.nu
12 | #
13 | # See https://www.nushell.sh/book/configuration.html
14 | #
15 | # Also see `help config env` for more options.
16 | #
17 | # You can remove these comments if you want or leave
18 | # them for future reference.
19 |
20 | mkdir ($nu.data-dir | path join "vendor/autoload")
21 | starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
22 |
23 | zoxide init nushell | save -f ~/.zoxide.nu
24 |
--------------------------------------------------------------------------------
/nvim/init.lua:
--------------------------------------------------------------------------------
1 | require "user.options"
2 | require "user.keymaps"
3 | require "user.plugins"
4 | require "user.colorscheme"
5 | require "user.cmp"
6 | require "user.lsp"
7 | require "user.telescope"
8 | require "user.treesitter"
9 | require "user.autopairs"
10 | require "user.comment"
11 | require "user.gitsigns"
12 | require "user.nvim-tree"
13 | require "user.bufferline"
14 | require "user.lualine"
15 | require "user.toggleterm"
16 | require "user.project"
17 | require "user.impatient"
18 | require "user.indentline"
19 | --require "user.alpha"
20 | require "user.whichkey"
21 | require "user.autocommands"
22 | require "user.symbols_outline"
23 | require "user.octo"
24 | require "user.lsp_signature"
25 | require "user.luasnip"
26 | --require "user.mini"
27 | --require "user.avante"
28 |
--------------------------------------------------------------------------------
/nvim/lua/user/alpha.lua:
--------------------------------------------------------------------------------
1 | local status_ok, alpha = pcall(require, "alpha")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | local dashboard = require("alpha.themes.dashboard")
7 | dashboard.section.header.val = {
8 | [[ __ ]],
9 | [[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
10 | [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
11 | [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
12 | [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
13 | [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
14 | }
15 | dashboard.section.buttons.val = {
16 | dashboard.button("f", " Find file", ":Telescope find_files "),
17 | dashboard.button("e", " New file", ":ene startinsert "),
18 | dashboard.button("p", " Find project", ":Telescope projects "),
19 | dashboard.button("r", " Recently used files", ":Telescope oldfiles "),
20 | dashboard.button("t", " Find text", ":Telescope live_grep "),
21 | dashboard.button("c", " Configuration", ":e ~/.config/nvim/init.lua "),
22 | dashboard.button("q", " Quit Neovim", ":qa"),
23 | }
24 |
25 | local function footer()
26 | -- NOTE: requires the fortune-mod package to work
27 | -- local handle = io.popen("fortune")
28 | -- local fortune = handle:read("*a")
29 | -- handle:close()
30 | -- return fortune
31 | return "chrisatmachine.com"
32 | end
33 |
34 | dashboard.section.footer.val = footer()
35 |
36 | dashboard.section.footer.opts.hl = "Type"
37 | dashboard.section.header.opts.hl = "Include"
38 | dashboard.section.buttons.opts.hl = "Keyword"
39 |
40 | dashboard.opts.opts.noautocmd = true
41 | -- vim.cmd([[autocmd User AlphaReady echo 'ready']])
42 | alpha.setup(dashboard.opts)
43 |
--------------------------------------------------------------------------------
/nvim/lua/user/autocommands.lua:
--------------------------------------------------------------------------------
1 | vim.cmd [[
2 | augroup _general_settings
3 | autocmd!
4 | autocmd FileType qf,help,man,lspinfo nnoremap q :close
5 | autocmd TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Visual', timeout = 200})
6 | autocmd BufWinEnter * :set formatoptions-=cro
7 | autocmd FileType qf set nobuflisted
8 | augroup end
9 |
10 | augroup _git
11 | autocmd!
12 | autocmd FileType gitcommit setlocal wrap
13 | autocmd FileType gitcommit setlocal spell
14 | augroup end
15 |
16 | augroup _markdown
17 | autocmd!
18 | autocmd FileType markdown setlocal wrap
19 | autocmd FileType markdown setlocal spell
20 | augroup end
21 |
22 | augroup _auto_resize
23 | autocmd!
24 | autocmd VimResized * tabdo wincmd =
25 | augroup end
26 |
27 | augroup _alpha
28 | autocmd!
29 | autocmd User AlphaReady set showtabline=0 | autocmd BufUnload set showtabline=2
30 | augroup end
31 | ]]
32 |
33 | -- Autoformat
34 | -- augroup _lsp
35 | -- autocmd!
36 | -- autocmd BufWritePre * lua vim.lsp.buf.formatting()
37 | -- augroup end
38 |
--------------------------------------------------------------------------------
/nvim/lua/user/autopairs.lua:
--------------------------------------------------------------------------------
1 | -- Setup nvim-cmp.
2 | local status_ok, npairs = pcall(require, "nvim-autopairs")
3 | if not status_ok then
4 | return
5 | end
6 |
7 | npairs.setup {
8 | check_ts = true,
9 | ts_config = {
10 | lua = { "string", "source" },
11 | javascript = { "string", "template_string" },
12 | java = false,
13 | },
14 | disable_filetype = { "TelescopePrompt", "spectre_panel" },
15 | fast_wrap = {
16 | map = "",
17 | chars = { "{", "[", "(", '"', "'" },
18 | pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
19 | offset = 0, -- Offset from pattern match
20 | end_key = "$",
21 | keys = "qwertyuiopzxcvbnmasdfghjkl",
22 | check_comma = true,
23 | highlight = "PmenuSel",
24 | highlight_grey = "LineNr",
25 | },
26 | }
27 |
28 | local cmp_autopairs = require "nvim-autopairs.completion.cmp"
29 | local cmp_status_ok, cmp = pcall(require, "cmp")
30 | if not cmp_status_ok then
31 | return
32 | end
33 | cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } })
34 |
--------------------------------------------------------------------------------
/nvim/lua/user/avante.lua:
--------------------------------------------------------------------------------
1 | local avante = require('avante')
2 |
3 | avante.setup({
4 | provider = "ollama",
5 | vendors = {
6 | ollama = {
7 | __inherited_from = "openai",
8 | api_key_name = "",
9 | endpoint = "http://127.0.0.1:11434/v1",
10 | model = "codegemma",
11 | },
12 | },
13 | behaviour = {
14 | auto_set_highlight_group = true,
15 | auto_apply_diff_after_generation = false,
16 | },
17 | mappings = {
18 | ask = "aa",
19 | refresh = "ar",
20 | },
21 | windows = {
22 | wrap = true,
23 | width = 40,
24 | },
25 | })
26 |
--------------------------------------------------------------------------------
/nvim/lua/user/colorscheme.lua:
--------------------------------------------------------------------------------
1 | vim.g.gruvbox_baby_transparent_mode = 1
2 | vim.g.gruvbox_baby_telescope_theme = 1
3 | local colors = require("gruvbox-baby.colors").config()
4 | vim.g.gruvbox_baby_highlights = {Search = {fg = colors.milk, bg = colors.orange}}
5 |
6 | vim.cmd [[
7 | if filereadable($HOME . "/.light")
8 | set background=light
9 | colorscheme zenwritten
10 | else
11 | try
12 | colorscheme everforest
13 | catch /^Vim\%((\a\+)\)\=:E185/
14 | colorscheme default
15 | set background=dark
16 | endtry
17 | endif
18 | ]]
19 |
--------------------------------------------------------------------------------
/nvim/lua/user/comment.lua:
--------------------------------------------------------------------------------
1 | local status_ok, comment = pcall(require, "Comment")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | comment.setup {
7 | pre_hook = function(ctx)
8 | local U = require "Comment.utils"
9 |
10 | local location = nil
11 | if ctx.ctype == U.ctype.block then
12 | location = require("ts_context_commentstring.utils").get_cursor_location()
13 | elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
14 | location = require("ts_context_commentstring.utils").get_visual_start_location()
15 | end
16 |
17 | return require("ts_context_commentstring.internal").calculate_commentstring {
18 | key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
19 | location = location,
20 | }
21 | end,
22 | }
23 |
--------------------------------------------------------------------------------
/nvim/lua/user/gitsigns.lua:
--------------------------------------------------------------------------------
1 | local status_ok, gitsigns = pcall(require, "gitsigns")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | gitsigns.setup {
7 | signs = {
8 | add = { text = "▎" },
9 | change = { text = "▎" },
10 | delete = { text = "契" },
11 | topdelete = { text = "契" },
12 | changedelete = { text = "▎" },
13 | },
14 | signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
15 | numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
16 | linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
17 | word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
18 | watch_gitdir = {
19 | interval = 1000,
20 | follow_files = true,
21 | },
22 | attach_to_untracked = true,
23 | current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
24 | current_line_blame_opts = {
25 | virt_text = true,
26 | virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
27 | delay = 1000,
28 | ignore_whitespace = false,
29 | },
30 | sign_priority = 6,
31 | update_debounce = 100,
32 | status_formatter = nil, -- Use default
33 | max_file_length = 40000,
34 | preview_config = {
35 | -- Options passed to nvim_open_win
36 | border = "single",
37 | style = "minimal",
38 | relative = "cursor",
39 | row = 0,
40 | col = 1,
41 | },
42 | }
43 |
--------------------------------------------------------------------------------
/nvim/lua/user/impatient.lua:
--------------------------------------------------------------------------------
1 | local status_ok, impatient = pcall(require, "impatient")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | impatient.enable_profile()
7 |
--------------------------------------------------------------------------------
/nvim/lua/user/indentline.lua:
--------------------------------------------------------------------------------
1 | local status_ok, indent_blankline = pcall(require, "indent_blankline")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | vim.g.indentLine_enabled = 1
7 | -- not sure if all these are used anymore (proycon) since v3 (https://github.com/lukas-reineke/indent-blankline.nvim/wiki/Migrate-to-version-3)
8 | vim.g.indent_blankline_show_trailing_blankline_indent = false
9 | vim.g.indent_blankline_show_first_indent_level = true
10 | vim.g.indent_blankline_use_treesitter = true
11 | vim.g.indent_blankline_context_patterns = {
12 | "class",
13 | "return",
14 | "function",
15 | "method",
16 | "^if",
17 | "^while",
18 | "jsx_element",
19 | "^for",
20 | "^object",
21 | "^table",
22 | "block",
23 | "arguments",
24 | "if_statement",
25 | "else_clause",
26 | "jsx_element",
27 | "jsx_self_closing_element",
28 | "try_statement",
29 | "catch_clause",
30 | "import_statement",
31 | "operation_type",
32 | }
33 | -- HACK: work-around for https://github.com/lukas-reineke/indent-blankline.nvim/issues/59
34 | vim.wo.colorcolumn = "99999"
35 |
36 | -- vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
37 | -- vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
38 | -- vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
39 | -- vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
40 | -- vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
41 | -- vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
42 | -- vim.opt.list = true
43 | -- vim.opt.listchars:append "space:⋅"
44 | -- vim.opt.listchars:append "space:"
45 | -- vim.opt.listchars:append "eol:↴"
46 | require "ibl".setup {
47 | indent = {
48 | char = "▏"
49 | },
50 | scope = {
51 | enabled = true,
52 | show_start = false,
53 | show_end = false
54 | },
55 | exclude = {
56 | buftypes = { "terminal", "nofile" },
57 | filetypes = { "help", "startify", "dashboard", "packer", "neogitstatus", "NVimTree", "Trouble" }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/nvim/lua/user/lsp/configs.lua:
--------------------------------------------------------------------------------
1 | local m = require("mason")
2 | m.setup()
3 | local status_ok, lsp_installer = pcall(require, "mason-lspconfig")
4 | if not status_ok then
5 | return
6 | end
7 |
8 | local lspconfig = require("lspconfig")
9 |
10 | local function getLinuxDistroFromReleaseFile()
11 | local f = io.open("/etc/os-release", "r")
12 | if not f then return nil end
13 |
14 | for line in f:lines() do
15 | if line:match("^ID=") then
16 | local distroName = line:gsub("ID=",""):gsub("\"","")
17 | return distroName
18 | end
19 | end
20 | f:close()
21 | return nil
22 | end
23 |
24 | -- (proycon) I don't think it should be necessary to add all those explicitly here (kinda conflicts with nvim-lsp-installer), but I can't get it to work otherwise
25 | local servers = { "jsonls", "lua_ls", "pyright", 'html', 'bashls', 'rust_analyzer', 'texlab', 'yamlls', 'jsonls', 'jdtls','kotlin_language_server', 'cssls', 'eslint', 'gopls', 'ansiblels', 'zls' }
26 | -- (proycon) these don't work on arm alpine: 'clangd', 'lemminx', add them conditionally
27 | local distro = getLinuxDistroFromReleaseFile()
28 | if distro ~= "postmarketos" and distro ~= "alpine" then
29 | table.insert(servers, "clangd")
30 | table.insert(servers, "lemminx")
31 | end
32 |
33 | lsp_installer.setup {
34 | ensure_installed = servers
35 | }
36 |
37 | for _, server in pairs(servers) do
38 | local opts = {
39 | on_attach = require("user.lsp.handlers").on_attach,
40 | capabilities = require("user.lsp.handlers").capabilities,
41 | }
42 | local has_custom_opts, server_custom_opts = pcall(require, "user.lsp.settings." .. server)
43 | if has_custom_opts then
44 | opts = vim.tbl_deep_extend("force", server_custom_opts, opts)
45 | end
46 | lspconfig[server].setup(opts)
47 | end
48 |
49 |
50 |
--------------------------------------------------------------------------------
/nvim/lua/user/lsp/init.lua:
--------------------------------------------------------------------------------
1 | local status_ok, _ = pcall(require, "lspconfig")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | require "user.lsp.configs"
7 | require("user.lsp.handlers").setup()
8 | require "user.lsp.null-ls"
9 |
--------------------------------------------------------------------------------
/nvim/lua/user/lsp/null-ls.lua:
--------------------------------------------------------------------------------
1 | local null_ls_status_ok, null_ls = pcall(require, "null-ls")
2 | if not null_ls_status_ok then
3 | return
4 | end
5 |
6 | -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
7 | local formatting = null_ls.builtins.formatting
8 | -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
9 | local diagnostics = null_ls.builtins.diagnostics
10 |
11 | null_ls.setup({
12 | debug = false,
13 | sources = {
14 | formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }),
15 | formatting.black.with({ extra_args = { "--fast" } }),
16 | formatting.stylua
17 | --formatting.rustfmt,
18 | --diagnostics.pylint,
19 | --diagnostics.shellcheck
20 | },
21 | })
22 |
--------------------------------------------------------------------------------
/nvim/lua/user/lsp/settings/sumneko_lua.lua:
--------------------------------------------------------------------------------
1 | return {
2 | settings = {
3 |
4 | Lua = {
5 | diagnostics = {
6 | globals = { "vim" },
7 | },
8 | workspace = {
9 | library = {
10 | [vim.fn.expand("$VIMRUNTIME/lua")] = true,
11 | [vim.fn.stdpath("config") .. "/lua"] = true,
12 | },
13 | },
14 | },
15 | },
16 | }
17 |
--------------------------------------------------------------------------------
/nvim/lua/user/lsp/settings/yamlls.lua:
--------------------------------------------------------------------------------
1 | local opts = {
2 | settings = {
3 | yaml = {
4 | keyOrdering = false
5 | },
6 | },
7 | }
8 |
9 | return opts
10 |
--------------------------------------------------------------------------------
/nvim/lua/user/lualine.lua:
--------------------------------------------------------------------------------
1 | local status_ok, lualine = pcall(require, "lualine")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | local hide_in_width = function()
7 | return vim.fn.winwidth(0) > 80
8 | end
9 |
10 | local diagnostics = {
11 | "diagnostics",
12 | sources = { "nvim_diagnostic" },
13 | sections = { "error", "warn" },
14 | symbols = { error = " ", warn = " " },
15 | colored = false,
16 | update_in_insert = false,
17 | always_visible = true,
18 | }
19 |
20 | local diff = {
21 | "diff",
22 | colored = false,
23 | symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
24 | cond = hide_in_width
25 | }
26 |
27 | local mode = {
28 | "mode",
29 | fmt = function(str)
30 | return "-- " .. str .. " --"
31 | end,
32 | }
33 |
34 | local filetype = {
35 | "filetype",
36 | icons_enabled = false,
37 | icon = nil,
38 | }
39 |
40 | local branch = {
41 | "branch",
42 | icons_enabled = true,
43 | icon = "",
44 | }
45 |
46 | local location = {
47 | "location",
48 | padding = 0,
49 | }
50 |
51 | -- cool function for progress
52 | local progress = function()
53 | local current_line = vim.fn.line(".")
54 | local total_lines = vim.fn.line("$")
55 | local chars = { "__", "▁▁", "▂▂", "▃▃", "▄▄", "▅▅", "▆▆", "▇▇", "██" }
56 | local line_ratio = current_line / total_lines
57 | local index = math.ceil(line_ratio * #chars)
58 | return chars[index]
59 | end
60 |
61 | local spaces = function()
62 | return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
63 | end
64 |
65 | lualine.setup({
66 | options = {
67 | icons_enabled = true,
68 | theme = "auto",
69 | component_separators = { left = "", right = "" },
70 | section_separators = { left = "", right = "" },
71 | disabled_filetypes = { "alpha", "dashboard", "NvimTree", "Outline" },
72 | always_divide_middle = true,
73 | },
74 | sections = {
75 | lualine_a = { branch, diagnostics },
76 | lualine_b = { mode },
77 | lualine_c = {},
78 | -- lualine_x = { "encoding", "fileformat", "filetype" },
79 | lualine_x = { diff, spaces, "encoding", filetype },
80 | lualine_y = { location },
81 | lualine_z = { progress },
82 | },
83 | inactive_sections = {
84 | lualine_a = {},
85 | lualine_b = {},
86 | lualine_c = { "filename" },
87 | lualine_x = { "location" },
88 | lualine_y = {},
89 | lualine_z = {},
90 | },
91 | tabline = {},
92 | extensions = {},
93 | })
94 |
--------------------------------------------------------------------------------
/nvim/lua/user/mini.lua:
--------------------------------------------------------------------------------
1 | require("mini.ai").setup() -- around/inside, not artificial intelligence!
2 | require("mini.surround").setup()
3 | require("mini.operators").setup()
4 | --require("mini.pairs").setup()
5 | require("mini.bracketed").setup()
6 | --require("mini.files").setup()
7 |
8 |
--------------------------------------------------------------------------------
/nvim/lua/user/project.lua:
--------------------------------------------------------------------------------
1 | local status_ok, project = pcall(require, "project_nvim")
2 | if not status_ok then
3 | return
4 | end
5 | project.setup({
6 | ---@usage set to false to disable project.nvim.
7 | --- This is on by default since it's currently the expected behavior.
8 | active = true,
9 |
10 | on_config_done = nil,
11 |
12 | ---@usage set to true to disable setting the current-woriking directory
13 | --- Manual mode doesn't automatically change your root directory, so you have
14 | --- the option to manually do so using `:ProjectRoot` command.
15 | manual_mode = false,
16 |
17 | ---@usage Methods of detecting the root directory
18 | --- Allowed values: **"lsp"** uses the native neovim lsp
19 | --- **"pattern"** uses vim-rooter like glob pattern matching. Here
20 | --- order matters: if one is not detected, the other is used as fallback. You
21 | --- can also delete or rearangne the detection methods.
22 | -- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project
23 | detection_methods = { "pattern" },
24 |
25 | ---@usage patterns used to detect root dir, when **"pattern"** is in detection_methods
26 | patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json" },
27 |
28 | ---@ Show hidden files in telescope when searching for files in a project
29 | show_hidden = false,
30 |
31 | ---@usage When set to false, you will get a message when project.nvim changes your directory.
32 | -- When set to false, you will get a message when project.nvim changes your directory.
33 | silent_chdir = true,
34 |
35 | ---@usage list of lsp client names to ignore when using **lsp** detection. eg: { "efm", ... }
36 | ignore_lsp = {},
37 |
38 | ---@type string
39 | ---@usage path to store the project history for use in telescope
40 | datapath = vim.fn.stdpath("data"),
41 | })
42 |
43 | local tele_status_ok, telescope = pcall(require, "telescope")
44 | if not tele_status_ok then
45 | return
46 | end
47 |
48 | telescope.load_extension('projects')
49 |
--------------------------------------------------------------------------------
/nvim/lua/user/symbols_outline.lua:
--------------------------------------------------------------------------------
1 | -- init.lua
2 | vim.g.symbols_outline = {
3 | highlight_hovered_item = true,
4 | show_guides = true,
5 | auto_preview = true,
6 | position = 'right',
7 | relative_width = true,
8 | width = 25,
9 | auto_close = false,
10 | show_numbers = false,
11 | show_relative_numbers = false,
12 | show_symbol_details = true,
13 | preview_bg_highlight = 'Pmenu',
14 | keymaps = { -- These keymaps can be a string or a table for multiple keys
15 | close = {"", "q"},
16 | goto_location = "",
17 | focus_location = "o",
18 | hover_symbol = "",
19 | toggle_preview = "K",
20 | rename_symbol = "r",
21 | code_actions = "a",
22 | },
23 | lsp_blacklist = {},
24 | symbol_blacklist = {},
25 | symbols = {
26 | File = {icon = "", hl = "TSURI"},
27 | Module = {icon = "", hl = "TSNamespace"},
28 | Namespace = {icon = "", hl = "TSNamespace"},
29 | Package = {icon = "", hl = "TSNamespace"},
30 | Class = {icon = "𝓒", hl = "TSType"},
31 | Method = {icon = "ƒ", hl = "TSMethod"},
32 | Property = {icon = "", hl = "TSMethod"},
33 | Field = {icon = "", hl = "TSField"},
34 | Constructor = {icon = "", hl = "TSConstructor"},
35 | Enum = {icon = "ℰ", hl = "TSType"},
36 | Interface = {icon = "ﰮ", hl = "TSType"},
37 | Function = {icon = "", hl = "TSFunction"},
38 | Variable = {icon = "", hl = "TSConstant"},
39 | Constant = {icon = "", hl = "TSConstant"},
40 | String = {icon = "𝓐", hl = "TSString"},
41 | Number = {icon = "#", hl = "TSNumber"},
42 | Boolean = {icon = "⊨", hl = "TSBoolean"},
43 | Array = {icon = "", hl = "TSConstant"},
44 | Object = {icon = "⦿", hl = "TSType"},
45 | Key = {icon = "🔐", hl = "TSType"},
46 | Null = {icon = "NULL", hl = "TSType"},
47 | EnumMember = {icon = "", hl = "TSField"},
48 | Struct = {icon = "𝓢", hl = "TSType"},
49 | Event = {icon = "🗲", hl = "TSType"},
50 | Operator = {icon = "+", hl = "TSOperator"},
51 | TypeParameter = {icon = "𝙏", hl = "TSParameter"}
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/nvim/lua/user/toggleterm.lua:
--------------------------------------------------------------------------------
1 | local status_ok, toggleterm = pcall(require, "toggleterm")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | toggleterm.setup({
7 | size = 20,
8 | open_mapping = [[]],
9 | hide_numbers = true,
10 | shade_filetypes = {},
11 | shade_terminals = true,
12 | shading_factor = 2,
13 | start_in_insert = true,
14 | insert_mappings = true,
15 | persist_size = true,
16 | direction = "float",
17 | close_on_exit = true,
18 | shell = vim.o.shell,
19 | float_opts = {
20 | border = "curved",
21 | winblend = 0,
22 | highlights = {
23 | border = "Normal",
24 | background = "Normal",
25 | },
26 | },
27 | })
28 |
29 | function _G.set_terminal_keymaps()
30 | local opts = {noremap = true}
31 | vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts)
32 | vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[]], opts)
33 | vim.api.nvim_buf_set_keymap(0, 't', '', [[h]], opts)
34 | vim.api.nvim_buf_set_keymap(0, 't', '', [[j]], opts)
35 | vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts)
36 | vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts)
37 | end
38 |
39 | vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
40 |
41 | local Terminal = require("toggleterm.terminal").Terminal
42 | local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
43 |
44 | function _LAZYGIT_TOGGLE()
45 | lazygit:toggle()
46 | end
47 |
48 | local tig = Terminal:new({ cmd = "tig", hidden = true })
49 |
50 | function _TIG_TOGGLE()
51 | tig:toggle()
52 | end
53 |
54 | local node = Terminal:new({ cmd = "node", hidden = true })
55 |
56 | function _NODE_TOGGLE()
57 | node:toggle()
58 | end
59 |
60 | local ncdu = Terminal:new({ cmd = "ncdu", hidden = true })
61 |
62 | function _NCDU_TOGGLE()
63 | ncdu:toggle()
64 | end
65 |
66 | local htop = Terminal:new({ cmd = "htop", hidden = true })
67 |
68 | function _HTOP_TOGGLE()
69 | htop:toggle()
70 | end
71 |
72 | local python = Terminal:new({ cmd = "python", hidden = true })
73 |
74 | function _PYTHON_TOGGLE()
75 | python:toggle()
76 | end
77 |
--------------------------------------------------------------------------------
/nvim/lua/user/treesitter.lua:
--------------------------------------------------------------------------------
1 | local status_ok, configs = pcall(require, "nvim-treesitter.configs")
2 | if not status_ok then
3 | return
4 | end
5 |
6 | configs.setup {
7 | ensure_installed = { "c","bash","lua","cpp","rust","dot","dockerfile","go","http", "json","latex","llvm","markdown_inline", "make","nu","perl","php","python","r", "rust","toml","turtle","vim","vue","yaml","zig" }, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
8 | sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
9 | ignore_install = { "latex" }, -- List of parsers to ignore installing
10 | autopairs = {
11 | enable = true,
12 | },
13 | highlight = {
14 | enable = true, -- false will disable the whole extension
15 | disable = { "" }, -- list of language that will be disabled
16 | additional_vim_regex_highlighting = true,
17 | },
18 | indent = { enable = true, disable = { "yaml" } },
19 | rainbow = {
20 | enable= true,
21 | extended_mode = true,
22 | max_file_lines = 1000
23 | }
24 | }
25 |
26 | require('ts_context_commentstring').setup {
27 | context_commentstring = {
28 | enable = true,
29 | enable_autocmd = false,
30 | },
31 | }
32 |
--------------------------------------------------------------------------------
/nvim/syntax/turtle.vim:
--------------------------------------------------------------------------------
1 | " Vim syntax file
2 | " Language: Turtle - Terse RDF Triple Language
3 | " Version: 1.1
4 | " SeeAlso:
5 | " Maintainer: Niklas Lindstrom
6 |
7 | let n3_actually = 0
8 | runtime! syntax/n3.vim
9 | unlet b:current_syntax
10 |
11 | syn match turtleDeclaration "\\|\\c"
12 | hi def link turtleDeclaration n3Declaration
13 |
14 | syn region turtleString matchgroup=n3StringDelim start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=n3Escape
15 | hi def link turtleString n3String
16 | syn region turtleMultilineString matchgroup=n3StringDelim start=+'''+ end=+'''+ skip=+\\\\\|\\'+ keepend contains=n3Escape
17 | hi def link turtleMultilineString n3MultilineString
18 |
19 | let b:current_syntax = "turtle"
20 |
--------------------------------------------------------------------------------
/pdbrc.py:
--------------------------------------------------------------------------------
1 | from pdb import DefaultConfig
2 |
3 | class Config(DefaultConfig):
4 | """Config options for pdb++
5 | """
6 | # fancy prompt
7 | prompt = "pdb++> "
8 | # change the color to "inverse" so that all the colors show through
9 | current_line_color = 7
10 | # make sticky the default mode
11 | sticky_by_default = True
12 |
--------------------------------------------------------------------------------
/ranger/luke_ranger_readme.md:
--------------------------------------------------------------------------------
1 | # Luke's ranger setup
2 |
3 | ## Shortcuts
4 |
5 | I've added many folder-specific shortcuts; refer to rc.conf for the specifics, but here's the idea. There are for "verbs:"
6 |
7 | + g -- "go or cd"
8 | + t -- "new tab"
9 | + m -- "move file"
10 | + Y -- "yank or copy file"
11 |
12 | These "verbs" take "nouns" or "arguments," like these:
13 |
14 | + d -- "~/Documents"
15 | + D -- "~/Downloads"
16 | + cf -- "~/.config"
17 | + And many others, including those you add!
18 |
19 | Press any "verb" followed by any "argument" to perform a folder operation. "gd" will cd to ~/Documents, for example. "mD" will move the selected file(s) to ~/Downloads. "tcf" will create a new tab in ~/.config, etc. etc.
20 |
21 | ## Many little things!
22 |
23 | + bg -- (for i3 users) makes an image your background (assuming i3 is looking at ~/.config/wall.png for your background)
24 | + X -- Extract a zip/rar/tar.gz, whatever. Runs a script that picks the right command for the right archive.
25 | + Z -- zips a folder up into a .tar.gz archive.
26 | + C -- rotates an image (requires imagemagick)
27 | + F -- flips an image (requires imagemagick)
28 | + moc shortcuts
29 | + MS -- Start server
30 | + MK -- kill server
31 | + MN -- Start playing selected song/folder now
32 | + Ma -- Enqueue selected song/folder
33 | + Mp -- Pause
34 | + Mn -- Next track
35 | + Mb -- Previous track
36 | + MP -- Convert .md file to .pdf (requires Pandoc)
37 | + ytv -- Download YouTube video (paste in url) (requires youtube-dl)
38 | + yta -- Download audio of YouTube video (paste in url) (requires youtube-dl)
39 |
--------------------------------------------------------------------------------
/river.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=River
3 | Name[en]=River
4 | Comment=This session logs you into River
5 | Comment[en]=This session logs in you into River
6 | Exec=/home/proycon/dotfiles/scripts/startriver.sh
7 | TryExec=/home/proycon/dotfiles/scripts/startriver.sh
8 | Icon=
9 | Type=Application
10 | DesktopNames=River
11 | Keywords=launch;River;desktop;session;
12 |
--------------------------------------------------------------------------------
/river/env.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | _find_runtime_dir() {
4 | #(copied from sxmo)
5 |
6 | # Take what we gave to you
7 | if [ -n "$XDG_RUNTIME_DIR" ]; then
8 | printf %s "$XDG_RUNTIME_DIR"
9 | return
10 | fi
11 |
12 | # Try something existing
13 | for root in /run /var/run; do
14 | path="$root/user/$(id -u)"
15 | if [ -d "$path" ] && [ -w "$path" ]; then
16 | printf %s "$path"
17 | return
18 | fi
19 | done
20 |
21 | if command -v mkrundir > /dev/null 2>&1; then
22 | mkrundir
23 | return
24 | fi
25 |
26 | # Fallback to a shared memory location
27 | _RDIR="/dev/shm/user/$(id -u)"
28 | mkdir -p "$_RDIR"
29 | echo "$_RDIR"
30 | }
31 |
32 | export QT_AUTO_SCREEN_SCALE_FACTOR=1
33 | export QT_QPA_PLATFORM="wayland;xcb"
34 | export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
35 | export QT_QPA_PLATFORMTHEME=qt5ct
36 | export QT_SCALE_FACTOR=1.8
37 | #export TDESKTOP_DISABLE_GTK_INTEGRATION=1
38 | export CLUTTER_BACKEND=wayland
39 | export ELM_SCALE=1.8
40 | export XDG_CURRENT_DESKTOP=river
41 | export XDG_SESSION_TYPE=wayland
42 | export XDG_SESSION_DESKTOP=river
43 | export GDK_BACKEND=wayland
44 | export MOZ_ENABLE_WAYLAND=1
45 | export SDL_VIDEODRIVER=wayland
46 | export GLFW_IM_MODULE=fcitx
47 | #export GTK_IM_MODULE=fcitx
48 | export INPUT_METHOD=fcitx
49 | export XMODIFIERS=@im=fcitx
50 | export IMSETTINGS_MODULE=fcitx
51 | export QT_IM_MODULE=fcitx
52 | #export GDK_DPI_SCALE=2 # only needed for firefox, messes up others
53 | export BEMENU_BACKEND=wayland
54 | FG="#bbbbbb"
55 | BG="#222222"
56 | FGSEL="#eeeeee"
57 | BGSEL="#005577"
58 | export BEMENU_OPTS="--fn 'Monospace 32' --nb $BG --nf $FG --sb $BGSEL --sf $FGSEL"
59 | export SXMO_MENU=wofi
60 |
61 | if [ -z "$XDG_RUNTIME_DIR" ]; then
62 | XDG_RUNTIME_DIR="$(_find_runtime_dir)"
63 | export XDG_RUNTIME_DIR
64 | fi
65 | export PATH="/home/proycon/bin:/home/proycon/.cargo/bin:/home/proycon/local/bin:$PATH"
66 | export MPD_HOST="anaproy.nl"
67 | export DEBEMAIL="proycon@anaproy.nl"
68 | export DEBFULLNAME="Maarten van Gompel"
69 | export TODO_DIR="$HOME/.todo"
70 | export GTK_THEME=Adwaita-dark
71 | export EDITOR="nvim"
72 | export TODO_DIR="$HOME/.todo"
73 | export XDG_CONFIG_HOME="$HOME/.config"
74 | export PINENTRY_USER_DATA=wayprompt
75 | . ~/dotfiles/scripts/gpgsetup.sh
76 | . ~/dotfiles/user-dirs.dirs
77 | export XDG_DESKTOP_DIR XDG_DOCUMENTS_DIR XDG_PICTURES_DIR XDG_MUSIC_DIR XDG_DOWNLOAD_DIR XDG_VIDEOS_DIR
78 |
79 | HOSTNAME=$(hostname)
80 | if [ "$HOSTNAME" = "trantor" ] || [ "$HOSTNAME" = "toren" ]; then
81 | KB_OPTS="-options lv3:ralt_switch,caps:ctrl_modifier,altwin:swap_alt_win,grp:alt_shift_toggle"
82 | else
83 | KB_OPTS=
84 | fi
85 | export KB_OPTS
86 |
87 |
--------------------------------------------------------------------------------
/rofi/rofi.dark.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | font: "Monospace 22";
3 | show-icons: true;
4 | location: 2;
5 | }
6 |
7 | @theme "gruvbox-dark-hard"
8 |
9 | window {
10 | width: 100%;
11 | border: 0px;
12 | }
13 |
--------------------------------------------------------------------------------
/rofi/rofi.light.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | font: "Monospace 22";
3 | show-icons: true;
4 | location: 2;
5 | }
6 |
7 | @theme "gruvbox-light-hard"
8 |
9 | window {
10 | width: 100%;
11 | border: 0px;
12 | }
13 |
--------------------------------------------------------------------------------
/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/screenshot.jpg
--------------------------------------------------------------------------------
/scripts/bright_down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | brightness=$(cat /sys/class/backlight/intel_backlight/brightness)
3 |
4 | if (($brightness > 0)); then
5 | let brightness=$brightness-100
6 | echo "echo $brightness > /sys/class/backlight/intel_backlight/brightness" | sudo zsh #or bash
7 | fi
8 |
--------------------------------------------------------------------------------
/scripts/bright_up.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | max_brightness=$(cat /sys/class/backlight/intel_backlight/max_brightness)
3 | brightness=$(cat /sys/class/backlight/intel_backlight/brightness)
4 |
5 | if (($brightness < $max_brightness)); then
6 | let brightness=$brightness+100
7 | echo "echo $brightness > /sys/class/backlight/intel_backlight/brightness" | sudo zsh #or bash
8 | fi
9 |
--------------------------------------------------------------------------------
/scripts/buku-dmenu:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # buku-dmenu - a bash script to open buku bookmarks using dmenu
4 | #
5 | # Copyright 2018 Ben Oliver
6 | # ben@bfoliver.com
7 | #
8 | # This program is free software: you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation, either version 3 of the License, or
11 | # (at your option) any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program. If not, see .
20 |
21 | version="v0.1.0"
22 |
23 | if [ "$1" = "--help" ] ; then
24 | echo "Run the script, start typing until the desired bookmark is selected."
25 | echo "buku and dmenu must be installed."
26 | exit 0
27 | elif [ "$1" = "--version" ] ; then
28 | echo "buku-dmenu $version"
29 | exit 0
30 | fi
31 |
32 | . ~/dotfiles/scripts/colorargs.sh
33 |
34 | #get all bmks | swap tabs for spaces | run dmenu | cut to ID | run buku if not empty
35 | if [ -n "$WAYLAND_DISPLAY" ]; then
36 | buku -p -f 5 | sed 's/\t/ /g' | bemenu -p buku -l 10 --fn "$BEMENU_FONT" $BEMENU_COLORARGS | cut -d ' ' -f 1 | xargs --no-run-if-empty buku -o
37 | else
38 | buku -p -f 5 | sed 's/\t/ /g' | dmenu -i -fn "Monospace:24" -l 10 $DMENU_COLORARGS | cut -d ' ' -f 1 | xargs --no-run-if-empty buku -o
39 | fi
40 |
--------------------------------------------------------------------------------
/scripts/bwstatus.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ -e /sys/class/net/qmapmux0.0 ]; then
4 | vnstat qmapmux0.0 --oneline | cut -d ';' -f 11
5 | else
6 | vnstat wwan0 --oneline | cut -d ';' -f 11
7 | fi
8 |
--------------------------------------------------------------------------------
/scripts/byzanz-record-window.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Delay before starting
4 | DELAY=10
5 |
6 | # Sound notification to let one know when recording is about to start (and ends)
7 | beep() {
8 | paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga &
9 | }
10 |
11 | # Duration and output file
12 | if [ $# -gt 0 ]; then
13 | D="--duration=$@"
14 | else
15 | echo Default recording duration 10s to /tmp/recorded.gif
16 | D="--duration=10 /tmp/recorded.gif"
17 | fi
18 | XWININFO=$(xwininfo)
19 | read X <<< $(awk -F: '/Absolute upper-left X/{print $2}' <<< "$XWININFO")
20 | read Y <<< $(awk -F: '/Absolute upper-left Y/{print $2}' <<< "$XWININFO")
21 | read W <<< $(awk -F: '/Width/{print $2}' <<< "$XWININFO")
22 | read H <<< $(awk -F: '/Height/{print $2}' <<< "$XWININFO")
23 |
24 | echo Delaying $DELAY seconds. After that, byzanz will start
25 | for (( i=$DELAY; i>0; --i )) ; do
26 | echo $i
27 | sleep 1
28 | done
29 |
30 | beep
31 | byzanz-record --verbose --delay=0 --x=$X --y=$Y --width=$W --height=$H $D
32 | beep
33 |
--------------------------------------------------------------------------------
/scripts/cache-dirs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ls -d /tmp > ~/.config/directories
4 | ls -d /nettmp >> ~/.config/directories
5 | ls -d ~/dotfiles >> ~/.config/directories
6 | ls -d ~/shared/*/ >> ~/.config/directories
7 | ls -d ~/projects/*/ >> ~/.config/directories
8 | ls -d ~/work/*/ >> ~/.config/directories
9 | ls -d ~/Pictures/*/ >> ~/.config/directories
10 | ls -d ~/Documents/*/ >> ~/.config/directories
11 | ls -d ~/Videos/*/ >> ~/.config/directories
12 | ls -d ~/Music/*/ >> ~/.config/directories
13 | ls -d ~/Music/byLanguage/ >> ~/.config/directories
14 |
15 | exit 0
16 |
--------------------------------------------------------------------------------
/scripts/castnone.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm /tmp/linkhandler.target; notify-send 'casting disabled' && play ~/dotfiles/media/glass.ogg
3 |
--------------------------------------------------------------------------------
/scripts/castpi1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo -n 1 > /tmp/linkhandler.target && notify-send 'casting to pi1' && play ~/dotfiles/media/glass_low.ogg
3 |
--------------------------------------------------------------------------------
/scripts/castpi2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | echo -n 2 > /tmp/linkhandler.target && notify-send 'casting to pi2' && play ~/dotfiles/media/glass_low.ogg
3 |
--------------------------------------------------------------------------------
/scripts/checkmail.sh:
--------------------------------------------------------------------------------
1 | ls -t ~/Server/Maildir/new/* | head -n 100 | mpick -t '"List-Id" !=~ ".*" && subject !=~~ "spam" && from !=~~ "proycon@science.ru.nl" && subject !=~~ "nieuwsbrief" && subject !=~~ "newsletter" && from !=~~ "reply" && from !=~~ "notification" && from !=~~ "verify@twitter.com" && from !=~~ "proycon@anaproy.nl" && from !=~~ "build"' | msort -d -r | MBLAZE_PAGER="cat" mscan -f "%f : %s" | cut -c1-40
2 |
--------------------------------------------------------------------------------
/scripts/colorargs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | if [ ! -e ~/.light ]; then
4 | #dark
5 | FG="#bbbbbb"
6 | BG="#222222"
7 | FGSEL="#eeeeee"
8 | BGSEL="#005577"
9 | else
10 | #light
11 | BG="#bbbbbb"
12 | FG="#222222"
13 | BGSEL="#eeeeee"
14 | FGSEL="#005577"
15 | fi
16 |
17 | export DMENU_COLORARGS="-nb $BG -nf $FG -sb $BGSEL -sf $FGSEL"
18 | export BEMENU_FONT="Monospace 32"
19 | export BEMENU_COLORARGS="--nb $BG --nf $FG --sb $BGSEL --sf $FGSEL"
20 |
--------------------------------------------------------------------------------
/scripts/curmail:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm ~/.mblaze/seq*
3 | #cd ~/Maildir/cur/
4 | lists=$(ls -d ~/Maildir/.Lists* | tr '\n' ' ')
5 | DATETHRESHOLD=$(date --date="3 months ago" +%s)
6 | for maildir in ~/Maildir $lists; do
7 | case $maildir in
8 | *CorporaList*|Siks*)
9 | #noisy lists I don't really care about
10 | ;;
11 | *)
12 | [ $(stat --format="%X" $maildir/new) -gt $DATETHRESHOLD ] &&\
13 | ls $maildir/new | tail -n 250 | grep ",S=" | sed "s|^|$maildir/new |" >> ~/.mblaze/seq_pre
14 | [ $(stat --format="%X" $maildir/cur) -gt $DATETHRESHOLD ] &&\
15 | ls $maildir/cur | tail -n 250 | grep ",S=" | sed "s|^|$maildir/cur |" >> ~/.mblaze/seq_pre
16 | ;;
17 | esac
18 | done
19 | cat ~/.mblaze/seq_pre | sort -rk 2 | head -n 1000 | sed "s| |/|" > ~/.mblaze/seq
20 | nr=$(mseq | mscan -f "%-3n %c%u%r %10d %17f ICON %2i%s" | ~/dotfiles/scripts/mblaze2pango.sh | rofi -matching glob -tokenize -i -no-sort -no-levenshtein-sort -p "Mail" -markup -markup-rows -dmenu -click-to-exit | cut -d " " -f 1)
21 | #nr=$(find ~/Maildir/cur/ -ctime -14 | tail -n 250 | msort -r | mseq -S | mscan -f "%-3n %c%u%r %10d %17f ICON %2i%s" | ~/dotfiles/scripts/mblaze2pango.sh | rofi -matching glob -tokenize -i -no-sort -no-levenshtein-sort -p "Mail" -markup -markup-rows -dmenu | cut -d " " -f 1)
22 | if [ -n "$nr" ]; then
23 | ATTACHDIR=~/Downloads/mailattachments
24 | rm -rf "$ATTACHDIR"
25 | mkdir -p "$ATTACHDIR"
26 | cd "$ATTACHDIR"
27 | if ls ~/Downloads/mailattachments/* > /dev/null; then
28 | ~/dotfiles/scripts/dmenu-files.sh "$ATTACHDIR" -t &
29 | fi
30 | mshow -x "$nr" #extract attachments
31 | cd -
32 | foot mshow -N "$nr"
33 | fi
34 | cd -
35 |
--------------------------------------------------------------------------------
/scripts/darkmode.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ln -sf ~/.config/foot/foot.dark.$(hostname).ini ~/.config/foot/foot.ini
4 | ln -sf ~/.config/rofi/rofi.dark.rasi ~/.config/rofi/config.rasi
5 | rm ~/.light 2>/dev/null
6 | swaybg -m fill -i ~/dotfiles/media/forest.jpg &
7 | notify-send "dark mode"
8 |
--------------------------------------------------------------------------------
/scripts/decolor:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | sed -r "s/\\x1B\\[\??([0-9]{1,4}(;[0-9]{1,2})?)?[mGKhl]//g"
3 |
--------------------------------------------------------------------------------
/scripts/dmenu-files.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | if [ -n "$WAYLAND_DISPLAY" ]; then
6 | MENUTOOL="bemenu $BEMENU_COLORARGS -p $1"
7 | else
8 | MENUTOOL="dmenu $DMENU_COLORARGS"
9 | fi
10 | PICKED=$(ls $2 "$1" | $MENUTOOL --fn "$BEMENU_FONT" -i -l 20)
11 | if [ -n "$PICKED" ]; then
12 | if [ -d "$1/$PICKED" ]; then
13 | ~/dotfiles/dmenu-files.sh "$1/$PICKED" $2
14 | else
15 | if file --mime-type "$1/$PICKED" | grep -E "text/html"; then
16 | firefox "$1/$PICKED" &
17 | elif file --mime-type "$1/$PICKED" | grep -E "(text/|message/|application/xml)"; then
18 | alacritty -e vim "$1/$PICKED" &
19 | elif file --mime-type "$1/$PICKED" | grep -E "application/pdf"; then
20 | zathura "$1/$PICKED" &
21 | else
22 | xdg-open "$1/$PICKED" &
23 | fi
24 | fi
25 | fi
26 |
27 |
--------------------------------------------------------------------------------
/scripts/emojiselect:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | # The famous "get a menu of emojis to copy" script.
4 |
5 | # Must have xclip installed to even show menu.
6 | #xclip -h >/dev/null || exit
7 |
8 |
9 | . ~/dotfiles/scripts/colorargs.sh
10 |
11 | if [ -n "$WAYLAND_DISPLAY" ]; then
12 | chosen=$(cut -d ';' -f1 ~/dotfiles/emoji | bemenu -p "Emoji" -n -l 30 --fn "$BEMENU_FONT" $BEMENU_COLORARGS | sed "s/ .*//")
13 | else
14 | chosen=$(cut -d ';' -f1 ~/dotfiles/emoji | rofi -dmenu -font "$BEMENU_FONT" | sed "s/ .*//")
15 | fi
16 |
17 | [ -z "$chosen" ] && exit
18 |
19 | if [ -n "$WAYLAND_DISPLAY" ]; then
20 | echo "$chosen" | tr -d '\n' | wl-copy
21 | wtype "$chosen"
22 | else
23 | echo "$chosen" | tr -d '\n' | xclip -selection clipboard
24 | xdotool type "$chosen"
25 | fi
26 |
--------------------------------------------------------------------------------
/scripts/fc-search.sh:
--------------------------------------------------------------------------------
1 | #!/bin/zsh
2 | codepoint=$(printf '%x' \'$1)
3 | if [ -n "$codepoint" ]; then
4 | fc-list ":charset=$codepoint"
5 | fi
6 |
7 |
--------------------------------------------------------------------------------
/scripts/fixworkspaces.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #workspaces might end up on wrong monitor if it powers up first
3 | for i in $(seq 1 9); do
4 | hyprctl dispatch moveworkspacetomonitor $i DP-2
5 | done
6 | hyprctl focusmonitor DP-3
7 | hyprctl workspace 10
8 | hyprctl focusmonitor DP-2
9 | hyprctl workspace 1
10 | pidof waybar || waybar &
11 |
--------------------------------------------------------------------------------
/scripts/git-stats.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # MIT License
4 | # Source: https://git.sr.ht/~rjarry/aerc/tree/master/item/contrib/git-stats.sh
5 |
6 | set -e
7 | set -o pipefail
8 |
9 | columns="Author,Commits,Changed Files,Insertions,Deletions"
10 |
11 | git shortlog -sn "$@" |
12 | while read -r commits author; do
13 | git log --author="$author" --pretty=tformat: --numstat "$@" | {
14 | adds=0
15 | subs=0
16 | files=0
17 | while read -r a s f; do
18 | [ "$a" = "-" ] && a=0
19 | [ "$s" = "-" ] && s=0
20 | adds=$((adds + a))
21 | subs=$((subs + s))
22 | files=$((files + 1))
23 | done
24 | printf '%s;%d;%d;%+d;%+d;\n' \
25 | "$author" "$commits" "$files" "$adds" "-$subs"
26 | }
27 | done |
28 | column -t -s ';' -N "$columns" -R "${columns#*,}" |
29 | sed -r 's/[[:space:]]+$//'
30 |
31 | echo
32 |
33 | columns="Reviewer/Tester,Commits"
34 |
35 | git shortlog -sn \
36 | --group=trailer:acked-by \
37 | --group=trailer:tested-by \
38 | --group=trailer:reviewed-by "$@" |
39 | while read -r commits author; do
40 | printf '%s;%s\n' "$author" "$commits"
41 | done |
42 | column -t -s ';' -N "$columns" -R "${columns#*,}" |
43 | sed -r 's/[[:space:]]+$//'
44 |
--------------------------------------------------------------------------------
/scripts/gitbranches:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | branch=$(git for-each-ref --color=always --sort=-committerdate refs/heads/ --format='%(color: red)%(committerdate:short) %(color:green)%(committername)%(color: reset) %(refname:short)' | fzf --ansi | cut -d" " -f 3)
4 | [ -n "$branch" ] && gitlog "$branch"
5 |
--------------------------------------------------------------------------------
/scripts/gitlog:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Shows git log in fzf
4 |
5 | #relies on a proper pager being set for diffs in ~/.gitconfig
6 | ARGS=$1
7 | while true ; do
8 | COMMIT="$(git log --color=always --pretty="%Cgreen%cs%Creset %h %Cblue%an%Creset %Cred%d%Creset %s" $ARGS | fzf --ansi --preview 'git show {2} --color=always | delta' | cut -d" " -f 2)"
9 | if [ $? -ne 0 ] || [ -z "$COMMIT" ]; then
10 | break
11 | fi
12 | git show "$COMMIT" || break
13 | done
14 |
--------------------------------------------------------------------------------
/scripts/gpgsetup.nu:
--------------------------------------------------------------------------------
1 | # this script should be sourced and not run directly
2 |
3 | export-env {
4 | $env.GPGKEY = "8AC624881EF2AC30C0E68E2C39FE11201A31555C"
5 | $env.SSH_VIA_GPG = 0
6 | $env.GPG_TTY = ^tty
7 | }
8 |
9 | # Some help for gpg to pass to others who want to send me something
10 | def gpghelp [] {
11 | echo $"gpg --recv-key $(env.GPGKEY)"
12 | echo $"echo \"your secret message here\" | gpg -e --armor -r $(env.EMAIL)"
13 | }
14 |
15 | # Encrypt a message for a given recipient (if no recipient is given, it'll be me myself)
16 | def gpgmsg [recipient?: string] {
17 | gpg -e --armor -r ($recipient | default $env.EMAIL)
18 | }
19 |
20 | # Show the ssh public key known by GPG
21 | def gpgsshpubkey [] {
22 | gpg --export-ssh-key $env.EMAIL
23 | }
24 |
25 | # Sign a file (detached). Provide a file as argument, a clear-signed detached *.asc signature will be generated
26 | def gpgsign [filename: string] {
27 | gpg --armor --detach-sign $filename
28 | ls $"($filename).asc"
29 | }
30 |
31 | # Sign and replace a file. Provide a file as argument, the original file will be REPLACED with a clear-signed counterpart!
32 | def gpgsignreplace [filename: string] {
33 | gpg --sign $filename; mv $"($filename).asc" $filename
34 | }
35 |
36 | if "XDG_RUNTIME_DIR" in $env {
37 | #set up ssh-agent without GPG
38 | do --env {
39 | let ssh_agent_file = (
40 | $nu.temp-path | path join $"ssh-agent-($env.USER).nuon"
41 | )
42 |
43 | if ($ssh_agent_file | path exists) {
44 | let ssh_agent_env = open ($ssh_agent_file)
45 | if ($"/proc/($ssh_agent_env.SSH_AGENT_PID)" | path exists) {
46 | load-env $ssh_agent_env
47 | return
48 | } else {
49 | rm $ssh_agent_file
50 | }
51 | }
52 |
53 | let ssh_agent_env = ^ssh-agent -c
54 | | lines
55 | | first 2
56 | | parse "setenv {name} {value};"
57 | | transpose --header-row
58 | | into record
59 | load-env $ssh_agent_env
60 | $ssh_agent_env | save --force $ssh_agent_file
61 | }
62 | }
63 |
64 | # To set nitrokey not to demand PIN on every sign action, make sure forcesig is DISABLED
65 | # PIN is still needed on the first interaction
66 |
67 | # $ gpg --card-edit
68 | # > admin
69 | # > forcesig
70 |
71 | # then set UIF sign and auth to on as follows, this requires confirmation using physical touch instead
72 |
73 | # > uif 1 on
74 | # > uif 1 off
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/scripts/gpgsetup.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # this script should be sourced and not run directly
4 |
5 | gpghelp() {
6 | echo "gpg --recv-key 8AC624881EF2AC30C0E68E2C39FE11201A31555C"
7 | echo "echo \"your secret message here\" | gpg -e --armor -r proycon@anaproy.nl"
8 | }
9 |
10 | gpgmsg() {
11 | if [ -n "$1" ]; then
12 | gpg -e --armor -r "$1"
13 | else
14 | gpg -e --armor -r proycon@anaproy.nl
15 | fi
16 | }
17 |
18 | gpgsshpubkey() {
19 | gpg --export-ssh-key proycon@anaproy.nl
20 | }
21 |
22 | gpgsign() {
23 | if [ -n "$1" ]; then
24 | gpg --armor --detach-sign "$1"
25 | else
26 | echo "Usage: provide a file as argument, it will be signed detached (*.asc)" >&2
27 | fi
28 | }
29 |
30 | gpgsignreplace() {
31 | if [ -n "$1" ]; then
32 | gpg --sign "$1" && mv "$1.asc" "$1"
33 | else
34 | echo "Usage: provide a file as argument, the original file will be REPLACED with a clear-signed counterpart" >&2
35 | fi
36 | }
37 |
38 | export GPGKEY="8AC624881EF2AC30C0E68E2C39FE11201A31555C"
39 |
40 | SSH_VIA_GPG=0
41 |
42 | if [ $SSH_VIA_GPG -eq 1 ]; then
43 | #SSH via GPG this relies on:
44 | # 1. keygrip for subkey in ~/.gnupg/sshcontrol
45 | # (obtain keygrip via gpg --list-keys --with-keygrip proycon@anaproy.nl)
46 | # 2. enable-ssh-support in ~/.gnupg/gpg-agent.conf
47 | unset SSH_AGENT_PID
48 | if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
49 | SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
50 | export SSH_AUTH_SOCK
51 | fi
52 | fi
53 |
54 | GPG_TTY=$(tty)
55 | export GPG_TTY
56 |
57 | if [ $SSH_VIA_GPG -eq 1 ]; then
58 | gpg-connect-agent updatestartuptty /bye >/dev/null
59 | else
60 | #set up ssh-agent without GPG
61 | if [ -n "$XDG_RUNTIME_DIR" ]; then
62 | if ! pgrep -u "$USER" ssh-agent > /dev/null; then
63 | ssh-agent -t 12h > "$XDG_RUNTIME_DIR/ssh-agent.env"
64 | fi
65 | if [ ! "$SSH_AUTH_SOCK" ] && [ -e "$XDG_RUNTIME_DIR/ssh-agent.env" ]; then
66 | . "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
67 | fi
68 | fi
69 | fi
70 |
71 | # To set nitrokey not to demand PIN on every sign action, make sure forcesig is DISABLED
72 | # PIN is still needed on the first interaction
73 |
74 | # $ gpg --card-edit
75 | # > admin
76 | # > forcesig
77 |
78 | # then set UIF sign and auth to on as follows, this requires confirmation using physical touch instead
79 |
80 | # > uif 1 on
81 | # > uif 1 off
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/scripts/handlehyprland.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | HOSTNAME="$(hostname)"
4 |
5 | handle() {
6 | EVENT=$(echo "$1" | cut -d">" -f 1)
7 | ARG=$(echo "$1" | cut -d">" -f 3)
8 | case $EVENT in
9 | "closewindow")
10 | #always focus master after closing a window
11 | hyprctl dispatch layoutmsg focusmaster
12 | ;;
13 | "monitoradded")
14 | if [ "$ARG" = "DP-2" ] && [ "$HOSTNAME" = "pollux" ]; then
15 | #workspaces might end up on wrong monitor if it powers up first
16 | for i in $(seq 1 9); do
17 | hyprctl dispatch moveworkspacetomonitor $i DP-2
18 | done
19 | hyprctl focusmonitor DP-3
20 | hyprctl workspace 10
21 | hyprctl focusmonitor DP-2
22 | hyprctl workspace 1
23 | pidof waybar || waybar &
24 | fi
25 | ;;
26 | esac
27 | }
28 |
29 | socat - UNIX-CONNECT:/tmp/hypr/$(echo $HYPRLAND_INSTANCE_SIGNATURE)/.socket2.sock | while read line; do handle $line; done
30 |
--------------------------------------------------------------------------------
/scripts/histplot:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 |
4 | die() {
5 | echo "error: $*" >&2
6 | exit 2
7 | }
8 |
9 | usage() {
10 | echo "histplot [options] [input-file]"
11 | echo "Options:"
12 | echo " -d [char] - Set seperator"
13 | echo " -h - Help"
14 | echo "Arguments:"
15 | echo " Input file is a CSV or TSV file"
16 | exit 0
17 | }
18 |
19 | separator=" "
20 |
21 | while getopts :hd:x:y: ARG; do
22 | case $ARG in
23 | d)
24 | separator=$OPTARG
25 | ;;
26 | h)
27 | usage
28 | ;;
29 | x)
30 | xlabel=$OPTARG
31 | ;;
32 | y)
33 | ylabel=$OPTARG
34 | ;;
35 | \?)
36 | die "Invalid option: -$ARG"
37 | ;;
38 | esac
39 | done
40 |
41 | shift "$(( OPTIND - 1 ))"
42 |
43 | [ -z "$1" ] && die "CSV or TSV input file required"
44 |
45 | case "$1" in
46 | *.csv)
47 | separator=","
48 | infile="$1"
49 | outfile=$(basename -s csv "$infile")
50 | ;;
51 | *.tsv)
52 | separator="\t"
53 | infile="$1"
54 | outfile=$(basename -s .tsv "$infile")
55 | ;;
56 | *)
57 | infile="$1"
58 | outfile=$(basename "$infile")
59 | ;;
60 | esac
61 |
62 | outfile="$outfile.png"
63 |
64 | gnuplot -p -e "set term png; set output '$outfile'; set datafile separator '$separator'; set style fill solid; set sty d hist; set xlabel '$xlabel'; set ylabel "$ylabel"; set yrange [0:50]; plot "$infile" u 2:xtic(1) notitle"
65 |
66 |
--------------------------------------------------------------------------------
/scripts/homecommand.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Receives notifications from MQTT
4 |
5 | . ~/dotfiles/scripts/colorargs.sh
6 |
7 | if [ -z "$1" ]; then
8 | if [ "$SXMO_WM" = "sway" ]; then
9 | chosen=$(cat ~/dotfiles/homecommands | sxmo_dmenu.sh -i -p "Home" -l 20 | sed "s/.*=//")
10 | elif [ -n "$WAYLAND_DISPLAY" ]; then
11 | chosen=$(cat ~/dotfiles/homecommands | bemenu -i -p "Home" -l 20 --fn "$BEMENU_FONT" $BEMENU_COLORARGS | sed "s/.*=//")
12 | else
13 | chosen=$(cat ~/dotfiles/homecommands | dmenu -i -l 20 -p "Home" $DMENU_COLORARGS | sed "s/.*=//")
14 | fi
15 |
16 | # Exit if none chosen.
17 | [ -z "$chosen" ] && exit
18 |
19 | TOPIC="home/command/$chosen"
20 | else
21 | TOPIC="home/command/$1"
22 | fi
23 |
24 |
25 | if [ -n "$2" ]; then
26 | PAYLOAD=$2
27 | else
28 | PAYLOAD=ON
29 | fi
30 |
31 | if [ ! -e ~/lighthome ]; then
32 | if [ -e ~/projects/lighthome ]; then
33 | ln -s ~/projects/lighthome ~/lighthome
34 | else
35 | echo "lighthome not installed" >&2
36 | exit 2
37 | fi
38 | fi
39 |
40 | ~/lighthome/send.sh --notify "$TOPIC" "$PAYLOAD"
41 |
--------------------------------------------------------------------------------
/scripts/hutlist:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # lists sourcehut patches
4 |
5 | if [ -z "$1" ]; then
6 | echo "hutlist [list] [[patchno]]">&2
7 | return 1;
8 | fi
9 | list="$1"
10 | if [ "$1" = "sxmo" ]; then
11 | list="~mil/sxmo-devel"
12 | elif [ "$1" = "aerc" ]; then
13 | list="~rjarry/aerc-devel"
14 | fi
15 | if [ -n "$2" ]; then
16 | PAGER=less hut lists patchset show -l "$list" "$2"
17 | else
18 | PAGER=less hut lists patchset list -l "$list"
19 | fi
20 |
--------------------------------------------------------------------------------
/scripts/huttodo:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # lists sourcehut todos
4 |
5 | if [ -z "$1" ]; then
6 | echo "huttodo [ticketlist] [[ticketno]]">&2
7 | return 1;
8 | fi
9 | tickets="$1"
10 | if [ "$1" = "sxmo" ]; then
11 | tickets="~mil/sxmo-tickets"
12 | elif [ "$1" = "aerc" ]; then
13 | tickets="~rjarry/aerc"
14 | fi
15 | if [ -n "$2" ]; then
16 | PAGER=less hut todo ticket show -t "$tickets" "$2"
17 | else
18 | PAGER=less hut todo ticket list -t "$tickets"
19 | fi
20 |
--------------------------------------------------------------------------------
/scripts/ischinese.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import sys
4 |
5 | """Tests if a text is in chinese characters"""
6 |
7 | line = sys.stdin.readline()
8 | if len(line) <= 6 and all(
9 | ((c > u'\u4e00' and c < u'\u9fff') or (c > u'\u3000' and c < u'\u303f')) for c in line.strip()
10 | ):
11 | exit(0)
12 | else:
13 | exit(1)
14 |
15 |
16 |
--------------------------------------------------------------------------------
/scripts/killmenu.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | CHOICE="$(
6 | printf %b "
7 | Cancel
8 | $(ps -eo pid,tt,user,cmd | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | grep "$USER" | tail -n +2)
9 | " |
10 | awk '{$1=$1};1' | grep '\w' | bemenu -p 'Kill' -l 20 --fn "$BEMENU_FONT" $BEMENU_COLORARGS
11 | )"
12 |
13 | PID="$(echo "$CHOICE" | cut -d " " -f 1)"
14 | if [ -n "$PID" ] && [ "$PID" != "cancel" ]; then
15 | kill "$PID"
16 | fi
17 |
--------------------------------------------------------------------------------
/scripts/lf-select:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # by Luke Smith
4 | # https://github.com/LukeSmithxyz/voidrice
5 |
6 | # Reads file names from stdin and selects them in lf.
7 |
8 | while read -r file; do
9 | [ -z "$file" ] && continue
10 | lf -remote "send select \"$file\""
11 | lf -remote "send toggle"
12 | done
13 |
--------------------------------------------------------------------------------
/scripts/lightmode.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ln -sf ~/.config/foot/foot.light.$(hostname).ini ~/.config/foot/foot.ini
4 | ln -sf ~/.config/alacritty/alacritty.light.yml ~/.config/alacritty/alacritty.yml
5 | ln -sf ~/.config/rofi/rofi.light.rasi ~/.config/rofi/config.rasi
6 | touch ~/.light
7 | swaybg -m fill -i ~/dotfiles/media/blossom-branch.jpg &
8 | notify-send "light mode"
9 |
--------------------------------------------------------------------------------
/scripts/lock.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | if [ ! -f /tmp/locked ]; then
3 | if pidof mpv steam X-Plane-x86_64 && [ "$1" != "force" ]; then
4 | #no lock
5 | exit 0
6 | fi
7 | task=$(todo.sh timetrack current -t)
8 | todo.sh timetrack stop
9 | touch /tmp/locked
10 | killall gpg-agent
11 | paplay ~/dotfiles/media/lock.wav >/dev/null 2>/dev/null &
12 | if [ -n "$WAYLAND_DISPLAY" ]; then
13 | if [ "$XDG_SESSION_DESKTOP" = "Hyprland" ]; then
14 | hyprctl keyword input:kb_layout proybasic
15 | elif [ "$XDG_SESSION_DESKTOP" = "river" ]; then
16 | riverctl keyboard-layout $KB_OPTS proybasic
17 | fi
18 | waylock -init-color 0x110000 -input-color 0x112200 -fail-color 0x990000
19 | if [ "$XDG_SESSION_DESKTOP" = "Hyprland" ]; then
20 | hyprctl dispatch dpms on #ensure dpms is on after lock finishes
21 | fi
22 | pidof waybar || waybar &
23 | else
24 | setxkbmap proylatin
25 | i3lock -n -c '220000'
26 | pidof picom || picom -f -e 1.0 &
27 | fi
28 | paplay ~/dotfiles/media/unlock.wav >/dev/null 2>/dev/null &
29 | rm /tmp/locked
30 | todo.sh timetrack start "$task"
31 | if [ "$XDG_SESSION_DESKTOP" = "Hyprland" ]; then
32 | if [ "$(hostname)" = "pollux" ]; then
33 | ~/dotfiles/scripts/fixworkspaces.sh
34 | fi
35 | fi
36 | fi
37 |
--------------------------------------------------------------------------------
/scripts/lspkg:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . /etc/os-release
3 | OPT=
4 | case "$ID" in
5 | alpine|postmarketos)
6 | if [ "$1" = "-i" ]; then
7 | OPT="--installed"
8 | fi
9 | pkg=$(apk list $OPT | sed -e "s/{.*}//g" -e "s/(.*)//g" -e "s/x86_64//g" -e "s/aarch64//g" | fzf)
10 | if [ -n "$pkg" ]; then
11 | pkgname="$(echo "$pkg" | cut -d" " -f 1 | sed -e "s/-[0-9].*$//g")"
12 | apk info "$pkgname"
13 | if echo "$pkg" | grep -q installed; then
14 | echo "press enter for manifest"
15 | read -r _x && apk manifest "$pkgname"
16 | fi
17 | fi
18 | ;;
19 | arch)
20 | if [ "$1" = "-i" ]; then
21 | pkg=$(pacman -Q | fzf)
22 | else
23 | pkg=$(pacman -Ss | grep "^[a-z].*" | sed "s|[a-z]*/||" | fzf)
24 | fi
25 | if [ -n "$pkg" ]; then
26 | pkgname="$(echo "$pkg" | cut -d" " -f 1)"
27 | pacman -Qi "$pkgname"
28 | echo "press enter for manifest"
29 | read -r _x && pacman -Ql "$pkgname"
30 | fi
31 | ;;
32 | debian|ubuntu)
33 | if [ "$1" = "-i" ]; then
34 | OPT="-i"
35 | fi
36 | pkg=$(apt list $OPT | fzf)
37 | if [ -n "$pkg" ]; then
38 | pkgname="$(echo "$pkg" | sed 's|/.*$||')"
39 | apt show "$pkgname"
40 | echo "press enter for manifest (if installed)"
41 | read -r _x && dpkg -L "$pkgname"
42 | fi
43 | ;;
44 | *)
45 | echo "unknown OS" >&2
46 | esac
47 |
--------------------------------------------------------------------------------
/scripts/mblaze2pango.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | while read -r line; do
3 | nr=$(echo "$line" | cut -d " " -f 1)
4 | remainder=$(echo "$line" | cut -d " " -f 2-)
5 | color="#fbf1c7"
6 | icon=" "
7 | case "$line" in
8 | *"Registration request from"*|*"build success"*|*"build fail"*|*Siksleden*|*Corpora-List*|*Nieuwsbrief*|*Newsletter*|*Correspondent*|*Steam*)
9 | color=gray
10 | ;;
11 | *"[PATCH"*)
12 | color=HotPink
13 | ;;
14 | *"TO:"*)
15 | color=green
16 | ;;
17 | esac
18 | case "$line" in
19 | *"TO:"*)
20 | icon=👉
21 | ;;
22 | *"frog"*)
23 | icon=🐸
24 | ;;
25 | *"folia"*)
26 | icon=🥬
27 | ;;
28 | *"clam"*)
29 | icon=🐚
30 | ;;
31 | *"sxmo"*)
32 | icon=📱
33 | ;;
34 | *)
35 | from=$(maddr -h from "$nr")
36 | spam=$(mhdr -h "X-Rspamd-Action:X-Spam-Status" "$nr")
37 | case "$spam" in
38 | *Yes,*|*reject*|*greylist*)
39 | color=black
40 | ;;
41 | esac
42 | to=$(maddr -h "to:cc" "$nr")
43 | case "$from $to" in
44 | *postmaster@science.ru.nl*|*admin@cls.ru.nl*)
45 | icon=🎠
46 | ;;
47 | *knaw.nl*|*@uu.nl*|*@uva.nl*|*@ru.nl*|*.ru.nl*|*ivdnt.nl*)
48 | icon=💼
49 | ;;
50 | *anaxotic*|*van-gompel*)
51 | icon=👪
52 | ;;
53 | *debian.org*|*alpinelinux.org*)
54 | icon=🐧
55 | ;;
56 | *github.com*)
57 | color=HotPink
58 | icon=🎫
59 | ;;
60 | *sr.ht*)
61 | color=HotPink
62 | icon=🎫
63 | ;;
64 | *noreply*|*homeautomation*)
65 | color=gray
66 | ;;
67 | esac
68 | ;;
69 | esac
70 | echo "$nr $remainder" | sed "s/ ICON / $icon /" | sed 's/Re:/Re:<\/span>/i' | sed 's/Fwd:/Fwd:<\/span>/i'
71 | done
72 |
--------------------------------------------------------------------------------
/scripts/minicam.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | v4l2-ctl --set-fmt-video=width=320,height=240
3 | mpv av://v4l2:/dev/video0
4 |
--------------------------------------------------------------------------------
/scripts/mutt-compose.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # set the screen window title to the message receiver
3 | awk -F 'To: ' '/^To:/ { print "\033k" $2 "\033\\" }' "$1"
4 | mutt -F ~/.mutt_compose -H "$1"
5 | rm "$1"
6 |
--------------------------------------------------------------------------------
/scripts/muttfzf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | match_folder() {
4 | find "$HOME/Maildir/" -name '*' -type d -maxdepth 1 | sort | fzf --reverse
5 | }
6 |
7 | folder=$(match_folder)
8 |
9 | echo "push 'c$folder'"
10 |
--------------------------------------------------------------------------------
/scripts/network-menu.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | icon_chk="✔"
6 | connections() {
7 | ACTIVE="$(nmcli -c no -t c show --active | cut -d: -f1,3 | sed "s/$/ $icon_chk/")"
8 | INACTIVE="$(nmcli -c no -t c show | cut -d: -f1,3)"
9 | printf %b "$ACTIVE\n$INACTIVE" | sort -u -t: -k1,1
10 | }
11 |
12 | toggleconnection() {
13 | CONNLINE="$1"
14 | CONNNAME="$(echo "$CHOICE" | cut -d: -f1)"
15 | if [ -n "$CONNNAME" ]; then
16 | if echo "$CONNLINE" | grep "$icon_chk"; then
17 | RES="$(nmcli c down "$CONNNAME" 2>&1)"
18 | else
19 | RES="$(nmcli c up "$CONNNAME" 2>&1)"
20 | fi
21 | notify-send "$RES"
22 | fi
23 | }
24 |
25 | scan() {
26 | ssid=$( nmcli -g ssid -c no device wifi | bemenu -p 'Networks' -l 20 --fn "$BEMENU_FONT" $BEMENU_COLORARGS)
27 |
28 | if [ -n "$ssid" ]; then
29 | if [ -f ~/.password-store/"$ssid".gpg ]; then
30 | passwd=$( pass show "$ssid" | head -n 1 )
31 | else
32 | passwd=$(bemenu -p 'Password' -l 20 --fn "$BEMENU_FONT" $BEMENU_COLORARGS)
33 | fi
34 |
35 | RES=$(nmcli dev wifi connect "$ssid" password "$passwd" 2>&1)
36 | notify-send "$RES"
37 | fi
38 | }
39 |
40 |
41 | CHOICE="$(
42 | printf %b "
43 | Scan
44 | $(connections)
45 | Editor
46 | List
47 | Close Menu
48 | " |
49 | awk '{$1=$1};1' | grep '\w' | bemenu -p 'Networks' -l 20 --fn "$BEMENU_FONT" $BEMENU_COLORARGS
50 | )"
51 | case "$CHOICE" in
52 | "Close Menu" )
53 | exit
54 | ;;
55 | "Scan")
56 | scan
57 | ;;
58 | "Editor")
59 | nm-connection-editor
60 | ;;
61 | "List")
62 | foot -e nmcli device wifi list
63 | ;;
64 | *)
65 | toggleconnection "$CHOICE"
66 | ;;
67 | esac
68 |
69 |
--------------------------------------------------------------------------------
/scripts/newmail:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | rm ~/.mblaze/seq*
3 | mlist ~/Maildir/new ~/Maildir/.Notifications/new ~/Maildir/.Lists*/new | msort -dr | mseq -S
4 | nr=$(mscan -f "%-3n %c%u%r %10d %17f ICON %2i%s" | ~/dotfiles/scripts/mblaze2pango.sh | rofi -matching glob -tokenize -i -no-sort -no-levenshtein-sort -p "Unread mail" -dmenu -markup -markup-rows | cut -d " " -f 1)
5 | if [ -n "$nr" ]; then
6 | ATTACHDIR=~/Downloads/mailattachments
7 | rm -rf "$ATTACHDIR"
8 | mkdir -p "$ATTACHDIR"
9 | cd "$ATTACHDIR"
10 | if ls ~/Downloads/mailattachments/* > /dev/null; then
11 | ~/dotfiles/scripts/dmenu-files.sh "$ATTACHDIR" -t &
12 | fi
13 | mshow -x "$nr" #extract attachments
14 | cd -
15 | foot mshow -N "$nr"
16 | fi
17 |
--------------------------------------------------------------------------------
/scripts/nuplot.nu:
--------------------------------------------------------------------------------
1 | # Adapted from https://github.com/kurokirasama/nushell_scripts/blob/main/ollama.nu by kurokirasama , License: MIT
2 |
3 | export def nuplot [
4 | --title:string #title
5 | ] {
6 | let n_cols = ($in | transpose | length)
7 | let name_cols = ($in | transpose | columns | first 2)
8 |
9 | let ylabel = if $n_cols == 1 {$name_cols | get 0} else {$name_cols | get 1}
10 | let xlabel = if $n_cols == 1 {""} else {$name_cols | get 0}
11 |
12 | let title = if ($title | is-empty) {
13 | if $n_cols == 1 {
14 | $ylabel | str upcase
15 | } else {
16 | $"($ylabel) vs ($xlabel)"
17 | }
18 | } else {
19 | $title
20 | }
21 |
22 | $in | to tsv | save -f tmpdata0.txt
23 | sed 1d tmpdata0.txt | save -f tmpdata.txt -f
24 |
25 | gnuplot -e $"set terminal png size 1024,768; unset key;set title '($title)';plot 'tmpdata.txt' w l lt 0;" | img2sixel
26 |
27 | rm -f tmpdata*.txt
28 | }
29 |
--------------------------------------------------------------------------------
/scripts/ollama.nu:
--------------------------------------------------------------------------------
1 | # Adapted from https://github.com/kurokirasama/nushell_scripts/blob/main/ollama.nu by kurokirasama , License: MIT
2 |
3 | use std/log
4 |
5 | export def llm [
6 | prompt?: string
7 | --model(-m): string
8 | ] {
9 | if (ps | where name == "ollama" | length) == 0 {
10 | log info "ollama is not running yet..starting (may take a bit)..."
11 | job spawn { ollama serve e> /tmp/ollama.log }
12 | while (ollama ps | complete).exit_code != 0 {
13 | sleep 2sec
14 | }
15 |
16 | }
17 | let runningmodel = try { (ollama ps | detect columns | first).name } catch { "" }
18 | let prompt = if ($prompt | is-empty) {$in} else {$prompt}
19 | let model = if ($runningmodel | is-empty) { if ($model | is-empty) {ollama list | detect columns | get NAME | input list -f (echo "Select model:")} else {$model} } else { $runningmodel }
20 |
21 | let data = {
22 | model: $model,
23 | prompt: $prompt,
24 | stream: false
25 | }
26 |
27 | let url = "http://localhost:11434/api/generate"
28 | let response = http post $url --content-type application/json $data
29 |
30 | if ($response | get error? | is-empty) {
31 | $response | get response
32 | } else {
33 | return-error $"Error: ($response | get error)"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/scripts/openinstagram.sh:
--------------------------------------------------------------------------------
1 | cd ~/Pictures/Instagram/
2 | export PATH=$HOME/bin:$PATH
3 | sxiv -t - < latest.txt
4 |
--------------------------------------------------------------------------------
/scripts/opensxiv.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | if [ -n "$WAYLAND_DISPLAY" ] || which bemenu; then
6 | dir=$(ls -d ~/Pictures/*/ | sed "s|$HOME/Pictures/||g" | bemenu -l 20 --fn "Monospace 20" -p "Open Folder?" $BEMENU_COLORARGS)
7 | else
8 | dir=$(ls -d ~/Pictures/*/ | sed "s|$HOME/Pictures/||g" | rofi -dmenu -p "Open Folder?")
9 | fi
10 | # Exit if none chosen.
11 | [ -z "$dir" ] && exit
12 | if [ -n "$WAYLAND_DISPLAY" ]; then
13 | pqiv --auto-montage-mode "$dir"
14 | else
15 | echo "$dir" | tr -d '\n' | xclip -selection clipboard
16 | export PATH=$HOME/bin:$PATH
17 | sxiv -rt "$HOME/Pictures/$dir" 2> /tmp/err
18 | fi
19 |
--------------------------------------------------------------------------------
/scripts/otpmenu.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | shopt -s nullglob globstar
6 |
7 | typeit=0
8 | if [ "$1" == "--type" ]; then
9 | typeit=1
10 | shift
11 | fi
12 |
13 | export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
14 |
15 | target=$(nitropy nk3 secrets list | tail -n +1 | cut -f 1 | cut -d " " -f 2 | bemenu -p "Target" --fn "$BEMENU_FONT" -l 10 $BEMENU_COLORARGS )
16 | [ -n "$target" ] || exit
17 |
18 | password=$(nitropy nk3 secrets get-otp "$target" | tail -n 1)
19 |
20 | if [ -n "$password" ]; then
21 | echo -n "$password" | wl-copy
22 | mpv --really-quiet "$HOME/dotfiles/media/unlock2.wav" &
23 | else
24 | mpv --really-quiet "$HOME/dotfiles/media/boing.wav" &
25 | fi
26 |
--------------------------------------------------------------------------------
/scripts/passmenu.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | shopt -s nullglob globstar
6 |
7 | typeit=0
8 | if [ "$1" == "--type" ]; then
9 | typeit=1
10 | shift
11 | fi
12 |
13 | prefix=${PASSWORD_STORE_DIR-~/.password-store}
14 | password_files=( "$prefix"/**/*.gpg )
15 | password_files=( "${password_files[@]#"$prefix"/}" )
16 | password_files=( "${password_files[@]%.gpg}" )
17 |
18 | password=$(printf '%s\n' "${password_files[@]}" | bemenu -p "Target" --fn "$BEMENU_FONT" -l 10 $BEMENU_COLORARGS )
19 |
20 | [ -n "$password" ] || exit
21 |
22 | if [ $typeit -eq 0 ]; then
23 | if pass show -c "$password" 2>/dev/null; then
24 | mpv --really-quiet "$HOME/dotfiles/media/unlock2.wav" &
25 | else
26 | mpv --really-quiet "$HOME/dotfiles/media/boing.wav" &
27 | fi
28 | else
29 | if pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | ydotool type --file -; then
30 | mpv --really-quiet "$HOME/dotfiles/media/unlock2.wav" &
31 | fi
32 | fi
33 |
34 |
--------------------------------------------------------------------------------
/scripts/pinentry-smart:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | case $PINENTRY_USER_DATA in
4 | curses)
5 | exec pinentry-curses "$@"
6 | ;;
7 | tty)
8 | exec pinentry-tty "$@"
9 | ;;
10 | wayprompt)
11 | exec pinentry-wayprompt "$@"
12 | ;;
13 | gnome3)
14 | exec pinentry-gnome3 "$@"
15 | ;;
16 | *)
17 | exec pinentry-wayprompt "$@"
18 | ;;
19 | esac
20 |
--------------------------------------------------------------------------------
/scripts/preview.nu:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env nu
2 |
3 | def main [filename: string --nosixel] {
4 | let filetype = ($filename | path type);
5 | if $filetype == "symlink" {
6 | main ($filename | path expand)
7 | exit
8 | }
9 |
10 | if $filetype == "dir" {
11 | ls | sort-by --reverse modified | first 10
12 | } else if $filetype == "file" {
13 | if $filename =~ '(png|jpe?g|gif|webm)$' {
14 | if $nosixel {
15 | file $filename
16 | ls -l $filename | first
17 | } else {
18 | img2sixel $filename
19 | }
20 | } else if $filename =~ '(mp4|mkv|mpeg|mp3)$' {
21 | file $filename
22 | ls -l $filename | first
23 | } else {
24 | bat --style=plain --pager=never --color=always $filename
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/scripts/reroutetunnel.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # find tunnel device. probably tun0
3 | TUNDEV=$(ip route |grep default |grep tun |awk '{print $5}')
4 | if [ "$TUNDEV" = "" ]; then
5 | echo "no tunnel found"
6 | exit 1
7 | fi
8 | # find gateway for tunnel device
9 | TUNGW=$(ip route |grep default |grep "$TUNDEV" |awk '{print $3}')
10 | # delete all routes that run via tunnel device
11 | ip route |grep "$TUNDEV" |grep -v scope | ( while read -r line; do sudo ip route del "$line"; done )
12 | # add route to network via tunnel device
13 | sudo ip route add 131.174.0.0/16 via "$TUNGW" dev "$TUNDEV"
14 |
--------------------------------------------------------------------------------
/scripts/rotdir:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # by Luke Smith
4 | # https://github.com/LukeSmithxyz/voidrice
5 |
6 | # When I open an image from the file manager in sxiv (the image viewer), I want
7 | # to be able to press the next/previous keys to key through the rest of the
8 | # images in the same directory. This script "rotates" the content of a
9 | # directory based on the first chosen file, so that if I open the 15th image,
10 | # if I press next, it will go to the 16th etc. Autistic, I know, but this is
11 | # one of the reasons that sxiv is great for being able to read standard input.
12 |
13 | [ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1
14 | base="$(basename "$1")"
15 | ls "$PWD" | awk "BEGIN { lines = \"\"; m = 0; } /^$base$/ { m = 1; } { if (!m) { if (lines) { lines = lines\"\n\"; } lines = lines\"\"\$0; } else { print \$0; } } END { print lines; }"
16 |
17 |
18 |
--------------------------------------------------------------------------------
/scripts/runsteam:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | flatpak run com.valvesoftware.Steam/x86_64/stable
3 |
--------------------------------------------------------------------------------
/scripts/scrapers.nu:
--------------------------------------------------------------------------------
1 | export def iso639-1 [] {
2 | let $data = http get https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes | query web --as-table ['Set 1', 'ISO Language Names','Endonym(s)']
3 | return $data
4 | }
5 |
6 | export def opengraph [url: string] {
7 | http get $url | query web --query 'meta[property^="og:"]' --attribute [ property content ]
8 | }
9 |
10 | # Web query to extract metadata from a URL
11 | export def scrapemeta [url: string] {
12 | http get $url | query web --query 'meta' --attribute [ name property content ]
13 | }
14 |
15 | # Show a preview image for the website
16 | export def ogimage [url: string] {
17 | curl --silent --output - (http get $url | query web --query 'meta[property^="og:image"]' --attribute [ content ]).0.content | img2sixel
18 | }
19 |
20 | # Web query for Mojeek
21 | export def mojeek [query: string] {
22 | http get $"https://www.mojeek.com/search?q=($query | url encode)" | query web --as-html --query 'div.results li' | each {
23 | {
24 | title: ($in | query web --query h2 | flatten | str join),
25 | url: ($in | query web --query 'a.title[href]' --attribute href | str join),
26 | shortdesc: ($in | query web --query p.s | flatten | str join)
27 | }
28 | }
29 | }
30 |
31 | # Web query for Alpine Linux packages (edge)
32 | export def lspkg-alpine [query: string] {
33 | http get https://pkgs.alpinelinux.org/packages?name=($query | url encode) | query web --as-table ["Package","Version","Maintainer"]
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/scripts/screencast.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | while [ -f screencast$n.mkv ]; do
4 | n=$((n+1))
5 | done
6 | filename="screencast$n.mkv"
7 | echo $filename
8 |
9 | if [ -n "$1" ]; then
10 | RES=$(xdpyinfo | grep dimensions | awk '{print $2;}')
11 | INPUT=":0.0"
12 | else
13 | if [ "$(hostname)" == "mhysa" ]; then
14 | RES="3840x2160"
15 | INPUT=":0.0+2160,0"
16 | fi
17 | fi
18 |
19 | ffmpeg -y \
20 | -f x11grab \
21 | -s "$RES" \
22 | -i "$INPUT" \
23 | -thread_queue_size 2048 \
24 | -f alsa -ar 44100 -i hw:3 \
25 | -c:v libx264 -r 30 -c:a flac $filename
26 |
27 |
--------------------------------------------------------------------------------
/scripts/screencast_noaudio.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | while [[ -f screencast$n.mpeg ]]
4 | do
5 | n=$((n+1))
6 | done
7 | filename="screencast$n.mpeg"
8 | echo $filename
9 |
10 | ffmpeg -y \
11 | -f x11grab \
12 | -s $(xdpyinfo | grep dimensions | awk '{print $2;}') \
13 | -i :0.0 \
14 | -r 25 $filename
15 |
16 | #-vf scale=1920:1080 \
17 | #ffmpeg -i Untitled_Screencast.webm -r 1 -pix_fmt rgb24 out.gif
18 |
--------------------------------------------------------------------------------
/scripts/screenshot.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | if [ "$1" = "region" ]; then
3 | NAME="screenshot$(date +%Y%m%d%H%M%S)-$(pwgen -1 -0 -A).png"
4 | wl-copy "https://download.anaproy.nl/$NAME"
5 | if grim -g "$(slurp)" "/nettmp/$NAME"; then
6 | ln -s "/nettmp/$NAME" "/tmp/$NAME"
7 | notify-send "Screenshot ready" "Published at https://download.anaproy.nl/$NAME and URL copied to clipboard"
8 | else
9 | notify-send "Screenshot failed!"
10 | fi
11 | elif [ "$1" = "annotate" ]; then
12 | NAME="screenshot$(date +%Y%m%d%H%M%S)-$(pwgen -1 -0 -A).png"
13 | wl-copy "https://download.anaproy.nl/$NAME"
14 | if grim -g "$(slurp -o -r -c '#ff0000ff')" - | satty --filename - --fullscreen --output-filename "/nettmp/$NAME"; then
15 | ln -s "/nettmp/$NAME" "/tmp/$NAME"
16 | notify-send "Screenshot ready" "Published at https://download.anaproy.nl/$NAME and URL copied to clipboard"
17 | else
18 | notify-send "Screenshot failed!"
19 | fi
20 | else
21 | NAME="$(date +%Y-%m-%d-%H%M%S)_screenshot-$(pwgen -1 -0 -A).png"
22 | wl-copy "/home/proycon/$NAME"
23 | grim "/home/proycon/$NAME" && notify-send "Full screenshot ready" "In /home/proycon/$NAME (copied to clipboard)"
24 | fi
25 |
26 |
--------------------------------------------------------------------------------
/scripts/startchat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | sleep 1
3 | export GTK_THEME=Adwaita-dark
4 | pidof senpai || foot --title senpai senpai &
5 | #pidof telegram-desktop || telegram-desktop &
6 | #pidof tg || foot --title tg tg &
7 | #pidof tut-mastodon || foot --title tut-mastodon tut-mastodon &
8 | pidof dino || dino &
9 | pidof nheko || nheko &
10 |
--------------------------------------------------------------------------------
/scripts/starthyprland.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | killall client.sh
3 | rm /tmp/locked
4 | export QT_AUTO_SCREEN_SCALE_FACTOR=0
5 | export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
6 | export QT_QPA_PLATFORM=wayland;xcb
7 | export QT_SCALE_FACTOR=1.8
8 | export ELM_SCALE=1.8
9 | export XDG_CURRENT_DESKTOP=Hyprland
10 | export XDG_SESSION_TYPE=wayland
11 | export XDG_SESSION_DESKTOP=Hyprland
12 | export GDK_BACKEND=wayland
13 | export MOZ_ENABLE_WAYLAND=1
14 | export SDL_VIDEODRIVER=wayland
15 | export GLFW_IM_MODULE=fcitx
16 | #export GTK_IM_MODULE=fcitx
17 | export INPUT_METHOD=fcitx
18 | export XMODIFIERS=@im=fcitx
19 | export IMSETTINGS_MODULE=fcitx
20 | export QT_IM_MODULE=fcitx
21 | #export GDK_DPI_SCALE=2 # only needed for firefox, messes up others
22 | export BEMENU_BACKEND=wayland
23 | exec Hyprland
24 |
--------------------------------------------------------------------------------
/scripts/startnumen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | killall speech 2> /dev/null
3 | paplay ~/dotfiles/media/glass.ogg
4 |
5 | if [ "$1" = "--house" ] && [ -f ~/lighthome/config/house.phrases ]; then
6 | HOUSEPHRASES=~/lighthome/config/house.idle.phrases
7 | fi
8 | if [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then
9 | ENVPHRASES=~/dotfiles/numen/phrases/environment.hyprland.phrases
10 | elif [ -n "$SXMO_WM" ]; then
11 | ENVPHRASES=~/dotfiles/numen/phrases/environment.sxmo-sway.phrases
12 | HOUSEPHRASES=~/lighthome/config/house.phrases
13 | fi
14 | if [ "$1" = "--timeout" ] || [ "$2" = "--timeout" ]; then
15 | TIMEOUT="timeout --kill-after=12s --signal=9 10s"
16 | else
17 | TIMEOUT=""
18 | fi
19 | $TIMEOUT numen /etc/numen/phrases/character.phrases /etc/numen/phrases/control.phrases /etc/numen/phrases/voice.phrases ~/dotfiles/numen/phrases/extra.character.phrases "$ENVPHRASES" $HOUSEPHRASES
20 | paplay ~/dotfiles/media/glass_low.ogg
21 |
22 |
--------------------------------------------------------------------------------
/scripts/startriver.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ~/.config/river/env.sh
4 |
5 | if [ -n "$DBUS_SESSION_BUS_ADDRESS" ]; then
6 | exec river
7 | else
8 | exec dbus-run-session -- river
9 | fi
10 |
--------------------------------------------------------------------------------
/scripts/startsway.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | export MOZ_ENABLE_WAYLAND=1
3 | export GDK_BACKEND=wayland
4 | export SDL_VIDEODRIVER=wayland
5 | export _JAVA_AWT_WM_NONREPARENTING=1
6 | if [ "$(hostname)" = "mhysa" ]; then
7 | exec sway --unsupported-gpu
8 | else
9 | exec sway
10 | fi
11 |
--------------------------------------------------------------------------------
/scripts/suspend.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ~/dotfiles/scripts/lock.sh &
3 | nitropy nk3 reboot # ensure nitrokey reboots so power cycle is interrupted and any cached PIN is lost
4 | sleep 5
5 | while pidof notmuch rsync pacman git apk; do
6 | sleep 5
7 | done
8 | if command -v systemctl; then
9 | systemctl suspend
10 | elif command -v zzz; then
11 | wlopm --off eDP-1
12 | doas zzz
13 | wlopm --on eDP-1
14 | elif command -v rtcwake; then
15 | if [ "$HOST" != "toren" ]; then
16 | umountssh &&\
17 | nmcli dev down wlan0 &&\
18 | wlopm --off eDP-1 &&\
19 | doas zzz
20 | wlopm --on eDP-1
21 | nmcli dev up wlan0
22 | fi
23 | fi
24 |
--------------------------------------------------------------------------------
/scripts/switchbg.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #stop the sxmo background daemon if we're on sxmo
4 | command -v superctl && superctl stop sxmo_bg && killall swaybg
5 |
6 | CURBG=$(ps aux | grep swaybg | grep -v grep)
7 |
8 | case "$CURBG" in
9 | *photo-of-lake*)
10 | NEWBG=~/dotfiles/media/mountain-view-krivec-ales.jpg
11 | ;;
12 | *mountain-view*)
13 | NEWBG=~/dotfiles/media/mountain.jpg
14 | ;;
15 | *mountain.jpg*)
16 | NEWBG=~/dotfiles/media/forest.jpg
17 | ;;
18 | *forest.jpg*)
19 | NEWBG=~/dotfiles/media/night-misty-peaks.png
20 | ;;
21 | *night-misty-peaks*)
22 | NEWBG=~/dotfiles/media/paradox_waves_by_neaben.jpg
23 | ;;
24 | *paradox_waves*)
25 | NEWBG=~/dotfiles/media/photo-of-lake-krivec-ales.jpg
26 | ;;
27 | *)
28 | NEWBG=~/dotfiles/media/paradox_waves_by_neaben.jpg
29 | ;;
30 | esac
31 |
32 | if [ -n "$NEWBG" ]; then
33 | killall swaybg
34 | echo "setting background $NEWBG" >&2
35 | swaybg -m fill -i "$NEWBG" &
36 | fi
37 |
--------------------------------------------------------------------------------
/scripts/timetracker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 |
4 | . ~/dotfiles/scripts/colorargs.sh
5 |
6 | if [ -z "$2" ]; then
7 | if [ -n "$WAYLAND_DISPLAY" ]; then
8 | chosen=$(cut -d ';' -f1 ~/dotfiles/timetracker.tasks | bemenu -p "Task" -l 10 $BEMENU_COLORARGS | sed "s/ .*//")
9 | else
10 | chosen=$(cut -d ';' -f1 ~/dotfiles/timetracker.tasks | rofi -dmenu -font "Monospace 28" | sed "s/ .*//")
11 | fi
12 | else
13 | chosen=$(echo "$2" | tr -d "\n")
14 | fi
15 |
16 | # Exit if none chosen.
17 | [ -z "$chosen" ] && exit
18 |
19 | if [ -z "$1" ] || [ "$1" = "0" ]; then
20 | D=$(date "+%Y-%m-%d %a %H:%M")
21 | else
22 | T=$(date "+%s")
23 | let "T=$T - ($1 * 60)"
24 | D=$(date "+%Y-%m-%d %a %H:%M" --date "@$T")
25 | fi
26 | echo "$D $chosen" >> ~/.timetracker.$(hostname).log
27 | echo "$(date +%H:%M) $chosen" > ~/.timetracker.current
28 |
--------------------------------------------------------------------------------
/scripts/tm:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Start Tmux
4 |
5 | sleep 1 #minor delay to allow river to read the title and move the window before tmux changes it
6 | if [ -n "$1" ]; then
7 | if command -v "$1" 2> /dev/null && [ "$1" != "local" ]; then
8 | name=$1
9 | else
10 | name=$1
11 | fi
12 | shift
13 | else
14 | name=untitled
15 | fi
16 | if [ $# -gt 0 ]; then
17 | tmux new -As "$name" "$*"
18 | else
19 | tmux new -As "$name"
20 | fi
21 |
--------------------------------------------------------------------------------
/scripts/tmuxdirname.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | d=$(realpath "$1")
3 | if [[ "$d" == "$HOME" ]]; then
4 | echo "~"
5 | else
6 | if [ -d .git ]; then
7 | basename "$d"
8 | else
9 | oldpath=$(pwd)
10 | cd "$d" || exit 1
11 | g=$(git rev-parse --show-toplevel 2> /dev/null)
12 | if [ $? -eq 0 ]; then
13 | basename "$g"
14 | else
15 | basename "$d"
16 | fi
17 | cd "$oldpath"
18 | fi
19 | fi
20 |
21 |
--------------------------------------------------------------------------------
/scripts/todotxtsync.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd ~/.todo/
3 | git commit -a -m "update"
4 | . ~/.github_token.sh
5 | todo.sh issue sync
6 | git commit -a -m "github sync"
7 | todo.sh notmuch
8 | git commit -a -m "notmuch sync"
9 |
--------------------------------------------------------------------------------
/scripts/trysuspend.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ssh_connected() {
4 | netstat -tn | awk '
5 | BEGIN { status = 1 }
6 | $4 ~ /:22$/ { status = 0; exit }
7 | END { exit status }
8 | '
9 | }
10 |
11 | if ! ssh_connected && ! pidof notmuch rsync pacman git apk scp cp tar zip unzip mpv steam X-Plane-x86_64; then
12 | LOADAVG=$(cut -d" " -f 2 /proc/loadavg | cut -d "." -f 1)
13 | if [ "$LOADAVG" -le 3 ]; then
14 | echo "auto suspending">&2
15 | if ! pidof waylock; then
16 | ~/dotfiles/scripts/lock.sh &
17 | sleep 3
18 | fi
19 | if command -v systemctl; then
20 | systemctl suspend
21 | elif command -v zzz; then
22 | umountssh &&\
23 | nmcli dev down wlan0 &&\
24 | wlopm --off eDP-1 &&\
25 | doas zzz
26 | wlopm --on eDP-1
27 | nmcli dev up wlan0
28 | fi
29 | fi
30 | else
31 | echo "suspension blocked">&2
32 | fi
33 |
--------------------------------------------------------------------------------
/scripts/updatemail.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | if [ ! -f /tmp/.maillock ]; then
3 | touch /tmp/.maillock
4 | date
5 | echo "Checking for new mail..."
6 | time notmuch new --verbose
7 | echo "Tagging new mail..."
8 | time notmuch tag --batch --input="$HOME/dotfiles.private/tags.txt"
9 | echo "done"
10 | rm /tmp/.maillock
11 | else
12 | echo "locked">&2
13 | fi
14 |
15 | #about once a night inbox2archive.sh should be run from cron, moving mail to the archive
16 |
--------------------------------------------------------------------------------
/scripts/updatevbuf.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | if [ -n "$DISPLAY" ]; then
3 | xsel -i -b < ~/.vbuf
4 | fi
5 |
--------------------------------------------------------------------------------
/scripts/urlview_wrapper.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ext="${1##*.}"
3 | mpvFiles="mkv mp4 gif"
4 | fehFiles="png jpg jpeg jpe"
5 | wgetFiles="mp3 flac opus mp3?source=feed pdf"
6 |
7 | if echo $fehFiles | grep -w $ext > /dev/null; then
8 | nohup feh "$1" >/dev/null &
9 | elif echo $mpvFiles | grep -w $ext > /dev/null; then
10 | nohup mpv --loop --quiet "$1" > /dev/null &
11 | elif echo $wgetFiles | grep -w $ext > /dev/null; then
12 | nohup wget "$1" >/dev/null &
13 | else
14 | nohup $BROWSER "$1" >/dev/null &
15 | fi
16 |
--------------------------------------------------------------------------------
/scripts/vpn-knaw.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #sleep for a bit so we only run this when the connection is up (bit patchy but works)
4 | sleep 4 && (
5 | IF=$(nmcli connection show --active | grep -E "(wifi|ethernet)" | head -n 1 | tr -s " " | cut -d" " -f 6)
6 | if [ -z "$IF" ]; then
7 | IF=enp10s0
8 | fi
9 | VPN_REMOTE=192.87.139.238
10 | ip route add 195.169.0.0/16 via $VPN_REMOTE dev ppp0
11 | ip route add 195.171.119.0/24 via $VPN_REMOTE dev ppp0
12 | ip route add 194.171.119.0/24 via $VPN_REMOTE dev ppp0
13 | ip route add 194.171.4.0/24 via $VPN_REMOTE dev ppp0
14 | ip route add 10.27.1.0/24 via $VPN_REMOTE dev ppp0
15 | ip route add $VPN_REMOTE via 192.168.0.1 dev "$IF" || route del $VPN_REMOTE #delete the existing one if this fails
16 | ip route add $VPN_REMOTE via 192.168.0.1 dev "$IF" #and retry...
17 | echo "routes set"
18 | ) &
19 |
20 | openfortivpn -c /home/proycon/dotfiles.private/openfortivpn-knaw $@
21 |
--------------------------------------------------------------------------------
/scripts/wclock:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | TZ=Canada/Pacific date +"🇨🇦 Vancouver: %H:%M %Z"
3 | TZ=US/Pacific date +"🇺🇸 Los Angeles: %H:%M %Z"
4 | TZ=America/Mexico_City date +"🇲🇽 Mexico Ciudad: %H:%M %Z"
5 | TZ=US/Central date +"🇺🇸 Chicago/Houston: %H:%M %Z"
6 | TZ=America/Bogota date +"🇨🇴 Bogotá: %H:%M %Z"
7 | TZ=US/Eastern date +"🇺🇸 New York: %H:%M %Z"
8 | TZ=America/Buenos_Aires date +"🇦🇷 Buenos Aires: %H:%M %Z"
9 | TZ=America/Sao_Paulo date +"🇧🇷 São Paulo: %H:%M %Z"
10 | TZ=Europe/London date +"🇬🇧 London: %H:%M %Z"
11 | TZ=Europe/Amsterdam date +"🇳🇱 Amsterdam: %H:%M %Z <---"
12 | TZ=Africa/Cairo date +"🇪🇬 Cairo: %H:%M %Z"
13 | TZ=Africa/Johannesburg date +"🇿🇦 Kaapstad: %H:%M %Z"
14 | TZ=Asia/Istanbul date +"🇹🇷 Istanbul: %H:%M %Z"
15 | TZ=Asia/Jerusalem date +"🇮🇱 Jerusalem: %H:%M %Z"
16 | TZ=Europe/Kiev date +"🇺🇦 Київ: %H:%M %Z"
17 | TZ=Europe/Moscow date +"🇷🇺 Москва: %H:%M %Z"
18 | TZ=Asia/Baghdad date +"🇸🇦 Riyadh: %H:%M %Z"
19 | TZ=Iran date +"🇮🇷 Teheran: %H:%M %Z"
20 | TZ=Asia/Karachi date +"🇵🇰 Karachi: %H:%M %Z"
21 | TZ=Asia/Kolkata date +"🇮🇳 New Delhi: %H:%M %Z"
22 | TZ=Asia/Bangkok date +"🇹🇭 กรุงเทพมหานคร: %H:%M %Z"
23 | TZ=Asia/Chongqing date +"🇨🇳 北京: %H:%M %Z"
24 | TZ=Asia/Singapore date +"🇸🇬 Singapore: %H:%M %Z"
25 | TZ=Asia/Seoul date +"🇰🇷 서울: %H:%M %Z"
26 | TZ=Asia/Tokyo date +"🇯🇵 東京: %H:%M %Z"
27 | TZ=Australia/Sydney date +"🇦🇺 Sydney: %H:%M %Z"
28 | TZ=NZ date +"🇳🇿 Wellington: %H:%M %Z"
29 |
--------------------------------------------------------------------------------
/scripts/wtime:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Show date and time in other time zones
4 |
5 | search=$1
6 | format='%a %F %T'
7 |
8 | timedatectl list-timezones \
9 | | grep -i "$search" \
10 | | while read z
11 | do
12 | d=$(TZ=$z date +"$format")
13 | printf "%-34s %23s\n" "$z" "$d"
14 | done
15 |
--------------------------------------------------------------------------------
/scripts/youtubemenu.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | . ~/dotfiles/scripts/colorargs.sh
4 |
5 | if [ -n "$WAYLAND_DISPLAY" ]; then
6 | QUERY=$(echo "" | bemenu -p Youtube -l 10 --fn "$BEMENU_FONT" $BEMENU_COLORARGS)
7 | if [ -n "$QUERY" ]; then
8 | ytfzf --external-menu --loop "$QUERY"
9 | else
10 | echo "No query">&2
11 | fi
12 | fi
13 |
--------------------------------------------------------------------------------
/senpai/highlight:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | escape() {
4 | printf "%s" "$1" | sed 's#\\#\\\\#g'
5 | }
6 | #TODO: figure out for Hyprland
7 | #FOCUS=$(swaymsg -t get_tree | jq '..|objects|select(.focused==true)|.name' | grep senpai | wc -l)
8 | #if [ "$HERE" -eq 0 ] || [ $FOCUS -eq 0 ]; then
9 | notify-send "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
10 | #fi
11 |
--------------------------------------------------------------------------------
/senpai/senpai.scfg:
--------------------------------------------------------------------------------
1 | address "anaproy.nl:6996"
2 | nickname "proycon"
3 | username "proycon"
4 | realname "Maarten van Gompel"
5 | password-cmd pass soju
6 | highlight proycon
7 |
--------------------------------------------------------------------------------
/signature:
--------------------------------------------------------------------------------
1 | --
2 |
3 | Maarten van Gompel (proycon)
4 |
5 | web: https://proycon.anaproy.nl
6 | gpg: 0x39FE11201A31555C
7 |
--------------------------------------------------------------------------------
/signature.knaw.txt:
--------------------------------------------------------------------------------
1 | --
2 |
3 | Maarten van Gompel
4 | Digital Infrastructure, Humanities Cluster,
5 | Koninklijke Nederlandse Akademie van Wetenschappen (KNAW)
6 |
7 | web: https://proycon.anaproy.nl
8 | gpg: 0x39FE11201A31555C
9 |
--------------------------------------------------------------------------------
/signature.ru.txt:
--------------------------------------------------------------------------------
1 | --
2 |
3 | Maarten van Gompel
4 | Centre for Language and Speech Technology
5 | Radboud Universiteit Nijmegen
6 |
7 | web: https://proycon.anaproy.nl
8 | gpg: 0x39FE11201A31555C
9 |
--------------------------------------------------------------------------------
/signature.unilang:
--------------------------------------------------------------------------------
1 | --
2 |
3 | Maarten van Gompel (Proycon)
4 |
5 | UniLang Administration
6 | http://www.unilang.org
7 | unilang@unilang.org
8 |
--------------------------------------------------------------------------------
/sxiv/exec/key-handler:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | while read file
3 | do
4 | fullpath="$(pwd)/$file"
5 | case "$1" in
6 | "w")
7 | feh --bg-scale "$fullpath"
8 | ;;
9 | "n")
10 | cp "$file" "/nettmp" && notify-send -i "$fullpath" "$file copied to /nettmp." &
11 | ;;
12 | "t")
13 | cp "$file" "/home/proycon/shared/transfer" && notify-send -i "$fullpath" "$file copied to ~/shared/transfer." &
14 | ;;
15 | "T")
16 | cp "$file" "/tmp" && notify-send -i "$fullpath" "$file copied to /tmp." &
17 | ;;
18 | "c")
19 | [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
20 | [ -z "$destdir" ] && exit
21 | cp "$file" "$destdir" && notify-send -i "$fullpath" "$file copied to $destdir." &
22 | ;;
23 | "m")
24 | [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
25 | [ -z "$destdir" ] && exit
26 | cp "$file" "$destdir" && notify-send -i "$fullpath" "$file moved to $destdir." &
27 | ;;
28 | "r")
29 | convert -rotate 90 "$file" "$file" ;;
30 | "R")
31 | convert -rotate -90 "$file" "$file" ;;
32 | "f")
33 | convert -flop "$file" "$file" ;;
34 | "y")
35 | echo -n "$file" | xclip -selection clipboard &&
36 | notify-send "$file copied to clipboard" & ;;
37 | "Y")
38 | echo -n "$fullpath" | xclip -selection clipboard &&
39 | notify-send "$fullpath copied to clipboard" & ;;
40 | "d")
41 | [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
42 | "e")
43 | gimp "$file" & ;;
44 | esac
45 | done
46 |
--------------------------------------------------------------------------------
/sxmo/Makefile:
--------------------------------------------------------------------------------
1 | all: contacts.tsv userscripts/0-HOME userscripts/startnumen
2 |
3 | contacts.tsv:
4 | ln -s ~/dotfiles.private/contacts.tsv
5 |
6 | userscripts/0-HOME:
7 | ln -s ~/dotfiles/scripts/homecommand.sh userscripts/0-HOME
8 |
9 | userscripts/startnumen:
10 | ln -s ~/dotfiles/scripts/startnumen.sh userscripts/startnumen
11 |
12 |
--------------------------------------------------------------------------------
/sxmo/conky.conf:
--------------------------------------------------------------------------------
1 | -- Space to setup configversion
2 | -- configversion: 19ec5c7f9e83bc6534d657f6180feba2
3 | -- configversion:19ec5c7f9e83bc6534d657f6180feba2
4 | conky.config = {
5 | out_to_wayland = true,
6 | out_to_x = false,
7 | alignment = 'middle_middle',
8 | own_window_argb_value = 0,
9 | own_window_type = 'desktop',
10 | width = 640,
11 | default_shade_color = '#eeeeee',
12 | draw_shades = false,
13 | font = 'Sxmo:size=12',
14 | use_xft = true,
15 | update_interval = 3,
16 | }
17 |
18 | conky.text = [[
19 | ${alignc}${font Sxmo:size=50:style=Bold}${time %H}${font Sxmo:size=50}:${time %M}${font}
20 | ${font Sxmo:size=20}${time %a %d %b %Y}${font}
21 | ${if_up wlan0}${font Monospace:size=10}${wireless_essid wlan0} ${wireless_link_qual_perc wlan0}% - ${addr wlan0}${font}${endif}
22 | ${font Monospace:size=8}${execi 60 nmcli -o d | grep " connected" | grep -v loopback | tr -s " " | cut -d" " -f 1,4} - ${execi 60 ~/dotfiles/scripts/bwstatus.sh }${font}
23 | ${execpi 10 ~/dotfiles/scripts/homestatus.sh conky}
24 | ]]
25 |
--------------------------------------------------------------------------------
/sxmo/guardbwusage.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | USAGE=$(vnstat -m -i wwan0 --oneline b | cut -d ';' -f 11)
3 | if [ -n "$USAGE" ]; then
4 | if [ $USAGE -gt 1835008000 ]; then
5 | nmcli connection down Simyo && mpv expired.oga
6 | fi
7 | fi
8 |
--------------------------------------------------------------------------------
/sxmo/hooks/sxmo_hook_modem.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # configversion: 5af98b088d38ff15338bc0e0a9fe9d33
3 | # SPDX-License-Identifier: AGPL-3.0-only
4 | # Copyright 2022 Sxmo Contributors
5 |
6 | # This hook is called when the ModemManager1.Modem signals a StateChanged
7 |
8 | # shellcheck source=scripts/core/sxmo_common.sh
9 | . sxmo_common.sh
10 |
11 | # see networkmanager documentation for state names
12 | # oldstate="$1"
13 | newstate="$2"
14 | # reason="$3" # 0 or 1
15 |
16 | sxmo_debug "$2 (old: $1 [reason: $3])"
17 |
18 | case "$newstate" in
19 | "locked")
20 | sxmo_log "State is locked. Attempting to unlock."
21 | if ! pgrep -f "sxmo_unlocksim.sh" >/dev/null; then
22 | if [ "$HOSTNAME" = "toren" ]; then
23 | mmcli -i 0 --pin $(pass sim) || sxmo_unlocksim.sh
24 | else
25 | sxmo_unlocksim.sh
26 | fi
27 | fi
28 | ;;
29 | "enabling")
30 | sxmo_log "State is enabling. Clearing stale call files."
31 | rm "$XDG_RUNTIME_DIR"/sxmo_calls/* 2>/dev/null
32 | rm -f "$SXMO_NOTIFDIR"/incomingcall* 2>/dev/null
33 | ;;
34 | "registered")
35 | sxmo_log "State is registered. Checking for calls and messages."
36 |
37 | # kill the pin-entry dmenu if still open
38 | pkill -f sxmo_unlocksim.sh
39 |
40 | sxmo_modem.sh checkforfinishedcalls
41 | sxmo_modem.sh checkforincomingcalls
42 | sxmo_modem.sh checkfornewtexts
43 | sxmo_modem.sh checkforstucksms
44 | if [ -f "${SXMO_MMS_BASE_DIR:-"$HOME"/.mms/modemmanager}/mms" ]; then
45 | sxmo_mms.sh checkforlostmms
46 | fi
47 |
48 | # An example of something else to do here!
49 | #if ! ping -Iwwan0 -q -c 1 -W 10 www.google.com >/dev/null; then
50 | # sxmo_log "ping failed."
51 | # nmcli c down "MINTY"
52 | # nmcli c up "MINTY"
53 | #else
54 | # sxmo_log "ping ok."
55 | #fi
56 | ;;
57 | esac
58 |
--------------------------------------------------------------------------------
/sxmo/hooks/sxmo_hook_network_down.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # configversion: 29ec7910bd4c699ad1a8c84f74e6aeb5
3 | # SPDX-License-Identifier: AGPL-3.0-only
4 | # Copyright 2023 Sxmo Contributors
5 |
6 | # This is called when any network goes down.
7 | # $1 = device name (eg. wlan0)
8 | # $2 = device type (eg. wifi)
9 |
10 | # Some examples:
11 |
12 | # Notify the user when a network goes down.
13 | killall -9 mosquitto_sub
14 | sxmo_notify_user.sh "$2 ($1) down."
15 | ~/dotfiles/scripts/homecommand.sh status &
16 | HOUR=$(date +%H)
17 | if [ "$HOUR" -ge 09 ] && [ "$HOUR" -le 22 ]; then
18 | sxmo_wakelock.sh timeout --kill-after=7s --signal=9 5s mpv --no-video --quiet ~/lighthome/media/disconnect.wav
19 | fi
20 | # Toggle the data connection when wifi goes down.
21 | #if [ "$2" = "wifi" ]; then
22 | # nmcli c down MYMINT
23 | # nmcli c up MYMINT
24 | #fi
25 |
--------------------------------------------------------------------------------
/sxmo/hooks/sxmo_hook_network_up.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # configversion: aec40a4fa4dcd04cc52ef8001970445d
3 | # SPDX-License-Identifier: AGPL-3.0-only
4 | # Copyright 2023 Sxmo Contributors
5 |
6 | # This is called when a network goes up.
7 | # $1 = device name (e.g. wlan0)
8 | # $2 = device type (e.g. wifi)
9 |
10 | # Notify the user if a network goes up.
11 | sxmo_notify_user.sh "$2 ($1) up."
12 | killall -9 mosquitto_sub
13 | ~/dotfiles/scripts/homecommand.sh status &
14 | HOUR=$(date +%H)
15 | if [ "$HOUR" -ge 09 ] && [ "$HOUR" -le 22 ]; then
16 | sxmo_wakelock.sh timeout --kill-after=7s --signal=9 5s mpv --no-video --quiet ~/lighthome/media/connect.wav
17 | fi
18 |
19 | # tell us wifi strength
20 | #if [ "$2" = "wifi" ]; then
21 | # sxmo_notify_user.sh "SIGNAL STRENGTH: $(nmcli -f IN-USE,SIGNAL,SSID device wifi |awk '/^\*/{if (NR!=1) {print $2}}')"
22 | #fi
23 |
--------------------------------------------------------------------------------
/sxmo/profile:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # configversion: e7cdaa3a889d251bed8a89ce8c622995
3 |
4 | # shellcheck source=scripts/core/sxmo_common.sh
5 | . sxmo_common.sh
6 |
7 | # Please modify this file to your liking
8 |
9 | # Important Instructions:
10 | # All processes you launch from this script must
11 | # be non-blocking: launch them in the background (using &)
12 | # or ensure they return quickly. Only after this script
13 | # finishes will the window manager be loaded
14 |
15 | # You will sometime get SMS or calls from not
16 | # country code prefixed phone numbers. To make
17 | # it easy to fixup configure the default countryu.
18 | #export DEFAULT_COUNTRY=FR
19 |
20 | ### Configuration Parameters ###
21 |
22 | # Note that this is just a subset of all available
23 | # parameters, see the sxmo documentation for more.
24 |
25 | # Use firefox as default browser if installed
26 | command -v firefox >/dev/null && export BROWSER=firefox
27 |
28 | # Prepopulate Subreddits menu with custom subreddits
29 | #export SXMO_SUBREDDITS="postmarketos pinephoneOfficial pinephone unixporn"
30 |
31 | # Change the default terminal command
32 | export TERMCMD="sxmo_terminal.sh"
33 |
34 | # Change the used terminal command
35 | # export SXMO_TERMINAL="st"
36 |
37 | # When scrolling past the beginning or end of a menu, wrap it around:
38 | #export DMENU_WRAP_AROUND=1
39 |
40 | # Enable audio feedback on keypress
41 | #export KEYBOARD_ARGS="-o | clickclack -f $(xdg_data_path sxmo/keytap.wav)"
42 |
43 | # Or, enable vibration feedback on keypress
44 | #export KEYBOARD_ARGS="-o | clickclack -V"
45 |
46 | # Set the scale factor in sway
47 | # export SXMO_SWAY_SCALE=2
48 |
49 | # To load specific part of configuration depending on the running environment
50 | case "$SXMO_WM" in
51 | sway|river)
52 | #set either bemenu or wofi
53 | export SXMO_MENU=wofi
54 | ;;
55 | dwm)
56 | ;;
57 | esac
58 |
59 | #Set RINGTONE to audio file to play for incoming call
60 | export SXMO_RINGTONE="$(xdg_data_path sxmo/ring.ogg)"
61 |
62 | #Set TEXTSOUND to audio file to play when received text message
63 | export SXMO_TEXTSOUND="$(xdg_data_path sxmo/notify.ogg)"
64 |
65 | #Set RINGTIME to number of seconds the phone will ring
66 | export SXMO_RINGTIME=20
67 |
68 | #Set RINGNUMBER to number of times phone will ring or repeat ringtone
69 | #(whichever of SXMO_RINGTIME or SXMO_RINGNUMBER runs less will limit how long phone rings)
70 | export SXMO_RINGNUMBER=10
71 |
72 | #Set to the default text for a new text message.
73 | export SXMO_DEFAULT_DRAFT="Enter new message here."
74 |
--------------------------------------------------------------------------------
/sxmo/river:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # configversion: 3b2e8ccba705f6788a2d062394706bd2
3 |
4 | exec ~/.config/river/init
5 |
--------------------------------------------------------------------------------
/sxmo/setup_mobile_data.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | mmcli -m 0 --create-bearer='apn=internet,user=KPN,password=GPRS,allowed-auth=chap,allow-roaming=no'
3 | nmcli c add type gsm ifname cdc-wdm0 con-name SIMYO apn internet user KPN password GPRS
4 |
--------------------------------------------------------------------------------
/sxmo/userscripts/0-home:
--------------------------------------------------------------------------------
1 | /home/proycon/dotfiles/scripts/homecommand.sh
--------------------------------------------------------------------------------
/sxmo/userscripts/1-terminal:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | foot
3 |
--------------------------------------------------------------------------------
/sxmo/userscripts/gallery:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | sxiv -t ~/Pictures/Photos
3 |
--------------------------------------------------------------------------------
/sxmo/userscripts/playmusic:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | mpc play
3 | snapclient -h mediaserver.anaproy.lxd
4 |
--------------------------------------------------------------------------------
/sxmo/userscripts/stopmusic:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | killall snapclient
3 | mpc stop
4 |
--------------------------------------------------------------------------------
/sxmo/xinit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # configversion: 36730424afa6d6bf9e9fb6d111c35504
3 |
4 | dbus-update-activation-environment DISPLAY XDG_CURRENT_DESKTOP
5 |
6 | # Run actions on start
7 | # By default, setup audio over the main speaker
8 | # and set a sane default volume
9 | sxmo_hook_start.sh &
10 |
--------------------------------------------------------------------------------
/tigrc:
--------------------------------------------------------------------------------
1 | set show-changes = true
2 | color cursor black yellow bold
3 | bind generic U ?git pull %(remote)
4 | set mouse = true
5 | color title-focus 252 237
6 | color title-blur 252 237
7 |
--------------------------------------------------------------------------------
/timetracker.tasks:
--------------------------------------------------------------------------------
1 | afk
2 | personal/chat
3 | personal/coding/other
4 | personal/coding/sxmo
5 | personal/gaming
6 | personal/homeautomation
7 | personal/language/chinese
8 | personal/language/esperanto
9 | personal/language/french
10 | personal/language/german
11 | personal/language/italian
12 | personal/language/portuguese
13 | personal/language/russian
14 | personal/language/spanish
15 | personal/mail
16 | personal/news&entertainment
17 | personal/ricing
18 | personal/serveradmin
19 | personal/buurt
20 | unspecified
21 | work/clariah/clam
22 | work/clariah/deepfrog
23 | work/clariah/flat
24 | work/clariah/folia
25 | work/clariah/frog
26 | work/clariah/lamachine
27 | work/clariah/mail
28 | work/clariah/meeting
29 | work/clariah/other
30 | work/clariah/piccl
31 | work/clariah/ucto
32 | work/clariah/valkuil
33 | work/clariah/ig
34 | work/clariah/wp3man
35 | work/clariah/vre
36 | work/clariah/switchboard
37 | work/clariah/tooldiscovery
38 | work/clariah/devops
39 | work/clariah/annotation
40 | work/knaw/nederlab
41 | work/knaw/oersetter
42 | work/knaw/goldenagents
43 | work/knaw/dg
44 | work/knaw/other
45 | work/clst/mail
46 | work/clst/meeting
47 | work/clst/chat
48 | work/clst/openspraak
49 | work/clst/other
50 | work/clst/sysadmin
51 |
--------------------------------------------------------------------------------
/tmux-powerline/.gitignore:
--------------------------------------------------------------------------------
1 | segments/np_mpd
2 | segments/xkb_layout
3 | *.swp
4 |
--------------------------------------------------------------------------------
/tmux-powerline/AUTHORS:
--------------------------------------------------------------------------------
1 | Please append you name/nick here when you have contributed with something!
2 |
3 | Erik Westrup
4 | Suvash Thapaliya
5 | Erik Jansson
6 | Yuku Takahashi
7 | Oscar Olsson
8 | Ryo Katsuma
9 | negipo
10 | Sina Siadat
11 | Vivien Leroy
12 | Gino Lucero
13 | Derek Ashley Thomas
14 | LuRsT
15 | Tomokazu Hirai
16 | Matt Black
17 | krieiter
18 | Viktor Jackson
19 | flytreeleft
20 | Conner McDaniel
21 | David Francos
22 | Travis Thompson
23 | Jonathon Klobucar
24 | Dylan Copeland
25 | Pete Johns
26 | Robert Murray McMahon
27 | Jeff Felchner
28 | tobetoby
29 | Matthew Lanigan
30 | Hadret
31 | antiAgainst
32 | Alexander Luberg
33 | Stanislaw Pusep
34 | Austin Beam
35 |
--------------------------------------------------------------------------------
/tmux-powerline/LICENSE:
--------------------------------------------------------------------------------
1 | tmux-powerline - Statusbar configuration for tmux that looks like vim-powerline and consist of dynamic segments.
2 |
3 | Copyright (c) 2012, see AUTHORS
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10 | * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11 |
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 |
14 | http://opensource.org/licenses/BSD-3-Clause
15 |
--------------------------------------------------------------------------------
/tmux-powerline/color_palette.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Print tmux color palette.
3 | # Idea from http://superuser.com/questions/285381/how-does-the-tmux-color-palette-work
4 |
5 | for i in $(seq 0 4 255); do
6 | for j in $(seq $i $(expr $i + 3)); do
7 | for k in $(seq 1 $(expr 3 - ${#j})); do
8 | printf " "
9 | done
10 | printf "\x1b[38;5;${j}mcolour${j}"
11 | [[ $(expr $j % 4) != 3 ]] && printf " "
12 | done
13 | printf "\n"
14 | done
15 |
--------------------------------------------------------------------------------
/tmux-powerline/config/defaults.sh:
--------------------------------------------------------------------------------
1 | # Default values for non segment configuration options.
2 |
3 | export TMUX_POWERLINE_DEBUG_MODE_ENABLED_DEFAULT="false"
4 | export TMUX_POWERLINE_PATCHED_FONT_IN_USE_DEFAULT="true"
5 | export TMUX_POWERLINE_THEME_DEFAULT="default"
6 |
--------------------------------------------------------------------------------
/tmux-powerline/config/helpers.sh:
--------------------------------------------------------------------------------
1 | # Other settings and helper functions.
2 |
3 | debug_mode_enabled() {
4 | [ -n "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" -a "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" != "false" ];
5 | }
6 |
7 | patched_font_in_use() {
8 | [ -z "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" -o "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" != "false" ];
9 | }
10 |
--------------------------------------------------------------------------------
/tmux-powerline/config/paths.sh:
--------------------------------------------------------------------------------
1 | # Paths
2 |
3 | export TMUX_POWERLINE_DIR_LIB="$TMUX_POWERLINE_DIR_HOME/lib"
4 | export TMUX_POWERLINE_DIR_SEGMENTS="$TMUX_POWERLINE_DIR_HOME/segments"
5 | export TMUX_POWERLINE_DIR_TEMPORARY="/tmp/tmux-powerline_${USER}"
6 | export TMUX_POWERLINE_DIR_THEMES="$TMUX_POWERLINE_DIR_HOME/themes"
7 | export TMUX_POWERLINE_RCFILE="$HOME/.tmux-powerlinerc"
8 | export TMUX_POWERLINE_RCFILE_DEFAULT="$HOME/.tmux-powerlinerc.default"
9 |
10 | if [ ! -d "$TMUX_POWERLINE_DIR_TEMPORARY" ]; then
11 | mkdir "$TMUX_POWERLINE_DIR_TEMPORARY"
12 | fi
13 |
--------------------------------------------------------------------------------
/tmux-powerline/config/shell.sh:
--------------------------------------------------------------------------------
1 | # Shell Configuration
2 | # vi: sw=8 ts=8 noet
3 |
4 | export SHELL_PLATFORM='unknown'
5 |
6 | case "$OSTYPE" in
7 | *'linux'* ) SHELL_PLATFORM='linux' ;;
8 | *'darwin'* ) SHELL_PLATFORM='osx' ;;
9 | *'bsd'* ) SHELL_PLATFORM='bsd' ;;
10 | esac
11 |
12 | shell_is_linux() { [[ $SHELL_PLATFORM == 'linux' || $SHELL_PLATFORM == 'bsd' ]]; }
13 | shell_is_osx() { [[ $SHELL_PLATFORM == 'osx' ]]; }
14 | shell_is_bsd() { [[ $SHELL_PLATFORM == 'bsd' || $SHELL_PLATFORM == 'osx' ]]; }
15 |
16 | export -f shell_is_linux
17 | export -f shell_is_osx
18 | export -f shell_is_bsd
19 |
--------------------------------------------------------------------------------
/tmux-powerline/generate_rc.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Generate default rc file.
3 |
4 | export TMUX_POWERLINE_DIR_HOME="$(dirname $0)"
5 | source "${TMUX_POWERLINE_DIR_HOME}/config/paths.sh"
6 | source "${TMUX_POWERLINE_DIR_HOME}/config/defaults.sh"
7 | source "${TMUX_POWERLINE_DIR_LIB}/rcfile.sh"
8 |
9 | generate_default_rc
10 |
11 | exit 0
12 |
--------------------------------------------------------------------------------
/tmux-powerline/img/full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/tmux-powerline/img/full.png
--------------------------------------------------------------------------------
/tmux-powerline/img/left-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/tmux-powerline/img/left-status.png
--------------------------------------------------------------------------------
/tmux-powerline/img/right-status.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/tmux-powerline/img/right-status.png
--------------------------------------------------------------------------------
/tmux-powerline/img/right-status_no_mail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/tmux-powerline/img/right-status_no_mail.png
--------------------------------------------------------------------------------
/tmux-powerline/img/right-status_no_mpd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/tmux-powerline/img/right-status_no_mpd.png
--------------------------------------------------------------------------------
/tmux-powerline/img/right-status_weather_battery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proycon/dotfiles/647949f611e098ca586a1d48b1787aed0e246d02/tmux-powerline/img/right-status_weather_battery.png
--------------------------------------------------------------------------------
/tmux-powerline/lib/arg_processing.sh:
--------------------------------------------------------------------------------
1 | #! Check script arguments.
2 |
3 | check_arg_side() {
4 | local side="$1"
5 | if ! [ "$side" == "left" -o "$side" == "right" ]; then
6 | echo "Argument must be must be the side to handle {left, right} and not \"${side}\"."
7 | exit 1
8 | fi
9 | }
10 |
--------------------------------------------------------------------------------
/tmux-powerline/lib/formatting.sh:
--------------------------------------------------------------------------------
1 | __print_colored_content() {
2 | echo -n "#[fg=colour$3, bg=colour$2]"
3 | echo -n "$1"
4 | echo -n "#[default]"
5 | }
6 |
--------------------------------------------------------------------------------
/tmux-powerline/lib/muting.sh:
--------------------------------------------------------------------------------
1 | # Muting Logic
2 | # In all cases $1 is the side to be muted (eg left/right).
3 |
4 | powerline_muted() {
5 | [ -e "$(__powerline_mute_file $1)" ];
6 | }
7 |
8 | toggle_powerline_mute_status() {
9 | if powerline_muted $1; then
10 | rm "$(__powerline_mute_file $1)"
11 | else
12 | touch "$(__powerline_mute_file $1)"
13 | fi
14 | }
15 |
16 | __powerline_mute_file() {
17 | local tmux_session=$(tmux display -p "#S")
18 |
19 | echo -n "${TMUX_POWERLINE_DIR_TEMPORARY}/mute_${tmux_session}_$1"
20 | }
21 |
--------------------------------------------------------------------------------
/tmux-powerline/lib/text_roll.sh:
--------------------------------------------------------------------------------
1 | # Rolling anything what you want.
2 | # arg1: text to roll.
3 | # arg2: max length to display.
4 | # arg3: roll speed in characters per second.
5 | roll_text() {
6 | local text="$1" # Text to print
7 |
8 | if [ -z "$text" ]; then
9 | return;
10 | fi
11 |
12 | local max_len="10" # Default max length.
13 |
14 | if [ -n "$2" ]; then
15 | max_len="$2"
16 | fi
17 |
18 | local speed="1" # Default roll speed in chars per second.
19 |
20 | if [ -n "$3" ]; then
21 | speed="$3"
22 | fi
23 |
24 | # Skip rolling if the output is less than max_len.
25 | if [ "${#text}" -le "$max_len" ]; then
26 | echo "$text"
27 | return
28 | fi
29 |
30 | # Anything starting with 0 is an Octal number in Shell,C or Perl,
31 | # so we must explicitly state the base of a number using base#number
32 | local offset=$((10#$(date +%s) * ${speed} % ${#text}))
33 |
34 | # Truncate text.
35 | text=${text:offset}
36 |
37 | local char # Character.
38 | local bytes # The bytes of one character.
39 | local index
40 |
41 | for ((index=0; index < max_len; index++)); do
42 | char=${text:index:1}
43 | bytes=$(echo -n $char | wc -c)
44 | # The character will takes twice space
45 | # of an alphabet if (bytes > 1).
46 | if ((bytes > 1)); then
47 | max_len=$((max_len - 1))
48 | fi
49 | done
50 |
51 | text=${text:0:max_len}
52 |
53 | #echo "index=${index} max=${max_len} len=${#text}"
54 | # How many spaces we need to fill to keep
55 | # the length of text that will be shown?
56 | local fill_count=$((${index} - ${#text}))
57 |
58 | for ((index=0; index < fill_count; index++)); do
59 | text="${text} "
60 | done
61 |
62 | echo "${text}"
63 | }
64 |
--------------------------------------------------------------------------------
/tmux-powerline/lib/tmux_adapter.sh:
--------------------------------------------------------------------------------
1 | # Get the current path in the segment.
2 | get_tmux_cwd() {
3 | local env_name=$(tmux display -p "TMUXPWD_#D" | tr -d %)
4 | local env_val=$(tmux show-environment | grep --color=never "$env_name")
5 | # The version below is still quite new for tmux. Uncomment this in the future :-)
6 | #local env_val=$(tmux show-environment "$env_name" 2>&1)
7 |
8 | if [[ ! $env_val =~ "unknown variable" ]]; then
9 | local tmux_pwd=$(echo "$env_val" | sed 's/^.*=//')
10 | echo "$tmux_pwd"
11 | fi
12 | }
13 |
--------------------------------------------------------------------------------
/tmux-powerline/mute_powerline.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | export TMUX_POWERLINE_DIR_HOME="$(dirname $0)"
4 | source "${TMUX_POWERLINE_DIR_HOME}/config/paths.sh"
5 | source "${TMUX_POWERLINE_DIR_LIB}/muting.sh"
6 | source "${TMUX_POWERLINE_DIR_LIB}/arg_processing.sh"
7 |
8 | side="$1"
9 | check_arg_side "$side"
10 | toggle_powerline_mute_status "$side"
11 |
--------------------------------------------------------------------------------
/tmux-powerline/powerline.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | export TMUX_POWERLINE_DIR_HOME="$(dirname $0)"
4 |
5 | source "${TMUX_POWERLINE_DIR_HOME}/config/helpers.sh"
6 | source "${TMUX_POWERLINE_DIR_HOME}/config/paths.sh"
7 | source "${TMUX_POWERLINE_DIR_HOME}/config/shell.sh"
8 | source "${TMUX_POWERLINE_DIR_HOME}/config/defaults.sh"
9 |
10 | source "${TMUX_POWERLINE_DIR_LIB}/arg_processing.sh"
11 | source "${TMUX_POWERLINE_DIR_LIB}/formatting.sh"
12 | source "${TMUX_POWERLINE_DIR_LIB}/muting.sh"
13 | source "${TMUX_POWERLINE_DIR_LIB}/powerline.sh"
14 | source "${TMUX_POWERLINE_DIR_LIB}/rcfile.sh"
15 |
16 | if ! powerline_muted "$1"; then
17 | process_settings
18 | check_arg_side "$1"
19 | print_powerline "$1"
20 | fi
21 |
22 | exit 0
23 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/ifstat.sh:
--------------------------------------------------------------------------------
1 | # Show network statistics for all active interfaces found.
2 |
3 | run_segment() {
4 | type ifstat >/dev/null 2>&1
5 | if [ "$?" -ne 0 ]; then
6 | return 1
7 | fi
8 |
9 | sed="sed"
10 | type gsed >/dev/null 2>&1
11 | if [ "$?" -eq 0 ]; then
12 | sed="gsed"
13 | fi
14 |
15 | data=$(ifstat -z -S -q 1 1)
16 | interfaces=$(echo -e "${data}" | head -n 1)
17 | flow_data=$(echo -e "${data}" | tail -n 1 | ${sed} "s/\s\{1,\}/,/g")
18 | index=1
19 | for inf in ${interfaces}; do
20 | type=""
21 | case ${inf} in
22 | eth*) type="⎆"
23 | ;;
24 | wlan*) type="☫"
25 | ;;
26 | en*) type=" "
27 | ;;
28 | esac
29 | if [ -n "${type}" ]; then
30 | formate=$(echo "${formate} ${type} ⇊ %.2f ⇈ %.2f")
31 | holder=$(echo "${holder},\$$((index)),\$$((index+1))")
32 | fi
33 | index=$((index+2))
34 | done
35 | if [ -n "${formate}" ]; then
36 | echo $(echo "${flow_data#,}" | awk -F"," "{printf(\"${formate}\"${holder})}")
37 | fi
38 | return 0
39 | }
40 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/ifstat_sys.sh:
--------------------------------------------------------------------------------
1 | # Show if stats by sampling /sys/.
2 | # Originally stolen from http://unix.stackexchange.com/questions/41346/upload-download-speed-in-tmux-status-line
3 |
4 | run_segment() {
5 | sleeptime="0.5"
6 | iface="wlan0"
7 | RXB=$(/dev/null | awk -F':' '/^[a-z]/ && !/^lo/ { print $1 }')
6 | for nic in ${all_nics[@]}; do
7 | ipv4s_on_nic=$(ifconfig ${nic} 2>/dev/null | awk '$1 == "inet" { print $2 }')
8 | for lan_ip in ${ipv4s_on_nic[@]}; do
9 | [[ -n "${lan_ip}" ]] && break
10 | done
11 | [[ -n "${lan_ip}" ]] && break
12 | done
13 | else
14 | # Get the names of all attached NICs.
15 | all_nics="$(ip addr show | cut -d ' ' -f2 | tr -d :)"
16 | all_nics=(${all_nics[@]//lo/}) # Remove lo interface.
17 |
18 | for nic in "${all_nics[@]}"; do
19 | # Parse IP address for the NIC.
20 | lan_ip="$(ip addr show ${nic} | grep '\' | tr -s ' ' | cut -d ' ' -f3)"
21 | # Trim the CIDR suffix.
22 | lan_ip="${lan_ip%/*}"
23 | # Only display the last entry
24 | lan_ip="$(echo "$lan_ip" | tail -1)"
25 |
26 | [ -n "$lan_ip" ] && break
27 | done
28 | fi
29 |
30 | echo "ⓛ ${lan_ip-N/a}"
31 | return 0
32 | }
33 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/np_itunes.script:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env osascript
2 | # Returns the current playing song in iTunes for OSX
3 |
4 | tell application "System Events"
5 | set process_list to (name of every process)
6 | end tell
7 |
8 | if process_list contains "iTunes" then
9 | tell application "iTunes"
10 | if player state is playing then
11 | set track_name to name of current track
12 | set artist_name to artist of current track
13 | # set album_name to album of current track
14 | set trim_length to 40
15 | set now_playing to artist_name & " - " & track_name
16 | if length of now_playing is less than trim_length then
17 | set now_playing_trim to now_playing
18 | else
19 | set now_playing_trim to characters 1 thru trim_length of now_playing as string
20 | end if
21 | end if
22 | end tell
23 | end if
24 |
25 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/np_pithos.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | import dbus
3 |
4 | pithos_bus = dbus.SessionBus()
5 |
6 | pithos = pithos_bus.get_object('net.kevinmehall.Pithos', '/net/kevinmehall/Pithos')
7 | props = pithos.get_dbus_method('GetCurrentSong', 'net.kevinmehall.Pithos')
8 |
9 | print props()["artist"] + " - " + props()["title"]
10 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/np_rdio_mac.script:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env osascript
2 | # Returns the current playing song in Rdio for OS X.
3 |
4 | tell application "System Events"
5 | set process_list to (name of every process)
6 | end tell
7 |
8 | if process_list contains "Rdio" then
9 | tell application "Rdio"
10 | if player state is playing then
11 | set track_name to name of current track
12 | set artist_name to artist of current track
13 | set album_name to album of current track
14 | set now_playing to artist_name & " - " & track_name
15 | # Uncomment if Album name is wanted
16 | #set now_playing to now_playing & " - " & album_name
17 | end if
18 | end tell
19 | end if
20 |
21 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/np_spotify_mac.script:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env osascript
2 | # Returns the current playing song in Spotify for OSX
3 |
4 | tell application "System Events"
5 | set process_list to (name of every process)
6 | end tell
7 |
8 | if process_list contains "Spotify" then
9 | tell application "Spotify"
10 | if player state is playing then
11 | set track_name to name of current track
12 | set artist_name to artist of current track
13 | #set album_name to album of current track
14 | set trim_length to 40
15 | set now_playing to artist_name & " - " & track_name
16 | if length of now_playing is less than trim_length then
17 | set now_playing_trim to now_playing
18 | else
19 | set now_playing_trim to characters 1 thru trim_length of now_playing as string
20 | end if
21 | end if
22 | end tell
23 | end if
24 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/rainbarf.sh:
--------------------------------------------------------------------------------
1 | # Print out Memory and CPU using https://github.com/creaktive/rainbarf
2 |
3 | run_segment() {
4 | type rainbarf >/dev/null 2>&1
5 | if [ "$?" -ne 0 ]; then
6 | return
7 | fi
8 |
9 | # Customize via ~/.rainbarf.conf
10 | stats=$(rainbarf --tmux)
11 | if [ -n "$stats" ]; then
12 | echo "$stats";
13 | fi
14 | return 0
15 | }
16 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/vcs_branch.sh:
--------------------------------------------------------------------------------
1 | # Prints current branch in a VCS directory if it could be detected.
2 |
3 | # Source lib to get the function get_tmux_pwd
4 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
5 |
6 | branch_symbol="⭠"
7 | git_colour="5"
8 | svn_colour="220"
9 | hg_colour="45"
10 |
11 |
12 | run_segment() {
13 | tmux_path=$(get_tmux_cwd)
14 | cd "$tmux_path"
15 | branch=""
16 | if [ -n "${git_branch=$(__parse_git_branch)}" ]; then
17 | branch="$git_branch"
18 | elif [ -n "${svn_branch=$(__parse_svn_branch)}" ]; then
19 | branch="$svn_branch"
20 | elif [ -n "${hg_branch=$(__parse_hg_branch)}" ]; then
21 | branch="$hg_branch"
22 | fi
23 |
24 | if [ -n "$branch" ]; then
25 | echo "${branch}"
26 | fi
27 | return 0
28 | }
29 |
30 |
31 | # Show git banch.
32 | __parse_git_branch() {
33 | type git >/dev/null 2>&1
34 | if [ "$?" -ne 0 ]; then
35 | return
36 | fi
37 |
38 | #git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
39 |
40 | # Quit if this is not a Git repo.
41 | branch=$(git symbolic-ref HEAD 2> /dev/null)
42 | if [[ -z $branch ]] ; then
43 | # attempt to get short-sha-name
44 | branch=":$(git rev-parse --short HEAD 2> /dev/null)"
45 | fi
46 | if [ "$?" -ne 0 ]; then
47 | # this must not be a git repo
48 | return
49 | fi
50 |
51 | # Clean off unnecessary information.
52 | branch=${branch##*/}
53 |
54 | echo -n "#[fg=colour${git_colour}]${branch_symbol} #[fg=colour${TMUX_POWERLINE_CUR_SEGMENT_FG}]${branch}"
55 | }
56 |
57 | # Show SVN branch.
58 | __parse_svn_branch() {
59 | type svn >/dev/null 2>&1
60 | if [ "$?" -ne 0 ]; then
61 | return
62 | fi
63 |
64 | local svn_info=$(svn info 2>/dev/null)
65 | if [ -z "${svn_info}" ]; then
66 | return
67 | fi
68 |
69 |
70 | local svn_root=$(echo "${svn_info}" | sed -ne 's#^Repository Root: ##p')
71 | local svn_url=$(echo "${svn_info}" | sed -ne 's#^URL: ##p')
72 |
73 | local branch=$(echo "${svn_url}" | egrep -o '[^/]+$')
74 | echo "#[fg=colour${svn_colour}]${branch_symbol} #[fg=colour${TMUX_POWERLINE_CUR_SEGMENT_FG}]${branch}"
75 | }
76 |
77 | __parse_hg_branch() {
78 | type hg >/dev/null 2>&1
79 | if [ "$?" -ne 0 ]; then
80 | return
81 | fi
82 |
83 | summary=$(hg summary)
84 | if [ "$?" -ne 0 ]; then
85 | return
86 | fi
87 |
88 | local branch=$(echo "$summary" | grep 'branch:' | cut -d ' ' -f2)
89 | echo "#[fg=colour${hg_colour}]${branch_symbol} #[fg=colour${TMUX_POWERLINE_CUR_SEGMENT_FG}]${branch}"
90 | }
91 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/vcs_compare.sh:
--------------------------------------------------------------------------------
1 | # This checks if the current branch is ahead of
2 | # or behind the remote branch with which it is tracked
3 |
4 | # Source lib to get the function get_tmux_pwd
5 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
6 |
7 | flat_symbol="⤚"
8 |
9 | run_segment() {
10 | tmux_path=$(get_tmux_cwd)
11 | cd "$tmux_path"
12 | stats=""
13 | if [ -n "${git_stats=$(__parse_git_stats)}" ]; then
14 | stats="$git_stats"
15 | elif [ -n "${svn_stats=$(__parse_svn_stats)}" ]; then
16 | stats="$svn_stats"
17 | elif [ -n "${hg_stats=$(__parse_hg_stats)}" ]; then
18 | stats="$hg_stats"
19 | fi
20 |
21 | if [ -n "$stats" ]; then
22 | echo "${stats}"
23 | fi
24 | return 0
25 | }
26 |
27 | __parse_git_stats() {
28 | type git >/dev/null 2>&1
29 | if [ "$?" -ne 0 ]; then
30 | return
31 | fi
32 |
33 | # check if git
34 | [[ -z $(git rev-parse --git-dir 2> /dev/null) ]] && return
35 |
36 | tracking_branch=$(git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD))
37 |
38 | # creates global variables $1 and $2 based on left vs. right tracking
39 | set -- $(git rev-list --left-right --count $tracking_branch...HEAD)
40 |
41 | behind=$1
42 | ahead=$2
43 |
44 | # print out the information
45 | if [[ $behind -gt 0 ]] ; then
46 | local ret="↓ $behind"
47 | fi
48 | if [[ $ahead -gt 0 ]] ; then
49 | local ret="${ret}↑ $ahead"
50 | fi
51 | echo "$ret"
52 | }
53 |
54 | __parse_hg_stats() {
55 | type hg >/dev/null 2>&1
56 | if [ "$?" -ne 0 ]; then
57 | return
58 | fi
59 | # not yet implemented
60 | }
61 |
62 | __parse_svn_stats() {
63 | type svn >/dev/null 2>&1
64 | if [ "$?" -ne 0 ]; then
65 | return
66 | fi
67 | # not yet implemented
68 | }
69 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/vcs_modified.sh:
--------------------------------------------------------------------------------
1 | # This checks if the current branch is ahead of
2 | # or behind the remote branch with which it is tracked
3 |
4 | # Source lib to get the function get_tmux_pwd
5 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
6 |
7 | mod_symbol="﹢"
8 |
9 | run_segment() {
10 | tmux_path=$(get_tmux_cwd)
11 | cd "$tmux_path"
12 |
13 | stats=""
14 | if [ -n "${git_stats=$(__parse_git_stats)}" ]; then
15 | stats="$git_stats"
16 | elif [ -n "${svn_stats=$(__parse_svn_stats)}" ]; then
17 | stats="$svn_stats"
18 | elif [ -n "${hg_stats=$(__parse_hg_stats)}" ]; then
19 | stats="$hg_stats"
20 | fi
21 | if [[ -n "$stats" && $stats -gt 0 ]]; then
22 | echo "${mod_symbol}${stats}"
23 | fi
24 | }
25 |
26 | __parse_git_stats(){
27 | type git >/dev/null 2>&1
28 | if [ "$?" -ne 0 ]; then
29 | return
30 | fi
31 |
32 | # check if git
33 | [[ -z $(git rev-parse --git-dir 2> /dev/null) ]] && return
34 |
35 | # return the number of staged items
36 | staged=$(git ls-files --modified | wc -l)
37 | echo $staged
38 | }
39 | __parse_hg_stats(){
40 | type hg >/dev/null 2>&1
41 | if [ "$?" -ne 0 ]; then
42 | return
43 | fi
44 | # not yet implemented
45 | }
46 | __parse_svn_stats() {
47 | type svn >/dev/null 2>&1
48 | if [ "$?" -ne 0 ]; then
49 | return
50 | fi
51 |
52 | local svn_info=$(svn info 2>/dev/null)
53 | if [ -z "${svn_info}" ]; then
54 | return
55 | fi
56 |
57 | local svn_wcroot=$(echo "${svn_info}" | sed -ne 's#^Working Copy Root Path: ##p')
58 | local svn_st=$(cd "${svn_wcroot}"; svn st)
59 | local modified=$(echo "${svn_st}" | egrep '^M' | wc -l)
60 | local conflicted=$(echo "${svn_st}" | egrep '^!?\s*C' | wc -l)
61 |
62 | #print
63 | if [[ $modified -gt 0 ]] ; then
64 | local ret="#[fg=colour${TMUX_POWERLINE_CUR_SEGMENT_FG}]±${modified}"
65 | fi
66 | if [[ $conflicted -gt 0 ]] ; then
67 | local ret="#[fg=colour${svn_colour}]ϟ${conflicted} ${ret}"
68 | fi
69 | echo "${ret}"
70 | }
71 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/vcs_others.sh:
--------------------------------------------------------------------------------
1 | # This checks if the current branch is ahead of or behind the remote branch with which it is tracked.
2 |
3 | # Source lib to get the function get_tmux_pwd
4 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
5 |
6 | other_symbol="⋯ "
7 |
8 | run_segment() {
9 | tmux_path=$(get_tmux_cwd)
10 | cd "$tmux_path"
11 | stats=""
12 | if [ -n "${git_stats=$(__parse_git_stats)}" ]; then
13 | stats="$git_stats"
14 | elif [ -n "${svn_stats=$(__parse_svn_stats)}" ]; then
15 | stats="$svn_stats"
16 | elif [ -n "${hg_stats=$(__parse_hg_stats)}" ]; then
17 | stats="$hg_stats"
18 | fi
19 | if [[ -n "$stats" && $stats -gt 0 ]]; then
20 | echo "${other_symbol}${stats}"
21 | fi
22 | return 0
23 | }
24 |
25 | __parse_git_stats(){
26 | type git >/dev/null 2>&1
27 | if [ "$?" -ne 0 ]; then
28 | return
29 | fi
30 |
31 | # check if git
32 | [[ -z $(git rev-parse --git-dir 2> /dev/null) ]] && return
33 |
34 | # return the number of staged items
35 | other=$(git ls-files --others --exclude-standard | wc -l)
36 | echo $other
37 | }
38 | __parse_hg_stats(){
39 | type svn >/dev/null 2>&1
40 | if [ "$?" -ne 0 ]; then
41 | return
42 | fi
43 | # not yet implemented
44 | }
45 | __parse_svn_stats(){
46 | type hg >/dev/null 2>&1
47 | if [ "$?" -ne 0 ]; then
48 | return
49 | fi
50 | # not yet implemented
51 | }
52 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/vcs_revision.sh:
--------------------------------------------------------------------------------
1 | # This prints the vcs revision in the working directory
2 | # currently only used in SVN
3 |
4 | # Source lib to get the function get_tmux_pwd
5 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
6 |
7 | run_segment() {
8 | tmux_path=$(get_tmux_cwd)
9 | cd "$tmux_path"
10 |
11 | stats=""
12 | if [[ -n "${svn_stats=$(__parse_svn_stats)}" ]]; then
13 | stats="$svn_stats"
14 | elif [[ -n "${hg_stats=$(__parse_hg_stats)}" ]]; then
15 | stats="$hg_stats"
16 | fi
17 | if [[ -n "$stats" ]]; then
18 | echo "${stats}"
19 | fi
20 | }
21 |
22 | __parse_hg_stats(){
23 | type hg >/dev/null 2>&1
24 | if [ "$?" -ne 0 ]; then
25 | return
26 | fi
27 | # not yet implemented
28 | }
29 | __parse_svn_stats(){
30 | type svn >/dev/null 2>&1
31 | if [ "$?" -ne 0 ]; then
32 | return
33 | fi
34 |
35 | local svn_info=$(svn info 2>/dev/null)
36 | if [ -z "${svn_info}" ]; then
37 | return
38 | fi
39 |
40 | local svn_ref=$(echo "${svn_info}" | sed -ne 's#^Revision: ##p')
41 |
42 | echo "r${svn_ref}"
43 | }
44 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/vcs_staged.sh:
--------------------------------------------------------------------------------
1 | # This checks if the current branch is ahead of
2 | # or behind the remote branch with which it is tracked
3 |
4 | # Source lib to get the function get_tmux_pwd
5 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
6 |
7 | staged_symbol="⊕ "
8 |
9 | run_segment() {
10 | tmux_path=$(get_tmux_cwd)
11 | cd "$tmux_path"
12 |
13 | stats=""
14 | if [ -n "${git_stats=$(__parse_git_stats)}" ]; then
15 | stats="$git_stats"
16 | elif [ -n "${svn_stats=$(__parse_svn_stats)}" ]; then
17 | stats="$svn_stats"
18 | elif [ -n "${hg_stats=$(__parse_hg_stats)}" ]; then
19 | stats="$hg_stats"
20 | fi
21 | if [[ -n "$stats" && $stats -gt 0 ]]; then
22 | stats=$(echo $stats | sed -e "s/^[ \t]*//")
23 | echo "${staged_symbol}${stats}"
24 | fi
25 | return 0
26 | }
27 |
28 |
29 | __parse_git_stats(){
30 | type git >/dev/null 2>&1
31 | if [ "$?" -ne 0 ]; then
32 | return
33 | fi
34 |
35 | # Check if git.
36 | [[ -z $(git rev-parse --git-dir 2> /dev/null) ]] && return
37 |
38 | # Return the number of staged items.
39 | staged=$(git diff --staged --name-status | wc -l)
40 | echo "$staged"
41 | }
42 |
43 | __parse_hg_stats(){
44 | type svn >/dev/null 2>&1
45 | if [ "$?" -ne 0 ]; then
46 | return
47 | fi
48 | # not yet implemented
49 | }
50 |
51 | __parse_svn_stats(){
52 | type hg >/dev/null 2>&1
53 | if [ "$?" -ne 0 ]; then
54 | return
55 | fi
56 | # not yet implemented
57 | }
58 |
--------------------------------------------------------------------------------
/tmux-powerline/segments.disabled/wan_ip.sh:
--------------------------------------------------------------------------------
1 | # Prints the WAN IP address. The result is cached and updated according to $update_period.
2 |
3 |
4 | run_segment() {
5 | local tmp_file="${TMUX_POWERLINE_DIR_TEMPORARY}/wan_ip.txt"
6 | local wan_ip
7 |
8 | if [ -f "$tmp_file" ]; then
9 | if shell_is_osx || shell_is_bsd; then
10 | last_update=$(stat -f "%m" ${tmp_file})
11 | elif shell_is_linux; then
12 | last_update=$(stat -c "%Y" ${tmp_file})
13 | fi
14 |
15 | time_now=$(date +%s)
16 | update_period=900
17 | up_to_date=$(echo "(${time_now}-${last_update}) < ${update_period}" | bc)
18 |
19 | if [ "$up_to_date" -eq 1 ]; then
20 | wan_ip=$(cat ${tmp_file})
21 | fi
22 | fi
23 |
24 | if [ -z "$wan_ip" ]; then
25 | wan_ip=$(curl --max-time 2 -s http://whatismyip.akamai.com/)
26 |
27 | if [ "$?" -eq "0" ]; then
28 | echo "${wan_ip}" > $tmp_file
29 | elif [ -f "${tmp_file}" ]; then
30 | wan_ip=$(cat "$tmp_file")
31 | fi
32 | fi
33 |
34 | if [ -n "$wan_ip" ]; then
35 | echo "ⓦ ${wan_ip}"
36 | fi
37 |
38 | return 0
39 | }
40 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/Makefile:
--------------------------------------------------------------------------------
1 | # Build the small MPD NP program.
2 | # Enable debug printing with $ make -e DEBUG=1
3 | DEBUG=0
4 | CC = $(shell hash clang 2>/dev/null && echo clang || echo gcc)
5 | CFLAGS = -O3 -Wall -std=c99 -I /usr/include/ -D DEBUG=${DEBUG}
6 | LDLIBS = -lmpdclient
7 | XKB_LAYOUT_LDLIBS= -lX11
8 |
9 | .PHONY: all clean
10 |
11 | all: np_mpd xkb_layout
12 |
13 | xkb_layout: xkb_layout.c
14 | $(CC) $(CFLAGS) $(LDFLAGS) $< $(XKB_LAYOUT_LDLIBS) -o $@
15 |
16 | clean:
17 | $(RM) np_mpd
18 | $(RM) xkb_layout
19 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/cpu.sh:
--------------------------------------------------------------------------------
1 | # Prints the CPU usage: user% sys% idle.
2 |
3 | run_segment() {
4 | if shell_is_linux; then
5 | cpu_line=$(top -b -n 1 | grep "Cpu(s)" )
6 | cpu_user=$(echo "$cpu_line" | grep -Po "(\d+(.\d+)?)(?=%?\s?(us(er)?))")
7 | cpu_system=$(echo "$cpu_line" | grep -Po "(\d+(.\d+)?)(?=%?\s?(sys?))")
8 | cpu_idle=$(echo "$cpu_line" | grep -Po "(\d+(.\d+)?)(?=%?\s?(id(le)?))")
9 | elif shell_is_osx; then
10 | cpus_line=$(top -e -l 1 | grep "CPU usage:" | sed 's/CPU usage: //')
11 | cpu_user=$(echo "$cpus_line" | awk '{print $1}' | sed 's/%//' )
12 | cpu_system=$(echo "$cpus_line" | awk '{print $3}'| sed 's/%//' )
13 | cpu_idle=$(echo "$cpus_line" | awk '{print $5}' | sed 's/%//' )
14 | fi
15 |
16 | if [ -n "$cpu_user" ] && [ -n "$cpu_system" ] && [ -n "$cpu_idle" ]; then
17 | echo "${cpu_user}, ${cpu_system}, ${cpu_idle}" | awk -F', ' '{printf("%5.1f,%5.1f,%5.1f",$1,$2,$3)}'
18 | return 0
19 | else
20 | return 1
21 | fi
22 | }
23 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/date.sh:
--------------------------------------------------------------------------------
1 | # Print the current date.
2 |
3 | TMUX_POWERLINE_SEG_DATE_FORMAT_DEFAULT="%F"
4 |
5 | generate_segmentrc() {
6 | read -d '' rccontents << EORC
7 | # date(1) format for the date. If you don't, for some reason, like ISO 8601 format you might want to have "%D" or "%m/%d/%Y".
8 | export TMUX_POWERLINE_SEG_DATE_FORMAT="${TMUX_POWERLINE_SEG_DATE_FORMAT_DEFAULT}"
9 | EORC
10 | echo "$rccontents"
11 | }
12 |
13 | __process_settings() {
14 | if [ -z "$TMUX_POWERLINE_SEG_DATE_FORMAT" ]; then
15 | export TMUX_POWERLINE_SEG_DATE_FORMAT="${TMUX_POWERLINE_SEG_DATE_FORMAT_DEFAULT}"
16 | fi
17 | }
18 |
19 | run_segment() {
20 | __process_settings
21 | date +"$TMUX_POWERLINE_SEG_DATE_FORMAT"
22 | return 0
23 | }
24 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/date_day.sh:
--------------------------------------------------------------------------------
1 | # Prints the name of the current day.
2 |
3 | run_segment() {
4 | date +"%a"
5 | return 0
6 | }
7 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/hostname.sh:
--------------------------------------------------------------------------------
1 | # Prints the hostname.
2 |
3 | TMUX_POWERLINE_SEG_HOSTNAME_FORMAT_DEFAULT="short"
4 |
5 | generate_segmentrc() {
6 | read -d '' rccontents << EORC
7 | # Use short or long format for the hostname. Can be {"short, long"}.
8 | export TMUX_POWERLINE_SEG_HOSTNAME_FORMAT="${TMUX_POWERLINE_SEG_HOSTNAME_FORMAT_DEFAULT}"
9 | EORC
10 | echo "$rccontents"
11 | }
12 |
13 | __process_settings() {
14 | if [ -z "$TMUX_POWERLINE_SEG_HOSTNAME_FORMAT" ]; then
15 | export TMUX_POWERLINE_SEG_HOSTNAME_FORMAT="${TMUX_POWERLINE_SEG_HOSTNAME_FORMAT_DEFAULT}"
16 | fi
17 | }
18 | run_segment() {
19 | __process_settings
20 | local opts=""
21 | if [ "$TMUX_POWERLINE_SEG_HOSTNAME_FORMAT" == "short" ]; then
22 | if shell_is_osx || shell_is_bsd; then
23 | opts="-s"
24 | else
25 | opts="--short"
26 | fi
27 | fi
28 |
29 | hostname ${opts}
30 | return 0
31 | }
32 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/load.sh:
--------------------------------------------------------------------------------
1 | # Print the average load.
2 |
3 | run_segment() {
4 | uptime | cut -d "," -f 3- | cut -d ":" -f2 | sed -e "s/^[ \t]*//"
5 | exit 0
6 | }
7 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/mailcount_apple_mail.script:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env osascript
2 | # Returns the number of unread mails in the INBOX of Apple Mail.
3 |
4 | tell application "System Events"
5 | set process_list to (name of every process)
6 | end tell
7 |
8 | if process_list contains "Mail" then
9 | tell application "Mail"
10 | if unread count of inbox > 0 then
11 | set a to unread count of inbox
12 | end if
13 | end tell
14 | end if
15 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/pwd.sh:
--------------------------------------------------------------------------------
1 | # Print the current working directory (trimmed to max length).
2 | # NOTE The trimming code's stolen from the web. Courtesy to who ever wrote it.
3 |
4 | # Source lib to get the function get_tmux_pwd
5 | source "${TMUX_POWERLINE_DIR_LIB}/tmux_adapter.sh"
6 |
7 | TMUX_POWERLINE_SEG_PWD_MAX_LEN_DEFAULT="40"
8 |
9 | generate_segmentrc() {
10 | read -d '' rccontents << EORC
11 | # Maximum length of output.
12 | export TMUX_POWERLINE_SEG_PWD_MAX_LEN="${TMUX_POWERLINE_SEG_PWD_MAX_LEN_DEFAULT}"
13 | EORC
14 | echo "$rccontents"
15 | }
16 |
17 | __process_settings() {
18 | if [ -z "$TMUX_POWERLINE_SEG_PWD_MAX_LEN" ]; then
19 | export TMUX_POWERLINE_SEG_PWD_MAX_LEN="${TMUX_POWERLINE_SEG_PWD_MAX_LEN_DEFAULT}"
20 | fi
21 | }
22 |
23 | run_segment() {
24 | __process_settings
25 | # Truncate from the left.
26 | tcwd=$(get_tmux_cwd)
27 | trunc_symbol="···"
28 | dir=${tcwd##*/}
29 | local max_len="$TMUX_POWERLINE_SEG_PWD_MAX_LEN"
30 | max_len=$(( ( max_len < ${#dir} ) ? ${#dir} : max_len ))
31 | ttcwd=${tcwd/#$HOME/\~}
32 | pwdoffset=$(( ${#ttcwd} - max_len ))
33 | if [ ${pwdoffset} -gt "0" ]; then
34 | ttcwd=${ttcwd:$pwdoffset:$max_len}
35 | ttcwd=${trunc_symbol}/${ttcwd#*/}
36 | fi
37 | echo "$ttcwd"
38 | return 0
39 | }
40 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/time.sh:
--------------------------------------------------------------------------------
1 | # Prints the current time.
2 |
3 | TMUX_POWERLINE_SEG_TIME_FORMAT_DEFAULT="%H:%M"
4 |
5 | generate_segmentrc() {
6 | read -d '' rccontents << EORC
7 | # date(1) format for the time. Americans might want to have "%I:%M %p".
8 | export TMUX_POWERLINE_SEG_TIME_FORMAT="${TMUX_POWERLINE_SEG_TIME_FORMAT_DEFAULT}"
9 | EORC
10 | echo "$rccontents"
11 | }
12 |
13 | __process_settings() {
14 | if [ -z "$TMUX_POWERLINE_SEG_TIME_FORMAT" ]; then
15 | export TMUX_POWERLINE_SEG_TIME_FORMAT="${TMUX_POWERLINE_SEG_TIME_FORMAT_DEFAULT}"
16 | fi
17 | }
18 |
19 | run_segment() {
20 | __process_settings
21 | date +"$TMUX_POWERLINE_SEG_TIME_FORMAT"
22 | return 0
23 | }
24 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/tmux_mem_cpu_load.sh:
--------------------------------------------------------------------------------
1 | # Print out Memory, cpu and load using https://github.com/thewtex/tmux-mem-cpu-load
2 |
3 | run_segment() {
4 | type tmux-mem-cpu-load >/dev/null 2>&1
5 | if [ "$?" -ne 0 ]; then
6 | return
7 | fi
8 |
9 | stats=$(tmux-mem-cpu-load)
10 | if [ -n "$stats" ]; then
11 | echo "$stats";
12 | fi
13 | return 0
14 | }
15 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/tmux_session_info.sh:
--------------------------------------------------------------------------------
1 | # Prints tmux session info.
2 | # Assuems that [ -n "$TMUX"].
3 |
4 | run_segment() {
5 | tmux display-message -p '#S:#I.#P'
6 | return 0
7 | }
8 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/uptime.sh:
--------------------------------------------------------------------------------
1 | # Prints the uptime.
2 |
3 | run_segment() {
4 | uptime | grep -PZo "(?<=up )[^,]*"
5 | return 0
6 | }
7 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/utc_time.sh:
--------------------------------------------------------------------------------
1 | # Prints the current time in UTC.
2 |
3 | run_segment() {
4 | date -u +"%H:%M"
5 | return 0
6 | }
7 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/xkb_layout.c:
--------------------------------------------------------------------------------
1 | /* xkb_layout
2 | * Description:
3 | * This program will connect to the X Server and print the id of the currently
4 | * active keyboard layout.
5 | */
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | #ifdef DEBUG
13 | #define DO_DEBUG DEBUG
14 | #else
15 | #define DO_DEBUG 0
16 | #endif
17 | #define DEBUG_PRINTF(...) do{ if (DO_DEBUG) { printf(__VA_ARGS__);} } while(0)
18 |
19 | int main() {
20 | // Get X display
21 | char *displayName = "";
22 | int eventCode;
23 | int errorReturn;
24 | int major = XkbMajorVersion;
25 | int minor = XkbMinorVersion;;
26 | int reasonReturn;
27 | Display *_display = XkbOpenDisplay(displayName, &eventCode, &errorReturn,
28 | &major, &minor, &reasonReturn);
29 | bool error = false;
30 | switch (reasonReturn) {
31 | case XkbOD_BadLibraryVersion:
32 | DEBUG_PRINTF("Bad XKB library version.\n");
33 | error = true;
34 | break;
35 | case XkbOD_ConnectionRefused:
36 | DEBUG_PRINTF("Connection to X server refused.\n");
37 | error = true;
38 | break;
39 | case XkbOD_BadServerVersion:
40 | DEBUG_PRINTF("Bad X11 server version.\n");
41 | error = true;
42 | break;
43 | case XkbOD_NonXkbServer:
44 | DEBUG_PRINTF("XKB not present.\n");
45 | error = true;
46 | break;
47 | case XkbOD_Success:
48 | break;
49 | }
50 |
51 | if (error) {
52 | return EXIT_FAILURE;
53 | }
54 |
55 | // Get current state of keyboard.
56 | int _deviceId = XkbUseCoreKbd;
57 | XkbStateRec xkbState;
58 | XkbGetState(_display, _deviceId, &xkbState);
59 | // print the groupnumber, may be used with setxkbmap -query to get name
60 | // of current layout
61 | printf("%d\n", xkbState.group);
62 | return 0;
63 | return EXIT_SUCCESS;
64 | }
65 |
--------------------------------------------------------------------------------
/tmux-powerline/segments/xkb_layout.sh:
--------------------------------------------------------------------------------
1 | # Print the currently used keyboard layout
2 | # This depends on a specifically developed program which prints the group id of
3 | # the currently used layout.
4 | # I developed the simple program myself with some guidance as I was unable to
5 | # find anything already developed.
6 | # Some people might suggest:
7 | # $ setxkbmod -query -v | awk -F "+" '{print $2}'
8 | # this will only work if you have set up XKB with a single layout which is true
9 | # for some.
10 |
11 | # This script will print the correct layout even if layout is set per window.
12 | # Exit if platform is not linux as this script is dependant on X11
13 |
14 | run_segment() {
15 | if ! shell_is_linux; then
16 | return 1
17 | fi
18 |
19 | cd "$TMUX_POWERLINE_DIR_SEGMENTS"
20 | if [ ! -x "xkb_layout" ]; then
21 | make clean xkb_layout &>/dev/null
22 | fi
23 |
24 | if [ -x ./xkb_layout ]; then
25 | cur_layout_nbr=$(($(./xkb_layout)+1));
26 | cur_layout=$(setxkbmap -query | grep layout | sed 's/layout:\s\+//g' | \
27 | awk -F ',' '{print $'$(echo "$cur_layout_nbr")'}')
28 | echo "⌨ $cur_layout"
29 | else
30 | return 1
31 | fi
32 | }
33 |
--------------------------------------------------------------------------------
/tmux-powerline/themes/default.sh:
--------------------------------------------------------------------------------
1 | # Default Theme
2 |
3 | if patched_font_in_use; then
4 | TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="⮂"
5 | TMUX_POWERLINE_SEPARATOR_LEFT_THIN="⮃"
6 | TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="⮀"
7 | TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="⮁"
8 | else
9 | TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀"
10 | TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮"
11 | TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶"
12 | TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="❯"
13 | fi
14 |
15 | TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'235'}
16 | TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'}
17 |
18 | TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}
19 | TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}
20 |
21 |
22 | # Format: segment_name background_color foreground_color [non_default_separator]
23 |
24 | if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then
25 | TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
26 | "tmux_session_info 148 234" \
27 | "hostname 33 0" \
28 | #"ifstat 30 255" \
29 | #"ifstat_sys 30 255" \
30 | "lan_ip 24 255 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}" \
31 | "wan_ip 24 255" \
32 | "vcs_branch 29 88" \
33 | "vcs_compare 60 255" \
34 | "vcs_staged 64 255" \
35 | "vcs_modified 9 255" \
36 | "vcs_others 245 0" \
37 | )
38 | fi
39 |
40 | if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then
41 | TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
42 | #"earthquake 3 0" \
43 | "pwd 89 211" \
44 | "mailcount 9 255" \
45 | "now_playing 234 37" \
46 | #"cpu 240 136" \
47 | "load 237 167" \
48 | #"tmux_mem_cpu_load 234 136" \
49 | "battery 137 127" \
50 | "weather 37 255" \
51 | #"rainbarf 0 0" \
52 | #"xkb_layout 125 117" \
53 | "date_day 235 136" \
54 | "date 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
55 | "time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
56 | #"utc_time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
57 | )
58 | fi
59 |
--------------------------------------------------------------------------------
/urlview:
--------------------------------------------------------------------------------
1 | COMMAND ~/dotfiles/urlview_wrapper.sh
2 |
--------------------------------------------------------------------------------
/user-dirs.dirs:
--------------------------------------------------------------------------------
1 | XDG_DESKTOP_DIR="$HOME/Desktop"
2 | XDG_DOCUMENTS_DIR="$HOME/Documents"
3 | XDG_DOWNLOAD_DIR="$HOME/Downloads"
4 | XDG_MUSIC_DIR="$HOME/Music"
5 | XDG_PICTURES_DIR="$HOME/Pictures"
6 | XDG_PUBLICSHARE_DIR="$HOME/Public"
7 | XDG_TEMPLATES_DIR="$HOME/Templates"
8 | XDG_VIDEOS_DIR="$HOME/Videos"
9 |
--------------------------------------------------------------------------------
/yazi/theme.toml:
--------------------------------------------------------------------------------
1 | [flavor]
2 | use = "catppuccin-mocha"
3 |
4 |
--------------------------------------------------------------------------------
/ytfzf/conf.sh:
--------------------------------------------------------------------------------
1 |
2 |
3 | external_menu () {
4 | . ~/dotfiles/scripts/colorargs.sh
5 | #use rofi instead of dmenu
6 | bemenu -l 10 --fn "$BEMENU_FONT" -p "$1"
7 | }
8 |
--------------------------------------------------------------------------------
/zathura/zathurarc:
--------------------------------------------------------------------------------
1 | map f toggle_fullscreen
2 | map fullscreen f change_mode normal
3 | map F follow
4 |
--------------------------------------------------------------------------------