From c39181b2febac88734d597f37a00234ea45d76e6 Mon Sep 17 00:00:00 2001 From: Harri Lahtinen Date: Sun, 2 Feb 2020 11:27:49 +0200 Subject: [PATCH] some changes --- .config/Scripts/expressvpn-status.sh | 19 ++++++ .config/Scripts/on | 36 +++++++++++ .config/Scripts/startupuv | 12 ++++ .config/Scripts/sysinfo | 55 +++++++++++++++++ .config/kitty/kitty.conf | 2 +- .config/networkmanager-dmenu/config.ini | 30 +++++++++ .config/nvim/config/main.vim | 13 +++- .config/nvim/config/plugins.vim | 1 + .config/picom.conf | 6 +- .config/polybar/config | 2 +- .../wpg/templates/config_twmn_twmn.conf.base | 2 +- .p10k.zsh | 61 ++++++++++--------- .zshrc | 8 +-- 13 files changed, 208 insertions(+), 39 deletions(-) create mode 100755 .config/Scripts/expressvpn-status.sh create mode 100755 .config/Scripts/on create mode 100755 .config/Scripts/startupuv create mode 100755 .config/Scripts/sysinfo create mode 100644 .config/networkmanager-dmenu/config.ini diff --git a/.config/Scripts/expressvpn-status.sh b/.config/Scripts/expressvpn-status.sh new file mode 100755 index 0000000..98609a3 --- /dev/null +++ b/.config/Scripts/expressvpn-status.sh @@ -0,0 +1,19 @@ + +#!/bin/sh + +STATUS=$(expressvpn status | cut -d " " -f 1) +IP=$(ip route get 8.8.8.8 | head -1 | awk '{print $7}') +SSID=$(nmcli -f SSID | head -1 | cut -d " " -f 4) + +if [ "$STATUS" != "Not" ]; then + echo " ${IP} " + +elif [ "$SSID" = "ASUS_5G" ] || [ "$SSID" = "ASUS" ]; then + echo " ${IP} " + +elif [ "$SSID" = "OP3T" ] || [ "$SSID" = "Samsung" ]; then + echo " ${IP} " + +elif [ "$SSID" != "ASUS_5G" || "ASUS" || "OP3T" || "Samsung" ]; then + echo " ${IP} " +fi diff --git a/.config/Scripts/on b/.config/Scripts/on new file mode 100755 index 0000000..6c13c22 --- /dev/null +++ b/.config/Scripts/on @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# to edit themes in place with live reload: +# ag -l | entr -r $HOME/.config/rofi/on +# use -normal-window flag on rofi if you want to not have to close rofi to get +# back to your editor. +# https://www.reddit.com/r/qtools/comments/amswu9/autoloading_rofi_for_quick_themeing_experience/ + +options="  lock +  logout +  sleep +  hibernate +  reboot +  shutdown" +themes_dir=$HOME/.config/rofi +theme=${1:-$themes_dir/colors-rofi-dark.rasi} +selection=$(echo -e "${options}" | rofi -dmenu -config ~/.config/rofi/config $theme -columns 6 -lines 1 -width 1700) + +echo "This is your selection: $selection" + +case "${selection}" in + "  lock") + betterlockscreen -l dim;; + "  logout") + i3-msg exit;; + "  sleep") + systemctl suspend;; + "  hibernate") + systemctl hibernate;; + "  reboot") + systemctl reboot;; + "  shutdown") + systemctl poweroff -i;; +esac + +exit 0 diff --git a/.config/Scripts/startupuv b/.config/Scripts/startupuv new file mode 100755 index 0000000..c28b9f7 --- /dev/null +++ b/.config/Scripts/startupuv @@ -0,0 +1,12 @@ +#!/bin/bash + +# This script uses a config file at this location to adjust the +# undervoltage of the core/cache and GPU. Source references the +# alisas from that location so the the undervolt can be easily changed. +# This can be deleted and the desired undervolt can be applyed directly from here. + +source "/home/hate/.config/Scripts/config" + +/home/hate/.config/Scripts/undervolt.py --core "${CORE2}" --cache "${CORE2}" --gpu "${GPU2}" + +exit 0 diff --git a/.config/Scripts/sysinfo b/.config/Scripts/sysinfo new file mode 100755 index 0000000..d7364d5 --- /dev/null +++ b/.config/Scripts/sysinfo @@ -0,0 +1,55 @@ +#!/bin/bash +# Source : https://github.com/Morgareth99/Funtoo-Dots/blob/master/Funtoo-Dots/Scripts/sysinfo.sh +# Edited : Erik Dubois - changed to work on ArcoLinux +# +# install software +# sudo pacman -S wmctrl +# awesome font displays in Termite not in urxvt + +OS=$(cat /etc/lsb-release | awk -F '=' '/DISTRIB_ID/ {print $2}') +KERNEL=$(uname -r) +ARCH=$(uname -m) +VERSION=$(cat /etc/lsb-release | awk -F '=' '/DISTRIB_RELEASE/ {print $2}') +UPTIME=$(awk '{printf("%d:%02d:%02d:%02d",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}' /proc/uptime) +MODEL=$(cat /sys/devices/virtual/dmi/id/board_{name,vendor} | awk '!(NR%2){print$1,p}{p=$0}') +DE=$(wmctrl -m | awk 'NR==1 {print $2}' | perl -nle 'print ucfirst lc') +CPU=$(awk < /proc/cpuinfo '/model name/{gsub(/[(TMR)]/,"");print $4,$5,$6}' | head -1) +#GPU=$(nvidia-smi --query-gpu=gpu_name --format=csv|sed -n 2p) +SHELL=$(echo "$SHELL" | awk -F/ '{for ( i=1; i <= NF; i++) sub(".", substr(toupper($i),1,1) , $i); print $NF}') +RESOLUTION=$(xdpyinfo | awk '/dimensions:/ {printf $2}') +BIRTH=$(ls -alct /|sed '$!d'|awk '{print $7, $6, $8}') + + +GtkTheme=$(awk < ~/.gtkrc-2.0 -F'"' '/gtk-theme-name/{print $2}') +GtkIcon=$(awk < ~/.gtkrc-2.0 -F'"' '/gtk-icon-theme-name/{print $2}' ) +GtkFont=$(awk < ~/.gtkrc-2.0 -F'"' '/gtk-font-name/{print $2}') + + +Packages=$(checkupdates | wc -l) +Layout=$(setxkbmap -print | awk -F"+" '/xkb_symbols/{for ( i=1; i <= NF; i++) sub(".", substr(toupper($i),1,1) , $i); print $2}') + + + echo "" + echo -e "\e[91m --------------------" + echo " SYSTEM INFORMATION" + echo " --------------------" + echo "" + echo -e "\e[91m  $USER" + echo -e "\e[94m  \e[39m$MODEL" + echo -e "\e[94m  \e[39m$OS $ARCH $VERSION" + echo -e "\e[94m  \e[39m$KERNEL" + echo -e "\e[94m  \e[39m$UPTIME" + echo -e "\e[94m  \e[39m$SHELL" + echo -e "\e[94m  \e[39m$RESOLUTION" + echo -e "\e[94m  \e[39m$CPU" + #echo -e "\e[94m  \e[39m$GPU" + echo -e "\e[91m --------------------" + echo -e "\e[91m  \e[31m$DE" + echo -e "\e[94m  \e[39m$GtkTheme" + echo -e "\e[94m  \e[39m$GtkIcon" + echo -e "\e[94m  \e[39m$GtkFont" + echo -e "\e[94m  \e[39m$BIRTH" + echo -e "\e[91m --------------------" + echo -e "\e[91m  \e[31m$Packages" + echo -e "\e[94m  \e[39m$Layout" + echo "" diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 4896083..d143bb8 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -35,7 +35,7 @@ selection_background #d75f5f #cursor #8fee96 # The cursor shape can be one of (block, beam, underline) -cursor_shape block +cursor_shape underline # The interval (in seconds) at which to blink the cursor. Set to zero to # disable blinking. diff --git a/.config/networkmanager-dmenu/config.ini b/.config/networkmanager-dmenu/config.ini new file mode 100644 index 0000000..e6b52b9 --- /dev/null +++ b/.config/networkmanager-dmenu/config.ini @@ -0,0 +1,30 @@ +[dmenu] +fn = -*-UbuntuMono Nerd Font Mono*-*-*-20-*-*-*-*-*-*-* +dmenu_command = rofi -width 15 +# # Note that dmenu_command can contain arguments as well like `rofi -width 30` +# # Rofi and dmenu are set to case insensitive by default `-i` +# l = number of lines to display, defaults to number of total network options +# fn = font string +# nb = normal background (name, #RGB, or #RRGGBB) +# nf = normal foreground +# sb = selected background +# sf = selected foreground +# b = (just set to empty value and menu will appear at the bottom +# m = number of monitor to display on +# p = Custom Prompt for the networks menu +pinentry = /usr/bin/pinentry +rofi_highlight = True +# (Default: False) use rofi highlighting instead of '**' + +# # override normal foreground and background colors (dmenu) or use the +# # -password option (rofi) to obscure passphrase entry +# [dmenu_passphrase] +# nf = #222222 +# nb = #222222 +rofi_obscure = True + +[editor] +terminal = kitty +gui_if_available = True +# terminal = +# gui_if_available = diff --git a/.config/nvim/config/main.vim b/.config/nvim/config/main.vim index b8b6141..104527d 100644 --- a/.config/nvim/config/main.vim +++ b/.config/nvim/config/main.vim @@ -6,11 +6,20 @@ " /___/ " "*********************************************************************************** +" Colorscheme and highlight settings +" General settings about colors +" Enable true colors support. Do not use this option if your terminal does not +" support true colors! For a comprehensive list of terminals supporting true +" colors, see https://github.com/termstandard/colors and https://bit.ly/2InF97t. +if $TERM == "xterm-256color" || exists('g:started_by_firenvim') + set termguicolors +endif - +" Use dark background +set background=dark " Colorscheme -colorscheme gruvbox +colorscheme gruvbox8 augroup specify_filetype autocmd! diff --git a/.config/nvim/config/plugins.vim b/.config/nvim/config/plugins.vim index 83d9cfc..9d5924b 100644 --- a/.config/nvim/config/plugins.vim +++ b/.config/nvim/config/plugins.vim @@ -93,4 +93,5 @@ Plug 'deviantfero/wpgtk.vim' Plug 'nanotech/jellybeans.vim' Plug 'cocopon/iceberg.vim' Plug 'morhetz/gruvbox' + Plug 'lifepillar/vim-gruvbox8' call plug#end() diff --git a/.config/picom.conf b/.config/picom.conf index 0cb0d64..dcb8f27 100644 --- a/.config/picom.conf +++ b/.config/picom.conf @@ -71,8 +71,10 @@ blur-background-exclude = [ ]; opacity-rule = [ #"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", - "99:class_g = 'kitty' && !focused", - "90:class_g = 'kitty' && focused", + "99:class_g = 'kitty' && _NET_WM_STATE@:32a", + "90:class_g = 'kitty' && !_NET_WM_STATE@:32a", + #"99:class_g = 'kitty' && !focused", + #"90:class_g = 'kitty' && focused", ]; ############## diff --git a/.config/polybar/config b/.config/polybar/config index 67c050f..d133951 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -222,7 +222,7 @@ label-background = ${colors.blue} [module/temperature] type = internal/temperature thermal-zone = 1 -hwmon-path = /sys/devices/virtual/hwmon/hwmon1/temp1_input +hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input warn-temperature = 65 format =