mirror of
https://github.com/FabricSoul/nixos-configs.git
synced 2025-08-03 16:50:24 -04:00
first commit
This commit is contained in:
commit
8450ea8068
61 changed files with 3269 additions and 0 deletions
125
configuration.nix
Normal file
125
configuration.nix
Normal file
|
@ -0,0 +1,125 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "Tatara"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Toronto";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.fabric = {
|
||||
isNormalUser = true;
|
||||
description = "fabric";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
greetd.greetd
|
||||
greetd.tuigreet
|
||||
xorg.xinit
|
||||
libinput
|
||||
libnotify
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [ nerdfonts ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time ";
|
||||
user = "fabric";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
windowManager.i3.enable = true;
|
||||
displayManager.startx.enable = true;
|
||||
libinput.enable = true;
|
||||
videoDrivers = ["nvidia"];
|
||||
};
|
||||
services.displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
};
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
};
|
||||
programs.steam.enable = true;
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
617
dotfiles/i3/.config/i3/config
Executable file
617
dotfiles/i3/.config/i3/config
Executable file
|
@ -0,0 +1,617 @@
|
|||
# exec --no-startup-id ~/set_once.sh
|
||||
# This file is a modified version based on default i3-config-wizard config
|
||||
# source is available here:
|
||||
# https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/etc/skel/.config/i3/config
|
||||
# Maintainer: joekamprad [joekamprad //a_t// endeavouros.com]
|
||||
# https://endeavouros.com
|
||||
#
|
||||
# iconic font icon search: https://fontawesome.com/v4.7/cheatsheet/
|
||||
#
|
||||
# --> to update this run the following command (will backup existing setup file)
|
||||
# wget --backups=1 https://raw.githubusercontent.com/endeavouros-team/endeavouros-i3wm-setup/main/etc/skel/.config/i3/config -P ~/.config/i3/
|
||||
#
|
||||
# Endeavouros-i3 config file
|
||||
# Source for complete framework of our i3 config and theming here: https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||
# EndeavourOS wiki holds some Information also: https://discovery.endeavouros.com/window-tiling-managers/i3-wm/
|
||||
# Please see http://i3wm.org/docs/userguide.html for the official i3 reference!
|
||||
|
||||
#######################
|
||||
# config starts here: #
|
||||
#######################
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango: Noto Sans Regular 10
|
||||
font pango: FiraCode Nerd Font medium 10
|
||||
|
||||
# set the mod key to the winkey:
|
||||
set $mod Mod4
|
||||
|
||||
#####################
|
||||
# workspace layout: #
|
||||
#####################
|
||||
|
||||
# default i3 tiling mode:
|
||||
workspace_layout default
|
||||
|
||||
# i3 stacking layout:
|
||||
# Each window will be fullscreen and tabbed top to bottom.
|
||||
#workspace_layout stacking
|
||||
|
||||
# i3 tabbed layout:
|
||||
# Each new window will open fullscreen as a tab (left to right)
|
||||
#workspace_layout tabbed
|
||||
|
||||
##############################
|
||||
# extra options for windows: #
|
||||
##############################
|
||||
|
||||
#border indicator on windows:
|
||||
default_border pixel 1
|
||||
exec --no-startup-id thunar --daemon
|
||||
#exec --no-startup-id flatpak run com.github.vladimiry.ElectronMail
|
||||
#exec --no-startup-id "libinput-gestures-setup start"
|
||||
#exec_always --no-startup-id "echo $PASSW | sshfs -p 8022 u0_a114@100.65.217.31:/storage/B49B-1F11/Android/data/com.termux/files /home/flavio/server -o password_stdin"
|
||||
# thin borders
|
||||
# hide_edge_borders both
|
||||
|
||||
# Set inner/outer gaps
|
||||
gaps inner 10
|
||||
gaps outer 0
|
||||
# for inserting password
|
||||
exec --no-startup-id /usr/lib/polkit-kde-authentication-agent-1
|
||||
# show window title bars (not officially supported with i3gaps)
|
||||
#default_border normal
|
||||
default_border pixel 2
|
||||
# window title alignment
|
||||
#title_align center
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# switch/iterate between workspaces
|
||||
bindsym $mod+Tab workspace next
|
||||
bindsym $mod+Shift+Tab workspace prev
|
||||
|
||||
# switch to workspace
|
||||
bindcode $mod+10 workspace $ws1
|
||||
bindcode $mod+11 workspace $ws2
|
||||
bindcode $mod+12 workspace $ws3
|
||||
bindcode $mod+13 workspace $ws4
|
||||
bindcode $mod+14 workspace $ws5
|
||||
bindcode $mod+15 workspace $ws6
|
||||
bindcode $mod+16 workspace $ws7
|
||||
bindcode $mod+17 workspace $ws8
|
||||
bindcode $mod+18 workspace $ws9
|
||||
bindcode $mod+19 workspace $ws10
|
||||
|
||||
# switch to workspace with numpad keys
|
||||
bindcode $mod+87 workspace $ws1 bindcode $mod+88 workspace $ws2
|
||||
bindcode $mod+89 workspace $ws3
|
||||
bindcode $mod+83 workspace $ws4
|
||||
bindcode $mod+84 workspace $ws5
|
||||
bindcode $mod+85 workspace $ws6
|
||||
bindcode $mod+79 workspace $ws7
|
||||
bindcode $mod+80 workspace $ws8
|
||||
bindcode $mod+81 workspace $ws9
|
||||
bindcode $mod+90 workspace $ws10
|
||||
|
||||
# switch to workspace with numlock numpad keys
|
||||
bindcode $mod+Mod2+87 workspace $ws1
|
||||
bindcode $mod+Mod2+88 workspace $ws2
|
||||
bindcode $mod+Mod2+89 workspace $ws3
|
||||
bindcode $mod+Mod2+83 workspace $ws4
|
||||
bindcode $mod+Mod2+84 workspace $ws5
|
||||
bindcode $mod+Mod2+85 workspace $ws6
|
||||
bindcode $mod+Mod2+79 workspace $ws7
|
||||
bindcode $mod+Mod2+80 workspace $ws8
|
||||
bindcode $mod+Mod2+81 workspace $ws9
|
||||
bindcode $mod+Mod2+90 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindcode $mod+Shift+10 move container to workspace $ws1
|
||||
bindcode $mod+Shift+11 move container to workspace $ws2
|
||||
bindcode $mod+Shift+12 move container to workspace $ws3
|
||||
bindcode $mod+Shift+13 move container to workspace $ws4
|
||||
bindcode $mod+Shift+14 move container to workspace $ws5
|
||||
bindcode $mod+Shift+15 move container to workspace $ws6
|
||||
bindcode $mod+Shift+16 move container to workspace $ws7
|
||||
bindcode $mod+Shift+17 move container to workspace $ws8
|
||||
bindcode $mod+Shift+18 move container to workspace $ws9
|
||||
bindcode $mod+Shift+19 move container to workspace $ws10
|
||||
|
||||
# move focused container to workspace with numpad keys
|
||||
bindcode $mod+Shift+Mod2+87 move container to workspace $ws1
|
||||
bindcode $mod+Shift+Mod2+88 move container to workspace $ws2
|
||||
bindcode $mod+Shift+Mod2+89 move container to workspace $ws3
|
||||
bindcode $mod+Shift+Mod2+83 move container to workspace $ws4
|
||||
bindcode $mod+Shift+Mod2+84 move container to workspace $ws5
|
||||
bindcode $mod+Shift+Mod2+85 move container to workspace $ws6
|
||||
bindcode $mod+Shift+Mod2+79 move container to workspace $ws7
|
||||
bindcode $mod+Shift+Mod2+80 move container to workspace $ws8
|
||||
bindcode $mod+Shift+Mod2+81 move container to workspace $ws9
|
||||
bindcode $mod+Shift+Mod2+90 move container to workspace $ws10
|
||||
|
||||
# move focused container to workspace with numpad keys
|
||||
bindcode $mod+Shift+87 move container to workspace $ws1
|
||||
bindcode $mod+Shift+88 move container to workspace $ws2
|
||||
bindcode $mod+Shift+89 move container to workspace $ws3
|
||||
bindcode $mod+Shift+83 move container to workspace $ws4
|
||||
bindcode $mod+Shift+84 move container to workspace $ws5
|
||||
bindcode $mod+Shift+85 move container to workspace $ws6
|
||||
bindcode $mod+Shift+79 move container to workspace $ws7
|
||||
bindcode $mod+Shift+80 move container to workspace $ws8
|
||||
bindcode $mod+Shift+81 move container to workspace $ws9
|
||||
bindcode $mod+Shift+90 move container to workspace $ws10
|
||||
|
||||
# resize window (you can also use the mouse for that):
|
||||
mode "" {
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
#same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
#back to normal: Enter or Escape
|
||||
bindsym $mod+r mode "default"
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode ""
|
||||
|
||||
|
||||
######################################
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec --no-startup-id kitty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+q kill
|
||||
|
||||
# exit-menu
|
||||
bindsym $mod+Shift+e exec --no-startup-id ~/.config/i3/scripts/powermenu
|
||||
|
||||
# Lock the system
|
||||
# lock with a picture:
|
||||
#bindsym $mod+l exec --no-startup-id i3lock -i ~/.config/i3/i3-lock-screen.png -p default|win -t
|
||||
# lock by blurring the screen:
|
||||
bindsym F9 exec --no-startup-id ~/.config/i3/scripts/blur-lock
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to update i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# keybinding in fancy rofi (automated):
|
||||
bindsym F1 exec --no-startup-id ~/.config/i3/scripts/keyhint-2
|
||||
# alternative
|
||||
# keybinding list in editor:
|
||||
# bindsym $mod+F1 exec --no-startup-id xed ~/.config/i3/keybindings
|
||||
|
||||
# Backlight control
|
||||
#bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
#bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
|
||||
# Backlight setting using dunst osc
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_up
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_down
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor 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
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+BackSpace split toggle
|
||||
|
||||
# split in vertical orientation
|
||||
#bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
# bindsym $mod+s layout stacking
|
||||
# bindsym $mod+g layout tabbed
|
||||
#bindsym $mod+e layout toggle split
|
||||
bindsym $mod+t layout toggle
|
||||
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+f floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
#bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
#bindsym $mod+a focus parent
|
||||
|
||||
# open new empty workspace
|
||||
bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace
|
||||
|
||||
# Multimedia Keys
|
||||
|
||||
# volume
|
||||
# use meta keys without showing osc
|
||||
#bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
|
||||
#bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_up
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_down
|
||||
|
||||
# gradular volume control
|
||||
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
|
||||
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
|
||||
|
||||
# mute
|
||||
#bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks
|
||||
# use meta keys showing osc using dunst
|
||||
bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh volume_mute
|
||||
|
||||
# mic mute toggle
|
||||
bindsym XF86AudioMicMute exec amixer sset Capture toggle
|
||||
|
||||
# audio control
|
||||
bindsym XF86AudioPlay exec --no-startup-id playerctl play
|
||||
bindsym XF86AudioPause exec --no-startup-id playerctl pause
|
||||
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
||||
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||
|
||||
# Redirect sound to headphones
|
||||
#bindsym $mod+p exec --no-startup-id /usr/local/bin/switch-audio-port
|
||||
|
||||
## App shortcuts
|
||||
bindsym $mod+w exec --no-startup-id /usr/bin/firefox
|
||||
bindsym $mod+n exec --no-startup-id rofi -config ~/.config/rofi/todo.rasi -modi Todo:~/.config/rofi/rofitodo.sh -show Todo
|
||||
bindsym Print exec --no-startup-id grim $HOME/Immagini/Schermate/$(date +"%Y-%m-%d-%T").png && notify-send "Screenshot saved to ~/$(date +"%Y-%m-%d-%T")-screenshot.png"
|
||||
bindsym --release Shift+Print exec --no-startup-id $HOME/.config/i3/scripts/miei/schermata.sh
|
||||
bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles
|
||||
|
||||
##########################################
|
||||
# configuration for workspace behaviour: #
|
||||
##########################################
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 1
|
||||
set $ws2 2
|
||||
set $ws3 3
|
||||
set $ws4 4
|
||||
set $ws5 5
|
||||
set $ws6 6
|
||||
set $ws7 7
|
||||
set $ws8 8
|
||||
set $ws9 9
|
||||
set $ws10 10
|
||||
|
||||
# use workspaces on different displays:
|
||||
# where you have to replace VGA-0/HDMI-0 with the names for your displays
|
||||
# you can get from xrandr command
|
||||
# workspace $ws1 output HDMI-1
|
||||
# workspace $ws2 output HDMI-1
|
||||
# workspace $ws3 output HDMI-1
|
||||
# workspace $ws4 output HDMI-1
|
||||
# workspace $ws5 output HDMI-1
|
||||
# workspace $ws6 output DP-4
|
||||
# workspace $ws7 output DP-4
|
||||
# workspace $ws8 output DP-4
|
||||
# workspace $ws9 output DP-4
|
||||
# workspace $ws10 output DP-4
|
||||
|
||||
# bind program to workspace and focus to them on startup:
|
||||
assign [class="discord"] $ws6
|
||||
assign [class="kitty"] $ws7
|
||||
assign [class="(?i)firefox"] $ws8
|
||||
|
||||
# automatic set focus new window if it opens on another workspace than the current:
|
||||
#for_window [class=Xfce4-terminal] focus
|
||||
#for_window [class=(?i)firefox] focus
|
||||
#for_window [class=Thunar] focus
|
||||
#for_window [class=Thunderbird] focus
|
||||
#for_window [class=TelegramDesktop] focus
|
||||
|
||||
exec --no-startup-id xset r rate 300 100
|
||||
exec_always --no-startup-id fcitx5
|
||||
##############
|
||||
# compositor #
|
||||
##############
|
||||
|
||||
# transparency
|
||||
# uncomment one of them to be used
|
||||
# options could need changes, related to used GPU and drivers.
|
||||
# to find the right setting consult the archwiki or ask at the forum.
|
||||
#
|
||||
# xcompmgr: https://wiki.archlinux.org/title/Xcompmgr
|
||||
# manpage: https://man.archlinux.org/man/xcompmgr.1.en
|
||||
# install xcompmgr package to use it (yay -S xcompmgr)
|
||||
#exec --no-startup-id xcompmgr -C -n &
|
||||
# or an more specialized config like this:
|
||||
#exec --no-startup-id xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55 &
|
||||
#
|
||||
# or:
|
||||
#
|
||||
# picom: https://wiki.archlinux.org/title/Picom
|
||||
# manpage: https://man.archlinux.org/man/picom.1.en
|
||||
# The default configuration is available in /etc/xdg/picom.conf
|
||||
# For modifications, it can be copied to ~/.config/picom/picom.conf or ~/.config/picom.conf
|
||||
# install picom package (yay -S picom)
|
||||
# start using default config
|
||||
#exec_always --no-startup-id picom -b
|
||||
#
|
||||
# for custom config:
|
||||
exec --no-startup-id picom --config ~/.config/picom/picom.conf
|
||||
|
||||
#############################################
|
||||
# autostart applications/services on login: #
|
||||
#############################################
|
||||
|
||||
#get auth work with polkit-gnome
|
||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
|
||||
# dex execute .desktop files + apps using /etc/xdg/autostart.
|
||||
# when second to i3 a DE is installed or mixed usage of i3 + xfce4 or GNOME
|
||||
# in this cases better disable dex and use manual starting apps using xdg/autostart
|
||||
# if enabled you should comment welcome app.
|
||||
# https://github.com/jceb/dex
|
||||
#exec --no-startup-id dex -a -s /etc/xdg/autostart/:~/.config/autostart/
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
#exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
# start welcome app
|
||||
#exec --no-startup-id sh /usr/share/endeavouros/scripts/welcome --startdelay=3
|
||||
|
||||
# num lock activated
|
||||
#exec --no-startup-id numlockx on
|
||||
|
||||
# configure multiple keyboard layouts and hotkey to switch (Alt+CAPSLOCK in this example)
|
||||
#exec --no-startup-id setxkbmap -layout 'us,sk' -variant altgr-intl,qwerty -option 'grp:alt_caps_toggle'
|
||||
|
||||
# start conky:
|
||||
#exec_always --no-startup-id conky
|
||||
|
||||
# start a script to setup displays
|
||||
# uncomment the next line, use arandr to setup displays and save the file as monitor:
|
||||
exec --no-startup-id ~/.screenlayout/monitor.sh
|
||||
# set wallpaper
|
||||
# exec --no-startup-id sleep 2 && nitrogen --restore
|
||||
exec_always --no-startup-id sleep 1 && feh --bg-fill $HOME/.config/sfondo.jpg
|
||||
|
||||
# set powersavings for display:
|
||||
# exec --no-startup-id xset s 480 dpms 600 600 600
|
||||
exec --no-startup-id xset s off
|
||||
|
||||
# disable power saving (for example if using xscreensaver)
|
||||
exec --no-startup-id xset -dpms
|
||||
|
||||
#blur enable
|
||||
#blur_xray enable
|
||||
#blur_passes 2
|
||||
#blur_radius 5
|
||||
|
||||
# use xautolock to use autosuspend rules for mobile devices
|
||||
# https://wiki.archlinux.org/title/Session_lock#xautolock
|
||||
#exec --no-startup-id xautolock -time 60 -locker "systemctl suspend"
|
||||
|
||||
|
||||
# xscreensaver
|
||||
# https://www.jwz.org/xscreensaver
|
||||
#exec --no-startup-id xscreensaver --no-splash
|
||||
|
||||
# Desktop notifications
|
||||
# dunst config used ~/.config/dunst/dunstrc
|
||||
# set alternative config if needed:
|
||||
#exec --no-startup-id /usr/bin/dunst --config ~/.config/dunst/dunstrc
|
||||
# may need to run dbus-launch explicitly:
|
||||
#exec --no-startup-id dbus-launch /usr/bin/dunst
|
||||
exec --no-startup-id /usr/bin/dunst
|
||||
# alternative if you installed aside with XFCE4:
|
||||
# exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd &
|
||||
|
||||
# autotiling script
|
||||
# https://github.com/nwg-piotr/autotiling
|
||||
# `yay -S autotiling ;) (it is in AUR)
|
||||
#exec_always --no-startup-id autotiling
|
||||
|
||||
# Autostart apps as you like
|
||||
#exec --no-startup-id sleep 2 && xfce4-terminal
|
||||
#exec --no-startup-id sleep 7 && firefox https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/force-knowledge.md
|
||||
#exec --no-startup-id sleep 3 && thunar
|
||||
|
||||
###############
|
||||
# system tray #
|
||||
###############
|
||||
# if you do not use dex: exec --no-startup-id dex --autostart --environment i3
|
||||
# you need to have tray apps started manually one by one:
|
||||
|
||||
# start blueberry app for managing bluetooth devices from tray:
|
||||
#exec_always --no-startup-id blueberry-tray
|
||||
|
||||
# networkmanager-applet
|
||||
#exec_always --no-startup-id nm-applet
|
||||
# clipman-applet
|
||||
#exec --no-startup-id xfce4-clipman
|
||||
|
||||
##################
|
||||
# floating rules #
|
||||
##################
|
||||
|
||||
# set floating (nontiling) for apps needing it
|
||||
|
||||
for_window [class="Yad" instance="yad"] floating enable
|
||||
for_window [class="Galculator" instance="galculator"] floating enable
|
||||
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
|
||||
|
||||
# set floating (nontiling) for special apps
|
||||
for_window [class="Xsane" instance="xsane"] floating enable
|
||||
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
|
||||
for_window [class="qt5ct" instance="qt5ct"] floating enable
|
||||
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
|
||||
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
||||
for_window [class="Pamac-manager"] floating enable
|
||||
for_window [window_role="About"] floating enable
|
||||
#for_window [title=".*"] opacity 1
|
||||
#for_window [title="^Startpage Search Results – Ablaze Floorp$"] opacity 0.9
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exec_always --no-startup-id nm-applet --indicator
|
||||
exec --no-startup-id blueman-applet
|
||||
# set size of floating window
|
||||
#for_window [window_role="(?i)GtkFileChooserDialog"] resize set 640 480 #to set size of file choose dialog
|
||||
#for_window [class=".*"] resize set 640 480 #to change size of all floating windows
|
||||
|
||||
# set position of floating window
|
||||
#for_window [class=".*"] move position center
|
||||
|
||||
######################################
|
||||
# color settings for bar and windows #
|
||||
######################################
|
||||
|
||||
# Define colors variables:
|
||||
set $darkbluetrans #313244
|
||||
set $darkblue #b4befe
|
||||
set $lightblue #eba0ac
|
||||
#set $urgentred #e53935
|
||||
|
||||
set $urgentred #f38ba8
|
||||
set $white #cdd6f4
|
||||
set $black #1e1e2e
|
||||
set $purple #6870A1
|
||||
set $darkgrey #383c4a
|
||||
set $grey #b0b5bd
|
||||
set $mediumgrey #8b8b8b
|
||||
set $yellowbrown #e1b700
|
||||
|
||||
# define colors for windows:
|
||||
#class border bground text indicator child_border
|
||||
|
||||
client.focused $darkblue $black $white $darkblue $darkblue
|
||||
client.unfocused $purple $black $grey $darkgrey $darkgrey
|
||||
client.focused_inactive $black $black $grey $darkgrey $darkgrey
|
||||
client.urgent $urgentred $urgentred $white $darkblue $yellowbrown
|
||||
############################################
|
||||
# bar settings (input comes from i3blocks) #
|
||||
############################################
|
||||
|
||||
# Start i3bar to display a workspace bar
|
||||
# (plus the system information i3status finds out, if available)
|
||||
bar {
|
||||
id bar-primary
|
||||
mode dock
|
||||
font pango: FiraCode Nerd Font medium 11.3
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position top
|
||||
# i3bar_command i3bar --transparency
|
||||
# it could be that you have no primary display set: set one (xrandr --output <output> --primary)
|
||||
# reference: https://i3wm.org/docs/userguide.html#_tray_output
|
||||
#tray_output primary
|
||||
#tray_output none
|
||||
tray_output none
|
||||
# When strip_workspace_numbers is set to yes,
|
||||
# any workspace that has a name of the form
|
||||
# “[n][:][NAME]” will display only the name.
|
||||
strip_workspace_numbers yes
|
||||
##strip_workspace_name no
|
||||
|
||||
colors {
|
||||
separator $purple
|
||||
# background $darkgrey
|
||||
background #1e1e2eD9
|
||||
statusline $white
|
||||
# border bg txt
|
||||
focused_workspace #1e1e2eD9 #1e1e2eD9 #b4befe
|
||||
active_workspace #1e1e2eD9 #1e1e2eD9 #a6adc8
|
||||
inactive_workspace #1e1e2eD9 #1e1e2eD9 #7f849c
|
||||
urgent_workspace #1e1e2eD9 #1e1e2eD9 #a6e3a1
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bar {
|
||||
id bar-tray
|
||||
mode invisible
|
||||
font pango: FiraCode Nerd Font medium 11.3
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
position top
|
||||
#modifier none
|
||||
# i3bar_command i3bar --transparency
|
||||
# it could be that you have no primary display set: set one (xrandr --output <output> --primary)
|
||||
# reference: https://i3wm.org/docs/userguide.html#_tray_output
|
||||
#tray_output primary
|
||||
|
||||
# When strip_workspace_numbers is set to yes,
|
||||
# any workspace that has a name of the form
|
||||
# “[n][:][NAME]” will display only the name.
|
||||
strip_workspace_numbers yes
|
||||
##strip_workspace_name no
|
||||
|
||||
colors {
|
||||
separator $purple
|
||||
# background $darkgrey
|
||||
background #1e1e2eD9
|
||||
statusline $white
|
||||
# border bg txt
|
||||
focused_workspace #1e1e2eD9 #1e1e2eD9 #cdd6f4
|
||||
active_workspace #1e1e2eD9 #1e1e2eD9 #a6adc8
|
||||
inactive_workspace #1e1e2eD9 #1e1e2eD9 #7f849c
|
||||
urgent_workspace #1e1e2eD9 #1e1e2eD9 #a6e3a1
|
||||
}
|
||||
}
|
||||
#bindsym $mod+p bar mode dock bar-tray; bar mode invisible bar-primary
|
||||
|
||||
|
||||
#####################################
|
||||
# Application menu handled by rofi: #
|
||||
#####################################
|
||||
|
||||
## rofi bindings fancy application menu ($mod+d /F9 optional disabled)
|
||||
|
||||
bindsym $mod+space exec --no-startup-id rofi -modi drun -show drun \
|
||||
-config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
#bindsym F9 exec --no-startup-id rofi -modi drun -show drun \
|
||||
# -config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
## rofi bindings for window menu ($mod+t /F10 optional disabled)
|
||||
|
||||
bindsym $mod+a exec --no-startup-id rofi -show window \
|
||||
-config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
#bindsym F10 exec --no-startup-id rofi -show window \
|
||||
# -config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
## rofi bindings to manage clipboard (install rofi-greenclip from the AUR)
|
||||
|
||||
#exec --no-startup-id greenclip daemon>/dev/null
|
||||
#bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard \
|
||||
# -config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
bindsym $mod+s exec flameshot gui
|
193
dotfiles/i3/.config/i3/i3blocks.conf
Executable file
193
dotfiles/i3/.config/i3/i3blocks.conf
Executable file
|
@ -0,0 +1,193 @@
|
|||
# File configurazione i3block
|
||||
|
||||
|
||||
separator=false
|
||||
markup=pango
|
||||
separator_block_width=6
|
||||
color=#cdd6f4
|
||||
|
||||
|
||||
|
||||
[search]
|
||||
full_text=
|
||||
color=#f38ba8
|
||||
command= rofi -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi
|
||||
|
||||
#[files]
|
||||
#full_text=
|
||||
#color=#cba6f7
|
||||
#command=i3-msg -q exec thunar ~/
|
||||
|
||||
[todo]
|
||||
full_text=
|
||||
color=#89b4fa
|
||||
command=rofi -config ~/.config/rofi/todo.rasi -modi Todo:~/.config/rofi/rofitodo.sh -show Todo
|
||||
|
||||
[wallpaper]
|
||||
full_text=
|
||||
color=#fab387
|
||||
command=~/.config/i3/scripts/miei/wallpaper.sh
|
||||
|
||||
[expander]
|
||||
full_text=
|
||||
command=i3-msg -q "exec --no-startup-id ~/.config/i3/scripts/miei/active.sh"
|
||||
color=#b4befe
|
||||
|
||||
[terminal]
|
||||
full_text=
|
||||
color=#94e2d5
|
||||
command=i3-msg -q exec kitty
|
||||
|
||||
|
||||
[close]
|
||||
full_text=
|
||||
color=#f38ba8
|
||||
command=i3-msg -q kill
|
||||
separator_block_width=0
|
||||
|
||||
|
||||
[simple-2]
|
||||
full_text=:
|
||||
color=#717171
|
||||
|
||||
|
||||
[meteo]
|
||||
command=~/.config/i3/scripts/miei/meteo.sh
|
||||
interval=1000
|
||||
|
||||
[separator]
|
||||
full_text="⟨"
|
||||
color=#585b70
|
||||
|
||||
#[update]
|
||||
#full_text=
|
||||
#command=~/.config/i3/scripts/miei/update.sh
|
||||
#interval=1800
|
||||
|
||||
|
||||
|
||||
#[separator]
|
||||
#full_text="⟨"
|
||||
#color=#585b70
|
||||
|
||||
[cpu_usage]
|
||||
full_text=
|
||||
label=
|
||||
command=~/.config/i3/scripts/miei/cpu.sh
|
||||
interval=10
|
||||
|
||||
#[separator]
|
||||
#full_text="⟨"
|
||||
#color=#585b70
|
||||
|
||||
#[news]
|
||||
#full_text=""
|
||||
#command=~/.config/i3/scripts/miei/feed.sh
|
||||
#interval=once
|
||||
|
||||
|
||||
#[separator]
|
||||
#full_text="⟨"
|
||||
#color=#585b70
|
||||
|
||||
#[pavucontrol]
|
||||
#full_text=
|
||||
#command=pavucontrol
|
||||
|
||||
|
||||
|
||||
#[timer]
|
||||
#full_text=
|
||||
#command=~/.config/i3/scripts/miei/timer.sh
|
||||
#interval=1
|
||||
|
||||
|
||||
[separator]
|
||||
full_text="⟨"
|
||||
color=#585b70
|
||||
|
||||
[pomodoro]
|
||||
command=~/.config/i3/scripts/pomodoro.sh
|
||||
interval=1
|
||||
|
||||
[separator]
|
||||
full_text="⟨"
|
||||
color=#585b70
|
||||
|
||||
# [gestione_energia]
|
||||
# full_text=
|
||||
# command=/home/flavio/.config/i3/scripts/miei/energia.sh
|
||||
# interval=once
|
||||
#
|
||||
#
|
||||
#
|
||||
# [separator]
|
||||
# full_text="⟨"
|
||||
# color=#585b70
|
||||
[volume-pulseaudio]
|
||||
command=~/.config/i3/scripts/volume
|
||||
instance=Master
|
||||
interval=1
|
||||
|
||||
#[battery]
|
||||
#command=~/.config/i3/scripts/battery2
|
||||
#label=
|
||||
#interval=30
|
||||
|
||||
#[separator]
|
||||
#full_text="|"
|
||||
|
||||
#[separator]
|
||||
#full_text="|"
|
||||
#color=#585b70
|
||||
#[icona]
|
||||
#full_text=
|
||||
|
||||
#[battery]
|
||||
#command=~/.config/i3/scripts/miei/power.sh
|
||||
#label=
|
||||
#interval=1
|
||||
|
||||
|
||||
|
||||
|
||||
[separator]
|
||||
full_text="⟨"
|
||||
color=#585b70
|
||||
|
||||
[time]
|
||||
full_text=
|
||||
label=
|
||||
interval=1
|
||||
command=~/.config/i3/scripts/miei/ora.sh
|
||||
separator_block_width=10
|
||||
color=#b4befe
|
||||
|
||||
#color=#f38ba8
|
||||
|
||||
[separator]
|
||||
full_text=" "
|
||||
separator_block_width=0
|
||||
background=#272836
|
||||
|
||||
|
||||
|
||||
|
||||
[shutdown_menu]
|
||||
full_text=<span size="medium"> ⏼ </span>
|
||||
#full_text=<span size="medium"> ⏼ </span>
|
||||
command=~/.config/i3/scripts/powermenu
|
||||
#color=#b4befe
|
||||
|
||||
#color=#f5e0dc
|
||||
#background=#e71853
|
||||
background=#313244
|
||||
#separator_block_width=0
|
||||
#color=#f38ba8
|
||||
separator_block_width=0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
dotfiles/i3/.config/i3/scripts/bell.wav
Executable file
BIN
dotfiles/i3/.config/i3/scripts/bell.wav
Executable file
Binary file not shown.
BIN
dotfiles/i3/.config/i3/scripts/bell_end.wav
Executable file
BIN
dotfiles/i3/.config/i3/scripts/bell_end.wav
Executable file
Binary file not shown.
11
dotfiles/i3/.config/i3/scripts/blur-lock
Executable file
11
dotfiles/i3/.config/i3/scripts/blur-lock
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PICTURE=/tmp/i3lock.png
|
||||
SCREENSHOT="scrot -z $PICTURE"
|
||||
|
||||
BLUR="5x4"
|
||||
|
||||
$SCREENSHOT
|
||||
convert $PICTURE -blur $BLUR $PICTURE
|
||||
i3lock -i $PICTURE
|
||||
rm $PICTURE
|
20
dotfiles/i3/.config/i3/scripts/miei/active.sh
Executable file
20
dotfiles/i3/.config/i3/scripts/miei/active.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/bash
|
||||
if [ -f /tmp/tray ]; then
|
||||
var=$(cat /tmp/tray)
|
||||
if [ $var == 1 ]; then
|
||||
echo 0 > /tmp/tray
|
||||
i3-msg -q "bar mode dock bar-tray"
|
||||
i3-msg -q "bar mode invisible bar-primary"
|
||||
fi
|
||||
|
||||
if [ $var == 0 ]; then
|
||||
echo 1 > /tmp/tray
|
||||
i3-msg -q "bar mode invisible bar-tray"
|
||||
i3-msg -q "bar mode dock bar-primary"
|
||||
|
||||
fi
|
||||
else
|
||||
echo 0 > /tmp/tray
|
||||
i3-msg -q "bar mode dock bar-tray"
|
||||
i3-msg -q "bar mode invisible bar-primary"
|
||||
fi
|
6
dotfiles/i3/.config/i3/scripts/miei/cpu.sh
Executable file
6
dotfiles/i3/.config/i3/scripts/miei/cpu.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/bash
|
||||
if [ $BLOCK_BUTTON == 1 ]; then
|
||||
kitty -e htop
|
||||
fi
|
||||
|
||||
echo ""$[100-$(vmstat 1 2|tail -1|awk '{print $15}')]"%"
|
48
dotfiles/i3/.config/i3/scripts/miei/energia.sh
Executable file
48
dotfiles/i3/.config/i3/scripts/miei/energia.sh
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/bash
|
||||
file=/tmp/powerprofile
|
||||
|
||||
if ! test -f $file; then
|
||||
echo 0 > $file
|
||||
powerprofilesctl set power-saver
|
||||
fi
|
||||
|
||||
a=$(cat $file)
|
||||
|
||||
if [ $BLOCK_BUTTON == 1 ]
|
||||
then
|
||||
if [ $a == 0 ]
|
||||
then
|
||||
echo 1 > $file
|
||||
echo " Blc"
|
||||
powerprofilesctl set balanced
|
||||
fi
|
||||
|
||||
if [ $a == 1 ]
|
||||
then
|
||||
echo 2 > $file
|
||||
echo " Pro"
|
||||
powerprofilesctl set performance
|
||||
fi
|
||||
|
||||
if [ $a == 2 ]
|
||||
then
|
||||
echo 0 > $file
|
||||
echo " Eco"
|
||||
powerprofilesctl set power-saver
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $a == 1 ]; then
|
||||
echo " Blc"
|
||||
fi
|
||||
|
||||
if [ $a == 0 ]; then
|
||||
echo " Eco"
|
||||
fi
|
||||
|
||||
if [ $a == 2 ]; then
|
||||
echo " Pro"
|
||||
fi
|
||||
|
||||
|
||||
|
29
dotfiles/i3/.config/i3/scripts/miei/feed.sh
Executable file
29
dotfiles/i3/.config/i3/scripts/miei/feed.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/bash
|
||||
a=0
|
||||
path=~/.config/i3/scripts/miei/feed.sh
|
||||
|
||||
if [ $BLOCK_BUTTON == 1 ]
|
||||
then
|
||||
if [ $a == 0 ]
|
||||
then
|
||||
sed -i '2d' $path
|
||||
sed -i '2ia=1' $path
|
||||
a=1
|
||||
else
|
||||
sed -i '2d' $path
|
||||
sed -i '2ia=0' $path
|
||||
a=0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $a == 1 ]
|
||||
then
|
||||
echo " $(curl https://www.lescienze.it/news/ -s -L | grep -o href.*h2 | head -n 1 | grep -o -P '(?<=">).*(?=</a>)')"
|
||||
else
|
||||
echo " News"
|
||||
fi
|
||||
|
||||
if [ $BLOCK_BUTTON == 3 ]; then
|
||||
xdg-open https://www.lescienze.it/news/
|
||||
fi
|
||||
|
29
dotfiles/i3/.config/i3/scripts/miei/full_charge.sh
Executable file
29
dotfiles/i3/.config/i3/scripts/miei/full_charge.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# quando lo clicco mi ricarica il dispositivo fino al 100% e poi disabilita la feature
|
||||
path="/sys/devices/pci0000:00/0000:00:14.3/PNP0C09:00/VPC2004:00/conservation_mode"
|
||||
value=$(cat $path)
|
||||
if [ $value -eq "" ];then
|
||||
echo "only ideapad"
|
||||
fi
|
||||
|
||||
level=$( upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep percentage | grep -o "[0-9]*")
|
||||
|
||||
if [ $BLOCK_BUTTON -eq 1 ] && [ $value -eq "1" ];then
|
||||
echo " full"
|
||||
echo $PASSW | sudo -S sh -c "echo 0 > $path"
|
||||
fi
|
||||
|
||||
|
||||
if [ $level -ge "95" ] && [ $value -eq "0" ];then
|
||||
echo " Csv"
|
||||
echo $PASSW | sudo -S sh -c "echo 1 > $path"
|
||||
fi
|
||||
|
||||
if [ $value -eq 0 ];then
|
||||
echo " full"
|
||||
else
|
||||
echo " Csv"
|
||||
fi
|
||||
|
||||
|
9
dotfiles/i3/.config/i3/scripts/miei/meteo.sh
Executable file
9
dotfiles/i3/.config/i3/scripts/miei/meteo.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/bash
|
||||
meteo=$(curl wttr.in/Toronto?format=1 | xargs echo)
|
||||
first="${meteo%% *}"
|
||||
if [ "$meteo" == "" ] || [ "$first" == "Unknown" ]; then
|
||||
echo " Off"
|
||||
|
||||
else
|
||||
echo $meteo
|
||||
fi
|
33
dotfiles/i3/.config/i3/scripts/miei/ora.sh
Executable file
33
dotfiles/i3/.config/i3/scripts/miei/ora.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/bash
|
||||
a=0
|
||||
|
||||
path=~/.config/i3/scripts/miei/ora.sh
|
||||
|
||||
cambia_var () {
|
||||
if [ $a == 0 ]; then
|
||||
sed -i '2d' $path
|
||||
sed -i '2ia=1' $path
|
||||
# se non mostri la variabile subito ci sarà il delay di interval
|
||||
a=1
|
||||
return 1
|
||||
fi
|
||||
if [ $a == 1 ]; then
|
||||
sed -i '2d' $path
|
||||
sed -i '2ia=0' $path
|
||||
a=0
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $BLOCK_BUTTON == 1 ]; then
|
||||
cambia_var
|
||||
fi
|
||||
|
||||
if [ $a == 0 ]; then
|
||||
date '+%a %d %b %H:%M'
|
||||
fi
|
||||
|
||||
if [ $a == 1 ]; then
|
||||
date '+%H:%M'
|
||||
fi
|
||||
|
52
dotfiles/i3/.config/i3/scripts/miei/power.sh
Executable file
52
dotfiles/i3/.config/i3/scripts/miei/power.sh
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/bash
|
||||
#echo " "
|
||||
#echo ""
|
||||
#echo "#a6e3a1"
|
||||
#
|
||||
|
||||
if [ $(cat /sys/class/power_supply/ACAD/online) == 1 ];then
|
||||
~/.config/i3/scripts/miei/power_charge.sh
|
||||
exit 1
|
||||
fi
|
||||
|
||||
level=$( upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep percentage | grep -o "[0-9]*")
|
||||
|
||||
unit=20
|
||||
vite=$(($level/unit))
|
||||
|
||||
if [ $vite == 5 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "#cdd6f4"
|
||||
fi
|
||||
|
||||
if [ $vite == 4 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 3 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 2 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "#fab387"
|
||||
fi
|
||||
if [ $vite == 1 ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "#fab387"
|
||||
fi
|
||||
if [ "$level" -lt "20" ] && [ "$level" -ge "10" ]; then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
||||
if [ "$level" -lt "10" ]; then
|
||||
echo "!"
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
47
dotfiles/i3/.config/i3/scripts/miei/power_charge.sh
Executable file
47
dotfiles/i3/.config/i3/scripts/miei/power_charge.sh
Executable file
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/bash
|
||||
#echo " "
|
||||
#echo ""
|
||||
#echo "#a6e3a1"
|
||||
#
|
||||
|
||||
level=$( upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep percentage | grep -o "[0-9]*")
|
||||
|
||||
unit=20
|
||||
vite=$(($level/unit))
|
||||
|
||||
if [ $vite == 5 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#cdd6f4"
|
||||
fi
|
||||
|
||||
if [ $vite == 4 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 3 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 2 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#fab387"
|
||||
fi
|
||||
if [ $vite == 1 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#fab387"
|
||||
fi
|
||||
if [ "$level" -lt "20" ] && [ "$level" -ge "10" ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
||||
if [ "$level" -lt "10" ]; then
|
||||
echo " !"
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
10
dotfiles/i3/.config/i3/scripts/miei/schermata.sh
Executable file
10
dotfiles/i3/.config/i3/scripts/miei/schermata.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/bash
|
||||
a=$(date +"%Y-%m-%d-%T")-schermata.png
|
||||
|
||||
maim --select ~/Immagini/Schermate/$a
|
||||
notify-send "Screenshot saved to ~/$a"
|
||||
#kdialog --yesno "Screenshot salvato, vuoi aprirlo?"
|
||||
#if [ $? == 0 ]; then
|
||||
eog ~/Immagini/Schermate/$a
|
||||
#fi
|
||||
|
80
dotfiles/i3/.config/i3/scripts/miei/timer.sh
Executable file
80
dotfiles/i3/.config/i3/scripts/miei/timer.sh
Executable file
|
@ -0,0 +1,80 @@
|
|||
#!/usr/bin/bash
|
||||
#creazione meccanismo di cambiamento timer modalità m (modifica)
|
||||
path=/tmp/miotimer
|
||||
|
||||
modifica () {
|
||||
if [ $BLOCK_BUTTON == 4 ];then
|
||||
current=$((current + 1))
|
||||
echo $mode > $path
|
||||
echo $current >> $path
|
||||
fi
|
||||
if [ $BLOCK_BUTTON == 5 ] && [ $current != 0 ];then
|
||||
current=$((current - 1))
|
||||
echo $mode > $path
|
||||
echo $current >> $path
|
||||
fi
|
||||
if [ $current == 0 ];then
|
||||
echo " Tmr"
|
||||
else
|
||||
echo " $(sed '2!d' $path) m"
|
||||
echo ""
|
||||
echo "#f9e2af"
|
||||
fi
|
||||
}
|
||||
|
||||
timer () {
|
||||
start=$(sed '2!d' $path)
|
||||
start=$((start * 60))
|
||||
now=$(date +%s)
|
||||
first=$(sed '3!d' $path)
|
||||
manca=$((start-now+first))
|
||||
if [ $manca != 0 ];then
|
||||
echo " $((manca / 60)):$((manca % 60))"
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
|
||||
else
|
||||
echo " Tmr"
|
||||
notify-send "Timer is over"
|
||||
rm $path
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -f $path ]
|
||||
then
|
||||
|
||||
|
||||
mode=$(sed '1!d' $path)
|
||||
current=$(sed '2!d' $path)
|
||||
|
||||
if [ $BLOCK_BUTTON == 1 ] && [ $current != 0 ];then
|
||||
if [ $mode == "w" ];then
|
||||
rm $path
|
||||
echo " Tmr"
|
||||
exit
|
||||
fi
|
||||
mode=w
|
||||
echo $mode > $path
|
||||
echo $current >> $path
|
||||
echo $(date +%s) >> $path
|
||||
fi
|
||||
|
||||
|
||||
if [ $mode == "m" ];then
|
||||
modifica
|
||||
fi
|
||||
|
||||
if [ $mode == "w" ];then
|
||||
timer
|
||||
fi
|
||||
|
||||
|
||||
|
||||
else
|
||||
echo m > $path
|
||||
echo 0 >> $path
|
||||
echo " Tmr"
|
||||
fi
|
16
dotfiles/i3/.config/i3/scripts/miei/update.sh
Executable file
16
dotfiles/i3/.config/i3/scripts/miei/update.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
if [ $BLOCK_BUTTON -eq "1" ];then
|
||||
kitty -e sudo dnf upgrade
|
||||
kitty -e flatpak update
|
||||
fi
|
||||
|
||||
|
||||
numero=$(dnf check-update| grep -Ec ' updates$')
|
||||
if [ $numero -eq "0" ];then
|
||||
echo " "
|
||||
else
|
||||
echo " $numero"
|
||||
echo ""
|
||||
echo "#f9e2af"
|
||||
fi
|
78
dotfiles/i3/.config/i3/scripts/miei/volcolor.sh
Executable file
78
dotfiles/i3/.config/i3/scripts/miei/volcolor.sh
Executable file
|
@ -0,0 +1,78 @@
|
|||
#!/bin/bash
|
||||
|
||||
level=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1 )
|
||||
|
||||
unit=10
|
||||
vite=$(($level/unit))
|
||||
mute=$(pactl get-sink-mute @DEFAULT_SINK@)
|
||||
|
||||
if [ "$mute" == "Mute: sì" ] || [ "$mute" == "Mute: yes" ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#cdd6f4"
|
||||
else
|
||||
if [ $vite == 10 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
||||
|
||||
if [ $vite == 9 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
||||
if [ $vite == 8 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
||||
if [ $vite == 7 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#f38ba8"
|
||||
fi
|
||||
if [ $vite == 6 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#fab387"
|
||||
fi
|
||||
if [ $vite == 5 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#fab387"
|
||||
fi
|
||||
if [ $vite == 4 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 3 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 2 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 1 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 0 ] && [ $level != 0 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#a6e3a1"
|
||||
fi
|
||||
if [ $vite == 0 ] && [ $level == 0 ]; then
|
||||
echo " "
|
||||
echo ""
|
||||
echo "#cdd6f4"
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
26
dotfiles/i3/.config/i3/scripts/miei/wallpaper.sh
Executable file
26
dotfiles/i3/.config/i3/scripts/miei/wallpaper.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/bash
|
||||
w_path=~/.config/wallpaper/
|
||||
c_path=~/.config/wallpaper/current
|
||||
config=~/.config/
|
||||
current=$(cat $c_path)
|
||||
|
||||
if [ $BLOCK_BUTTON == 1 ];then
|
||||
new=$((current+1))
|
||||
if [ $new == 13 ]; then
|
||||
new=0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $BLOCK_BUTTON == 3 ];then
|
||||
new=$((current - 1))
|
||||
if [ $new == "-1" ]; then
|
||||
new=12
|
||||
fi
|
||||
fi
|
||||
|
||||
rm "${config}sfondo.jpg"
|
||||
cp "$w_path$new.jpg" $config
|
||||
mv "$config$new.jpg" "${config}sfondo.jpg"
|
||||
sed -i '1d' $c_path
|
||||
echo $new >> $c_path
|
||||
feh --bg-fill ~/.config/sfondo.jpg
|
132
dotfiles/i3/.config/i3/scripts/pomodoro.sh
Executable file
132
dotfiles/i3/.config/i3/scripts/pomodoro.sh
Executable file
|
@ -0,0 +1,132 @@
|
|||
#!/bin/bash
|
||||
if [ -f /tmp/pomo_timer ];then
|
||||
pluto=$(cat /tmp/pomo_timer)
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) if [ $pluto -eq "0" ];then
|
||||
echo "1" > /tmp/pomo_timer
|
||||
pluto=1
|
||||
else
|
||||
echo "0" > /tmp/pomo_timer
|
||||
pluto=0
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
if [ $pluto -eq "0" ];then
|
||||
|
||||
# Config variables
|
||||
# 40min = 2400s
|
||||
# 25min = 1500s
|
||||
# 20min = 1200s
|
||||
# 5min = 300s
|
||||
|
||||
# In secondi
|
||||
work_time=2400
|
||||
break_time=1200
|
||||
|
||||
msg_start=" Pom"
|
||||
work_prefix=" "
|
||||
break_prefix=" "
|
||||
|
||||
#start_color="#b39df3"
|
||||
#start_color="#E06C75"
|
||||
start_color="#cdd6f4"
|
||||
|
||||
break_color="#a6e3a1"
|
||||
work_color="#f38ba8"
|
||||
|
||||
break_command="notify-send -t 2500 'Grab a tea'"
|
||||
work_command="notify-send -t 2500 'Time to work!'"
|
||||
|
||||
pom_path="/tmp/pomodoro"
|
||||
|
||||
function display () {
|
||||
min=$((s/60))
|
||||
sek=$((s%60))
|
||||
if [ $min -eq 0 ]
|
||||
then
|
||||
min=00
|
||||
elif [ $min -lt 10 ]
|
||||
then
|
||||
min=0$min
|
||||
fi
|
||||
if [ $sek -lt 10 ]
|
||||
then
|
||||
sek=0$sek
|
||||
fi
|
||||
case $2 in # richiamo alla seconda variabile, t
|
||||
w)
|
||||
echo "$work_prefix$min:$sek"
|
||||
echo $min:$sek
|
||||
echo $work_color
|
||||
;;
|
||||
b)
|
||||
echo "$break_prefix$min:$sek"
|
||||
echo $min:$sek
|
||||
echo $break_color
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [ -f "$pom_path" ] && [ "$(wc -l $pom_path | awk '{print $1}')" -eq 2 ]
|
||||
then
|
||||
p=$(sed '1 d' $pom_path) # time
|
||||
t=$(sed '2 d' $pom_path) # mode
|
||||
case $t in
|
||||
w) dur=$work_time;;
|
||||
b) dur=$break_time;;
|
||||
esac
|
||||
now=$(date +%s)
|
||||
s=$((dur-now+p)) # sec mancanti basandosi su orologio e istante chiamata questa fzione
|
||||
if [ $s -le 0 ] # if time less than 0 then switch mode
|
||||
then
|
||||
case $t in
|
||||
w)
|
||||
echo b > $pom_path
|
||||
eval "$break_command"
|
||||
paplay $HOME/.config/i3/scripts/bell.wav
|
||||
;;
|
||||
b)
|
||||
echo w > $pom_path
|
||||
eval "$work_command"
|
||||
paplay $HOME/.config/i3/scripts/bell_end.wav
|
||||
|
||||
;;
|
||||
esac
|
||||
echo "$now" >> $pom_path
|
||||
fi
|
||||
display "$s" "$t"
|
||||
else
|
||||
echo "$msg_start"
|
||||
echo "$msg_start"
|
||||
echo "$start_color"
|
||||
fi
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1)
|
||||
if [ -f $pom_path ]; then # if file exists then stop reset timer
|
||||
rm $pom_path
|
||||
else
|
||||
echo w > $pom_path # else start timer
|
||||
date +%s >> $pom_path
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# è scritto in modo carino ma non ha sostanziali differenze rispetto al mio , per aggiornarsi sfrutta l'interval integrato. Inoltre è vincolato dalla stampa dell'orario effettivo che non gli permette di andare fuori dal taiming e rimanere sempre in orario. Dovrei evitare la funzione di chiamata e quella di sleep ed optare per un intervallo dentro il blocco. L'aggiornamento nel primo caso non cambia nulla nel secondo mostra secondi differenti ma si può fare.
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ $pluto -eq "1" ];then
|
||||
~/.config/i3/scripts/miei/timer.sh
|
||||
fi
|
||||
|
||||
else
|
||||
echo "0" > /tmp/pomo_timer
|
||||
fi
|
||||
|
||||
|
184
dotfiles/i3/.config/i3/scripts/powermenu
Executable file
184
dotfiles/i3/.config/i3/scripts/powermenu
Executable file
|
@ -0,0 +1,184 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Use rofi/zenity to change system runstate thanks to systemd.
|
||||
#
|
||||
# Note: this currently relies on associative array support in the shell.
|
||||
#
|
||||
# Inspired from i3pystatus wiki:
|
||||
# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu
|
||||
#
|
||||
# Copyright 2015 Benjamin Chrétien <chretien at lirmm dot fr>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# modified to work with latest rofi update by joekamprad <joekamprad@endeavouros.com>
|
||||
|
||||
#######################################################################
|
||||
# BEGIN CONFIG #
|
||||
#######################################################################
|
||||
|
||||
# Use a custom lock script
|
||||
#LOCKSCRIPT="i3lock-extra -m pixelize"
|
||||
|
||||
# Colors: FG (foreground), BG (background), HL (highlighted)
|
||||
FG_COLOR="#bbbbbb"
|
||||
BG_COLOR="#111111"
|
||||
HLFG_COLOR="#111111"
|
||||
HLBG_COLOR="#bbbbbb"
|
||||
BORDER_COLOR="#222222"
|
||||
|
||||
# Options not related to colors (most rofi options do not work anymore)
|
||||
ROFI_OPTIONS=(-theme ~/.config/rofi/pw.rasi)
|
||||
# Zenity options
|
||||
ZENITY_TITLE="Power Menu"
|
||||
ZENITY_TEXT="Action:"
|
||||
ZENITY_OPTIONS=(--column= --hide-header)
|
||||
|
||||
#######################################################################
|
||||
# END CONFIG #
|
||||
#######################################################################
|
||||
|
||||
# Whether to ask for user's confirmation
|
||||
enable_confirmation=false
|
||||
|
||||
# Preferred launcher if both are available
|
||||
preferred_launcher="rofi"
|
||||
|
||||
usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc.
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-c ask for user confirmation
|
||||
-p preferred launcher (rofi or zenity)
|
||||
|
||||
This script depends on:
|
||||
- systemd,
|
||||
- i3,
|
||||
- rofi or zenity."
|
||||
|
||||
# Check whether the user-defined launcher is valid
|
||||
launcher_list=(rofi zenity)
|
||||
function check_launcher() {
|
||||
if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then
|
||||
echo "Supported launchers: ${launcher_list[*]}"
|
||||
exit 1
|
||||
else
|
||||
# Get array with unique elements and preferred launcher first
|
||||
# Note: uniq expects a sorted list, so we cannot use it
|
||||
i=1
|
||||
launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \
|
||||
| sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' '))
|
||||
fi
|
||||
}
|
||||
|
||||
# Parse CLI arguments
|
||||
while getopts "hcp:" option; do
|
||||
case "${option}" in
|
||||
h) echo "${usage}"
|
||||
exit 0
|
||||
;;
|
||||
c) enable_confirmation=true
|
||||
;;
|
||||
p) preferred_launcher="${OPTARG}"
|
||||
check_launcher "${preferred_launcher}"
|
||||
;;
|
||||
*) exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check whether a command exists
|
||||
function command_exists() {
|
||||
command -v "$1" &> /dev/null 2>&1
|
||||
}
|
||||
|
||||
# systemctl required
|
||||
if ! command_exists systemctl ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# menu defined as an associative array
|
||||
typeset -A menu
|
||||
|
||||
# Menu with keys/commands
|
||||
|
||||
menu=(
|
||||
[ Shutdown]="systemctl poweroff"
|
||||
[ Reboot]="systemctl reboot"
|
||||
[ Suspend]="systemctl suspend"
|
||||
[ Lock]="~/.config/i3/scripts/blur-lock"
|
||||
[ Logout]="i3-msg exit"
|
||||
)
|
||||
|
||||
menu_nrows=${#menu[@]}
|
||||
|
||||
# Menu entries that may trigger a confirmation message
|
||||
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
|
||||
|
||||
launcher_exe=""
|
||||
launcher_options=""
|
||||
rofi_colors=""
|
||||
|
||||
function prepare_launcher() {
|
||||
if [[ "$1" == "rofi" ]]; then
|
||||
rofi_colors=(-bc "${BORDER_COLOR}" -bg "${BG_COLOR}" -fg "${FG_COLOR}" \
|
||||
-hlfg "${HLFG_COLOR}" -hlbg "${HLBG_COLOR}")
|
||||
launcher_exe="rofi"
|
||||
launcher_options=(-dmenu -i -lines "${menu_nrows}" -p "${ROFI_TEXT}" \
|
||||
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||
elif [[ "$1" == "zenity" ]]; then
|
||||
launcher_exe="zenity"
|
||||
launcher_options=(--list --title="${ZENITY_TITLE}" --text="${ZENITY_TEXT}" \
|
||||
"${ZENITY_OPTIONS[@]}")
|
||||
fi
|
||||
}
|
||||
|
||||
for l in "${launcher_list[@]}"; do
|
||||
if command_exists "${l}" ; then
|
||||
prepare_launcher "${l}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# No launcher available
|
||||
if [[ -z "${launcher_exe}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
launcher=(${launcher_exe} "${launcher_options[@]}")
|
||||
selection="$(printf '%s\n' "${!menu[@]}" | sort | "${launcher[@]}")"
|
||||
|
||||
function ask_confirmation() {
|
||||
if [ "${launcher_exe}" == "rofi" ]; then
|
||||
confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \
|
||||
"${rofi_colors}" "${ROFI_OPTIONS[@]}")
|
||||
[ "${confirmed}" == "Yes" ] && confirmed=0
|
||||
elif [ "${launcher_exe}" == "zenity" ]; then
|
||||
zenity --question --text "Are you sure you want to ${selection,,}?"
|
||||
confirmed=$?
|
||||
fi
|
||||
|
||||
if [ "${confirmed}" == 0 ]; then
|
||||
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $? -eq 0 && ! -z ${selection} ]]; then
|
||||
if [[ "${enable_confirmation}" = true && \
|
||||
${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then
|
||||
ask_confirmation
|
||||
else
|
||||
i3-msg -q "exec --no-startup-id ${menu[${selection}]}"
|
||||
fi
|
||||
fi
|
97
dotfiles/i3/.config/i3/scripts/volume
Executable file
97
dotfiles/i3/.config/i3/scripts/volume
Executable file
|
@ -0,0 +1,97 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# original source: https://github.com/vivien/i3blocks-contrib/tree/master/volume
|
||||
# check the readme: https://github.com/vivien/i3blocks-contrib/blob/master/volume/README.md
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# The second parameter overrides the mixer selection
|
||||
# For PulseAudio users, eventually use "pulse"
|
||||
# For Jack/Jack2 users, use "jackplug"
|
||||
# For ALSA users, you may use "default" for your primary card
|
||||
# or you may use hw:# where # is the number of the card desired
|
||||
if [[ -z "$MIXER" ]] ; then
|
||||
MIXER="default"
|
||||
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
|
||||
# pulseaudio is running, but not all installations use "pulse"
|
||||
if amixer -D pulse info >/dev/null 2>&1 ; then
|
||||
MIXER="pulse"
|
||||
fi
|
||||
fi
|
||||
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
|
||||
MIXER="${2:-$MIXER}"
|
||||
fi
|
||||
|
||||
# The instance option sets the control to report and configure
|
||||
# This defaults to the first control of your selected mixer
|
||||
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
|
||||
if [[ -z "$SCONTROL" ]] ; then
|
||||
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
|
||||
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
|
||||
head -n1
|
||||
)}"
|
||||
fi
|
||||
|
||||
# The first parameter sets the step to change the volume by (and units to display)
|
||||
# This may be in in % or dB (eg. 5% or 3dB)
|
||||
if [[ -z "$STEP" ]] ; then
|
||||
STEP="${1:-5%}"
|
||||
fi
|
||||
|
||||
# AMIXER(1):
|
||||
# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
|
||||
# more natural for human ear."
|
||||
NATURAL_MAPPING=${NATURAL_MAPPING:-0}
|
||||
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
|
||||
AMIXER_PARAMS="-M"
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
capability() { # Return "Capture" if the device is a capture device
|
||||
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
|
||||
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
|
||||
}
|
||||
|
||||
volume() {
|
||||
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
|
||||
}
|
||||
|
||||
format() {
|
||||
|
||||
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
|
||||
perl_filter+='{CORE::say $4 eq "off" ? "0%" : "'
|
||||
# If dB was selected, print that instead
|
||||
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
|
||||
perl_filter+='"; exit}'
|
||||
# output=$(/home/flavio/.config/i3/scripts/miei/volcolor.sh)
|
||||
# valore=${output::-1}
|
||||
# basandomi sul valore di output cambio icona
|
||||
~/.config/i3/scripts/miei/volcolor.sh
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
|
||||
3) pavucontrol;;
|
||||
|
||||
4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
|
||||
5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
|
||||
esac
|
||||
|
||||
volume | format
|
98
dotfiles/i3/.config/i3/scripts/volume_brightness.sh
Executable file
98
dotfiles/i3/.config/i3/scripts/volume_brightness.sh
Executable file
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
# original source: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
|
||||
|
||||
# taken from here: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
|
||||
|
||||
# See README.md for usage instructions
|
||||
bar_color="#a6da95"
|
||||
volume_step=5
|
||||
brightness_step=5%
|
||||
max_volume=100
|
||||
|
||||
# Uses regex to get volume from pactl
|
||||
function get_volume {
|
||||
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
|
||||
}
|
||||
|
||||
# Uses regex to get mute status from pactl
|
||||
function get_mute {
|
||||
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
|
||||
}
|
||||
|
||||
# Uses regex to get brightness from xbacklight
|
||||
function get_brightness {
|
||||
brightnessctl g | grep -Po '[0-9]{1,3}' | head -n 1
|
||||
|
||||
}
|
||||
|
||||
# Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume
|
||||
function get_volume_icon {
|
||||
volume=$(get_volume)
|
||||
mute=$(get_mute)
|
||||
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ] ; then
|
||||
volume_icon=" "
|
||||
elif [ "$volume" -lt 50 ]; then
|
||||
volume_icon=" "
|
||||
else
|
||||
volume_icon=" "
|
||||
fi
|
||||
}
|
||||
|
||||
# Always returns the same icon - I couldn't get the brightness-low icon to work with fontawesome
|
||||
function get_brightness_icon {
|
||||
brightness_icon=" "
|
||||
}
|
||||
|
||||
# Displays a volume notification using dunstify
|
||||
function show_volume_notif {
|
||||
volume=$(get_mute)
|
||||
get_volume_icon
|
||||
dunstify -t 1000 -r 2593 -u normal "$volume_icon $volume%" -h int:value:$volume -h string:hlcolor:$bar_color
|
||||
}
|
||||
|
||||
# Displays a brightness notification using dunstify
|
||||
function show_brightness_notif {
|
||||
massima=$(brightnessctl m)
|
||||
brightness=$(($(get_brightness)*100/$massima))
|
||||
get_brightness_icon
|
||||
dunstify -t 1000 -r 2593 -u normal "$brightness_icon $brightness%" -h int:value:$brightness -h string:hlcolor:$bar_color
|
||||
}
|
||||
|
||||
# Main function - Takes user input, "volume_up", "volume_down", "brightness_up", or "brightness_down"
|
||||
case $1 in
|
||||
volume_up)
|
||||
# Unmutes and increases volume, then displays the notification
|
||||
pactl set-sink-mute @DEFAULT_SINK@ 0
|
||||
volume=$(get_volume)
|
||||
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
|
||||
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
|
||||
else
|
||||
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
|
||||
fi
|
||||
show_volume_notif
|
||||
;;
|
||||
|
||||
volume_down)
|
||||
# Raises volume and displays the notification
|
||||
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
|
||||
show_volume_notif
|
||||
;;
|
||||
|
||||
volume_mute)
|
||||
# Toggles mute and displays the notification
|
||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
show_volume_notif
|
||||
;;
|
||||
|
||||
brightness_up)
|
||||
# Increases brightness and displays the notification
|
||||
brightnessctl s +$brightness_step
|
||||
show_brightness_notif
|
||||
;;
|
||||
|
||||
brightness_down)
|
||||
# Decreases brightness and displays the notification
|
||||
brightnessctl s $brightness_step-
|
||||
show_brightness_notif
|
||||
;;
|
||||
esac
|
61
dotfiles/kmonad/.kmonad/real-programmers-dvorak.kbd
Normal file
61
dotfiles/kmonad/.kmonad/real-programmers-dvorak.kbd
Normal file
|
@ -0,0 +1,61 @@
|
|||
|
||||
(defcfg
|
||||
;; For Linux
|
||||
input (device-file "/dev/input/by-path/pci-0000:02:00.0-usb-0:5:1.0-event-kbd")
|
||||
output (uinput-sink "My KMonad output"
|
||||
;; To understand the importance of the following line, see the section on
|
||||
;; Compose-key sequences at the near-bottom of this file.
|
||||
"/run/current-system/sw/bin/sleep 1 && /run/current-system/sw/bin/setxkbmap -option compose:ralt")
|
||||
cmp-seq ralt ;; Set the compose key to `RightAlt'
|
||||
cmp-seq-delay 5 ;; 5ms delay between each compose-key sequence press
|
||||
|
||||
;; For Windows
|
||||
;; input (low-level-hook)
|
||||
;; output (send-event-sink)
|
||||
|
||||
;; For MacOS
|
||||
;; input (iokit-name "my-keyboard-product-string")
|
||||
;; output (kext)
|
||||
|
||||
;; Comment this if you want unhandled events not to be emitted
|
||||
fallthrough true
|
||||
|
||||
;; Set this to false to disable any command-execution in KMonad
|
||||
allow-cmd true
|
||||
|
||||
;; Set the implicit around to `around`
|
||||
implicit-around around
|
||||
)
|
||||
|
||||
(defsrc
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w e r t y u i o p [ ] \
|
||||
caps a s d f g h j k l ; ' ret
|
||||
lsft z x c v b n m , . / rsft
|
||||
lctl lmet lalt spc ralt rmet cmp rctl
|
||||
)
|
||||
|
||||
(deflayer default
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
$ + [ { \( & = \) } ] * ! | bspc
|
||||
tab ; , . p y f g c r l / @ \
|
||||
caps a o e u i d h t n s - ret
|
||||
@shift ' q j k x b m w v z rsft
|
||||
lctl lmet lalt spc ralt rmet cmp rctl
|
||||
)
|
||||
|
||||
|
||||
(deflayer shift
|
||||
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
~ 1 2 3 4 5 6 7 8 9 0 % ` bspc
|
||||
tab : < > P Y F G C R L ? ^ #
|
||||
caps A O E U I D H T N S _ ret
|
||||
lsft " Q J K X B M W V Z rsft
|
||||
lctl lmet lalt spc ralt rmet cmp rctl
|
||||
)
|
||||
|
||||
(defalias
|
||||
shift (layer-toggle shift)
|
||||
)
|
||||
|
8
dotfiles/nvim/.config/nvim/.gitignore
vendored
Normal file
8
dotfiles/nvim/.config/nvim/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
tt.*
|
||||
.tests
|
||||
doc/tags
|
||||
debug
|
||||
.repro
|
||||
foo.*
|
||||
*.log
|
||||
data
|
15
dotfiles/nvim/.config/nvim/.neoconf.json
Normal file
15
dotfiles/nvim/.config/nvim/.neoconf.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
201
dotfiles/nvim/.config/nvim/LICENSE
Normal file
201
dotfiles/nvim/.config/nvim/LICENSE
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
4
dotfiles/nvim/.config/nvim/README.md
Normal file
4
dotfiles/nvim/.config/nvim/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# 💤 LazyVim
|
||||
|
||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
2
dotfiles/nvim/.config/nvim/init.lua
Normal file
2
dotfiles/nvim/.config/nvim/init.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
84
dotfiles/nvim/.config/nvim/lazy-lock.json
Normal file
84
dotfiles/nvim/.config/nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"LazyVim": { "branch": "main", "commit": "12818a6cb499456f4903c5d8e68af43753ebc869" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "b546852f7a477276805b01f84ac79c28a962c55b" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
|
||||
"catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-git": { "branch": "main", "commit": "50d526dff0f6bc441b51fc269d9fdc99a50c76af" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"conform.nvim": { "branch": "master", "commit": "936f2413e6c57185cd873623a29a0685bce4b423" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
|
||||
"copilot.lua": { "branch": "master", "commit": "1a237cf50372830a61d92b0adf00d3b23882e0e1" },
|
||||
"crates.nvim": { "branch": "main", "commit": "b3b9ac6ed9618955b24bf9adede7530ef608495b" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||
"dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" },
|
||||
"flash.nvim": { "branch": "main", "commit": "25ba3f4d1e0b080213b39518ebcfbb693a23c957" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
|
||||
"fzf-lua": { "branch": "main", "commit": "f39de2d77755e90a7a80989b007f0bf2ca13b0dd" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "76d86580f71bd2f07d4264c782ab8d1c12302e13" },
|
||||
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
|
||||
"kmonad-vim": { "branch": "master", "commit": "37978445197ab00edeb5b731e9ca90c2b141723f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
|
||||
"leetcode.nvim": { "branch": "master", "commit": "02fb2c855658ad6b60e43671f6b040c812181a1d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"markdown.nvim": { "branch": "main", "commit": "a5e2d0b1215814c3d033be1fd8eccf59ce366399" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.ai": { "branch": "main", "commit": "40e380a589d07ec2c856940c6422aafe5d949a0d" },
|
||||
"mini.hipatterns": { "branch": "main", "commit": "fdad87bf545aec5210ca9a2c49fddf6284d72d1e" },
|
||||
"mini.icons": { "branch": "main", "commit": "2d89252993fec829b24720097a687412d10f6c85" },
|
||||
"mini.pairs": { "branch": "main", "commit": "e543c760edc5e746e5b6cbd02c066c17ead3ef16" },
|
||||
"mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "0774fa2085c62a147fcc7b56f0ac37053cc80217" },
|
||||
"neotest": { "branch": "master", "commit": "6d6ad113f56edc7c3f2a77a0836ea8c1b955ebea" },
|
||||
"neotest-golang": { "branch": "main", "commit": "3a258b6e58ada91f8af95b445b6156c2290d0e06" },
|
||||
"neotest-python": { "branch": "master", "commit": "72603dfdbaad5695160268cb10531a14cc37236e" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "7557f26defd093c4e9bc17f28b08403f706f5a44" },
|
||||
"noice.nvim": { "branch": "main", "commit": "5fd435c3c6c70d1fe79923593124aa0d52534bc1" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
||||
"nvim-dap": { "branch": "master", "commit": "20a4859ebde1c9bc8e96f8cc11a20667e7fdd516" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "5511788255c92bdd845f8d9690f88e2e0f0ff9f2" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "db72bf6ab9f75fe841e8e11e772ee7fef6f484f1" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" },
|
||||
"nvim-lint": { "branch": "master", "commit": "a7ce9c78a7c710c28bee56dfab10a5c0c80b7fb5" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "6a3c6a42a6e24414bdf337b05a84a0ea013dd155" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
|
||||
"octo.nvim": { "branch": "master", "commit": "fd50872494abd1cb580c604f1f52aae2257f7220" },
|
||||
"one-small-step-for-vimkind": { "branch": "main", "commit": "0f0d5bc67786c36edc2cb6fb5faa5c09dd1a6e10" },
|
||||
"overseer.nvim": { "branch": "master", "commit": "236e60cdac6410dd95ea5cecafdb801a304d6a41" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
|
||||
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "319c01b99b7a8c9ac2066bf0efd4d6ec68fef444" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "4b386e66a9599057587c30538d5e6192e3d1c181" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
|
||||
"venv-selector.nvim": { "branch": "regexp", "commit": "c9d638f76ec9e31a46839d6bc12677dbafd73389" },
|
||||
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "a5ff8bd69fcaf53cd24827b54492c8ce87806d18" },
|
||||
"vim-suda": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" },
|
||||
"vim-wakatime": { "branch": "master", "commit": "53bba6bb8342de9cbdafc82142a9b5e82008d858" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "bfec3d6bc0a9b0b2cb11644642f78c2c3915eef0" },
|
||||
"yanky.nvim": { "branch": "main", "commit": "73215b77d22ebb179cef98e7e1235825431d10e4" }
|
||||
}
|
35
dotfiles/nvim/.config/nvim/lazyvim.json
Normal file
35
dotfiles/nvim/.config/nvim/lazyvim.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.coding.mini-surround",
|
||||
"lazyvim.plugins.extras.coding.yanky",
|
||||
"lazyvim.plugins.extras.dap.core",
|
||||
"lazyvim.plugins.extras.dap.nlua",
|
||||
"lazyvim.plugins.extras.editor.dial",
|
||||
"lazyvim.plugins.extras.editor.fzf",
|
||||
"lazyvim.plugins.extras.editor.inc-rename",
|
||||
"lazyvim.plugins.extras.editor.overseer",
|
||||
"lazyvim.plugins.extras.lang.docker",
|
||||
"lazyvim.plugins.extras.lang.git",
|
||||
"lazyvim.plugins.extras.lang.go",
|
||||
"lazyvim.plugins.extras.lang.json",
|
||||
"lazyvim.plugins.extras.lang.markdown",
|
||||
"lazyvim.plugins.extras.lang.nix",
|
||||
"lazyvim.plugins.extras.lang.php",
|
||||
"lazyvim.plugins.extras.lang.python",
|
||||
"lazyvim.plugins.extras.lang.rust",
|
||||
"lazyvim.plugins.extras.lang.sql",
|
||||
"lazyvim.plugins.extras.lang.svelte",
|
||||
"lazyvim.plugins.extras.lang.tailwind",
|
||||
"lazyvim.plugins.extras.lang.toml",
|
||||
"lazyvim.plugins.extras.lang.yaml",
|
||||
"lazyvim.plugins.extras.test.core",
|
||||
"lazyvim.plugins.extras.util.dot",
|
||||
"lazyvim.plugins.extras.util.gitui",
|
||||
"lazyvim.plugins.extras.util.mini-hipatterns",
|
||||
"lazyvim.plugins.extras.util.octo"
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "6520"
|
||||
},
|
||||
"version": 6
|
||||
}
|
3
dotfiles/nvim/.config/nvim/lua/config/autocmds.lua
Normal file
3
dotfiles/nvim/.config/nvim/lua/config/autocmds.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
14
dotfiles/nvim/.config/nvim/lua/config/core/keymaps.lua
Normal file
14
dotfiles/nvim/.config/nvim/lua/config/core/keymaps.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
local km = vim.keymap
|
||||
|
||||
|
||||
-- Visual Mode --
|
||||
km.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
km.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- Normal Mode --
|
||||
-- Window
|
||||
km.set("n", "<leader>sv", "<C-w>v")
|
||||
km.set("n", "<leader>sh", "<C-w>s")
|
||||
|
27
dotfiles/nvim/.config/nvim/lua/config/core/options.lua
Normal file
27
dotfiles/nvim/.config/nvim/lua/config/core/options.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
local opt = vim.opt
|
||||
|
||||
opt.relativenumber = ture
|
||||
opt.number = true
|
||||
|
||||
opt.tabstop = 2
|
||||
opt.shiftwidth = 2
|
||||
opt.expandtab = true
|
||||
opt.autoindent = true
|
||||
|
||||
|
||||
opt.wrap = false
|
||||
|
||||
opt.cursorline = ture
|
||||
|
||||
opt.mouse:append("a")
|
||||
|
||||
opt.clipboard:append("unnamedplus")
|
||||
|
||||
opt.splitright = true
|
||||
opt.splitbelow = true
|
||||
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
|
||||
opt.termguicolors = true
|
||||
opt.signcolumn = "yes"
|
4
dotfiles/nvim/.config/nvim/lua/config/keymaps.lua
Normal file
4
dotfiles/nvim/.config/nvim/lua/config/keymaps.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
require("config.core.keymaps")
|
53
dotfiles/nvim/.config/nvim/lua/config/lazy.lua
Normal file
53
dotfiles/nvim/.config/nvim/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
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)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
4
dotfiles/nvim/.config/nvim/lua/config/options.lua
Normal file
4
dotfiles/nvim/.config/nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
require("config.core.options")
|
13
dotfiles/nvim/.config/nvim/lua/plugins/colorscheme.lua
Normal file
13
dotfiles/nvim/.config/nvim/lua/plugins/colorscheme.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
-- add gruvbox
|
||||
-- { "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
-- colorscheme = "tokyonight-day",
|
||||
colorscheme = "duskfox",
|
||||
},
|
||||
},
|
||||
}
|
7
dotfiles/nvim/.config/nvim/lua/plugins/disabled.lua
Normal file
7
dotfiles/nvim/.config/nvim/lua/plugins/disabled.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
{ "folke/noice.nvim", enabled = false },
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
}
|
193
dotfiles/nvim/.config/nvim/lua/plugins/example.lua
Normal file
193
dotfiles/nvim/.config/nvim/lua/plugins/example.lua
Normal file
|
@ -0,0 +1,193 @@
|
|||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
3
dotfiles/nvim/.config/nvim/lua/plugins/kmonad.lua
Normal file
3
dotfiles/nvim/.config/nvim/lua/plugins/kmonad.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
"kmonad/kmonad-vim",
|
||||
}
|
22
dotfiles/nvim/.config/nvim/lua/plugins/leetcode.lua
Normal file
22
dotfiles/nvim/.config/nvim/lua/plugins/leetcode.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
{
|
||||
"kawre/leetcode.nvim",
|
||||
build = ":TSUpdate html",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim", -- required by telescope
|
||||
"MunifTanjim/nui.nvim",
|
||||
|
||||
-- optional
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"rcarriga/nvim-notify",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = {
|
||||
-- configuration goes here
|
||||
---@type lc.lang
|
||||
-- lang = "rust",
|
||||
lang = "golang",
|
||||
},
|
||||
},
|
||||
}
|
24
dotfiles/nvim/.config/nvim/lua/plugins/neo-tree.lua
Normal file
24
dotfiles/nvim/.config/nvim/lua/plugins/neo-tree.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = {
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
visible = true,
|
||||
},
|
||||
},
|
||||
event_handlers = {
|
||||
-- {
|
||||
-- event = "after_render",
|
||||
-- handler = function()
|
||||
-- local state = require("neo-tree.sources.manager").get_state("filesystem")
|
||||
-- if not require("neo-tree.sources.common.preview").is_active() then
|
||||
-- state.config = { use_float = false } -- or whatever your config is
|
||||
-- state.commands.toggle_preview(state)
|
||||
-- end
|
||||
-- end,
|
||||
-- },
|
||||
},
|
||||
},
|
||||
}
|
8
dotfiles/nvim/.config/nvim/lua/plugins/nightfox.lua
Normal file
8
dotfiles/nvim/.config/nvim/lua/plugins/nightfox.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
{
|
||||
"EdenEast/nightfox.nvim",
|
||||
opts = {
|
||||
transparent = true,
|
||||
},
|
||||
},
|
||||
}
|
10
dotfiles/nvim/.config/nvim/lua/plugins/noice.lua
Normal file
10
dotfiles/nvim/.config/nvim/lua/plugins/noice.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
config = {
|
||||
cmdline = {
|
||||
view = "cmdline",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
84
dotfiles/nvim/.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
84
dotfiles/nvim/.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
|
@ -0,0 +1,84 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
version = false, -- last release is way too old
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
},
|
||||
-- Not all LSP servers add brackets when completing a function.
|
||||
-- To better deal with this, LazyVim adds a custom option to cmp,
|
||||
-- that you can configure. For example:
|
||||
--
|
||||
-- ```lua
|
||||
-- opts = {
|
||||
-- auto_brackets = { "python" }
|
||||
-- }
|
||||
-- ```
|
||||
opts = function()
|
||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||
local cmp = require("cmp")
|
||||
local defaults = require("cmp.config.default")()
|
||||
local auto_select = true
|
||||
return {
|
||||
auto_brackets = {}, -- configure any filetype to auto add brackets
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
|
||||
},
|
||||
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<CR>"] = LazyVim.cmp.confirm({ select = auto_select }),
|
||||
["<C-y>"] = LazyVim.cmp.confirm({ select = true }),
|
||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||
["<Tab>"] = cmp.mapping.confirm(),
|
||||
["<S-CR>"] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<C-CR>"] = function(fallback)
|
||||
cmp.abort()
|
||||
fallback()
|
||||
end,
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "path" },
|
||||
{ name = "snippets" },
|
||||
{ name = "git" },
|
||||
{ name = "copilot" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
formatting = {
|
||||
format = function(entry, item)
|
||||
local icons = LazyVim.config.icons.kinds
|
||||
if icons[item.kind] then
|
||||
item.kind = icons[item.kind] .. item.kind
|
||||
end
|
||||
|
||||
local widths = {
|
||||
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
|
||||
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
|
||||
}
|
||||
|
||||
for key, width in pairs(widths) do
|
||||
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
|
||||
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…"
|
||||
end
|
||||
end
|
||||
|
||||
return item
|
||||
end,
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = {
|
||||
hl_group = "CmpGhostText",
|
||||
},
|
||||
},
|
||||
sorting = defaults.sorting,
|
||||
}
|
||||
end,
|
||||
main = "lazyvim.util.cmp",
|
||||
}
|
6
dotfiles/nvim/.config/nvim/lua/plugins/nvim-notify.lua
Normal file
6
dotfiles/nvim/.config/nvim/lua/plugins/nvim-notify.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"rcarriga/nvim-notify",
|
||||
opts = {
|
||||
timeout = 10000,
|
||||
},
|
||||
}
|
6
dotfiles/nvim/.config/nvim/lua/plugins/presence.lua
Normal file
6
dotfiles/nvim/.config/nvim/lua/plugins/presence.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
{
|
||||
"andweeb/presence.nvim",
|
||||
-- very_lazy = true,
|
||||
},
|
||||
}
|
5
dotfiles/nvim/.config/nvim/lua/plugins/suda.lua
Normal file
5
dotfiles/nvim/.config/nvim/lua/plugins/suda.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
{
|
||||
"lambdalisue/vim-suda",
|
||||
},
|
||||
}
|
19
dotfiles/nvim/.config/nvim/lua/plugins/tmux-vim.lua
Normal file
19
dotfiles/nvim/.config/nvim/lua/plugins/tmux-vim.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
},
|
||||
}
|
13
dotfiles/nvim/.config/nvim/lua/plugins/tokyonight.lua
Normal file
13
dotfiles/nvim/.config/nvim/lua/plugins/tokyonight.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
opts = {
|
||||
transparent = true,
|
||||
styles = {
|
||||
sidebars = "transparent",
|
||||
floats = "transparent",
|
||||
},
|
||||
day_brightness = 0.1,
|
||||
},
|
||||
},
|
||||
}
|
3
dotfiles/nvim/.config/nvim/lua/plugins/vim-be-good.lua
Normal file
3
dotfiles/nvim/.config/nvim/lua/plugins/vim-be-good.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
"ThePrimeagen/vim-be-good",
|
||||
}
|
3
dotfiles/nvim/.config/nvim/lua/plugins/wakatime.lua
Normal file
3
dotfiles/nvim/.config/nvim/lua/plugins/wakatime.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
}
|
3
dotfiles/nvim/.config/nvim/stylua.toml
Normal file
3
dotfiles/nvim/.config/nvim/stylua.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
24
dotfiles/tmux/.tmux.conf
Normal file
24
dotfiles/tmux/.tmux.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
# List of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
# set -g @plugin 'catppuccin/tmux'
|
||||
set -g @plugin 'odedlaz/tmux-onedark-theme'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
setw -g mode-keys vi
|
||||
set -g mouse on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||
bind P paste-buffer
|
||||
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||
# Other examples:
|
||||
# set -g @plugin 'github_username/plugin_name'
|
||||
# set -g @plugin 'github_username/plugin_name#branch'
|
||||
# set -g @plugin 'git@github.com:user/plugin'
|
||||
# set -g @plugin 'git@bitbucket.com:user/plugin'
|
||||
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
189
dotfiles/zshrc/.zshrc
Normal file
189
dotfiles/zshrc/.zshrc
Normal file
|
@ -0,0 +1,189 @@
|
|||
# Add deno completions to search path
|
||||
if [[ ":$FPATH:" != *":/home/fabric/.zsh/completions:"* ]]; then export FPATH="/home/fabric/.zsh/completions:$FPATH"; fi
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
# fi
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
|
||||
# Path to your Oh My Zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time Oh My Zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
# a theme from this variable instead of looking in $ZSH/themes/
|
||||
# If set to an empty array, this variable will have no effect.
|
||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion.
|
||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment one of the following lines to change the auto-update behavior
|
||||
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# zstyle ':omz:update' frequency 13
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# You can also set it to another string to have that shown instead of the default red dots.
|
||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(git
|
||||
zsh-autosuggestions
|
||||
)
|
||||
|
||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# Set personal aliases, overriding those provided by Oh My Zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
|
||||
# users are encouraged to define aliases within a top-level file in
|
||||
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
|
||||
# - $ZSH_CUSTOM/aliases.zsh
|
||||
# - $ZSH_CUSTOM/macos.zsh
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('/Users/fabric/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "/Users/fabric/anaconda3/etc/profile.d/conda.sh" ]; then
|
||||
. "/Users/fabric/anaconda3/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="/Users/fabric/anaconda3/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
# <<< conda initialize <<<
|
||||
|
||||
function yy() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
cd -- "$cwd"
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
if [[ -o interactive ]]; then
|
||||
# Commands to run in interactive sessions can go here
|
||||
neofetch
|
||||
gitfetch
|
||||
fi
|
||||
|
||||
source /usr/share/nvm/init-nvm.sh
|
||||
source /etc/profile.d/google-cloud-cli.sh
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
export GOPATH=$(go env GOPATH)
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
# alias air='$(go env GOPATH)/bin/air'
|
||||
# alias templ='$(go env GOPATH)/bin/templ'
|
||||
# alias energy='$(go env GOPATH)/bin/energy'
|
||||
|
||||
# pnpm
|
||||
export PNPM_HOME="/home/fabric/.local/share/pnpm"
|
||||
case ":$PATH:" in
|
||||
*":$PNPM_HOME:"*) ;;
|
||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||
esac
|
||||
# pnpm end
|
||||
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
|
||||
export ANDROID_HOME=${HOME}/Android/Sdk
|
||||
export PATH=${ANDROID_HOME}/tools:${PATH}
|
||||
export PATH=${ANDROID_HOME}/emulator:${PATH}
|
||||
export PATH=${ANDROID_HOME}/platform-tools:${PATH}
|
||||
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||
|
||||
set -o vi
|
||||
export LD_LIBRARY_PATH=~/.local/share/cef
|
||||
export ENERGY_HOME=/home/fabric/cvim/energy/EnergyFramework
|
||||
export UPX_HOME=/home/fabric/cvim/energy/upx
|
||||
export PATH=$PATH:$UPX_HOME
|
||||
|
||||
# Turso
|
||||
export PATH="$PATH:/home/fabric/.turso"
|
||||
|
||||
. "$HOME/.local/bin/env"
|
||||
. "/home/fabric/.deno/env"
|
49
flake.lock
generated
Normal file
49
flake.lock
generated
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734366194,
|
||||
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1734323986,
|
||||
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
29
flake.nix
Normal file
29
flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "Fabric's flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ...}:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
Tatara = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
fabric = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
38
hardware-configuration.nix
Normal file
38
hardware-configuration.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/1cc325bd-91a6-4c69-9593-e2cb27363c93";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/EF24-B12A";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
63
home.nix
Normal file
63
home.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "fabric";
|
||||
home.homeDirectory = "/home/fabric";
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
kitty
|
||||
firefox
|
||||
mpv
|
||||
i3blocks
|
||||
feh
|
||||
maim
|
||||
scrot
|
||||
rofi
|
||||
picom
|
||||
nerdfonts
|
||||
tmux
|
||||
discord
|
||||
fzf
|
||||
yazi
|
||||
zsh
|
||||
flameshot
|
||||
dunst
|
||||
pavucontrol
|
||||
];
|
||||
|
||||
services = {
|
||||
dunst = {
|
||||
enable = true;
|
||||
configFile = /home/fabric/.config/dunst/customDunstrc;
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./dotfiles/i3/.config/i3/config;
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
git = {
|
||||
userName = "FabricSoul";
|
||||
userEmail = "fabric.soul7@gmail.com";
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue