mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
add tooling.nix
This commit is contained in:
parent
3942238dba
commit
449cbfae84
@ -7,11 +7,11 @@
|
||||
|
||||
set $HOME /home/tstarr
|
||||
|
||||
set $DISP_PRI HDMI-A-1
|
||||
set $DISP_SEC DP-3
|
||||
set $DISP_PRI DP-2
|
||||
set $DISP_SEC HDMI-A-1
|
||||
|
||||
set $BOR_WIDTH 4
|
||||
set $GAP_INNER 4
|
||||
set $BOR_WIDTH 3
|
||||
set $GAP_INNER 3
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
@ -32,20 +32,26 @@ set $mode_power "[r]eboot | [s]hutdown"
|
||||
#----- COLORS
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# class border bground text indicator child_border
|
||||
client.focused #bd93f9 #bd93f9 #F8F8F2 #bd93f9 #bd93f9
|
||||
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
|
||||
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
|
||||
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
|
||||
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
|
||||
set $background #282A36
|
||||
set $foreground #F8F8F2
|
||||
set $focused #bd93f9
|
||||
set $inactive #44475A
|
||||
set $urgent #FF5555
|
||||
|
||||
client.background #F8F8F2
|
||||
# class border bground text indicator child_border
|
||||
client.focused $focused $focused $foreground $focused $focused
|
||||
client.focused_inactive $inactive $inactive $foreground $inactive $inactive
|
||||
client.unfocused $background $background $foreground $background $background
|
||||
client.urgent $inactive $urgent $foreground $urgent $urgent
|
||||
client.placeholder $background $background $foreground $background $background
|
||||
|
||||
client.background $foreground
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- MISC. CONFIGURATION
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
font pango:Google Noto 8.5
|
||||
font pango:JetBrains Mono Nerd Font 10
|
||||
default_border pixel 3
|
||||
default_floating_border pixel 3
|
||||
|
||||
@ -127,7 +133,7 @@ mode utility {
|
||||
bindsym q exit
|
||||
bindsym r reload
|
||||
bindsym p exec "rofi-rbw", $e
|
||||
# TODO: gamemode (mod+Ctrl+g). Needs script to toggle
|
||||
bindsym g exec "~/.config/sway/scripts/gamemode.sh", $e
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
@ -150,16 +156,18 @@ bindsym $mod+Tab focus mode_toggle
|
||||
floating_modifier $mod
|
||||
|
||||
# spatial container management
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
bindsym $mod+h exec ~/.config/sway/scripts/tabfocus.sh "h"
|
||||
bindsym $mod+j exec ~/.config/sway/scripts/tabfocus.sh "j"
|
||||
bindsym $mod+k exec ~/.config/sway/scripts/tabfocus.sh "k"
|
||||
bindsym $mod+l exec ~/.config/sway/scripts/tabfocus.sh "l"
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
bindsym $mod+minus split v
|
||||
bindsym $mod+backslash split h
|
||||
bindsym $mod+z splith; layout tabbed; focus parent
|
||||
bindsym $mod+Shift+z layout default
|
||||
|
||||
# workspace management
|
||||
bindsym $mod+1 workspace $tag1
|
||||
@ -180,15 +188,19 @@ bindsym $mod+Shift+e move container to workspace $tag7
|
||||
bindsym $mod+Shift+r move container to workspace $tag8
|
||||
|
||||
# audio
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +2%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -2%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
# [o]pen applications
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+u exec foot
|
||||
bindsym $mod+a exec rofi -show drun -show-icons
|
||||
bindsym $mod+Shift+a exec rofi -show window -show-icons
|
||||
bindsym $mod+a mode rofi
|
||||
mode rofi {
|
||||
bindsym r exec rofi -show drun -show-icons, $e
|
||||
bindsym w exec rofi -show window -show-icons, $e
|
||||
bindsym e exec rofi -modi emoji -show emoji, $e
|
||||
bindsym Escape mode default
|
||||
}
|
||||
bindsym $mod+o mode open
|
||||
mode open {
|
||||
bindsym b exec firefox, $e
|
||||
@ -206,6 +218,8 @@ mode scratch {
|
||||
'scratch-nb' 'alacritty -e tmuxinator start nb', $e
|
||||
bindsym t exec $HOME/.config/sway/scripts/scratch.sh \
|
||||
'scratch-warrior' 'alacritty -e tmuxinator start task', $e
|
||||
bindsym b exec $HOME/.config/sway/scripts/scratch.sh \
|
||||
'scratch-blue' 'blueman-manager', $e
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
@ -219,15 +233,25 @@ output DP-3 {
|
||||
position 2560,0
|
||||
}
|
||||
|
||||
bar {
|
||||
position top
|
||||
#output $DISP_PRI
|
||||
status_command while ~/.config/sway/scripts/status.sh; do sleep 1; done
|
||||
tray_output none
|
||||
pango_markup enabled
|
||||
colors {
|
||||
background #000000
|
||||
focused_workspace $focused $focused $background
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- AUTOSTART WITH I3
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
exec --no-startup-id "udiskie"
|
||||
#exec_always --no-startup-id "$HOME/.config/sway/scripts/autolayout.sh"
|
||||
exec_always --no-startup-id "blueman-applet"
|
||||
exec_always --no-startup-id "nm-applet"
|
||||
exec_always --no-startup-id "flameshot"
|
||||
exec_always --no-startup-id "configure-gtk"
|
||||
exec_always --no-startup-id "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"
|
||||
exec_always --no-startup-id "waybar"
|
||||
|
||||
exec --no-startup-id "~/.config/sway/scripts/idle.sh"
|
||||
|
@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import i3ipc
|
||||
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
def on_window_event(i3, e):
|
||||
focused_container = i3.get_tree().find_focused().parent
|
||||
# Get parent layout of focused window
|
||||
parent_layout = focused_container.layout
|
||||
# Get number of windows in focues container
|
||||
num_parent_windows = len(focused_container.nodes)
|
||||
# Get number of windows in workspace
|
||||
workspace = i3.get_tree().find_focused().workspace()
|
||||
num_workspace_windows = len(workspace.leaves())
|
||||
if num_parent_windows > 1 and parent_layout != "tabbed":
|
||||
i3.command("splitv; layout tabbed")
|
||||
elif num_workspace_windows == 1:
|
||||
i3.command("layout splith")
|
||||
|
||||
# Subscribe to window events
|
||||
i3.on("window", on_window_event)
|
||||
|
||||
# Start the main loop
|
||||
i3.main()
|
8
home/dot_config/sway/scripts/executable_gamemode.sh
Normal file
8
home/dot_config/sway/scripts/executable_gamemode.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
status=$(gamemoded -s)
|
||||
if [ "$status" == "gamemode is inactive" ]; then
|
||||
gamemoded -r &
|
||||
else
|
||||
killall gamemoded
|
||||
fi
|
3
home/dot_config/sway/scripts/executable_idle.sh
Normal file
3
home/dot_config/sway/scripts/executable_idle.sh
Normal file
@ -0,0 +1,3 @@
|
||||
swayidle -w \
|
||||
timeout 300 '~/.config/sway/scripts/lock.sh' \
|
||||
before-sleep '~/.config/sway/scripts/lock.sh'
|
21
home/dot_config/sway/scripts/executable_lock.sh
Normal file
21
home/dot_config/sway/scripts/executable_lock.sh
Normal file
@ -0,0 +1,21 @@
|
||||
swayidle -w \
|
||||
timeout 60 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' &
|
||||
|
||||
swaylock \
|
||||
--screenshots \
|
||||
--clock \
|
||||
--indicator \
|
||||
--indicator-radius 100 \
|
||||
--indicator-thickness 7 \
|
||||
--effect-blur 7x5 \
|
||||
--effect-vignette 0.5:0.5 \
|
||||
--ring-color bb00cc \
|
||||
--key-hl-color 880033 \
|
||||
--line-color 00000000 \
|
||||
--inside-color 00000088 \
|
||||
--separator-color 00000000 \
|
||||
--grace 2 \
|
||||
--fade-in 0.2
|
||||
|
||||
pkill --newest swayidle
|
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
pkill polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch polybar
|
||||
polybar -c /home/tstarr/.config/polybar/dracula &
|
36
home/dot_config/sway/scripts/executable_status.sh
Normal file
36
home/dot_config/sway/scripts/executable_status.sh
Normal file
@ -0,0 +1,36 @@
|
||||
# The Sway configuration file in ~/.config/sway/config calls this script.
|
||||
# You should see changes to the status bar after saving this script.
|
||||
|
||||
# Uptime
|
||||
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f7)
|
||||
|
||||
# Date
|
||||
date_formatted=$(date "+%a %F %H:%M")
|
||||
|
||||
# Kernel Version
|
||||
linux_version=$(uname -r)
|
||||
|
||||
# Gamemode status
|
||||
status=$(gamemoded -s)
|
||||
if [ "$status" == "gamemode is inactive" ]; then
|
||||
gamemode=🧊
|
||||
else
|
||||
gamemode=🔥
|
||||
fi
|
||||
|
||||
# Volume
|
||||
sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 )
|
||||
volume=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
|
||||
mute=$(pactl list sinks | grep '^[[:space:]]Mute:' | head -n $(( $SINK + 1 )) | tail -n 1 | awk '{print $2}')
|
||||
|
||||
if [ "$mute" == "yes" ]; then
|
||||
volume_color='#f92672'
|
||||
else
|
||||
volume_color='#ffffff'
|
||||
fi
|
||||
|
||||
#bluetooth=$(bluetoothctl devices | cut -f2 -d' ' | while read uuid; do bluetoothctl info $uuid; done | grep -e "Name\|Connected: yes" | grep -B1 "yes" | head -n 1 | cut -d\ -f2-)
|
||||
bluetooth="a"
|
||||
|
||||
#<span foreground='#c16b26'>lel</span>
|
||||
echo -e "🫐 $bluetooth | ⬆️ $uptime_formatted | 🔉<span foreground='$volume_color'>$volume%</span> | $gamemode | 🐧 $linux_version | $date_formatted "
|
@ -1,4 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
CPU_USAGE=$(top -b -n2 -p 1 | fgrep "Cpu(s)" | tail -1 | awk -F'id,' -v prefix="$prefix" '{ split($1, vs, ","); v=vs[length(vs)]; sub("%", "", v); printf "%s%.1f%%\n", prefix, 100 - v }')
|
||||
echo "$CPU_USAGE"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
sink=$( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 )
|
||||
volume=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
|
||||
|
@ -85,10 +85,9 @@ fi
|
||||
export PATH
|
||||
|
||||
export PATH=/home/tstarr/.nimble/bin:$PATH
|
||||
export PATH=/home/tstarr/.cargo/bin:$PATH
|
||||
|
||||
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
|
||||
export PATH="$PATH:$GEM_HOME/bin"
|
||||
#export PATH=/home/tstarr/.cargo/bin:$PATH
|
||||
#export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
|
||||
#export PATH="$PATH:$GEM_HOME/bin"
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
@ -81,23 +81,14 @@
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
neovim
|
||||
git
|
||||
haskellPackages.xmobar
|
||||
killall
|
||||
pciutils
|
||||
syncthing
|
||||
nnn
|
||||
xidlehook
|
||||
pamixer
|
||||
#pamixer
|
||||
vifm
|
||||
play-with-mpv
|
||||
mpv
|
||||
autokey
|
||||
gnome-extension-manager
|
||||
gnome.gnome-tweaks
|
||||
pinentry-curses
|
||||
ripgrep
|
||||
trash-cli
|
||||
];
|
||||
|
||||
@ -116,8 +107,10 @@
|
||||
configDir = "/home/tstarr/.config/syncthing";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
@ -135,6 +128,7 @@
|
||||
vfio.enable = false; # Currently broken
|
||||
};
|
||||
devel = {
|
||||
tooling.enable = true;
|
||||
python.enable = true;
|
||||
engineering.enable = true;
|
||||
};
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
firefox
|
||||
alacritty
|
||||
gamemode
|
||||
|
@ -36,14 +36,15 @@ in {
|
||||
glib # gsettings
|
||||
dracula-theme # gtk theme
|
||||
gnome3.adwaita-icon-theme # default gnome cursors
|
||||
swaylock
|
||||
swaylock-effects
|
||||
swayidle
|
||||
grim # screenshot functionality
|
||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||
mako # notification system developed by swaywm maintainer
|
||||
wdisplays # tool to configure displays
|
||||
rofip
|
||||
networkmanagerapplet
|
||||
rofi
|
||||
imagemagick
|
||||
feh
|
||||
];
|
||||
|
||||
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
||||
|
@ -18,6 +18,8 @@ in {
|
||||
(python3.withPackages my-python-packages)
|
||||
beancount
|
||||
fava
|
||||
nodePackages_latest.pyright
|
||||
distrobox
|
||||
];
|
||||
};
|
||||
}
|
||||
|
18
provision/nixos/modules/devel/tooling.nix
Normal file
18
provision/nixos/modules/devel/tooling.nix
Normal file
@ -0,0 +1,18 @@
|
||||
# coding stuff for all the languages
|
||||
|
||||
{ config, lib, pkgs, user, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.devel.tooling;
|
||||
in {
|
||||
options.modules.devel.tooling.enable = lib.mkEnableOption "tooling";
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Install packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
ripgrep
|
||||
tmuxinator
|
||||
];
|
||||
};
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
let sources = import ../nix/sources.nix; in
|
||||
self: super: {
|
||||
rofi = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
|
||||
rofi = super.rofi.override { plugins = [ self.rofi-emoji ]; };
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user