replaced powerline with oh-my-posh, new deps and alias fixes

This commit is contained in:
Rick van Lieshout 2024-06-11 22:59:12 +02:00
parent ec10ac7281
commit a715528931
15 changed files with 113 additions and 35 deletions

10
.vscode/settings.json vendored
View File

@ -1,3 +1,11 @@
{ {
"cSpell.words": ["autohint", "hintstyle", "rgba"] "cSpell.words": [
"autohint",
"hintstyle",
"rgba"
],
"sonarlint.connectedMode.project": {
"connectionId": "public-sonarcloud",
"projectKey": "Mastermindzh_dotfiles"
}
} }

View File

@ -61,6 +61,7 @@ alias suspend='sudo bash ~/.config/i3/scripts/suspend.sh'
alias clean-all='sudo pacman -R $(pacman -Qtdq) && sudo paccache -rk 1 && sudo paccache -ruk0 && sudo journalctl --vacuum-time=2d && docker-clean-all && rm -rf ~/.local/share/Trash/' alias clean-all='sudo pacman -R $(pacman -Qtdq) && sudo paccache -rk 1 && sudo paccache -ruk0 && sudo journalctl --vacuum-time=2d && docker-clean-all && rm -rf ~/.local/share/Trash/'
alias delete-empty='find . -type d -empty -delete' alias delete-empty='find . -type d -empty -delete'
alias addwireguard='sudo nmcli connection import type wireguard file ' alias addwireguard='sudo nmcli connection import type wireguard file '
alias defaultfonts='for family in serif sans-serif monospace Arial Helvetica Verdana "Times New Roman" "Courier New"; do echo -e "\033[1m$family: \033[0m" && fc-match "$family" && echo ""; done'
# might be useful in demos... # might be useful in demos...
alias oopsie='fuck' alias oopsie='fuck'

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# useful docker commands # useful docker commands
alias stop-dockers='docker stop $(docker ps -aq)' alias stop-dockers='if [ $(docker ps -aq | wc -l) != 0 ]; then docker stop $(docker ps -aq); fi'
alias docker-clean-containers='docker container prune -f --filter "until=48h"' alias docker-clean-containers='docker container prune -f --filter "until=48h"'
alias docker-clean-images='docker image prune -a -f --filter "until=48h"' alias docker-clean-images='docker image prune -a -f --filter "until=48h"'
alias docker-clean-volumes='docker volume prune -f --filter "label!=keep"' alias docker-clean-volumes='docker volume prune -f --filter "label!=keep"'

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
alias clean-node-modules='find . -name "node_modules" -type d -print0 |xargs -0 rm -r --' alias clean-node-modules='find . -not -path "*/.*" -name "node_modules" -type d -print0 | xargs -0 rm -rf'
alias organize-package-json='npx format-package -w && npx sort-package-json' alias organize-package-json='npx format-package -w && npx sort-package-json'

View File

@ -1,10 +1,4 @@
#!/bin/bash #!/bin/bash
# if powerline-shell is available use it.
function _update_ps1() {
if hash powerline-rs 2>/dev/null; then
PS1="$(powerline-rs --shell bash $?)"
fi
}
# sourceIfExists # sourceIfExists
function sourceIfExists() { function sourceIfExists() {
@ -19,6 +13,7 @@ source ~/.custom
source ~/.variables source ~/.variables
sourceIfExists ~/lib/azure-cli/az.completion sourceIfExists ~/lib/azure-cli/az.completion
eval "$(thefuck --alias)" eval "$(thefuck --alias)"
eval "$(oh-my-posh init bash --config ~/.config/poshthemes/mastermindzh.yaml)"
# load keychain with private key # load keychain with private key
if test -f "$HOME/.ssh/id_ed25519"; then if test -f "$HOME/.ssh/id_ed25519"; then
@ -40,10 +35,4 @@ if hash dotnet 2>/dev/null; then
export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools" export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools"
fi fi
PS1='[\u@\h \W]\$ '
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
export PATH=$PATH:/home/mastermindzh/bin export PATH=$PATH:/home/mastermindzh/bin

View File

@ -5,3 +5,4 @@
# #
XCURSOR_THEME="Adwaita" XCURSOR_THEME="Adwaita"
EDITOR="nano" EDITOR="nano"
GTK_THEME=Adwaita-dark

2
config/gtk/portals.conf Normal file
View File

@ -0,0 +1,2 @@
[preferred]
default=gtk;wlr

View File

@ -1,15 +1,14 @@
[Settings] [Settings]
gtk-theme-name=Adwaita-dark gtk-theme-name=Adwaita-dark
gtk-icon-theme-name="Papirus-Dark"
gtk-font-name="Ubuntu 12" gtk-font-name="Ubuntu 12"
gtk-cursor-theme-name=Adwaita gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0 gtk-cursor-theme-size=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1 gtk-button-images=1
gtk-menu-images=1 gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1 gtk-xft-antialias=1
gtk-xft-hinting=1 gtk-xft-hinting=1
gtk-xft-hintstyle=hintmedium gtk-xft-hintstyle=hintmedium

View File

@ -29,6 +29,7 @@ x-scheme-handler/tidal=tidal-hifi.desktop
# files # files
#-------------- #--------------
inode/director=thunar.desktop inode/director=thunar.desktop
x-scheme-handler/ftb=ftb-app.desktop
[Added Associations] [Added Associations]
# browser-stuff # browser-stuff

View File

@ -0,0 +1,61 @@
version: 2
blocks:
# prompt on the right
- type: rprompt
overflow: hidden
segments:
- background: transparent
foreground: yellow
style: plain
template: "{{ .FormattedMs }}"
type: executiontime
properties:
threshold: 1
# prompt segment
- type: prompt
alignment: left
newline: true
segments:
- foreground: "#77E4F7"
template: "{{ .Path }} "
type: path
properties:
home_icon: " "
style: agnoster_short
# git segment
- type: git
foreground: "#C678DD"
properties:
fetch_status: true
style: plain
# template:
# "<#ffffff>on</> {{ .HEAD }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if and (.Working.Changed)
# (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String
# }}{{ end }}"
template: "<#ffffff>on</> {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}  {{end}} "
# current language info
- type: node
foreground: "#98C379"
properties:
fetch_version: true
style: plain
template: "  {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }} {{ .Full }} "
- alignment: left
segments:
- foreground: "#63F08C"
style: plain
template: "➜ "
type: text
type: prompt
# bash won't play along :)
# transient_prompt:
# background: transparent
# foreground_templates:
# - "{{if gt .Code 0}}red{{end}}"
# - "{{if eq .Code 0}}magenta{{end}}"
# template: " "

View File

@ -9,8 +9,11 @@ configuration {
display-drun: " "; display-drun: " ";
display-run: " "; display-run: " ";
display-ssh: " "; display-ssh: " ";
display-clipboard: " ";
display-emoji: " ";
display-calc: " ";
display-filebrowser: " "; display-filebrowser: " ";
display-window: ""; display-window: "";
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]"; drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";
window-format: "{w} · {c} · {t}"; window-format: "{w} · {c} · {t}";
} }

12
dependencies/aur.txt vendored
View File

@ -1,27 +1,27 @@
visual-studio-code-bin visual-studio-code-bin
i3blocks-contrib i3blocks-contrib
insync insync
ttf-font-awesome-4
awesome-terminal-fonts-git awesome-terminal-fonts-git
otf-droid-sans-mono-powerline-git otf-droid-sans-mono-powerline-git
downgrade downgrade
powerline-rs oh-my-posh
dive dive
xorg-xev xorg-xev
networkmanager-l2tp networkmanager-l2tp
snapd
azure-cli
notify-osd-customizable notify-osd-customizable
notifyconf notifyconf
dotnet-host-bin dotnet-host-bin
sysmontask
keychain keychain
nomachine nomachine
chili-sddm-theme chili-sddm-theme
dive dive
gnome-text-editor gnome-text-editor
greenclip greenclip
kind
pulseaudio-ctl pulseaudio-ctl
seafile seafile
seafile-client seafile-client
awf-gtk4
azure-cli
sysmontask
kind

View File

@ -92,6 +92,8 @@ eog
feh feh
firefox firefox
flameshot flameshot
gtk-engine-murrine
gnome-themes-standard
gnome-themes-extra gnome-themes-extra
htop htop
i3blocks i3blocks

View File

