From 40ae852ae295c38ea1c51ca4cf7b6fe916a6ced8 Mon Sep 17 00:00:00 2001 From: jolzem Date: Tue, 25 Jul 2023 03:26:05 +0200 Subject: [PATCH] Initial commit --- .gitignore | 1 + alacritty/alacritty.yml | 62 ++++++++++ deploy.sh | 66 ++++++++++ git/config | 33 +++++ nvim/init.vim | 94 ++++++++++++++ sway/config | 259 +++++++++++++++++++++++++++++++++++++++ sway/lock.sh | 14 +++ user-dirs/user-dirs.dirs | 15 +++ waybar/config | 146 ++++++++++++++++++++++ waybar/style.css | 28 +++++ zsh/.zshrc | 25 ++++ 11 files changed, 743 insertions(+) create mode 100644 .gitignore create mode 100755 alacritty/alacritty.yml create mode 100755 deploy.sh create mode 100644 git/config create mode 100755 nvim/init.vim create mode 100644 sway/config create mode 100755 sway/lock.sh create mode 100644 user-dirs/user-dirs.dirs create mode 100644 waybar/config create mode 100644 waybar/style.css create mode 100644 zsh/.zshrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..454b655 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +credentials diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml new file mode 100755 index 0000000..74090e0 --- /dev/null +++ b/alacritty/alacritty.yml @@ -0,0 +1,62 @@ +window: + padding: + x: 32 + y: 32 + + dynamic_padding: true + decorations: None + opacity: 0.8 + +key_bindings: + - { key: V, mods: Alt, action: Paste } # Alt+V Paste + - { key: C, mods: Alt, action: Copy } # Alt+C Copy + - { key: Q, mods: Super, action: Quit } # Mod+Q Quit + - { key: N, mods: Alt, action: ToggleFullscreen } # Alt+N Fullscreen + - { key: Return, mods: Super, action: SpawnNewInstance } # Mod+Enter New Instance + - { key: J, mods: Alt, action: ScrollLineDown } # Alt+J Scroll Down + - { key: K, mods: Alt, action: ScrollLineUp } # Alt+K Scroll Up + - { key: L, mods: Alt, action: ScrollToBottom } # Alt+L Scroll to Bottom + - { key: H, mods: Alt, action: ScrollToBottom } # Alt+H Scroll to Bottom + +font: + normal: + family: JetBrainsMono Nerd Font + style: Normal + bold: + family: JetBrainsMono Nerd Font + style: Bold + italic: + family: JetBrainsMono Nerd Font + style: Italic + + size: 12.0 + + offset: + x: 0 + y: 0 + +draw_bold_text_with_bright_colors: true + + # import: + # - /home/johannes/.config/alacritty/colors/material.yml + +bell: + animation: EaseOutExpo + color: '0xffffff' + duration: 1 + +mouse: + hide_when_typing: true + +scrolling: + history: 1000 + auto_scroll: true + +cursor: + style: Beam + unfocused_hollow: true + +live_config_reload: true + +shell: + program: /bin/zsh diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..f4e0e1d --- /dev/null +++ b/deploy.sh @@ -0,0 +1,66 @@ +#!/bin/sh + +help() { + printf 'Choose one or more options from the following list\nto add as an argument to the script:\n' + grep -P '^\s+[a-z\-]+\)' "$0" | sed 's/)//' | xargs printf ' - %s\n' + exit 0 +} + +link() { + [ -e "$2" ] && printf 'found existing file %s\n' "$2" && rm -i "$2" + ln -s "$1" "$2" 2>/dev/null +} + +[ $# -eq 0 ] && help + +#command -v git >/dev/null || echo "Install git to run this script" && exit 1 +#command -v curl >/dev/null || echo "Install curl to run this script" && exit 1 + +for option in "$@"; do + case $option in + alacritty) + [ ! -d "$HOME/.config/alacritty" ] && mkdir -p "$HOME/.config/alacritty" + link "$PWD/alacritty/alacritty.yml" "$HOME/.config/alacritty/alacritty.yml" + ;; + zsh) + [ ! -d "$HOME/.config/zsh" ] && mkdir -p "$HOME/.config/zsh" + link "$PWD/zsh/.zshrc" "$HOME/.config/zsh/.zshrc" + curl -fLo $HOME/.config/zsh/zsh-autosuggestions.zsh --create-dirs \ + https://raw.githubusercontent.com/zsh-users/zsh-autosuggestions/master/zsh-autosuggestions.zsh + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.config/zsh/zsh-syntax-highlighting + git clone https://github.com/romkatv/gitstatus.git $HOME/.config/zsh/gitstatus + ;; + nvim) + [ ! -d "$HOME/.config/nvim" ] && mkdir -p "$HOME/.config/nvim" + link "$PWD/nvim/init.vim" "$HOME/.config/nvim/init.vim" + sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + ;; + git) + [ ! -d "$HOME/.config/git" ] && mkdir -p "$HOME/.config/git" + link "$PWD/git/config" "$HOME/.config/git/config" + command -v gh>/dev/null && gh auth login + ;; + user-dirs) + link "$PWD/user-dirs/user-dirs.dirs" "$HOME/.config/user-dirs.dirs" + ;; + sway) + [ ! -d "$HOME/.config/sway" ] && mkdir -p "$HOME/.config/sway" + link "$PWD/sway/config" "$HOME/.config/sway/config" + link "$PWD/sway/lock.sh" "$HOME/.config/sway/lock.sh" + [ -e "$HOME/.config/zsh/variables" ] && link \ + "$HOME/.config/zsh/variables" "$HOME/.config/sway/env" + ;; + waybar) + [ ! -d "$HOME/.config/waybar" ] && mkdir -p "$HOME/.config/waybar" + link "$PWD/waybar/config" "$HOME/.config/waybar/config" + link "$PWD/waybar/style.css" "$HOME/.config/waybar/style.css" + ;; + *) + printf '\033[0;31mno config file found for "%s"\033[0m\n' "$option" + help + exit 1 + ;; + esac + printf '\033[0;32mDeployed configs for %s\033[0m\n' "$option" +done diff --git a/git/config b/git/config new file mode 100644 index 0000000..d4a8746 --- /dev/null +++ b/git/config @@ -0,0 +1,33 @@ +[user] + name = jolzem + email = jolzem@pm.me + signingkey = DB5485828E95A447 + +[credential "https://github.com"] + helper = + helper = !/usr/bin/gh auth git-credential + +[credential "https://gist.github.com"] + helper = + helper = !/usr/bin/gh auth git-credential + +[pull] + rebase = false + +[core] + editor = nvim + +[http] + sslVerify = false + +[credential] + helper = store + +[init] + defaultBranch = main + +[commit] + gpgsign = true + +[safe] + directory = /workspace diff --git a/nvim/init.vim b/nvim/init.vim new file mode 100755 index 0000000..29864c3 --- /dev/null +++ b/nvim/init.vim @@ -0,0 +1,94 @@ +" init autocmd +autocmd! +set number relativenumber " Show absolute line numbers on the left. +filetype plugin on " Auto-detect un-labeled filetypes +syntax on " Turn syntax highlighting on +set ai " Sets auto-indentation +set si " Sets smart-indentation +set cursorline " Highlight current cursor line +set tabstop=2 " Tab equal 2 spaces (default 4) +set shiftwidth=2 " Arrow function (>>) creates 2 spaces +set expandtab " Use spaces instead of a tab charater on TAB +set smarttab " Be smart when using tabs +set hlsearch " When searching (/), highlights matches as you go +set incsearch " When searching (/), display results as you type (instead of only upon ENTER) +set smartcase " When searching (/), automatically switch to a case-sensitive search if you use any capital letters +set ttyfast " Boost speed by altering character redraw rates to your terminal +set showmatch " Show matching brackets when text indicator is over them +set noerrorbells " Silence the error bell +set novisualbell " Visually hide the error bell +set encoding=utf8 " Set text encoding as utf8 +set clipboard+=unnamedplus " Use the OS clipboard by default +set showtabline=2 " Use tabline +set splitright " split to the right instead of left +set nowrap +set bg=dark +set wildmode=longest,list,full + +" PLUGINS +" download to ~/.local/share/nvim/site/autoload/plug.vim +call plug#begin("~/.local/share/nvim/site/autoload/plugged") + Plug 'junegunn/goyo.vim' + Plug 'neoclide/coc.nvim', {'branch': 'release'} + Plug 'https://github.com/jiangmiao/auto-pairs.git' + Plug 'lervag/vimtex' + Plug 'https://github.com/ap/vim-css-color' + Plug 'https://github.com/907th/vim-auto-save.git' + Plug 'https://github.com/alvan/vim-closetag' + Plug 'vim-airline/vim-airline' + Plug 'vim-airline/vim-airline-themes' +call plug#end() + +let g:vimtex_view_method = 'zathura' +let g:auto_save = 1 +let mapleader ="," +let g:airline#extensions#tabline#enabled = 1 + +" REMAPPING +" jump to last known position when opening a file +au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + +map :Goyo +imap :Goyoa + +map ,, :keepp /<++>ca< +imap ,, :keepp /<++>ca< + +" indent with tab +vnoremap >gv +vnoremap >> +inoremap >>a +nnoremap >> +inoremap < << + +" jump to beginning of selection when exiting visual mode +vnoremap o + +" use to trigger completion and navigate to the next complete item +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +inoremap + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : + \ coc#refresh() + +autocmd BufWritePre,BufRead *.tex :VimtexCompile " init autocompiling tex docs +autocmd VimLeave *.tex :!texclear % " clear tex junk when closing tex file +autocmd BufWritePre * %s/\s\+$//e " auto delete trailing white space on save +autocmd BufWritePost *.vim source % + +" LaTeX shortcuts +autocmd FileType tex inoremap b \textbf{} +autocmd FileType tex inoremap u \underline{} +autocmd FileType tex inoremap i \textit{} +autocmd FileType tex inoremap s \section{} +autocmd FileType tex inoremap ss \subsection{} +autocmd FileType tex inoremap sss \subsubsection{} +autocmd FileType tex inoremap l \begin{itemize}<++>\end{itemize},, +autocmd FileType tex inoremap o \begin{enumerate}<++>\end{enumerate},, +autocmd FileType tex inoremap c {\tt } diff --git a/sway/config b/sway/config new file mode 100644 index 0000000..0bf392f --- /dev/null +++ b/sway/config @@ -0,0 +1,259 @@ +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod4 + +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l + +# Your preferred terminal emulator +set $term alacritty +set $browser librewolf +set $files nemo + +# wallpapers +set $mainwall /home/johannes/Files/Pictures/walls/csgo/Gamma-Doppler.png +set $leftwall /home/johannes/Files/Pictures/walls/csgo/M4A1-S-Nightmare.png +set $rightwall /home/johannes/Files/Pictures/walls/csgo/PARACORD-CRIMSON.png +set $topwall /home/johannes/Files/Pictures/walls/csgo/deagle-code-red.png + +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +# set $menu dmenu_path | dmenu | xargs swaymsg exec -- +set $menu eval "dmenu_run $DMENU_COLORS -p 'dmenu'" + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +# Main +output DP-1 bg $mainwall fill +# Left +output DP-3 bg $leftwall fill +# Right +output DP-2 bg $rightwall fill +# Top +output HDMI-A-1 bg $topwall fill + +output * bg /home/johannes/Files/Pictures/walls/etc/insight.jpg fill + +# +# Example configuration: +# +# output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs +output DP-3 pos 0 768 +output DP-1 pos 1920 768 mode 1920x1080@143.981Hz +output DP-2 pos 3840 768 +output HDMI-A-1 pos 4500 0 +# 4500 is approximate location of monitor + +# Assign Workspaces to outputs +workspace 1 output DP-1 +workspace 2 output DP-3 +workspace 3 output DP-2 +workspace 4 output HDMI-A-1 + +### Idle configuration +# +# Example configuration: +# +# exec swayidle -w \ +# timeout 300 'swaylock -f -c 000000' \ +# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ +# before-sleep 'swaylock -f -c 000000' +# +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. + +### Input configuration +# +# Example configuration: +# +# input "2:14:SynPS/2_Synaptics_TouchPad" { +# dwt enabled +# tap enabled +# natural_scroll enabled +# middle_emulation enabled +# } +# +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec $term + + # Start Web browser + bindsym $mod+w exec $browser + bindsym $mod+f exec $files + bindsym $mod+s exec /usr/bin/spotify-launcher + bindsym $mod+b exec /usr/bin/firefox + bindsym $mod+m exec /usr/bin/monero-wallet-gui + bindsym $mod+n exec /home/johannes/.local/bin/copymenu + + # Kill focused window + bindsym $mod+q kill + + # Start your launcher + bindsym $mod+d exec $menu + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+r reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+e exec ~/.local/bin/dpowermenu + + # Lock screen with blur + bindsym $mod+Semicolon exec ~/.config/sway/lock.sh + + # Media Control + bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% + bindsym XF86AudioPlay exec playerctl play-pause + bindsym XF86AudioNext exec playerctl next + bindsym XF86AudioPrev exec playerctl previous + bindsym XF86AudioStop exec playerctl stop +# +# Moving around: +# + # Move your focus around + bindsym $mod+$left focus left + bindsym $mod+$down focus down + bindsym $mod+$up focus up + bindsym $mod+$right focus right + + # Or use $mod+[up|down|left|right] + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+$left move left + bindsym $mod+Shift+$down move down + bindsym $mod+Shift+$up move up + bindsym $mod+Shift+$right move right + + # Ditto, with arrow keys + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right +# +# Workspaces: +# + # Switch to workspace + bindsym $mod+1 workspace number 1 + bindsym $mod+2 workspace number 2 + bindsym $mod+3 workspace number 3 + bindsym $mod+4 workspace number 4 + bindsym $mod+5 workspace number 5 + bindsym $mod+6 workspace number 6 + bindsym $mod+7 workspace number 7 + bindsym $mod+8 workspace number 8 + bindsym $mod+9 workspace number 9 + bindsym $mod+0 workspace number 10 + # Move focused container to workspace + bindsym $mod+Shift+1 move container to workspace number 1 + bindsym $mod+Shift+2 move container to workspace number 2 + bindsym $mod+Shift+3 move container to workspace number 3 + bindsym $mod+Shift+4 move container to workspace number 4 + bindsym $mod+Shift+5 move container to workspace number 5 + bindsym $mod+Shift+6 move container to workspace number 6 + bindsym $mod+Shift+7 move container to workspace number 7 + bindsym $mod+Shift+8 move container to workspace number 8 + bindsym $mod+Shift+9 move container to workspace number 9 + bindsym $mod+Shift+0 move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # Switch the current container between different layout styles + bindsym $mod+Shift+y layout tiling + bindsym $mod+Shift+t workspace_layout default + + # Make the current focus fullscreen + bindsym $mod+t fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+Shift+space floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" +# bindsym $mod+m move workspace to output right + +# Personal settings +focus_follows_mouse no +gaps inner 5 +default_border pixel 1 + +exec_always /usr/bin/indicator-sound-switcher +exec /usr/bin/dunst + +bar { + swaybar_command waybar +} + +# Color Settings +# set $base00 #282828 +# set $base01 #504945 +# set $base03 #928374 +# set $base05 #8ec07c +# set $base07 #fbf1c7 +# set $base08 #cc241d +# set $base0D #98971a +# +# # class border bground text indicator child_border +# client.focused $base05 $base0D $base00 $base0D $base0D +# client.focused_inactive $base01 $base01 $base05 $base03 $base01 +# client.unfocused $base01 $base00 $base05 $base01 $base01 +# client.urgent $base08 $base08 $base00 $base08 $base08 +# client.placeholder $base00 $base00 $base05 $base00 $base00 +# client.background $base07 + +include /etc/sway/config.d/* diff --git a/sway/lock.sh b/sway/lock.sh new file mode 100755 index 0000000..1587b01 --- /dev/null +++ b/sway/lock.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +LOCKARGS="" + +for OUTPUT in `swaymsg -t get_outputs | jq -r '.[].name'` +do + IMAGE=/tmp/$OUTPUT-lock.png + grim -o $OUTPUT $IMAGE + convert $IMAGE -blur 2x8 $IMAGE + LOCKARGS="${LOCKARGS} --image ${OUTPUT}:${IMAGE}" + IMAGES="${IMAGES} ${IMAGE}" +done +swaylock $LOCKARGS +rm $IMAGES diff --git a/user-dirs/user-dirs.dirs b/user-dirs/user-dirs.dirs new file mode 100644 index 0000000..ac36845 --- /dev/null +++ b/user-dirs/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/Files/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Files/Desktop/" +XDG_DOCUMENTS_DIR="$HOME/Files/Documents/" +XDG_DOWNLOAD_DIR="$HOME/Files/Downloads/" +XDG_MUSIC_DIR="$HOME/Files/Music/" +XDG_PICTURES_DIR="$HOME/Files/Pictures/" +XDG_PUBLICSHARE_DIR="$HOME/Files/Public/" +XDG_TEMPLATES_DIR="$HOME/Files/Templates/" +XDG_VIDEOS_DIR="$HOME/Files/Videos/" diff --git a/waybar/config b/waybar/config new file mode 100644 index 0000000..661feb9 --- /dev/null +++ b/waybar/config @@ -0,0 +1,146 @@ +{ + "height": 20, // Waybar height (to be removed for auto height) + "spacing": 4, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": ["sway/workspaces", "sway/mode", "custom/media", "sway/window"], // "wlr/workspaces" for hyprland + "modules-center": ["clock"], + "modules-right": ["pulseaudio", "network", "tray"], // "idle_inhibitor" "keyboard-state" "memory" "cpu" + "keyboard-state": { + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "unknown-tag": "N/A", + "interval": 2, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + "scroll-step": 5, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + } +} + diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..f0fdd2e --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,28 @@ +* { + border: none; + border-radius: 0; + padding: 0; + padding-right: 4px; + margin: 0; + font-size: 12px; + font-family: 'JetBrainsMono Nerd Font', monospace; +} + +window#waybar { + background: #000; + color: #b0bec5; +} + +#workspaces button { + padding: 0 10px; + color: #b0bec5; +} + +#workspaces button.focused { + background-color: #0a0a0a; +} + +#battery { + margin-left: 7px; + margin-right: 3px; +} diff --git a/zsh/.zshrc b/zsh/.zshrc new file mode 100644 index 0000000..5edd351 --- /dev/null +++ b/zsh/.zshrc @@ -0,0 +1,25 @@ +autoload -Uz promptinit +promptinit + +bindkey -e + +bindkey "^[[1;5C" forward-word +bindkey "^[[1;5D" backward-word +bindkey "^[[3;5~" backward-kill-word + +setopt histignorealldups sharehistory + +HISTSIZE=5000 +SAVEHIST=5000 +HISTFILE=$HOME/.config/zsh/zsh_history + +# Modern completion system +autoload -Uz compinit +compinit -d ~/.cache/zsh/ > /dev/null 2>&1 +_comp_options+=(globdots) # include hidden files + +source $HOME/.config/zsh/variables +source $HOME/.config/zsh/aliases +source $HOME/.config/zsh/zsh-autosuggestions.zsh +source $HOME/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source $HOME/.config/zsh/gitstatus/gitstatus.prompt.zsh