From a35db4097e4381e157f55965024c8efe87b50ecc Mon Sep 17 00:00:00 2001 From: starr-dusT Date: Sun, 25 Dec 2022 20:43:52 -0800 Subject: [PATCH] updates including getting rid of greenclip :( --- home/.chezmoiexternal.toml | 2 +- home/bin/executable_add-xbps-description.py | 22 +++++++ home/dot_config/greenclip.toml | 11 ---- home/dot_config/i3/config.tmpl | 9 +-- home/dot_zshrc | 7 ++- provision/tasks/desktop/packages.yml | 63 ++++++++++----------- provision/tasks/development/packages.yml | 1 + provision/tasks/terminal/packages.yml | 6 +- 8 files changed, 65 insertions(+), 56 deletions(-) create mode 100644 home/bin/executable_add-xbps-description.py delete mode 100644 home/dot_config/greenclip.toml diff --git a/home/.chezmoiexternal.toml b/home/.chezmoiexternal.toml index e15f9c48..97001dda 100644 --- a/home/.chezmoiexternal.toml +++ b/home/.chezmoiexternal.toml @@ -1,4 +1,4 @@ -[".themes"] +[".themes/dracula"] type = "archive" url = "https://github.com/dracula/gtk/archive/master.zip" exact = true diff --git a/home/bin/executable_add-xbps-description.py b/home/bin/executable_add-xbps-description.py new file mode 100644 index 00000000..c7f8fbb3 --- /dev/null +++ b/home/bin/executable_add-xbps-description.py @@ -0,0 +1,22 @@ +#!/usr/bin/python + +import os +import subprocess +import sys + +input_str = sys.stdin.read().replace("\n", "") +pkg = input_str.replace(" ", "")[1:] +cmd = "xbps-query -Rs %s"%(pkg) +output = subprocess.getoutput(cmd) +if output.count('[') > 1: + cmd = "xbps-query -Rs %s | grep -E ' %s-[0-9](.|[0-9])[0-9]'"%(pkg,pkg) + output = subprocess.getoutput(cmd) +upper_pos = -1 +for index, char in enumerate(output): + if char == char.upper() and char.isalpha(): + upper_pos = index + break +if upper_pos == -1: + sys.stdout.write("error") +else: + sys.stdout.write(input_str + " # " + output[upper_pos:]) diff --git a/home/dot_config/greenclip.toml b/home/dot_config/greenclip.toml deleted file mode 100644 index f8a9902e..00000000 --- a/home/dot_config/greenclip.toml +++ /dev/null @@ -1,11 +0,0 @@ - -[greenclip] - blacklisted_applications = [] - enable_image_support = true - history_file = "/home/tstarr/.cache/greenclip.history" - image_cache_directory = "/tmp/greenclip" - max_history_length = 50 - max_selection_size_bytes = 0 - static_history = ["Greenclip has been updated to v4.1, update your new config file at ~/.config/greenclip.toml"] - trim_space_from_selection = true - use_primary_selection_as_input = false diff --git a/home/dot_config/i3/config.tmpl b/home/dot_config/i3/config.tmpl index dbc15e73..7dd26350 100644 --- a/home/dot_config/i3/config.tmpl +++ b/home/dot_config/i3/config.tmpl @@ -99,10 +99,6 @@ for_window [con_mark="scratch-nnn"] floating enable, \ resize set 800 px 600 px, \ move position 880 px 420 px -for_window [con_mark="scratch-warden"] floating enable, \ - resize set 1000 px 800 px, \ - move position 780 px 320 px - for_window [con_mark="scratch-warrior"] floating enable, \ resize set 1000 px 800 px, \ move position 780 px 320 px @@ -140,7 +136,7 @@ bindsym $mod+x mode utility mode utility { bindsym q exit bindsym r restart - bindsym c exec "rofi -modi 'clipboard:greenclip print' -show clipboard -run-command '{cmd}'", $e + bindsym p exec "rofi-rbw", $e # TODO: flameshot (mod+Ctrl+f) # TODO: gamemode (mod+Ctrl+g). Needs script to toggle bindsym Escape mode default @@ -224,8 +220,6 @@ bindsym $mod+c mode scratch mode scratch { bindsym Return exec $HOME/.config/i3/scripts/scratch.sh \ 'scratch-term' 'alacritty', $e - bindsym b exec --no-startup-id $HOME/.config/i3/scripts/scratch.sh \ - 'scratch-warden' 'firefoxpwa site launch 01GKYZS658452DK05DVDCRF5V4, $e' bindsym n exec $HOME/.config/i3/scripts/scratch.sh \ 'scratch-nnn' 'alacritty -e nnn -d -e -H -r', $e bindsym t exec $HOME/.config/i3/scripts/scratch.sh \ @@ -240,6 +234,5 @@ mode scratch { exec --no-startup-id "autorandr --change && i3-msg restart" exec --no-startup-id "pipewire & pipewire-pulse &" exec_always --no-startup-id "$HOME/.config/i3/scripts/polybar.sh" -exec --no-startup-id "greenclip daemon &" exec_always --no-startup-id "blueman-applet" exec_always --no-startup-id nitrogen --restore diff --git a/home/dot_zshrc b/home/dot_zshrc index 3fdf3445..1f1ba196 100644 --- a/home/dot_zshrc +++ b/home/dot_zshrc @@ -83,6 +83,7 @@ fi export PATH export PATH=/home/tstarr/.nimble/bin:$PATH +export PATH=/home/tstarr/.cargo/bin:$PATH export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm @@ -108,9 +109,9 @@ alias n="nnn -d -e -H -r" alias s="startx" # Chezmoi -alias cmc="chezmoi cd" -alias cmd="chezmoi apply --verbose --dry-run" -alias cma="chezmoi apply" +alias cc="chezmoi cd" +alias cdr="chezmoi apply --verbose --dry-run" +alias ca="chezmoi apply" # xbps alias xi="sudo xbps-install" diff --git a/provision/tasks/desktop/packages.yml b/provision/tasks/desktop/packages.yml index 8458c06e..3189586c 100644 --- a/provision/tasks/desktop/packages.yml +++ b/provision/tasks/desktop/packages.yml @@ -1,32 +1,32 @@ - name: Install desktop dnf packages xbps: name: - - xorg - - xterm - - alacritty - - mpv # Movie player playing most video formats and DVDs - - python3-i3ipc # IPC interface to control i3 from Python - - xprop - - lxappearance - - blueman - - xrandr - - dunst - - ffmpeg - - firefox - - i3-gaps - - i3status - - nitrogen - - nvidia - - nvidia-libs-32bit - - pavucontrol - - polybar - - rofi - - pcmanfm - - xclip - - autorandr - - xsel - - clipmenu - - nerd-fonts + - xorg # X.org meta-package + - xterm # X Terminal Emulator + - alacritty # Cross-platform, GPU-accelerated terminal emulator + - mpv # Video player based on MPlayer/mplayer2 + - python3-i3ipc # Improved Python library to control i3wm and sway + - xprop # Property displayer for X + - lxappearance # LXDE Theme Switcher + - blueman # GTK+ Bluetooth Manager + - xrandr # Primitive command line interface to RandR extension + - dunst # Lightweight and customizable notification daemon + - ffmpeg # Decoding, encoding and streaming software + - firefox # Mozilla Firefox web browser + - i3-gaps # Improved tiling window manager - i3 fork with more features + - i3status # Status bar generator for i3bar, dzen2, xmobar or similar programs + - nitrogen # Background browser and setter for X with support for Xinerama + - nvidia # NVIDIA drivers for linux - Libraries and Utilities + - nvidia-libs-32bit # NVIDIA drivers for linux - common libraries (32bit) + - pavucontrol # PulseAudio Volume Control + - polybar # Fast and easy-to-use status bar + - rofi # Window switcher, run dialog and dmenu replacement + - pcmanfm # LXDE file manager + - xclip # Command line interface to the X11 clipboard + - autorandr # Automatically select a display configuration based on connected devices + - xsel # Command-line getting and setting the contents of the X selection + - clipmenu # Clipboard management using dmenu + - nerd-fonts # Iconic font aggregator, collection and patcher state: present become: true @@ -46,13 +46,12 @@ dest: /home/{{ user }}/bin remote_src: true mode: 0755 - -- name: Install greenclip - get_url: - url: "https://github.com/erebe/greenclip/releases/download/v4.2/greenclip" - dest: /home/{{ user }}/bin - mode: 0755 +- name: Install desktop python packages + ansible.builtin.pip: + name: + - rofi-rbw + #void-repo-multilib #void-repo-multilib-nonfree #void-repo-nonfree diff --git a/provision/tasks/development/packages.yml b/provision/tasks/development/packages.yml index d997a461..d32b85ec 100644 --- a/provision/tasks/development/packages.yml +++ b/provision/tasks/development/packages.yml @@ -6,6 +6,7 @@ - ripgrep - fd - lazygit + - cargo state: present become: true diff --git a/provision/tasks/terminal/packages.yml b/provision/tasks/terminal/packages.yml index 915704d1..29738cc3 100644 --- a/provision/tasks/terminal/packages.yml +++ b/provision/tasks/terminal/packages.yml @@ -13,8 +13,12 @@ - khal - khard - vdirsyncer + - cargo # Required for rbw state: present become: true -#- import_tasks: advcpmv.yml # Patched cp and mv for nnn +- name: Install rbw + community.general.cargo: + name: rbw + - import_tasks: nb.yml