@ -62,7 +62,6 @@ bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right bindsym $mod+Shift+Right move right
# move focused workspace # move focused workspace
bindsym $mod+Ctrl+Right move workspace to output right bindsym $mod+Ctrl+Right move workspace to output right
bindsym $mod+Ctrl+Left move workspace to output left bindsym $mod+Ctrl+Left move workspace to output left
@ -234,6 +233,7 @@ for_window [title="Tidal-hifi - settings"] floating enable
for_window [class="Sysmontask"] floating enable for_window [class="Sysmontask"] floating enable
for_window [class="Sysmontask"] resize set 930 665 for_window [class="Sysmontask"] resize set 930 665
for_window [instance="Godot_Engine"] floating enable for_window [instance="Godot_Engine"] floating enable
for_window [class="Alert"] floating enable
############################################ ############################################
# Workspace specific tools # # Workspace specific tools #
@ -322,8 +322,8 @@ exec --no-startup-id i3-msg 'workspace $workspace2; exec xfce4-terminal' && i3-m
exec --no-startup-id i3-msg 'workspace $workspace12; exec bitwarden-desktop' exec --no-startup-id i3-msg 'workspace $workspace12; exec bitwarden-desktop'
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec /usr/bin/compton
exec /bin/bash ~/.config/i3/scripts/startup.sh
exec --no-startup-id greenclip daemon exec --no-startup-id greenclip daemon
exec --no-startup-id seafile-applet exec --no-startup-id seafile-applet
exec --no-startup-id obsidian exec --no-startup-id obsidian
exec /usr/bin/compton
exec /bin/bash ~/.config/i3/scripts/startup.sh

View File

@ -91,15 +91,28 @@ function setDateTimeConfig {
sudo ln -sf "$PWD"/config/networkmanager/09-timezone /etc/NetworkManager/dispatcher.d/09-timezone sudo ln -sf "$PWD"/config/networkmanager/09-timezone /etc/NetworkManager/dispatcher.d/09-timezone
} }
function install_gtk {
mkdir -p ~/.config/xdg-desktop-portal
mkdir -p "$HOME/.config/gtk-3.0"
mkdir -p "$HOME/.config/gtk-4.0"
ln -sf "$PWD"/config/gtk/portals.conf ~/.config/xdg-desktop-portal/portals.conf
ln -sf "$PWD"/config/gtk/settings.ini ~/.gtkrc-2.0.mine
ln -sf "$PWD"/config/gtk/settings.ini ~/.config/gtk-3.0/settings.ini
ln -sf "$PWD"/config/gtk/settings.ini ~/.config/gtk-4.0/settings.ini
}
# install other configs # install other configs
function install_config { function install_config {
install_gtk
# link directories # link directories
linkDir "$PWD"/wallpapers/images ~/Pictures/wallpapers linkDir "$PWD"/wallpapers/images ~/Pictures/wallpapers
linkDir "$PWD"/i3 ~/.config/i3 linkDir "$PWD"/i3 ~/.config/i3
linkDir "$PWD"/config/notify-osd/notify-osd ~/.notify-osd linkDir "$PWD"/config/notify-osd/notify-osd ~/.notify-osd
linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal
linkDir "$PWD"/config/polybar ~/.config/polybar linkDir "$PWD"/config/polybar ~/.config/polybar
linkDir "$PWD"/config/poshthemes ~/.config/poshthemes
# link user files # link user files
ln -sf "$PWD"/bash/.aliases ~/ ln -sf "$PWD"/bash/.aliases ~/
@ -108,9 +121,7 @@ function install_config {
ln -sf "$PWD"/bash/.alias.sh ~/.alias ln -sf "$PWD"/bash/.alias.sh ~/.alias
ln -sf "$PWD"/config/nano/.nanorc ~/.nanorc ln -sf "$PWD"/config/nano/.nanorc ~/.nanorc
ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json
ln -sf "$PWD"/config/gtk-3.0/settings.ini ~/.gtkrc-2.0.mine
mkdir -p "$HOME/.config/gtk-3.0"
ln -sf "$PWD"/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini
ln -sf "$PWD"/config/mimeapps.list ~/.config/mimeapps.list ln -sf "$PWD"/config/mimeapps.list ~/.config/mimeapps.list
ln -sf "$PWD"/config/greenclip.toml ~/.config/greenclip.toml ln -sf "$PWD"/config/greenclip.toml ~/.config/greenclip.toml
ln -sf "$PWD"/config/terminalrc ~/.config/xfce4/terminal/terminalrc ln -sf "$PWD"/config/terminalrc ~/.config/xfce4/terminal/terminalrc