From 8a8b13c91812ccd1ec647045c72c0e0affebb76d Mon Sep 17 00:00:00 2001 From: david bernet <david.bernet@student.uni-halle.de> Date: Sun, 8 Dec 2024 23:29:58 +0100 Subject: [PATCH] Added nu and other stuff idk --- hypr/hyprland.conf | 1 + neofetch/config.conf | 864 ++++++++++++++++++++++++++++++ nushell/config.nu | 899 ++++++++++++++++++++++++++++++++ nushell/env.nu | 86 +++ nushell/history.txt | 67 +++ nvim/init.lua | 137 ++--- nvim/lazy-lock.json | 12 + nvim/lua/config/lazy.lua | 35 ++ nvim/lua/plugins/gitsigns.lua | 57 ++ nvim/lua/plugins/lualine.lua | 11 + nvim/lua/plugins/neominimap.lua | 28 + nvim/lua/plugins/neotree.lua | 10 + nvim/lua/plugins/telescope.lua | 5 + nvim/lua/plugins/treesitter.lua | 7 + nvim/test.txt | 4 + nvim_konservativ/init.lua | 116 +++++ sway/config | 164 ++++++ sway/config.d/autostart.conf | 2 + sway/config.d/swaysome.conf | 66 +++ sway/switch_workspace.sh | 20 + sway/workspace_overview.sh | 23 + waybar/config.jsonc | 64 +-- waybar/style.css | 12 +- waybar/style.css.map | 2 +- waybar/style.scss | 16 +- 25 files changed, 2572 insertions(+), 136 deletions(-) create mode 100644 neofetch/config.conf create mode 100644 nushell/config.nu create mode 100644 nushell/env.nu create mode 100644 nushell/history.txt create mode 100644 nvim/lazy-lock.json create mode 100644 nvim/lua/config/lazy.lua create mode 100644 nvim/lua/plugins/gitsigns.lua create mode 100644 nvim/lua/plugins/lualine.lua create mode 100644 nvim/lua/plugins/neominimap.lua create mode 100644 nvim/lua/plugins/neotree.lua create mode 100644 nvim/lua/plugins/telescope.lua create mode 100644 nvim/lua/plugins/treesitter.lua create mode 100644 nvim/test.txt create mode 100644 nvim_konservativ/init.lua create mode 100644 sway/config create mode 100644 sway/config.d/autostart.conf create mode 100644 sway/config.d/swaysome.conf create mode 100644 sway/switch_workspace.sh create mode 100644 sway/workspace_overview.sh diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index af47e44..a7c68e3 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -50,6 +50,7 @@ exec-once = sh /home/hexe/.config/waybar/launch-waybar.sh exec-once = systemctl --user start hyprpolkitagent exec-once = hyprpm reload exec-once = keepassxc +exec-once = blueman-applet ############################# ### ENVIRONMENT VARIABLES ### diff --git a/neofetch/config.conf b/neofetch/config.conf new file mode 100644 index 0000000..cdba4c6 --- /dev/null +++ b/neofetch/config.conf @@ -0,0 +1,864 @@ +# See this wiki page for more info: +# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info +print_info() { + info title + info underline + + info "OS" distro + info "Host" model + info "Kernel" kernel + info "Uptime" uptime + info "Packages" packages + info "Shell" shell + info "Resolution" resolution + info "DE" de + info "WM" wm + info "WM Theme" wm_theme + info "Theme" theme + info "Icons" icons + info "Terminal" term + info "Terminal Font" term_font + info "CPU" cpu + info "GPU" gpu + info "Memory" memory + + # info "GPU Driver" gpu_driver # Linux/macOS only + # info "CPU Usage" cpu_usage + # info "Disk" disk + # info "Battery" battery + # info "Font" font + # info "Song" song + # [[ "$player" ]] && prin "Music Player" "$player" + # info "Local IP" local_ip + # info "Public IP" public_ip + # info "Users" users + # info "Locale" locale # This only works on glibc systems. + + info cols +} + +# Title + + +# Hide/Show Fully qualified domain name. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --title_fqdn +title_fqdn="off" + + +# Kernel + + +# Shorten the output of the kernel function. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --kernel_shorthand +# Supports: Everything except *BSDs (except PacBSD and PC-BSD) +# +# Example: +# on: '4.8.9-1-ARCH' +# off: 'Linux 4.8.9-1-ARCH' +kernel_shorthand="on" + + +# Distro + + +# Shorten the output of the distro function +# +# Default: 'off' +# Values: 'on', 'tiny', 'off' +# Flag: --distro_shorthand +# Supports: Everything except Windows and Haiku +distro_shorthand="off" + +# Show/Hide OS Architecture. +# Show 'x86_64', 'x86' and etc in 'Distro:' output. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --os_arch +# +# Example: +# on: 'Arch Linux x86_64' +# off: 'Arch Linux' +os_arch="on" + + +# Uptime + + +# Shorten the output of the uptime function +# +# Default: 'on' +# Values: 'on', 'tiny', 'off' +# Flag: --uptime_shorthand +# +# Example: +# on: '2 days, 10 hours, 3 mins' +# tiny: '2d 10h 3m' +# off: '2 days, 10 hours, 3 minutes' +uptime_shorthand="on" + + +# Memory + + +# Show memory pecentage in output. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --memory_percent +# +# Example: +# on: '1801MiB / 7881MiB (22%)' +# off: '1801MiB / 7881MiB' +memory_percent="off" + +# Change memory output unit. +# +# Default: 'mib' +# Values: 'kib', 'mib', 'gib' +# Flag: --memory_unit +# +# Example: +# kib '1020928KiB / 7117824KiB' +# mib '1042MiB / 6951MiB' +# gib: ' 0.98GiB / 6.79GiB' +memory_unit="mib" + + +# Packages + + +# Show/Hide Package Manager names. +# +# Default: 'tiny' +# Values: 'on', 'tiny' 'off' +# Flag: --package_managers +# +# Example: +# on: '998 (pacman), 8 (flatpak), 4 (snap)' +# tiny: '908 (pacman, flatpak, snap)' +# off: '908' +package_managers="on" + + +# Shell + + +# Show the path to $SHELL +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --shell_path +# +# Example: +# on: '/bin/bash' +# off: 'bash' +shell_path="off" + +# Show $SHELL version +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --shell_version +# +# Example: +# on: 'bash 4.4.5' +# off: 'bash' +shell_version="on" + + +# CPU + + +# CPU speed type +# +# Default: 'bios_limit' +# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'. +# Flag: --speed_type +# Supports: Linux with 'cpufreq' +# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. +speed_type="bios_limit" + +# CPU speed shorthand +# +# Default: 'off' +# Values: 'on', 'off'. +# Flag: --speed_shorthand +# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz +# +# Example: +# on: 'i7-6500U (4) @ 3.1GHz' +# off: 'i7-6500U (4) @ 3.100GHz' +speed_shorthand="off" + +# Enable/Disable CPU brand in output. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_brand +# +# Example: +# on: 'Intel i7-6500U' +# off: 'i7-6500U (4)' +cpu_brand="on" + +# CPU Speed +# Hide/Show CPU speed. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_speed +# +# Example: +# on: 'Intel i7-6500U (4) @ 3.1GHz' +# off: 'Intel i7-6500U (4)' +cpu_speed="on" + +# CPU Cores +# Display CPU cores in output +# +# Default: 'logical' +# Values: 'logical', 'physical', 'off' +# Flag: --cpu_cores +# Support: 'physical' doesn't work on BSD. +# +# Example: +# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores) +# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores) +# off: 'Intel i7-6500U @ 3.1GHz' +cpu_cores="logical" + +# CPU Temperature +# Hide/Show CPU temperature. +# Note the temperature is added to the regular CPU function. +# +# Default: 'off' +# Values: 'C', 'F', 'off' +# Flag: --cpu_temp +# Supports: Linux, BSD +# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable +# coretemp kernel module. This only supports newer Intel processors. +# +# Example: +# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' +# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]' +# off: 'Intel i7-6500U (4) @ 3.1GHz' +cpu_temp="off" + + +# GPU + + +# Enable/Disable GPU Brand +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gpu_brand +# +# Example: +# on: 'AMD HD 7950' +# off: 'HD 7950' +gpu_brand="on" + +# Which GPU to display +# +# Default: 'all' +# Values: 'all', 'dedicated', 'integrated' +# Flag: --gpu_type +# Supports: Linux +# +# Example: +# all: +# GPU1: AMD HD 7950 +# GPU2: Intel Integrated Graphics +# +# dedicated: +# GPU1: AMD HD 7950 +# +# integrated: +# GPU1: Intel Integrated Graphics +gpu_type="all" + + +# Resolution + + +# Display refresh rate next to each monitor +# Default: 'off' +# Values: 'on', 'off' +# Flag: --refresh_rate +# Supports: Doesn't work on Windows. +# +# Example: +# on: '1920x1080 @ 60Hz' +# off: '1920x1080' +refresh_rate="off" + + +# Gtk Theme / Icons / Font + + +# Shorten output of GTK Theme / Icons / Font +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --gtk_shorthand +# +# Example: +# on: 'Numix, Adwaita' +# off: 'Numix [GTK2], Adwaita [GTK3]' +gtk_shorthand="off" + + +# Enable/Disable gtk2 Theme / Icons / Font +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gtk2 +# +# Example: +# on: 'Numix [GTK2], Adwaita [GTK3]' +# off: 'Adwaita [GTK3]' +gtk2="on" + +# Enable/Disable gtk3 Theme / Icons / Font +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --gtk3 +# +# Example: +# on: 'Numix [GTK2], Adwaita [GTK3]' +# off: 'Numix [GTK2]' +gtk3="on" + + +# IP Address + + +# Website to ping for the public IP +# +# Default: 'http://ident.me' +# Values: 'url' +# Flag: --ip_host +public_ip_host="http://ident.me" + +# Public IP timeout. +# +# Default: '2' +# Values: 'int' +# Flag: --ip_timeout +public_ip_timeout=2 + + +# Desktop Environment + + +# Show Desktop Environment version +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --de_version +de_version="on" + + +# Disk + + +# Which disks to display. +# The values can be any /dev/sdXX, mount point or directory. +# NOTE: By default we only show the disk info for '/'. +# +# Default: '/' +# Values: '/', '/dev/sdXX', '/path/to/drive'. +# Flag: --disk_show +# +# Example: +# disk_show=('/' '/dev/sdb1'): +# 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 823G / 893G (93%)' +# +# disk_show=('/'): +# 'Disk (/): 74G / 118G (66%)' +# +disk_show=('/') + +# Disk subtitle. +# What to append to the Disk subtitle. +# +# Default: 'mount' +# Values: 'mount', 'name', 'dir', 'none' +# Flag: --disk_subtitle +# +# Example: +# name: 'Disk (/dev/sda1): 74G / 118G (66%)' +# 'Disk (/dev/sdb2): 74G / 118G (66%)' +# +# mount: 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 74G / 118G (66%)' +# +# dir: 'Disk (/): 74G / 118G (66%)' +# 'Disk (Local Disk): 74G / 118G (66%)' +# 'Disk (Videos): 74G / 118G (66%)' +# +# none: 'Disk: 74G / 118G (66%)' +# 'Disk: 74G / 118G (66%)' +# 'Disk: 74G / 118G (66%)' +disk_subtitle="mount" + +# Disk percent. +# Show/Hide disk percent. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --disk_percent +# +# Example: +# on: 'Disk (/): 74G / 118G (66%)' +# off: 'Disk (/): 74G / 118G' +disk_percent="on" + + +# Song + + +# Manually specify a music player. +# +# Default: 'auto' +# Values: 'auto', 'player-name' +# Flag: --music_player +# +# Available values for 'player-name': +# +# amarok +# audacious +# banshee +# bluemindo +# clementine +# cmus +# deadbeef +# deepin-music +# dragon +# elisa +# exaile +# gnome-music +# gmusicbrowser +# gogglesmm +# guayadeque +# io.elementary.music +# iTunes +# juk +# lollypop +# mocp +# mopidy +# mpd +# muine +# netease-cloud-music +# olivia +# playerctl +# pogo +# pragha +# qmmp +# quodlibet +# rhythmbox +# sayonara +# smplayer +# spotify +# strawberry +# tauonmb +# tomahawk +# vlc +# xmms2d +# xnoise +# yarock +music_player="auto" + +# Format to display song information. +# +# Default: '%artist% - %album% - %title%' +# Values: '%artist%', '%album%', '%title%' +# Flag: --song_format +# +# Example: +# default: 'Song: Jet - Get Born - Sgt Major' +song_format="%artist% - %album% - %title%" + +# Print the Artist, Album and Title on separate lines +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --song_shorthand +# +# Example: +# on: 'Artist: The Fratellis' +# 'Album: Costello Music' +# 'Song: Chelsea Dagger' +# +# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger' +song_shorthand="off" + +# 'mpc' arguments (specify a host, password etc). +# +# Default: '' +# Example: mpc_args=(-h HOST -P PASSWORD) +mpc_args=() + + +# Text Colors + + +# Text Colors +# +# Default: 'distro' +# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' +# Flag: --colors +# +# Each number represents a different part of the text in +# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info' +# +# Example: +# colors=(distro) - Text is colored based on Distro colors. +# colors=(4 6 1 8 8 6) - Text is colored in the order above. +colors=(distro) + + +# Text Options + + +# Toggle bold text +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --bold +bold="on" + +# Enable/Disable Underline +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --underline +underline_enabled="on" + +# Underline character +# +# Default: '-' +# Values: 'string' +# Flag: --underline_char +underline_char="-" + + +# Info Separator +# Replace the default separator with the specified string. +# +# Default: ':' +# Flag: --separator +# +# Example: +# separator="->": 'Shell-> bash' +# separator=" =": 'WM = dwm' +separator=":" + + +# Color Blocks + + +# Color block range +# The range of colors to print. +# +# Default: '0', '15' +# Values: 'num' +# Flag: --block_range +# +# Example: +# +# Display colors 0-7 in the blocks. (8 colors) +# neofetch --block_range 0 7 +# +# Display colors 0-15 in the blocks. (16 colors) +# neofetch --block_range 0 15 +block_range=(0 15) + +# Toggle color blocks +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --color_blocks +color_blocks="on" + +# Color block width in spaces +# +# Default: '3' +# Values: 'num' +# Flag: --block_width +block_width=3 + +# Color block height in lines +# +# Default: '1' +# Values: 'num' +# Flag: --block_height +block_height=1 + +# Color Alignment +# +# Default: 'auto' +# Values: 'auto', 'num' +# Flag: --col_offset +# +# Number specifies how far from the left side of the terminal (in spaces) to +# begin printing the columns, in case you want to e.g. center them under your +# text. +# Example: +# col_offset="auto" - Default behavior of neofetch +# col_offset=7 - Leave 7 spaces then print the colors +col_offset="auto" + +# Progress Bars + + +# Bar characters +# +# Default: '-', '=' +# Values: 'string', 'string' +# Flag: --bar_char +# +# Example: +# neofetch --bar_char 'elapsed' 'total' +# neofetch --bar_char '-' '=' +bar_char_elapsed="-" +bar_char_total="=" + +# Toggle Bar border +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --bar_border +bar_border="on" + +# Progress bar length in spaces +# Number of chars long to make the progress bars. +# +# Default: '15' +# Values: 'num' +# Flag: --bar_length +bar_length=15 + +# Progress bar colors +# When set to distro, uses your distro's logo colors. +# +# Default: 'distro', 'distro' +# Values: 'distro', 'num' +# Flag: --bar_colors +# +# Example: +# neofetch --bar_colors 3 4 +# neofetch --bar_colors distro 5 +bar_color_elapsed="distro" +bar_color_total="distro" + + +# Info display +# Display a bar with the info. +# +# Default: 'off' +# Values: 'bar', 'infobar', 'barinfo', 'off' +# Flags: --cpu_display +# --memory_display +# --battery_display +# --disk_display +# +# Example: +# bar: '[---=======]' +# infobar: 'info [---=======]' +# barinfo: '[---=======] info' +# off: 'info' +cpu_display="off" +memory_display="off" +battery_display="off" +disk_display="off" + + +# Backend Settings + + +# Image backend. +# +# Default: 'ascii' +# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', +# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' +# Flag: --backend +image_backend="ascii" + +# Image Source +# +# Which image or ascii file to display. +# +# Default: 'auto' +# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")' +# Flag: --source +# +# NOTE: 'auto' will pick the best image source for whatever image backend is used. +# In ascii mode, distro ascii art will be used and in an image mode, your +# wallpaper will be used. +image_source="auto" + + +# Ascii Options + + +# Ascii distro +# Which distro's ascii art to display. +# +# Default: 'auto' +# Values: 'auto', 'distro_name' +# Flag: --ascii_distro +# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS", +# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs, +# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock, +# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD, +# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS, +# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover, +# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin, +# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary, +# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD, +# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo, +# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra, +# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion, +# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite, +# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva, +# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib, +# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner, +# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba, +# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD, +# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint, +# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix, +# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan, +# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific, +# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz, +# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS, +# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails, +# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio, +# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin, +# and IRIX have ascii logos +# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants. +# Use '{distro name}_old' to use the old logos. +# NOTE: Ubuntu has flavor variants. +# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME, +# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors. +# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu, +# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android, +# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola, +# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS, +# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian, +# postmarketOS, and Void have a smaller logo variant. +# Use '{distro name}_small' to use the small variants. +ascii_distro="auto" + +# Ascii Colors +# +# Default: 'distro' +# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num' +# Flag: --ascii_colors +# +# Example: +# ascii_colors=(distro) - Ascii is colored based on Distro colors. +# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors. +ascii_colors=(distro) + +# Bold ascii logo +# Whether or not to bold the ascii logo. +# +# Default: 'on' +# Values: 'on', 'off' +# Flag: --ascii_bold +ascii_bold="on" + + +# Image Options + + +# Image loop +# Setting this to on will make neofetch redraw the image constantly until +# Ctrl+C is pressed. This fixes display issues in some terminal emulators. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --loop +image_loop="off" + +# Thumbnail directory +# +# Default: '~/.cache/thumbnails/neofetch' +# Values: 'dir' +thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" + +# Crop mode +# +# Default: 'normal' +# Values: 'normal', 'fit', 'fill' +# Flag: --crop_mode +# +# See this wiki page to learn about the fit and fill options. +# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F +crop_mode="normal" + +# Crop offset +# Note: Only affects 'normal' crop mode. +# +# Default: 'center' +# Values: 'northwest', 'north', 'northeast', 'west', 'center' +# 'east', 'southwest', 'south', 'southeast' +# Flag: --crop_offset +crop_offset="center" + +# Image size +# The image is half the terminal width by default. +# +# Default: 'auto' +# Values: 'auto', '00px', '00%', 'none' +# Flags: --image_size +# --size +image_size="auto" + +# Gap between image and text +# +# Default: '3' +# Values: 'num', '-num' +# Flag: --gap +gap=3 + +# Image offsets +# Only works with the w3m backend. +# +# Default: '0' +# Values: 'px' +# Flags: --xoffset +# --yoffset +yoffset=0 +xoffset=0 + +# Image background color +# Only works with the w3m backend. +# +# Default: '' +# Values: 'color', 'blue' +# Flag: --bg_color +background_color= + + +# Misc Options + +# Stdout mode +# Turn off all colors and disables image backend (ASCII/Image). +# Useful for piping into another command. +# Default: 'off' +# Values: 'on', 'off' +stdout="off" diff --git a/nushell/config.nu b/nushell/config.nu new file mode 100644 index 0000000..59ff7b8 --- /dev/null +++ b/nushell/config.nu @@ -0,0 +1,899 @@ +# Nushell Config File +# +# version = "0.100.0" + +# For more information on defining custom themes, see +# https://www.nushell.sh/book/coloring_and_theming.html +# And here is the theme collection +# https://github.com/nushell/nu_scripts/tree/main/themes +let dark_theme = { + # color for nushell primitives + separator: white + leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off + header: green_bold + empty: blue + # Closures can be used to choose colors for specific values. + # The value (in this case, a bool) is piped into the closure. + # eg) {|| if $in { 'light_cyan' } else { 'light_gray' } } + bool: light_cyan + int: white + filesize: cyan + duration: white + date: purple + range: white + float: white + string: white + nothing: white + binary: white + cell-path: white + row_index: green_bold + record: white + list: white + block: white + hints: dark_gray + search_result: { bg: red fg: white } + shape_and: purple_bold + shape_binary: purple_bold + shape_block: blue_bold + shape_bool: light_cyan + shape_closure: green_bold + shape_custom: green + shape_datetime: cyan_bold + shape_directory: cyan + shape_external: cyan + shape_externalarg: green_bold + shape_external_resolved: light_yellow_bold + shape_filepath: cyan + shape_flag: blue_bold + shape_float: purple_bold + # shapes are used to change the cli syntax highlighting + shape_garbage: { fg: white bg: red attr: b } + shape_glob_interpolation: cyan_bold + shape_globpattern: cyan_bold + shape_int: purple_bold + shape_internalcall: cyan_bold + shape_keyword: cyan_bold + shape_list: cyan_bold + shape_literal: blue + shape_match_pattern: green + shape_matching_brackets: { attr: u } + shape_nothing: light_cyan + shape_operator: yellow + shape_or: purple_bold + shape_pipe: purple_bold + shape_range: yellow_bold + shape_record: cyan_bold + shape_redirection: purple_bold + shape_signature: green_bold + shape_string: green + shape_string_interpolation: cyan_bold + shape_table: blue_bold + shape_variable: purple + shape_vardecl: purple + shape_raw_string: light_purple +} + +let light_theme = { + # color for nushell primitives + separator: dark_gray + leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off + header: green_bold + empty: blue + # Closures can be used to choose colors for specific values. + # The value (in this case, a bool) is piped into the closure. + # eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } } + bool: dark_cyan + int: dark_gray + filesize: cyan_bold + duration: dark_gray + date: purple + range: dark_gray + float: dark_gray + string: dark_gray + nothing: dark_gray + binary: dark_gray + cell-path: dark_gray + row_index: green_bold + record: dark_gray + list: dark_gray + block: dark_gray + hints: dark_gray + search_result: { fg: white bg: red } + shape_and: purple_bold + shape_binary: purple_bold + shape_block: blue_bold + shape_bool: light_cyan + shape_closure: green_bold + shape_custom: green + shape_datetime: cyan_bold + shape_directory: cyan + shape_external: cyan + shape_externalarg: green_bold + shape_external_resolved: light_purple_bold + shape_filepath: cyan + shape_flag: blue_bold + shape_float: purple_bold + # shapes are used to change the cli syntax highlighting + shape_garbage: { fg: white bg: red attr: b } + shape_glob_interpolation: cyan_bold + shape_globpattern: cyan_bold + shape_int: purple_bold + shape_internalcall: cyan_bold + shape_keyword: cyan_bold + shape_list: cyan_bold + shape_literal: blue + shape_match_pattern: green + shape_matching_brackets: { attr: u } + shape_nothing: light_cyan + shape_operator: yellow + shape_or: purple_bold + shape_pipe: purple_bold + shape_range: yellow_bold + shape_record: cyan_bold + shape_redirection: purple_bold + shape_signature: green_bold + shape_string: green + shape_string_interpolation: cyan_bold + shape_table: blue_bold + shape_variable: purple + shape_vardecl: purple + shape_raw_string: light_purple +} + +# External completer example +# let carapace_completer = {|spans| +# carapace $spans.0 nushell ...$spans | from json +# } + +# The default config record. This is where much of your global configuration is setup. +$env.config = { + show_banner: false # true or false to enable or disable the welcome banner at startup + + ls: { + use_ls_colors: true # use the LS_COLORS environment variable to colorize output + clickable_links: true # enable or disable clickable links. Your terminal has to support links. + } + + rm: { + always_trash: false # always act as if -t was given. Can be overridden with -p + } + + table: { + mode: compact # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other + index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column + show_empty: true # show 'empty list' and 'empty record' placeholders for command output + padding: { left: 1, right: 1 } # a left right padding of each column in a table + trim: { + methodology: wrapping # wrapping or truncating + wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology + truncating_suffix: "..." # A suffix used by the 'truncating' methodology + } + header_on_separator: false # show header text on separator/border line + footer_inheritance: false # render footer in parent table if child is big enough (extended table option) + # abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point + } + + error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages + + # Whether an error message should be printed if an error of a certain kind is triggered. + display_errors: { + exit_code: false # assume the external command prints an error message + # Core dump errors are always printed, and SIGPIPE never triggers an error. + # The setting below controls message printing for termination by all other signals. + termination_signal: true + } + + # datetime_format determines what a datetime rendered in the shell would look like. + # Behavior without this configuration point will be to "humanize" the datetime display, + # showing something like "a day ago." + datetime_format: { + # normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables + # table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format + } + + explore: { + status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" }, + command_bar_text: { fg: "#C4C9C6" }, + highlight: { fg: "black", bg: "yellow" }, + status: { + error: { fg: "white", bg: "red" }, + warn: {} + info: {} + }, + selected_cell: { bg: light_blue }, + } + + history: { + max_size: 100_000 # Session has to be reloaded for this to take effect + sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file + file_format: "plaintext" # "sqlite" or "plaintext" + isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions. + } + + completions: { + case_sensitive: false # set to true to enable case-sensitive completions + quick: true # set this to false to prevent auto-selecting completions when only one remains + partial: true # set this to false to prevent partial filling of the prompt + algorithm: "prefix" # prefix or fuzzy + sort: "smart" # "smart" (alphabetical for prefix matching, fuzzy score for fuzzy matching) or "alphabetical" + external: { + enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow + max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options + completer: null # check 'carapace_completer' above as an example + } + use_ls_colors: true # set this to true to enable file/path/directory completions using LS_COLORS + } + + filesize: { + metric: false # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard) + format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto + } + + cursor_shape: { + emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default) + vi_insert: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default) + vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default) + } + + color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record + footer_mode: 25 # always, never, number_of_rows, auto + float_precision: 2 # the precision for displaying floats in tables + buffer_editor: null # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.VISUAL and $env.EDITOR + use_ansi_coloring: true + bracketed_paste: true # enable bracketed paste, currently useless on windows + edit_mode: emacs # emacs, vi + shell_integration: { + # osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title + osc2: true + # osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory + osc7: true + # osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8 + osc8: true + # osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal + osc9_9: false + # osc133 is several escapes invented by Final Term which include the supported ones below. + # 133;A - Mark prompt start + # 133;B - Mark prompt end + # 133;C - Mark pre-execution + # 133;D;exit - Mark execution finished with exit code + # This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is + osc133: true + # osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features + # 633;A - Mark prompt start + # 633;B - Mark prompt end + # 633;C - Mark pre-execution + # 633;D;exit - Mark execution finished with exit code + # 633;E - Explicitly set the command line with an optional nonce + # 633;P;Cwd=<path> - Mark the current working directory and communicate it to the terminal + # and also helps with the run recent menu in vscode + osc633: true + # reset_application_mode is escape \x1b[?1l and was added to help ssh work better + reset_application_mode: true + } + render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt. + use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this. + highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which. + recursion_limit: 50 # the maximum number of times nushell allows recursion before stopping it + + plugins: {} # Per-plugin configuration. See https://www.nushell.sh/contributor-book/plugins.html#configuration. + + plugin_gc: { + # Configuration for plugin garbage collection + default: { + enabled: true # true to enable stopping of inactive plugins + stop_after: 10sec # how long to wait after a plugin is inactive to stop it + } + plugins: { + # alternate configuration for specific plugins, by name, for example: + # + # gstat: { + # enabled: false + # } + } + } + + hooks: { + pre_prompt: [{ null }] # run before the prompt is shown + pre_execution: [{ null }] # run before the repl input is run + env_change: { + PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input + } + display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline + command_not_found: { null } # return an error message when a command is not found + } + + menus: [ + # Configuration for default nushell menus + # Note the lack of source parameter + { + name: completion_menu + only_buffer_difference: false + marker: "| " + type: { + layout: columnar + columns: 4 + col_width: 20 # Optional value. If missing all the screen width is used to calculate column width + col_padding: 2 + } + style: { + text: green + selected_text: { attr: r } + description_text: yellow + match_text: { attr: u } + selected_match_text: { attr: ur } + } + } + { + name: ide_completion_menu + only_buffer_difference: false + marker: "| " + type: { + layout: ide + min_completion_width: 0, + max_completion_width: 50, + max_completion_height: 10, # will be limited by the available lines in the terminal + padding: 0, + border: true, + cursor_offset: 0, + description_mode: "prefer_right" + min_description_width: 0 + max_description_width: 50 + max_description_height: 10 + description_offset: 1 + # If true, the cursor pos will be corrected, so the suggestions match up with the typed text + # + # C:\> str + # str join + # str trim + # str split + correct_cursor_pos: false + } + style: { + text: green + selected_text: { attr: r } + description_text: yellow + match_text: { attr: u } + selected_match_text: { attr: ur } + } + } + { + name: history_menu + only_buffer_difference: true + marker: "? " + type: { + layout: list + page_size: 10 + } + style: { + text: green + selected_text: green_reverse + description_text: yellow + } + } + { + name: help_menu + only_buffer_difference: true + marker: "? " + type: { + layout: description + columns: 4 + col_width: 20 # Optional value. If missing all the screen width is used to calculate column width + col_padding: 2 + selection_rows: 4 + description_rows: 10 + } + style: { + text: green + selected_text: green_reverse + description_text: yellow + } + } + ] + + keybindings: [ + { + name: completion_menu + modifier: none + keycode: tab + mode: [emacs vi_normal vi_insert] + event: { + until: [ + { send: menu name: completion_menu } + { send: menunext } + { edit: complete } + ] + } + } + { + name: completion_previous_menu + modifier: shift + keycode: backtab + mode: [emacs, vi_normal, vi_insert] + event: { send: menuprevious } + } + { + name: ide_completion_menu + modifier: control + keycode: space + mode: [emacs vi_normal vi_insert] + event: { + until: [ + { send: menu name: ide_completion_menu } + { send: menunext } + { edit: complete } + ] + } + } + { + name: history_menu + modifier: control + keycode: char_r + mode: [emacs, vi_insert, vi_normal] + event: { send: menu name: history_menu } + } + { + name: help_menu + modifier: none + keycode: f1 + mode: [emacs, vi_insert, vi_normal] + event: { send: menu name: help_menu } + } + { + name: next_page_menu + modifier: control + keycode: char_x + mode: emacs + event: { send: menupagenext } + } + { + name: undo_or_previous_page_menu + modifier: control + keycode: char_z + mode: emacs + event: { + until: [ + { send: menupageprevious } + { edit: undo } + ] + } + } + { + name: escape + modifier: none + keycode: escape + mode: [emacs, vi_normal, vi_insert] + event: { send: esc } # NOTE: does not appear to work + } + { + name: cancel_command + modifier: control + keycode: char_c + mode: [emacs, vi_normal, vi_insert] + event: { send: ctrlc } + } + { + name: quit_shell + modifier: control + keycode: char_d + mode: [emacs, vi_normal, vi_insert] + event: { send: ctrld } + } + { + name: clear_screen + modifier: control + keycode: char_l + mode: [emacs, vi_normal, vi_insert] + event: { send: clearscreen } + } + { + name: search_history + modifier: control + keycode: char_q + mode: [emacs, vi_normal, vi_insert] + event: { send: searchhistory } + } + { + name: open_command_editor + modifier: control + keycode: char_o + mode: [emacs, vi_normal, vi_insert] + event: { send: openeditor } + } + { + name: move_up + modifier: none + keycode: up + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: menuup } + { send: up } + ] + } + } + { + name: move_down + modifier: none + keycode: down + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: menudown } + { send: down } + ] + } + } + { + name: move_left + modifier: none + keycode: left + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: menuleft } + { send: left } + ] + } + } + { + name: move_right_or_take_history_hint + modifier: none + keycode: right + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: historyhintcomplete } + { send: menuright } + { send: right } + ] + } + } + { + name: move_one_word_left + modifier: control + keycode: left + mode: [emacs, vi_normal, vi_insert] + event: { edit: movewordleft } + } + { + name: move_one_word_right_or_take_history_hint + modifier: control + keycode: right + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: historyhintwordcomplete } + { edit: movewordright } + ] + } + } + { + name: move_to_line_start + modifier: none + keycode: home + mode: [emacs, vi_normal, vi_insert] + event: { edit: movetolinestart } + } + { + name: move_to_line_start + modifier: control + keycode: char_a + mode: [emacs, vi_normal, vi_insert] + event: { edit: movetolinestart } + } + { + name: move_to_line_end_or_take_history_hint + modifier: none + keycode: end + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: historyhintcomplete } + { edit: movetolineend } + ] + } + } + { + name: move_to_line_end_or_take_history_hint + modifier: control + keycode: char_e + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: historyhintcomplete } + { edit: movetolineend } + ] + } + } + { + name: move_to_line_start + modifier: control + keycode: home + mode: [emacs, vi_normal, vi_insert] + event: { edit: movetolinestart } + } + { + name: move_to_line_end + modifier: control + keycode: end + mode: [emacs, vi_normal, vi_insert] + event: { edit: movetolineend } + } + { + name: move_down + modifier: control + keycode: char_n + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: menudown } + { send: down } + ] + } + } + { + name: move_up + modifier: control + keycode: char_p + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + { send: menuup } + { send: up } + ] + } + } + { + name: delete_one_character_backward + modifier: none + keycode: backspace + mode: [emacs, vi_insert] + event: { edit: backspace } + } + { + name: delete_one_word_backward + modifier: control + keycode: backspace + mode: [emacs, vi_insert] + event: { edit: backspaceword } + } + { + name: delete_one_character_forward + modifier: none + keycode: delete + mode: [emacs, vi_insert] + event: { edit: delete } + } + { + name: delete_one_character_forward + modifier: control + keycode: delete + mode: [emacs, vi_insert] + event: { edit: delete } + } + { + name: delete_one_character_backward + modifier: control + keycode: char_h + mode: [emacs, vi_insert] + event: { edit: backspace } + } + { + name: delete_one_word_backward + modifier: control + keycode: char_w + mode: [emacs, vi_insert] + event: { edit: backspaceword } + } + { + name: move_left + modifier: none + keycode: backspace + mode: vi_normal + event: { edit: moveleft } + } + { + name: newline_or_run_command + modifier: none + keycode: enter + mode: emacs + event: { send: enter } + } + { + name: move_left + modifier: control + keycode: char_b + mode: emacs + event: { + until: [ + { send: menuleft } + { send: left } + ] + } + } + { + name: move_right_or_take_history_hint + modifier: control + keycode: char_f + mode: emacs + event: { + until: [ + { send: historyhintcomplete } + { send: menuright } + { send: right } + ] + } + } + { + name: redo_change + modifier: control + keycode: char_g + mode: emacs + event: { edit: redo } + } + { + name: undo_change + modifier: control + keycode: char_z + mode: emacs + event: { edit: undo } + } + { + name: paste_before + modifier: control + keycode: char_y + mode: emacs + event: { edit: pastecutbufferbefore } + } + { + name: cut_word_left + modifier: control + keycode: char_w + mode: emacs + event: { edit: cutwordleft } + } + { + name: cut_line_to_end + modifier: control + keycode: char_k + mode: emacs + event: { edit: cuttolineend } + } + { + name: cut_line_from_start + modifier: control + keycode: char_u + mode: emacs + event: { edit: cutfromstart } + } + { + name: swap_graphemes + modifier: control + keycode: char_t + mode: emacs + event: { edit: swapgraphemes } + } + { + name: move_one_word_left + modifier: alt + keycode: left + mode: emacs + event: { edit: movewordleft } + } + { + name: move_one_word_right_or_take_history_hint + modifier: alt + keycode: right + mode: emacs + event: { + until: [ + { send: historyhintwordcomplete } + { edit: movewordright } + ] + } + } + { + name: move_one_word_left + modifier: alt + keycode: char_b + mode: emacs + event: { edit: movewordleft } + } + { + name: move_one_word_right_or_take_history_hint + modifier: alt + keycode: char_f + mode: emacs + event: { + until: [ + { send: historyhintwordcomplete } + { edit: movewordright } + ] + } + } + { + name: delete_one_word_forward + modifier: alt + keycode: delete + mode: emacs + event: { edit: deleteword } + } + { + name: delete_one_word_backward + modifier: alt + keycode: backspace + mode: emacs + event: { edit: backspaceword } + } + { + name: delete_one_word_backward + modifier: alt + keycode: char_m + mode: emacs + event: { edit: backspaceword } + } + { + name: cut_word_to_right + modifier: alt + keycode: char_d + mode: emacs + event: { edit: cutwordright } + } + { + name: upper_case_word + modifier: alt + keycode: char_u + mode: emacs + event: { edit: uppercaseword } + } + { + name: lower_case_word + modifier: alt + keycode: char_l + mode: emacs + event: { edit: lowercaseword } + } + { + name: capitalize_char + modifier: alt + keycode: char_c + mode: emacs + event: { edit: capitalizechar } + } + # The following bindings with `*system` events require that Nushell has + # been compiled with the `system-clipboard` feature. + # If you want to use the system clipboard for visual selection or to + # paste directly, uncomment the respective lines and replace the version + # using the internal clipboard. + { + name: copy_selection + modifier: control_shift + keycode: char_c + mode: emacs + event: { edit: copyselection } + # event: { edit: copyselectionsystem } + } + { + name: cut_selection + modifier: control_shift + keycode: char_x + mode: emacs + event: { edit: cutselection } + # event: { edit: cutselectionsystem } + } + # { + # name: paste_system + # modifier: control_shift + # keycode: char_v + # mode: emacs + # event: { edit: pastesystem } + # } + { + name: select_all + modifier: control_shift + keycode: char_a + mode: emacs + event: { edit: selectall } + } + ] +} diff --git a/nushell/env.nu b/nushell/env.nu new file mode 100644 index 0000000..281e7c3 --- /dev/null +++ b/nushell/env.nu @@ -0,0 +1,86 @@ +# Nushell Environment Config File +# +# version = "0.100.0" + +def create_left_prompt [] { + let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) { + null => $env.PWD + '' => '~' + $relative_pwd => ([~ $relative_pwd] | path join) + } + + let user = (whoami) + let user_color = (if (is-admin) { ansi red_bold } else { ansi light_magenta }) + + let hostname = (hostname) + + let path_segment = $"($user_color)($user)(ansi light_gray)@(ansi light_green)($hostname)(ansi light_gray):(ansi light_cyan)($dir)" + + $path_segment +} + +# Use nushell functions to define your right and left prompt +$env.PROMPT_COMMAND = {|| create_left_prompt } + +# The prompt indicators are environmental variables that represent +# the state of the prompt +$env.PROMPT_INDICATOR = {|| " \n-> " } +$env.PROMPT_INDICATOR_VI_INSERT = {|| " \n: " } +$env.PROMPT_INDICATOR_VI_NORMAL = {|| " \n> " } +$env.PROMPT_MULTILINE_INDICATOR = {|| " \n::: " } + +# If you want previously entered commands to have a different prompt from the usual one, +# you can uncomment one or more of the following lines. +# This can be useful if you have a 2-line prompt and it's taking up a lot of space +# because every command entered takes up 2 lines instead of 1. You can then uncomment +# the line below so that previously entered commands show with a single `🚀`. +# $env.TRANSIENT_PROMPT_COMMAND = {|| "🚀 " } +# $env.TRANSIENT_PROMPT_INDICATOR = {|| "" } +# $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" } +# $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" } +# $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" } +# $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" } + +# Specifies how environment variables are: +# - converted from a string to a value on Nushell startup (from_string) +# - converted from a value back to a string when running external commands (to_string) +# Note: The conversions happen *after* config.nu is loaded +$env.ENV_CONVERSIONS = { + "PATH": { + from_string: { |s| $s | split row (char esep) | path expand --no-symlink } + to_string: { |v| $v | path expand --no-symlink | str join (char esep) } + } + "Path": { + from_string: { |s| $s | split row (char esep) | path expand --no-symlink } + to_string: { |v| $v | path expand --no-symlink | str join (char esep) } + } +} + +# Directories to search for scripts when calling source or use +# The default for this is $nu.default-config-dir/scripts +$env.NU_LIB_DIRS = [ + ($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts + ($nu.data-dir | path join 'completions') # default home for nushell completions +] + +# Directories to search for plugin binaries when calling register +# The default for this is $nu.default-config-dir/plugins +$env.NU_PLUGIN_DIRS = [ + ($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins +] + +# To add entries to PATH (on Windows you might use Path), you can use the following pattern: +# $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path') +# An alternate way to add entries to $env.PATH is to use the custom command `path add` +# which is built into the nushell stdlib: +# use std "path add" +# $env.PATH = ($env.PATH | split row (char esep)) +# path add /some/path +# path add ($env.CARGO_HOME | path join "bin") +# path add ($env.HOME | path join ".local" "bin") +# $env.PATH = ($env.PATH | uniq) + +# To load from a custom file you can use: +# source ($nu.default-config-dir | path join 'custom.nu') + +^date +"%a %d.%m.%Y %H:%M" \ No newline at end of file diff --git a/nushell/history.txt b/nushell/history.txt new file mode 100644 index 0000000..10d7e85 --- /dev/null +++ b/nushell/history.txt @@ -0,0 +1,67 @@ +clear +ls +lsblk +man lsblk +man +clear +ssh +nvim .config/nushell/config.nu +PS1="aa" +export PS1="aa" +export +cd .config/nushell/ +codium +codium . +ls +neofetch +cd Dokumente/ +cd / +cd mnt/sda1/ +cd ~ +sudo -i +clear +ls +nu +nu +clear +Okay das ist besser +clear +whoami +cd Dokumente/ +hostname +clear +cd Dokumente/ +aha! +ls +lsblk +^ls +lsblk | get NAME +echo $(lsblk) | get NAME +echo $(lsblk) +echo (lsblk) +echo (lsblk) | get NAME +awk +lsblk | awk +lsblk | parse +lsblk +lsblk | parse "{name} {MAJ}:{MIN} {RM}" +lsblk | detect columns +pgrep +top +htop +top -h +top -h | detect columns +top -b +df -h +df -h | detect columns +df -h +df -h | detect columns +clear +hugo --serve +hugo --server +hugo -server +hugo server +ntfs-3g /dev/sda1 /mnt/sda1/ +sudo ntfs-3g /dev/sda1 /mnt/sda1/ +codium ~/.config/ +sh ~/.config/waybar/launch-waybar.sh diff --git a/nvim/init.lua b/nvim/init.lua index 3e00146..e69c97c 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,49 +1,19 @@ +-- BNDs nvim config <3 +-- ------------------- + vim.cmd("set expandtab") vim.cmd("set tabstop=4") vim.cmd("set softtabstop=4") vim.cmd("set shiftwidth=4") -vim.g.mapleader = " " - --- Initialize vim-plug ----------------------- -local plug_path = vim.fn.stdpath('data') .. '/site/autoload/plug.vim' -if vim.fn.empty(vim.fn.glob(plug_path)) > 0 then - vim.fn.system({ - 'sh', '-c', - 'curl -fLo ' .. plug_path .. ' --create-dirs ' .. - 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - }) - vim.cmd 'autocmd VimEnter * PlugInstall | source $MYVIMRC' -end - - --- vim-plug Plugin Section --------------------------- -vim.cmd [[ -call plug#begin('~/.config/nvim/plugged') - -Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} -Plug 'neovim/nvim-lspconfig' -Plug 'ellisonleao/gruvbox.nvim' -Plug 'nvim-lua/plenary.nvim' - -Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } -Plug 'nvim-telescope/telescope-ui-select.nvim' +vim.g.mapleader=" " -Plug 'https://github.com/nvim-neo-tree/neo-tree.nvim.git' -Plug 'nvim-tree/nvim-web-devicons' -Plug 'MunifTanjim/nui.nvim' -Plug 'nvim-lualine/lualine.nvim' +-- import lazy package manager +require("config.lazy") -Plug 'williamboman/mason.nvim' -Plug 'williamboman/mason-lspconfig.nvim' -Plug 'neovim/nvim-lspconfig' - -call plug#end() -]] +-- Set the color scheme +vim.cmd.colorscheme "habamax" -- line numbers ---------------- vim.o.number = true -- Enable line numbers vim.o.relativenumber = true -- Enable relative line numbers vim.cmd [[ @@ -51,66 +21,57 @@ vim.cmd [[ autocmd InsertLeave * set relativenumber " Enable relative numbers in normal mode ]] --- Set colorscheme ------------------- -vim.o.background = "dark" -- or "light" for light mode --- Default options: -require("gruvbox").setup({ - terminal_colors = true, -- add neovim terminal colors - contrast = "soft", -- can be "hard", "soft" or empty string - palette_overrides = { --- bright_green = "#ffffff", - } -}) -vim.cmd("colorscheme gruvbox") - --- Set up Telescope -------------------- +-- Telescope local builtin = require("telescope.builtin") -vim.keymap.set('n', '<C-p>', builtin.find_files, {}) -vim.keymap.set('n', '<leader>ff', builtin.find_files, {}) -vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) - --- This is your opts table -require("telescope").setup { - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - -- even more opts - } - } - } -} --- To get ui-select loaded and working with telescope, you need to call --- load_extension, somewhere after setup function: -require("telescope").load_extension("ui-select") +vim.keymap.set('n', '<leader>p', builtin.find_files, {}) +vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) -- Treesitter -------------- local config = require("nvim-treesitter.configs") config.setup({ - ensure_installed = {"lua", "javascript", "rust", "json"}, + ensure_installed = {"lua", "javascript"}, + sync_install = false, highlight = { enable = true }, indent = { enable = true }, }) -- Neotree ----------- -vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal left<CR>') +vim.keymap.set('n', '<leader>o', ':Neotree filesystem reveal right<CR>', {}) + +vim.keymap.set('i', '<C-Space>', '<ESC>', { noremap = true }) +vim.keymap.set('n', 'o', 'a', { noremap = true }) +vim.keymap.set('n', 'u', 'i', { noremap = true }) +vim.keymap.set('n', 'O', 'o', { noremap = true }) +vim.keymap.set('n', 'U', 'O', { noremap = true }) +vim.keymap.set('n', 'xx', 'dd', { noremap = true }) +vim.keymap.set('n', 'cc', 'yy', { noremap = true }) + +for _,mode in pairs({'n', 'x', 'o'}) do + vim.keymap.set(mode, 'j', 'h', { noremap = true }) + vim.keymap.set(mode, 'k', 'j', { noremap = true }) + vim.keymap.set(mode, 'i', 'k', { noremap = true }) + + vim.keymap.set(mode, 'J', '0', { noremap = true }) + vim.keymap.set(mode, 'L', '$', { noremap = true }) + vim.keymap.set(mode, 'I', 'H', { noremap = true }) + vim.keymap.set(mode, 'K', 'L', { noremap = true }) + + vim.keymap.set(mode, '<C-l>', 'w', { noremap = true }) + vim.keymap.set(mode, '<C-j>', 'b', { noremap = true }) + vim.keymap.set(mode, '<C-i>', '<C-b>', { noremap = true }) + vim.keymap.set(mode, '<C-k>', '<C-f>', { noremap = true }) + + vim.keymap.set(mode, 'c', 'y', { noremap = true }) + vim.keymap.set(mode, 'y', 'v', { noremap = true }) + vim.keymap.set(mode, 'x', 'd', { noremap = true }) + vim.keymap.set(mode, 'v', 'p', { noremap = true }) + vim.keymap.set(mode, 'h', 'c', { noremap = true }) +end --- Status line --------------- -require('lualine').setup() +vim.keymap.set('n', 'z', ':undo<cr>', { noremap = true }) +vim.keymap.set('n', 'Z', ':redo<cr>', { noremap = true }) +vim.keymap.set('n', 's', ':w<cr>', { noremap = true }) +vim.keymap.set('n', '<C-q>', ':xa<cr>', { noremap = true }) --- LSP configuration --------------------- -require('mason').setup() -require('mason-lspconfig').setup({ - ensure_installed = { "lua_ls", "ts_ls" } -}) +vim.keymap.set('n', 'S', ':source %<cr>', { noremap = true }) -local lspconfig = require('lspconfig') -lspconfig.lua_ls.setup({}) -lspconfig.ts_ls.setup({}) -vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) -vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {}) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..ad543f6 --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,12 @@ +{ + "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, + "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "neominimap.nvim": { "branch": "main", "commit": "d244cab3171e44389f90831792b4318ab0be94b1" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-treesitter": { "branch": "master", "commit": "60b4c15e7c055295241868e2cc30d71581083ed7" }, + "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" } +} diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..f5ee74c --- /dev/null +++ b/nvim/lua/config/lazy.lua @@ -0,0 +1,35 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, +}) diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..6c1f4fe --- /dev/null +++ b/nvim/lua/plugins/gitsigns.lua @@ -0,0 +1,57 @@ +return { + "lewis6991/gitsigns.nvim", + event = "BufReadPre", + + config = function() + require("gitsigns").setup({ + signs = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signs_staged = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signs_staged_enable = true, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + follow_files = true + }, + auto_attach = true, + attach_to_untracked = false, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + virt_text_priority = 100, + use_focus = true, + }, + current_line_blame_formatter = '<author>, <author_time:%R> - <summary>', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + }) + end, +} diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..1f7b39a --- /dev/null +++ b/nvim/lua/plugins/lualine.lua @@ -0,0 +1,11 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require("lualine").setup({ + options = { + theme = 'everforest' + } + }) + end +} diff --git a/nvim/lua/plugins/neominimap.lua b/nvim/lua/plugins/neominimap.lua new file mode 100644 index 0000000..9d76af7 --- /dev/null +++ b/nvim/lua/plugins/neominimap.lua @@ -0,0 +1,28 @@ +---@module "neominimap.config.meta" +return { + "Isrothy/neominimap.nvim", + version = "v3.*.*", + enabled = false, + lazy = false, -- NOTE: NO NEED to Lazy load + -- Optional + keys = { + -- Global Minimap Controls + { "<leader>nm", "<cmd>Neominimap toggle<cr>", desc = "Toggle global minimap" }, + { "<leader>nr", "<cmd>Neominimap refresh<cr>", desc = "Refresh global minimap" }, + + { "<leader>nf", "<cmd>Neominimap focus<cr>", desc = "Focus on minimap" }, + { "<leader>nu", "<cmd>Neominimap unfocus<cr>", desc = "Unfocus minimap" }, + { "<leader>ns", "<cmd>Neominimap toggleFocus<cr>", desc = "Switch focus on minimap" }, + }, + init = function() + -- The following options are recommended when layout == "float" + vim.opt.wrap = false + vim.opt.sidescrolloff = 36 -- Set a large value + + --- Put your configuration here + ---@type Neominimap.UserConfig + vim.g.neominimap = { + auto_enable = true, + } + end, +} diff --git a/nvim/lua/plugins/neotree.lua b/nvim/lua/plugins/neotree.lua new file mode 100644 index 0000000..25bd2a4 --- /dev/null +++ b/nvim/lua/plugins/neotree.lua @@ -0,0 +1,10 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information + } +} diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..4c2bc8a --- /dev/null +++ b/nvim/lua/plugins/telescope.lua @@ -0,0 +1,5 @@ +return { + 'nvim-telescope/telescope.nvim', tag = '0.1.8', +-- or , branch = '0.1.x', + dependencies = { 'nvim-lua/plenary.nvim' } +} diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..636d82a --- /dev/null +++ b/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,7 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = function() + require("nvim-treesitter.install").update({ with_sync = true })() + end, +} + diff --git a/nvim/test.txt b/nvim/test.txt new file mode 100644 index 0000000..fe70463 --- /dev/null +++ b/nvim/test.txt @@ -0,0 +1,4 @@ +Das ist ein einfacher kleiner Test haha! + + +Okay dann ist der Text einfach weiß, das ist sehr fair, ja diff --git a/nvim_konservativ/init.lua b/nvim_konservativ/init.lua new file mode 100644 index 0000000..3e00146 --- /dev/null +++ b/nvim_konservativ/init.lua @@ -0,0 +1,116 @@ +vim.cmd("set expandtab") +vim.cmd("set tabstop=4") +vim.cmd("set softtabstop=4") +vim.cmd("set shiftwidth=4") +vim.g.mapleader = " " + +-- Initialize vim-plug +---------------------- +local plug_path = vim.fn.stdpath('data') .. '/site/autoload/plug.vim' +if vim.fn.empty(vim.fn.glob(plug_path)) > 0 then + vim.fn.system({ + 'sh', '-c', + 'curl -fLo ' .. plug_path .. ' --create-dirs ' .. + 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + }) + vim.cmd 'autocmd VimEnter * PlugInstall | source $MYVIMRC' +end + + +-- vim-plug Plugin Section +-------------------------- +vim.cmd [[ +call plug#begin('~/.config/nvim/plugged') + +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'neovim/nvim-lspconfig' +Plug 'ellisonleao/gruvbox.nvim' +Plug 'nvim-lua/plenary.nvim' + +Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.8' } +Plug 'nvim-telescope/telescope-ui-select.nvim' + +Plug 'https://github.com/nvim-neo-tree/neo-tree.nvim.git' +Plug 'nvim-tree/nvim-web-devicons' +Plug 'MunifTanjim/nui.nvim' +Plug 'nvim-lualine/lualine.nvim' + +Plug 'williamboman/mason.nvim' +Plug 'williamboman/mason-lspconfig.nvim' +Plug 'neovim/nvim-lspconfig' + +call plug#end() +]] + +-- line numbers +--------------- +vim.o.number = true -- Enable line numbers +vim.o.relativenumber = true -- Enable relative line numbers +vim.cmd [[ + autocmd InsertEnter * set norelativenumber " Disable relative numbers in insert mode + autocmd InsertLeave * set relativenumber " Enable relative numbers in normal mode +]] + +-- Set colorscheme +------------------ +vim.o.background = "dark" -- or "light" for light mode +-- Default options: +require("gruvbox").setup({ + terminal_colors = true, -- add neovim terminal colors + contrast = "soft", -- can be "hard", "soft" or empty string + palette_overrides = { +-- bright_green = "#ffffff", + } +}) +vim.cmd("colorscheme gruvbox") + +-- Set up Telescope +------------------- +local builtin = require("telescope.builtin") +vim.keymap.set('n', '<C-p>', builtin.find_files, {}) +vim.keymap.set('n', '<leader>ff', builtin.find_files, {}) +vim.keymap.set('n', '<leader>fg', builtin.live_grep, {}) + +-- This is your opts table +require("telescope").setup { + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + -- even more opts + } + } + } +} +-- To get ui-select loaded and working with telescope, you need to call +-- load_extension, somewhere after setup function: +require("telescope").load_extension("ui-select") + +-- Treesitter +------------- +local config = require("nvim-treesitter.configs") +config.setup({ + ensure_installed = {"lua", "javascript", "rust", "json"}, + highlight = { enable = true }, + indent = { enable = true }, +}) + +-- Neotree +---------- +vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal left<CR>') + +-- Status line +-------------- +require('lualine').setup() + +-- LSP configuration +-------------------- +require('mason').setup() +require('mason-lspconfig').setup({ + ensure_installed = { "lua_ls", "ts_ls" } +}) + +local lspconfig = require('lspconfig') +lspconfig.lua_ls.setup({}) +lspconfig.ts_ls.setup({}) +vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) +vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {}) diff --git a/sway/config b/sway/config new file mode 100644 index 0000000..2213f2c --- /dev/null +++ b/sway/config @@ -0,0 +1,164 @@ +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod4 +# Home row direction keys, like vim +set $left j +set $down k +set $up i +set $right l +# Your preferred terminal emulator +set $term kitty +# Your preferred application launcher +set $menu rofi -show drun + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +output * bg /home/hexe/Bilder/grafiken/wallpapers/conrado_salinas.png fill +# +# Example configuration: +# +output eDP-1 resolution 1920x1080 position 0,0 +output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +### Idle configuration +# +# Example configuration: +# +# exec swayidle -w \ +# timeout 300 'swaylock -f -c 000000' \ +# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power 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. +input * { + xkb_layout "de" +} + +default_border pixel 2 + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec $term + + # Kill focused window + bindsym $mod+q kill + + # Start your launcher + bindsym $mod+r exec $menu + + bindsym $mod+w exec mullvad-browser + + bindsym $mod+e exec nemo + + bindsym $mod+t exec thunderbird + + bindsym $mod+d exec discord + + # 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 + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' +# +# 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 + + bindsym $mod+Alt+Up exec "sh .config/sway/switch_workspace.sh next" + bindsym $mod+Alt+Down exec "sh .config/sway/switch_workspace.sh prev" + bindsym $mod+Shift+Alt+Up exec "sh .config/sway/switch_workspace.sh next move" + bindsym $mod+Shift+Alt+Down exec "sh .config/sway/switch_workspace.sh prev move" + +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + bindsym $mod+n splith + bindsym $mod+m splitv + + # Switch the current container between different layout styles + #bindsym $mod+s layout stacking + #bindsym $mod+w layout tabbed + #bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+space fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+v 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 + +# +# Utilities: +# + # Special keys to adjust volume via PulseAudio + bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle + bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5% + bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5% + bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle + # Special keys to adjust brightness via brightnessctl + bindsym --locked XF86MonBrightnessDown exec light -U 5 + bindsym --locked XF86MonBrightnessUp exec light -A 5 + # Special key to take a screenshot with grim + bindsym Print exec grim + + +include /home/hexe/.config/sway/config.d/* +include /etc/sway/config.d/* diff --git a/sway/config.d/autostart.conf b/sway/config.d/autostart.conf new file mode 100644 index 0000000..9c3a0de --- /dev/null +++ b/sway/config.d/autostart.conf @@ -0,0 +1,2 @@ +exec sh /home/hexe/.config/waybar/launch-waybar.sh +exec keepassxc \ No newline at end of file diff --git a/sway/config.d/swaysome.conf b/sway/config.d/swaysome.conf new file mode 100644 index 0000000..0c7eed3 --- /dev/null +++ b/sway/config.d/swaysome.conf @@ -0,0 +1,66 @@ +# Use (un)bindcode or (un)bindsym, depending on what you used in your main sway config file. +# The `--no-warn` setting is only added to shortcuts that exist in the default config. You may want to add or remove +# that flag on some bindings depending on your config. + +# Change focus between workspaces +bindsym --no-warn $mod+1 exec "swaysome focus 1" +bindsym --no-warn $mod+2 exec "swaysome focus 2" +bindsym --no-warn $mod+3 exec "swaysome focus 3" +bindsym --no-warn $mod+4 exec "swaysome focus 4" +bindsym --no-warn $mod+5 exec "swaysome focus 5" +bindsym --no-warn $mod+6 exec "swaysome focus 6" +bindsym --no-warn $mod+7 exec "swaysome focus 7" +bindsym --no-warn $mod+8 exec "swaysome focus 8" +bindsym --no-warn $mod+9 exec "swaysome focus 9" +bindsym --no-warn $mod+0 exec "swaysome focus 0" + +# Move containers between workspaces +bindsym --no-warn $mod+Shift+1 exec "swaysome move 1" +bindsym --no-warn $mod+Shift+2 exec "swaysome move 2" +bindsym --no-warn $mod+Shift+3 exec "swaysome move 3" +bindsym --no-warn $mod+Shift+4 exec "swaysome move 4" +bindsym --no-warn $mod+Shift+5 exec "swaysome move 5" +bindsym --no-warn $mod+Shift+6 exec "swaysome move 6" +bindsym --no-warn $mod+Shift+7 exec "swaysome move 7" +bindsym --no-warn $mod+Shift+8 exec "swaysome move 8" +bindsym --no-warn $mod+Shift+9 exec "swaysome move 9" +bindsym --no-warn $mod+Shift+0 exec "swaysome move 0" + +# Focus workspace groups +bindsym $mod+Alt+1 exec "swaysome focus-group 1" +bindsym $mod+Alt+2 exec "swaysome focus-group 2" +bindsym $mod+Alt+3 exec "swaysome focus-group 3" +bindsym $mod+Alt+4 exec "swaysome focus-group 4" +bindsym $mod+Alt+5 exec "swaysome focus-group 5" +bindsym $mod+Alt+6 exec "swaysome focus-group 6" +bindsym $mod+Alt+7 exec "swaysome focus-group 7" +bindsym $mod+Alt+8 exec "swaysome focus-group 8" +bindsym $mod+Alt+9 exec "swaysome focus-group 9" +bindsym $mod+Alt+0 exec "swaysome focus-group 0" + +# Move containers to other workspace groups +bindsym $mod+Alt+Shift+1 exec "swaysome move-to-group 1" +bindsym $mod+Alt+Shift+2 exec "swaysome move-to-group 2" +bindsym $mod+Alt+Shift+3 exec "swaysome move-to-group 3" +bindsym $mod+Alt+Shift+4 exec "swaysome move-to-group 4" +bindsym $mod+Alt+Shift+5 exec "swaysome move-to-group 5" +bindsym $mod+Alt+Shift+6 exec "swaysome move-to-group 6" +bindsym $mod+Alt+Shift+7 exec "swaysome move-to-group 7" +bindsym $mod+Alt+Shift+8 exec "swaysome move-to-group 8" +bindsym $mod+Alt+Shift+9 exec "swaysome move-to-group 9" +bindsym $mod+Alt+Shift+0 exec "swaysome move-to-group 0" + +# Move focused container to next output +bindsym $mod+o exec "swaysome next-output" +# Move focused container to previous output +bindsym $mod+Shift+o exec "swaysome prev-output" + +# Move focused workspace group to next output +bindsym $mod+Alt+o exec "swaysome workspace-group-next-output" +# Move focused workspace group to previous output +bindsym $mod+Alt+Shift+o exec "swaysome workspace-group-prev-output" + +# Init workspaces for every screen +exec "swaysome init 1" + + diff --git a/sway/switch_workspace.sh b/sway/switch_workspace.sh new file mode 100644 index 0000000..a09670b --- /dev/null +++ b/sway/switch_workspace.sh @@ -0,0 +1,20 @@ +CURRENT_WS=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .num') + +if (( CURRENT_WS >= 10 )); then + # Outputh with the bigger ten workspace IDs + CURRENT_WS=$((CURRENT_WS-10)) +fi + +if [[ "$1" == "next" && CURRENT_WS -lt 5 ]]; then + (( CURRENT_WS++ )) +elif [[ "$1" == "prev" && CURRENT_WS -gt 1 ]]; then + (( CURRENT_WS-- )) +fi + +if [[ "$2" == "move" ]]; then + swaysome move $CURRENT_WS +fi + +swaysome focus $CURRENT_WS + +kill -SIGRTMIN+5 $(pidof waybar) \ No newline at end of file diff --git a/sway/workspace_overview.sh b/sway/workspace_overview.sh new file mode 100644 index 0000000..4c0b6a3 --- /dev/null +++ b/sway/workspace_overview.sh @@ -0,0 +1,23 @@ +workspaces=( [1]="t" [2]="t" [3]="t" [4]="t" [5]="t" [11]="t" [12]="a" [13]="a" [14]="a" [15]="a") + +for p in $(swaymsg -t get_workspaces | jq '.[] | .num') +do + workspaces[$p]="b" +done + + +focusedID=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .num') +workspaces[$focusedID]="f" + +# output="" + +for key in "${!workspaces[@]}"; do + output="$output${workspaces[$key]}" + + if [ $key -eq 5 ]; then + output="$output - " + fi +done +# echo $(swaymsg -t get_outputs | jq -r '.[] | select(.focused==true) | .name') + +echo $output \ No newline at end of file diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 88e209c..2f045d5 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -7,9 +7,8 @@ "spacing": 0, // Gaps between modules (4px) // Choose the order of the modules "modules-left": [ - "sway/workspaces" -// "wlr/taskbar", - // "sway/window", + "hyprland/workspaces", + "hyprland/window" // "custom/workspaces" ], "modules-center": [ @@ -30,34 +29,37 @@ // "format": "TEst {}", // "signal": 5 // }, - "sway/workspaces": { - "disable-scroll": false, - "format": "{index}", - "format-icons": { - "urgent": "U", - "focused": "⦁︎", - "default": "D", - "persistent": "⚪︎", - "high-priority-named": ["hp1", "hp2"] - }, - "persistent-workspaces": { - "1": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists - "2": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists - "3": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists - "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists - "5": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists - "11": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists - "12": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists - "13": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists - "14": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists - "15": ["HDMI-A-1"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists - }, - "window-rewrite-default": "{name}", - "window-format": "<span color='#e0e0e0'>{name}</span>" - }, - "sway/window": { - "format": "{title}", - "max-length": 50 + // "sway/workspaces": { + // "disable-scroll": false, + // "format": "{index}", + // "format-icons": { + // "urgent": "U", + // "focused": "⦁︎", + // "default": "D", + // "persistent": "⚪︎", + // "high-priority-named": ["hp1", "hp2"] + // }, + // "persistent-workspaces": { + // "1": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + // "2": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + // "3": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + // "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + // "5": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + // "11": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + // "12": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + // "13": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + // "14": ["HDMI-A-1"], // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + // "15": ["HDMI-A-1"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + // }, + // "window-rewrite-default": "{name}", + // "window-format": "<span color='#e0e0e0'>{name}</span>" + // }, + // "sway/window": { + // "format": "{title}", + // "max-length": 50 + // }, + "hyprland/workspaces": { + "format": "{icon}" }, "tray": { // "icon-size": 21, diff --git a/waybar/style.css b/waybar/style.css index ce55b44..652654c 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -57,19 +57,19 @@ window#waybar { } #workspaces button { - border-bottom: 4px solid white; border-radius: 0px; - margin: 0 5px; - padding: 0px; + margin: 0 4px; + padding: 0 10px; + color: black; + background-color: lightgray; } #workspaces button.empty { background-color: black; - border-bottom: 4px solid black; + color: white; } -#workspaces button.focused { +#workspaces button.focused, #workspaces button.active { background-color: white; color: black; - border-bottom: 4px solid white; } #clock, diff --git a/waybar/style.css.map b/waybar/style.css.map index 555c83d..abd4e4d 100644 --- a/waybar/style.css.map +++ b/waybar/style.css.map @@ -1 +1 @@ -{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAGA;EACI,6DAAA;EACA,8DAAA;EACA,eAAA;ACFJ;;ADKA;EACI,uBATS;EAUT,YAXS;ACSb;;ADKA;EACI,YAdS;EAeT,uBAhBS;ACcb;;ADKA,0DAAA;AACA;EACE,uBArBW;EAsBX,YArBW;ACmBb;ADIE;EACE,2BAAA;ACFJ;ADKE;EACE,yBAAA;EACA,cAAA;ACHJ;;ADQA;EACI,uBApCS;EAqCT,YApCS;AC+Bb;;ADQA,4EAAA;AACA;EACE,uBA1CW;EA2CX,YA1CW;ACqCb;ADME;EACE,qBAAA;EACA,cAAA;ACJJ;;ADQA;EACE,YAlDW;EAmDX,uBApDW;AC+Cb;;ADQA;EACI,uBAvDS;ACkDb;;ADQA;EACI,uBA5DS;EA6DT,YA5DS;ACuDb;;ADSE;EACE,8BAAA;EACA,kBAAA;EACA,aAAA;EACA,YAAA;ACNJ;ADaI;EACE,uBA5EO;EA6EP,8BAAA;ACXN;ADcI;EACE,uBAlFO;EAmFP,YAlFO;EAmFP,8BAAA;ACZN;;ADqBA;;;;;;;;;;;;;;;;;;EAkBI,eAAA;EACA,aAAA;AClBJ;;ADoBA;;EAEI,aAAA;ACjBJ;;ADoBA,2DAAA;AACA;EACI,cAAA;ACjBJ;;ADoBA,6DAAA;AACA;EACI,eAAA;ACjBJ;;ADmBA;EACI,mBAAA;AChBJ;;ADmBA;EACI,yBAAA;EACA,cAAA;AChBJ;;ADmBA;EACI,yBAAA;EACA,cAAA;AChBJ;;ADmBA;EACI,yBAAA;EACA,cAAA;AChBJ;;ADmBA;EACI,yBAAA;AChBJ","file":"style.css"} \ No newline at end of file +{"version":3,"sources":["style.scss","style.css"],"names":[],"mappings":"AAGA;EACI,6DAAA;EACA,8DAAA;EACA,eAAA;ACFJ;;ADKA;EACI,uBATS;EAUT,YAXS;ACSb;;ADKA;EACI,YAdS;EAeT,uBAhBS;ACcb;;ADKA,0DAAA;AACA;EACE,uBArBW;EAsBX,YArBW;ACmBb;ADIE;EACE,2BAAA;ACFJ;ADKE;EACE,yBAAA;EACA,cAAA;ACHJ;;ADQA;EACI,uBApCS;EAqCT,YApCS;AC+Bb;;ADQA,4EAAA;AACA;EACE,uBA1CW;EA2CX,YA1CW;ACqCb;ADME;EACE,qBAAA;EACA,cAAA;ACJJ;;ADQA;EACE,YAlDW;EAmDX,uBApDW;AC+Cb;;ADQA;EACI,uBAvDS;ACkDb;;ADQA;EACI,uBA5DS;EA6DT,YA5DS;ACuDb;;ADSE;EACE,kBAAA;EACA,aAAA;EACA,eAAA;EACA,YApES;EAqET,2BAAA;ACNJ;ADSI;EACE,uBAzEO;EA0EP,YA3EO;ACoEb;ADUI;EACE,uBA/EO;EAgFP,YA/EO;ACuEb;;ADiBA;;;;;;;;;;;;;;;;;;EAkBI,eAAA;EACA,aAAA;ACdJ;;ADgBA;;EAEI,aAAA;ACbJ;;ADgBA,2DAAA;AACA;EACI,cAAA;ACbJ;;ADgBA,6DAAA;AACA;EACI,eAAA;ACbJ;;ADeA;EACI,mBAAA;ACZJ;;ADeA;EACI,yBAAA;EACA,cAAA;ACZJ;;ADeA;EACI,yBAAA;EACA,cAAA;ACZJ;;ADeA;EACI,yBAAA;EACA,cAAA;ACZJ;;ADeA;EACI,yBAAA;ACZJ","file":"style.css"} \ No newline at end of file diff --git a/waybar/style.scss b/waybar/style.scss index 1b1a91c..983666b 100644 --- a/waybar/style.scss +++ b/waybar/style.scss @@ -64,25 +64,21 @@ window#waybar { #workspaces { button { - border-bottom: 4px solid $background; border-radius: 0px; - margin: 0 5px; - padding: 0px; - // margin: 0px; - // padding: 0px; - // color: $background; - // background-color: lightgray; + margin: 0 4px; + padding: 0 10px; + color: $foreground; + background-color: lightgray; // border-radius: 0px; &.empty { background-color: $foreground; - border-bottom: 4px solid $foreground; + color: $background; } - &.focused { + &.focused, &.active { background-color: $background; color: $foreground; - border-bottom: 4px solid $background; } // &.urgent { -- GitLab