From 2718a4de5389cfe5287f2289b0e46d8509e2aeab Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Sun, 25 Feb 2024 23:40:42 +0100 Subject: . --- drawio/drawio | 2 +- foot/foot.ini | 41 +++++++++++------------ git/.gitconfig | 2 +- install.sh | 8 ++--- numen/phrases/main.phrases | 15 +++++++++ numen/scripts/radio.sh | 31 +++++++++++++++++ nvim/init.lua | 55 +++++++++++++++++-------------- shell/.profile | 1 + shell/zsh/.zshrc | 23 +++++++------ sublime-text/Preferences.sublime-settings | 1 + sway/init.sh | 6 ++++ sway/terminal.sh | 8 ++--- 12 files changed, 126 insertions(+), 67 deletions(-) create mode 100644 numen/phrases/main.phrases create mode 100755 numen/scripts/radio.sh diff --git a/drawio/drawio b/drawio/drawio index 4bb3cd9..fab29b2 100755 --- a/drawio/drawio +++ b/drawio/drawio @@ -10,4 +10,4 @@ else args="" fi -exec electron25 $args /usr/lib/draw.io "$@" +exec ~/.local/opt/drawio.AppImage $args "$@" diff --git a/foot/foot.ini b/foot/foot.ini index 65affb1..70555b8 100644 --- a/foot/foot.ini +++ b/foot/foot.ini @@ -34,7 +34,7 @@ line-height=20 # workers= # include=/usr/share/foot/themes/monokai-pro -include=/usr/share/foot/themes/tango +# include=/usr/share/foot/themes/tango [environment] # name=value @@ -60,7 +60,7 @@ include=/usr/share/foot/themes/tango [cursor] # style=block -# color= +color=000000 babdb6 # blink=no # beam-thickness=1.5 # underline-thickness= @@ -71,30 +71,27 @@ include=/usr/share/foot/themes/tango [colors] alpha=1.0 -foreground=dcdcdc -# foreground=dcdccc -# background=111111 -# background=080808 +foreground=eaeaea +background=000000 ## Normal/regular colors (color palette 0-7) -# regular0=222222 # black -# regular1=cc9393 # red -# regular2=7f9f7f # green -# regular3=d0bf8f # yellow -# regular4=6ca0a3 # blue -# regular5=dc8cc3 # magenta -# regular6=93e0e3 # cyan -# regular7=dcdccc # white -regular7=dcdcdc +regular0=000000 # black +regular1=d54e53 # red +regular2=00af00 # green +regular3=e6c547 # yellow +regular4=7aa6da # blue +regular5=c397d8 # magenta +regular6=70c0ba # cyan +regular7=ffffff # white ## Bright colors (color palette 8-15) -# bright0=666666 # bright black -# bright1=dca3a3 # bright red -# bright2=bfebbf # bright green -# bright3=f0dfaf # bright yellow -# bright4=8cd0d3 # bright blue -# bright5=fcace3 # bright magenta -# bright6=b3ffff # bright cyan +bright0=666666 # bright black +bright1=ff3334 # bright red +bright2=00cf00 # bright green +bright3=e7c547 # bright yellow +bright4=7aa6da # bright blue +bright5=b77ee0 # bright magenta +bright6=54ced6 # bright cyan bright7=ffffff # bright white ## dimmed colors (see foot.ini(5) man page) diff --git a/git/.gitconfig b/git/.gitconfig index 1da265b..7abe96e 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,7 +1,7 @@ [user] name = bozo.kopic email = bozo@kopic.xyz - signingkey = CC79457AF7EEDD5558E3D8303BFE72132DE3F554 + signingkey = 1E5A7C9229CE0BEE9488499B61E770F9ED93DF2A [http] sslVerify = false [branch] diff --git a/install.sh b/install.sh index 532f357..54f878f 100755 --- a/install.sh +++ b/install.sh @@ -6,10 +6,7 @@ symlink () { ln -sfT "$@" } -if [ ! -d "$HOME" ]; then - echo "invalid \$HOME" - exit 1 -fi +: ${HOME:?} DOTFILES_DIR=$HOME/.dotfiles CONFIG_DIR=$HOME/.config @@ -104,6 +101,9 @@ symlink $DOTFILES_DIR/lock/lock.desktop $APP_DIR/lock.desktop # neomutt symlink $DOTFILES_DIR/neomutt $CONFIG_DIR/neomutt +# numen +symlink $DOTFILES_DIR/numen $CONFIG_DIR/numen + # pictures symlink $DOTFILES_DIR/pictures $PICTURES_DIR diff --git a/numen/phrases/main.phrases b/numen/phrases/main.phrases new file mode 100644 index 0000000..6fe7668 --- /dev/null +++ b/numen/phrases/main.phrases @@ -0,0 +1,15 @@ + +lisa exit please: run killall numen + +lisa desk stand please: run ~/.local/opt/venvs/python311/bin/idasen stand +lisa desk sit please: run ~/.local/opt/venvs/python311/bin/idasen sit + +lisa volume mute please: run pulsemixer --mute +lisa volume un mute please: run pulsemixer --unmute +lisa volume up please: run pulsemixer --change-volume +10 +lisa volume down please: run pulsemixer --change-volume -10 +lisa volume thirty please: run pulsemixer --set-volume 30 + +lisa turn on radio peak please: run ~/.config/numen/scripts/radio.sh sljeme & +lisa turn on radio student please: run ~/.config/numen/scripts/radio.sh student & +lisa turn off radio please: run ~/.config/numen/scripts/radio.sh & diff --git a/numen/scripts/radio.sh b/numen/scripts/radio.sh new file mode 100755 index 0000000..e573894 --- /dev/null +++ b/numen/scripts/radio.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +set -e + +if [ ! -d "$NUMEN_STATE_DIR" ]; then + exit 1 +fi + +PID_PATH=$NUMEN_STATE_DIR/radio.pid +PID=$(cat $PID_PATH 2> /dev/null || true) + +if [ ! -z "$PID" ]; then + kill -- $PID $(ps --ppid $PID -o pid=) || true + waitpid $PID || true + rm -f $PID_PATH +fi + +if [ -z "$1" ]; then + exit 0 +fi + +if ! command -v "radio-$1" > /dev/null; then + exit 1 +fi + +(echo $$ > $PID_PATH) + +trap "exit 1" HUP INT PIPE QUIT TERM +trap "rm -rf $PID_PATH" EXIT + +radio-$1 > /dev/null 2>&1 diff --git a/nvim/init.lua b/nvim/init.lua index 2226b2d..9e9ebae 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -40,6 +40,11 @@ vim.o.fileformats = "unix,dos" vim.g.vim_json_conceal = 0 vim.g.markdown_syntax_conceal = 0 -- autocmd FileType json set conceallevel=0 +vim.o.conceallevel = 0 +vim.api.nvim_create_autocmd({"FileType"}, { + pattern = "json", + command = "set conceallevel=0" +}) -- show line numbers vim.o.number = true @@ -278,17 +283,17 @@ require('packer').startup { end } - use { - 'wfxr/minimap.vim', - after = { - 'monokai.nvim' - }, - config = function() - vim.g.minimap_highlight_range = 1 - vim.g.minimap_git_colors = 1 - vim.keymap.set('', '', vim.cmd.MinimapToggle) - end - } + -- use { + -- 'wfxr/minimap.vim', + -- after = { + -- 'monokai.nvim' + -- }, + -- config = function() + -- vim.g.minimap_highlight_range = 1 + -- vim.g.minimap_git_colors = 1 + -- vim.keymap.set('', '', vim.cmd.MinimapToggle) + -- end + -- } use { 'numToStr/Comment.nvim', @@ -299,20 +304,20 @@ require('packer').startup { use 'rafamadriz/neon' - use { - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate', - config = function() - require('nvim-treesitter.configs').setup { - ensure_installed = { - 'python', 'bash', 'lua', 'javascript', 'c', 'json', 'html' - }, - highlight = { - enable = true - } - } - end - } + -- use { + -- 'nvim-treesitter/nvim-treesitter', + -- run = ':TSUpdate', + -- config = function() + -- require('nvim-treesitter.configs').setup { + -- ensure_installed = { + -- 'python', 'bash', 'lua', 'javascript', 'c', 'json', 'html' + -- }, + -- highlight = { + -- enable = true + -- } + -- } + -- end + -- } use { 'neovim/nvim-lspconfig', diff --git a/shell/.profile b/shell/.profile index 6a15331..cee7311 100644 --- a/shell/.profile +++ b/shell/.profile @@ -54,3 +54,4 @@ export LUA_CPATH # [ -e $nix_profile_sh ] && . $nix_profile_sh # export LOCALE_ARCHIVE=~/.nix-profile/lib/locale/locale-archive +export NUMEN_MODEL=~/.local/share/vosk-models/small-en-us diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc index debd4b0..0c3568e 100644 --- a/shell/zsh/.zshrc +++ b/shell/zsh/.zshrc @@ -6,10 +6,10 @@ export GPG_TTY=$(tty) bindkey -v -fpath=(~/.dotfiles/shell/zsh/tabcompletion - $fpath) -autoload -Uz compinit -compinit +# fpath=(~/.dotfiles/shell/zsh/tabcompletion +# $fpath) +# autoload -Uz compinit +# compinit setopt PROMPT_SUBST GIT_PS1_SHOWDIRTYSTATE=1 @@ -27,20 +27,23 @@ PROMPT='[%F{green}%n%f@%m %F{green}%~%f$(__git_ps1 " (%s)")]$ ' [ -n "$(command -v direnv)" ] && eval "$(direnv hook zsh)" -SYSTEM_PLUGINS=(/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh - /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh) +SYSTEM_PLUGINS=(zsh-autosuggestions + zsh-syntax-highlighting + zsh-history-substring-search) +SYSTEM_PLUGINS_DIR=/usr/share/zsh/plugins for plugin in $SYSTEM_PLUGINS; do - [ -e "$plugin" ] && . $plugin + [ -e "$SYSTEM_PLUGINS_DIR/$plugin/$plugin.zsh" ] && \ + . $SYSTEM_PLUGINS_DIR/$plugin/$plugin.zsh done bindkey '\e[1~' beginning-of-line # Home bindkey '\e[4~' end-of-line # End bindkey '\e[3~' delete-char # Delete -[ -n "$(command -v history-substring-search-up)" ] && \ + +if [ -f $SYSTEM_PLUGINS_DIR/zsh-history-substring-search/zsh-history-substring-search.zsh ]; then bindkey '^[[A' history-substring-search-up # Up -[ -n "$(command -v history-substring-search-down)" ] && \ bindkey '^[[B' history-substring-search-down # Down +fi bindkey '^[[1;5D' backward-word # Ctrl+Left bindkey '^[[1;5C' forward-word # Ctrl+Right diff --git a/sublime-text/Preferences.sublime-settings b/sublime-text/Preferences.sublime-settings index 8253f42..c93ef51 100644 --- a/sublime-text/Preferences.sublime-settings +++ b/sublime-text/Preferences.sublime-settings @@ -69,6 +69,7 @@ "shift_tab_unindent": true, "show_line_endings": true, "theme": "Adaptive.sublime-theme", + /*"tab_size": 4,*/ "translate_tabs_to_spaces": true, "trim_trailing_white_space_on_save": true, "update_check": false, diff --git a/sway/init.sh b/sway/init.sh index 95d2063..d0c5e49 100755 --- a/sway/init.sh +++ b/sway/init.sh @@ -22,6 +22,12 @@ if command -v systemctl > /dev/null; then systemctl --user restart xdg-desktop-portal systemctl --user restart xdg-desktop-portal-wlr systemctl --user restart plasma-kactivitymanagerd +else + dbus-update-activation-environment WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP + + /usr/libexec/pipewire-launcher & + /usr/libexec/xdg-desktop-portal-wlr & fi ~/.config/sway/swayidle.sh & diff --git a/sway/terminal.sh b/sway/terminal.sh index 25559c3..3929f82 100755 --- a/sway/terminal.sh +++ b/sway/terminal.sh @@ -18,9 +18,9 @@ else if ! (swaymsg -t get_tree -r | jq -e "recurse(.nodes[]) | select(.app_id == \"$term_app_id\")" > /dev/null); then - exec alacritty --class $term_app_id -e \ - tmux new-session -A -s default - # exec foot --app-id $term_app_id \ - # tmux new-session -A -s default + # exec alacritty --class $term_app_id -e \ + # tmux new-session -A -s default + exec foot --app-id $term_app_id \ + tmux new-session -A -s default fi fi -- cgit v1.2.3-70-g09d2