From d0ef589a3977e8b4d22ca4e0c137d43ee0d45e8f Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 23 Jun 2022 12:17:54 -0500 Subject: [PATCH] updating EVERYTHING for arch again --- README.org | 7 +++++-- awesome/init.fnl | 6 +++--- awesome/keybindings.fnl | 6 +++--- fish/config.fish | 2 +- flake.lock | 18 ++++++++-------- qutebrowser/autoconfig.yml | 4 ++-- qutebrowser/quickmarks | 35 ++++---------------------------- scripts/cpu-plasma-diy.sh | 17 ++++++++++++++++ scripts/cpu-plasma.2s.sh | 2 +- scripts/emacslof | 10 ++++----- scripts/fflof | 10 ++++----- scripts/mem-plasma-diy.sh | 21 +++++++++++++++++++ scripts/mem-plasma.2s.sh | 2 +- scripts/muunread-plasma-diy.sh | 16 +++++++++++++++ scripts/qblof | 10 ++++----- scripts/screenshot | 2 +- scripts/startup.sh | 10 +++++++++ scripts/ww | 4 ++-- system/kaladin/configuration.nix | 5 ++++- system/syl/configuration.nix | 7 +++++-- 20 files changed, 120 insertions(+), 74 deletions(-) create mode 100755 scripts/cpu-plasma-diy.sh create mode 100755 scripts/mem-plasma-diy.sh create mode 100755 scripts/muunread-plasma-diy.sh create mode 100755 scripts/startup.sh diff --git a/README.org b/README.org index cab6398..73a8ae5 100644 --- a/README.org +++ b/README.org @@ -147,6 +147,7 @@ services.xserver = { }; displayManager.sddm.enable = true; desktopManager.plasma5.enable = true; + desktopManager.gnome.enable = true; }; # programs.qt5ct.enable = true; @@ -233,10 +234,11 @@ wget killall tmux discover -kde-rounded-corners +# kde-rounded-corners lightly-qt pinentry pinentry-qt +dutree unzip unrar p7zip @@ -324,6 +326,7 @@ powertop quickemu OVMFFull element-desktop-wayland +# rustdesk # hyprland #+end_src @@ -538,7 +541,7 @@ Notice how I am including all of my software here. It may be a big file, but hav macchina # Dev tools <> - <> + # <> ]; nixpkgs.overlays = [ diff --git a/awesome/init.fnl b/awesome/init.fnl index e15621e..1c39dff 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -761,13 +761,13 @@ (awful.spawn.once "kwalletd5") (awful.spawn.once "feh --bg-fill /home/chris/Pictures/wallpapers/tech.jpg") (awful.spawn.once "bluetoothctl power on") -(awful.spawn.once "systemctl --user restart nextcloud-client.service") +(awful.spawn.once "nextcloud --background") (awful.spawn.once "rbw-agent") (awful.spawn.once "killall jellyfin-mpv-shim && jellyfin-mpv-shim") (awful.spawn.once "xset r rate 220 90") (awful.spawn.once "/usr/lib/kdeconnectd") -;; (awful.spawn.once "emacs --daemon") -;; (if laptop (awful.spawn.once "nm-applet")) +(awful.spawn.once "emacs --daemon") +(if laptop (awful.spawn.once "nm-applet")) (awful.spawn.once "xcape -e 'Super_L=Super_L|Control_L|Escape'") (awful.spawn.once "xcape -e 'Alt_L=Super_L|W'") (awful.spawn.once "unclutter") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 583c7e6..dee952f 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -151,10 +151,10 @@ (awful.key [ modkey ] "." (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/emoji.sh")) {:description "emoji picker" :group "utilities"}) (awful.key [] "XF86MonBrightnessUp" (fn [] (awful.spawn.with_shell - "light -A 5 && lightget")) + "brightnessctl s +5% && lightget")) {:description "Increase monitor brightness by 5%" :group "utilities"}) (awful.key [] "XF86MonBrightnessDown" (fn [] (awful.spawn.with_shell - "light -U 5 && lightget")) + "brightnessctl s 5%- && lightget")) {:description "Decrease monitor brightness by 5%" :group "utilities"}) ;; Menubar ;; (awful.key [ modkey ] "p" (fn [] (menubar.show)) @@ -183,7 +183,7 @@ (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) {:description "Open Writer" :group "apps" }) ;;ff - (awful.key [modkey] "b" (fn [] (awful.spawn "fflof")) + (awful.key [modkey] "b" (fn [] (awful.spawn "qblof")) {:description "launch browser" :group "apps"}) ;; rofi (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.config/rofi/launchers-git/launcher.sh")) diff --git a/fish/config.fish b/fish/config.fish index e83338a..11fa7b0 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -236,4 +236,4 @@ end # end # fm6000 -r -c blue -any-nix-shell fish --info-right | source +# any-nix-shell fish --info-right | source diff --git a/flake.lock b/flake.lock index 141dfd3..22ae811 100644 --- a/flake.lock +++ b/flake.lock @@ -27,11 +27,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1655199284, - "narHash": "sha256-R/g2ZWplGWVOfm2TyB4kR+YcOE/uWkgjkYrl/RYgJ/U=", + "lastModified": 1655594877, + "narHash": "sha256-AQ39Vlb6zhsJqIRz2cN923+ESBxHmeHMHoPqA80xOCE=", "owner": "nix-community", "repo": "home-manager", - "rev": "87d30c164849a7471d99749aa4d2d28b81564f69", + "rev": "5197e5df7d3a148b1ad080235f70800987bc3549", "type": "github" }, "original": { @@ -49,11 +49,11 @@ "wlroots": "wlroots" }, "locked": { - "lastModified": 1655154988, - "narHash": "sha256-yjVNcLIqUkyhHbOS9lSWFurQx/qKD9YMPpQJpX5nqq4=", + "lastModified": 1655497428, + "narHash": "sha256-B1P/EDJvho3lBxqtGAXKBlPDXlF/7bLHeC+h2aTPkWc=", "owner": "vaxerski", "repo": "Hyprland", - "rev": "fa6530c7e8f5f79041a28456ca91d4641c7ad354", + "rev": "f7bdc2e87020ea7308035bceaa2ab659af91d2de", "type": "github" }, "original": { @@ -64,11 +64,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1655130522, - "narHash": "sha256-5dzlxE4okyu+M39yeVtHWQXzDZQxFF5rUB1iY9R6Lb4=", + "lastModified": 1655567057, + "narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "13f08d71ceff5101321e0291854495a1ec153a5e", + "rev": "e0a42267f73ea52adc061a64650fddc59906fc99", "type": "github" }, "original": { diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index 774f730..b890b7c 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -47,8 +47,8 @@ settings: scrolling.bar: global: overlay statusbar.show: - global: always + global: in-mode tabs.show: global: switching zoom.default: - global: 100% + global: 150% diff --git a/qutebrowser/quickmarks b/qutebrowser/quickmarks index e90f152..b394685 100644 --- a/qutebrowser/quickmarks +++ b/qutebrowser/quickmarks @@ -1,32 +1,5 @@ -yt https://yewtu.be/feed/subscriptions -sp https://tfcconnection.sharepoint.com/sites/TeensForChrist/Shared%20Documents/Forms/AllItems.aspx -ama https://smile.amazon.com/ -azu https://portal.azure.com/#@tfcconnection.org/dashboard/private/e5f3455d-3737-47d8-852b-1847a3b4801b -ac https://azure-costs.com/app/teams/personal/dashboards?active=e47b9bb7-1701-400e-9cbd-195c9cfda2c2&cycle=monthly -awe https://awesomewm.org/apidoc/index.html -y https://www.youtube.com/ -nf https://www.nerdfonts.com/cheat-sheet -plex https://app.plex.tv/desktop# +awe https://awesomewm.org/apidoc/ od https://odysee.com/$/following -tml https://outlook.office.com/mail/inbox -oned https://tfcconnection-my.sharepoint.com/personal/chris_tfcconnection_org/_layouts/15/onedrive.aspx -bw https://bitwarden.tfcconnection.org/#/ -coin https://www.coinbase.com/dashboard -remind https://www.remind.com/classes/4223h9 -admin https://admin.microsoft.com/AdminPortal/Home#/homepage -jelly https://jelly.cochrun.xyz/web/index.html#!/home.html -st http://127.0.0.1:8384/# -ha https://home.cochrun.xyz/lovelace/default_view -tfc https://www.tfcconnection.org/ -nvtfc https://www.facebook.com/NorthernValleyTFC -tnc https://staff.tfcconnection.org/apps/dashboard/ -nc https://nc.cochrun.xyz/apps/files/ -oml https://outlook.live.com/mail/0/inbox -stb https://table.tfcconnection.org/ -tms https://teams.microsoft.com/_#/conversations/General -n8n https://n8n.tfcconnection.org/workflow -stbdocs https://api.seatable.io/#intro -svg https://icon-sets.iconify.design/ -icons https://icon-sets.iconify.design/ -ai https://mastodon.online/web/getting-started -kde https://invent.kde.org/explore/groups?sort=name_asc +nc https://staff.tfcconnection.org/apps/dashboard/ +nch https://nc.cochrun.xyz/apps/files/ +bw https://bitwarden.tfcconnection.org/#/vault diff --git a/scripts/cpu-plasma-diy.sh b/scripts/cpu-plasma-diy.sh new file mode 100755 index 0000000..f66b67a --- /dev/null +++ b/scripts/cpu-plasma-diy.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +ID=$1 + +while true +do + COMMAND="systemmonitor" + # font='VictorMono Nerd Font' color=#ff9f43 size=11 + + cpu="$(mpstat 1 1 | rg Average | awk '{print $3+$4+$5}' | sed 's/\(.*\)/\1%/g')" + + DATA="| A |  $cpu | | $COMMAND |" + qdbus org.kde.plasma.doityourselfbar /id_$ID \ + org.kde.plasma.doityourselfbar.pass "$DATA" + + sleep 3s +done diff --git a/scripts/cpu-plasma.2s.sh b/scripts/cpu-plasma.2s.sh index 3500145..22fc265 100755 --- a/scripts/cpu-plasma.2s.sh +++ b/scripts/cpu-plasma.2s.sh @@ -4,5 +4,5 @@ # echo 100 - $(mpstat | rg all | cut -d \ -f43) | bc cpu="$(mpstat 1 1 | rg Average | awk '{print $3+$4+$5}' | sed 's/\(.*\)/\1%/g')" -echo " $cpu | color=#ff9f43 font='VictorMono Nerd Font' size=11" +echo " $cpu | font='VictorMono Nerd Font' color=#ff9f43 size=11" # echo " $cpu | color=#D75F00 font='VictorMono Nerd Font' size=11" diff --git a/scripts/emacslof b/scripts/emacslof index cb93092..a71ed14 100755 --- a/scripts/emacslof +++ b/scripts/emacslof @@ -9,15 +9,15 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then # echo $emacsrg if [ -z $emacsrg ]; then - emacsclient -c & + exec emacsclient -c & exit else - wmctrl -ia $emacsrg + exec wmctrl -ia $emacsrg exit fi else if [ $KDE_FULL_SESSION = "true" ]; then - /home/chris/bin/ww -fa Emacs -c emacsclient + exec /home/chris/bin/ww -fa Emacs -c emacsclient exit else # WAYLAND @@ -26,11 +26,11 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then emacswin=$(echo $emacsrg | sed 's/.*\: //') # echo $emacswin - wlrctl toplevel focus title:"$emacswin" + exec wlrctl toplevel focus title:"$emacswin" exit fi fi else - emacsclient -c & + exec emacsclient -c & fi diff --git a/scripts/fflof b/scripts/fflof index 35c9680..17a7959 100755 --- a/scripts/fflof +++ b/scripts/fflof @@ -12,16 +12,16 @@ if [ $(pgrep -c firefox) -gt 0 ]; then # echo $emacsrg if [ -z $ffrg ]; then - firefox + exec firefox exit else - wmctrl -ia $ffrg + exec wmctrl -ia $ffrg exit fi else if [ $KDE_FULL_SESSION = "true" ]; then echo "KDE" - /home/chris/bin/ww -f firefox -c firefox + exec /home/chris/bin/ww -f firefox -c firefox exit else # WAYLAND @@ -30,10 +30,10 @@ if [ $(pgrep -c firefox) -gt 0 ]; then ffwin=$(echo $ffrg | sed 's/.*\: //') # echo $ffwin - wlrctl toplevel focus title:"$ffwin" + exec wlrctl toplevel focus title:"$ffwin" exit fi fi else - firefox + exec firefox fi diff --git a/scripts/mem-plasma-diy.sh b/scripts/mem-plasma-diy.sh new file mode 100755 index 0000000..1f2f16c --- /dev/null +++ b/scripts/mem-plasma-diy.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +ID=$1 + +while true +do + COMMAND="systemmonitor" + # font='VictorMono Nerd Font' color=#ff9f43 size=11 + + read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}') + + percent=$(bc -l <<< "100 * $total / $used") + + mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}'| awk '{printf $2}') + + DATA="| A |  $mem | |$COMMAND |" + qdbus org.kde.plasma.doityourselfbar /id_$ID \ + org.kde.plasma.doityourselfbar.pass "$DATA" + + sleep 2s +done diff --git a/scripts/mem-plasma.2s.sh b/scripts/mem-plasma.2s.sh index 5740f08..dee648f 100755 --- a/scripts/mem-plasma.2s.sh +++ b/scripts/mem-plasma.2s.sh @@ -1,4 +1,4 @@ -#!/run/current-system/sw/bin/bash +#!/bin/bash # Get the percentage of used memory and print it read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}') diff --git a/scripts/muunread-plasma-diy.sh b/scripts/muunread-plasma-diy.sh new file mode 100755 index 0000000..46d8001 --- /dev/null +++ b/scripts/muunread-plasma-diy.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +ID=$1 + +while true +do + COMMAND="emacsclient -c -e (mu4e)" + + muunread="$(mu find flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" | wc -l)" + + DATA="| A |  $muunread | |$COMMAND |" + qdbus org.kde.plasma.doityourselfbar /id_$ID \ + org.kde.plasma.doityourselfbar.pass "$DATA" + + sleep 60s +done diff --git a/scripts/qblof b/scripts/qblof index ad03301..53546ea 100755 --- a/scripts/qblof +++ b/scripts/qblof @@ -12,15 +12,15 @@ if [ $(pgrep -c qutebrowser) -gt 0 ]; then # echo $emacsrg if [ -z $qbrg ]; then - qutebrowser + exec qutebrowser exit else - wmctrl -ia $qbrg + exec wmctrl -ia $qbrg exit fi else if [ $KDE_FULL_SESSION = "true" ]; then - /home/chris/bin/ww -f org.qutebrowser.qutebrowser -c qutebrowser + exec /home/chris/bin/ww -f org.qutebrowser.qutebrowser -c qutebrowser exit else echo "other wayland" @@ -30,10 +30,10 @@ if [ $(pgrep -c qutebrowser) -gt 0 ]; then qbwin=$(echo $qbrg | sed 's/\(.*r\)\:.*/\1/') # echo $ffwin - wlrctl toplevel focus "$qbwin" + exec wlrctl toplevel focus "$qbwin" exit fi fi else - qutebrowser + exec qutebrowser fi diff --git a/scripts/screenshot b/scripts/screenshot index 76c77ce..6df3b13 100755 --- a/scripts/screenshot +++ b/scripts/screenshot @@ -21,7 +21,7 @@ declare -a options=( "cancel" ) -choice=$(printf '%s\n' "${options[@]}" | rofi -theme /home/chris/dotfiles/rofi/launchers-git/$style.rasi -dmenu -p 'Clip or Save') +choice=$(printf '%s\n' "${options[@]}" | rofi -theme /home/chris/.config/rofi/launchers-git/$style.rasi -dmenu -p 'Clip or Save') if [[ "$choice" == "cancel" ]]; then rm /tmp/$timestamp.png diff --git a/scripts/startup.sh b/scripts/startup.sh new file mode 100755 index 0000000..5d4c8f0 --- /dev/null +++ b/scripts/startup.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +nextcloud --background & +rbw-agent & +killall jellyfin-mpv-shim && jellyfin-mpv-shim & +/usr/lib/kdeconnectd & +emacs --daemon & +nm-applet & +greenclip daemon & +waybar & diff --git a/scripts/ww b/scripts/ww index 7659a72..0799f9d 100755 --- a/scripts/ww +++ b/scripts/ww @@ -1,4 +1,4 @@ -#!/run/current-system/sw/bin/bash +#!/bin/bash # Usage: ww -f "window class filter" -c "run if not found" # Usage: ww -fa "window title filter" -c "run if not found" @@ -116,5 +116,5 @@ if [ -n "$IS_RUNNING" ] || [ -n "$FILTERALT" ]; then # uninstall it dbus-send --session --dest=org.kde.KWin --print-reply=literal /Scripting org.kde.kwin.Scripting.unloadScript "string:$SCRIPT_NAME" >/dev/null 2>&1 elif [ -n "$COMMAND" ]; then - $COMMAND & + exec $COMMAND & fi diff --git a/system/kaladin/configuration.nix b/system/kaladin/configuration.nix index bc4f784..53f6139 100644 --- a/system/kaladin/configuration.nix +++ b/system/kaladin/configuration.nix @@ -52,6 +52,7 @@ }; displayManager.sddm.enable = true; desktopManager.plasma5.enable = true; + desktopManager.gnome.enable = true; }; # programs.qt5ct.enable = true; @@ -138,10 +139,11 @@ killall tmux discover - kde-rounded-corners + # kde-rounded-corners lightly-qt pinentry pinentry-qt + dutree unzip unrar p7zip @@ -229,6 +231,7 @@ quickemu OVMFFull element-desktop-wayland + # rustdesk # hyprland blender neofetch diff --git a/system/syl/configuration.nix b/system/syl/configuration.nix index 522a3fd..fb6d3d1 100644 --- a/system/syl/configuration.nix +++ b/system/syl/configuration.nix @@ -62,6 +62,7 @@ }; displayManager.sddm.enable = true; desktopManager.plasma5.enable = true; + desktopManager.gnome.enable = true; }; # programs.qt5ct.enable = true; @@ -161,10 +162,11 @@ killall tmux discover - kde-rounded-corners + # kde-rounded-corners lightly-qt pinentry pinentry-qt + dutree unzip unrar p7zip @@ -252,6 +254,7 @@ quickemu OVMFFull element-desktop-wayland + # rustdesk # hyprland neofetch afetch @@ -283,7 +286,7 @@ libsForQt5.ki18n libsForQt5.kcoreaddons fennel - (libsForQt5.callPackage ../../LightlyShaders {}) + # (libsForQt5.callPackage ../../LightlyShaders {}) ]; nixpkgs.overlays = [