Compare commits
3 Commits
fc8a43504d
...
4ea9437bb0
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ea9437bb0 | |||
| d0760a22bd | |||
| f67a12c29a |
@@ -105,12 +105,134 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
# i3blocks configuration file
|
||||||
|
home.file.".config/i3blocks/config".text = ''
|
||||||
|
# i3blocks config - replicating waybar setup
|
||||||
|
separator_block_width=15
|
||||||
|
markup=pango
|
||||||
|
|
||||||
|
[disk]
|
||||||
|
command=df -h / | awk 'NR==2 {print "💾 " $5}'
|
||||||
|
interval=30
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[cpu]
|
||||||
|
command=top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print "🧠 " int(100 - $1) "%"}'
|
||||||
|
interval=2
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[memory]
|
||||||
|
command=free | awk 'NR==2 {printf "🐏 %.0f%%\n", $3*100/$2}'
|
||||||
|
interval=5
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[pulseaudio]
|
||||||
|
command=${pkgs.writeShellScript "i3blocks-pulseaudio" ''
|
||||||
|
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '\d+%' | head -1)
|
||||||
|
muted=$(pactl get-sink-mute @DEFAULT_SINK@ | grep -o 'yes')
|
||||||
|
if [ "$muted" = "yes" ]; then
|
||||||
|
echo "🔇"
|
||||||
|
else
|
||||||
|
vol_num=''${volume%\%}
|
||||||
|
if [ $vol_num -le 33 ]; then
|
||||||
|
echo "🔈 $volume"
|
||||||
|
elif [ $vol_num -le 66 ]; then
|
||||||
|
echo "🔉 $volume"
|
||||||
|
else
|
||||||
|
echo "🔊 $volume"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
''}
|
||||||
|
interval=1
|
||||||
|
signal=10
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[backlight]
|
||||||
|
command=${pkgs.writeShellScript "i3blocks-backlight" ''
|
||||||
|
if command -v brightnessctl &>/dev/null; then
|
||||||
|
brightnessctl g | awk -v max=$(brightnessctl m) '{printf "☀️ %.0f%%\n", ($1/max)*100}'
|
||||||
|
fi
|
||||||
|
''}
|
||||||
|
interval=1
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[network]
|
||||||
|
command=${pkgs.writeShellScript "i3blocks-network" ''
|
||||||
|
if iwgetid -r &>/dev/null; then
|
||||||
|
ssid=$(iwgetid -r)
|
||||||
|
signal=$(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)}')
|
||||||
|
echo "📶 $ssid ($signal%)"
|
||||||
|
else
|
||||||
|
ip=$(ip -4 addr show | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v '127.0.0.1' | head -1)
|
||||||
|
if [ -n "$ip" ]; then
|
||||||
|
echo "🔌 $ip"
|
||||||
|
else
|
||||||
|
echo "❌"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
''}
|
||||||
|
interval=5
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[battery]
|
||||||
|
command=${pkgs.writeShellScript "i3blocks-battery" ''
|
||||||
|
if [ -d /sys/class/power_supply/BAT0 ]; then
|
||||||
|
capacity=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||||
|
status=$(cat /sys/class/power_supply/BAT0/status)
|
||||||
|
|
||||||
|
if [ "$status" = "Charging" ]; then
|
||||||
|
echo "⚡ $capacity%"
|
||||||
|
else
|
||||||
|
echo "🔋 $capacity%"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
''}
|
||||||
|
interval=10
|
||||||
|
separator=true
|
||||||
|
|
||||||
|
[time]
|
||||||
|
command=date '+%Y-%m-%d %H:%M'
|
||||||
|
interval=1
|
||||||
|
separator=false
|
||||||
|
'';
|
||||||
|
|
||||||
xsession.windowManager.i3 = let
|
xsession.windowManager.i3 = let
|
||||||
base_i3_config = recursiveUpdate shared_config {
|
base_i3_config = recursiveUpdate shared_config {
|
||||||
bars = [{
|
bars = [{
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
statusCommand = "${pkgs.i3blocks}/bin/i3blocks";
|
||||||
trayOutput = "primary"; # Enable system tray on primary output
|
trayOutput = "primary"; # Enable system tray on primary output
|
||||||
|
fonts = {
|
||||||
|
names = [ "Fira Code" "monospace" ];
|
||||||
|
size = 11.0;
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
background = "#000000";
|
||||||
|
statusline = "#ffffff";
|
||||||
|
separator = "#666666";
|
||||||
|
|
||||||
|
# Workspace button colors (matching waybar)
|
||||||
|
focusedWorkspace = {
|
||||||
|
border = "#285577";
|
||||||
|
background = "#285577";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
activeWorkspace = {
|
||||||
|
border = "#5f676a";
|
||||||
|
background = "#5f676a";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
inactiveWorkspace = {
|
||||||
|
border = "#222222";
|
||||||
|
background = "#222222";
|
||||||
|
text = "#888888";
|
||||||
|
};
|
||||||
|
urgentWorkspace = {
|
||||||
|
border = "#900000";
|
||||||
|
background = "#900000";
|
||||||
|
text = "#ffffff";
|
||||||
|
};
|
||||||
|
};
|
||||||
}];
|
}];
|
||||||
keybindings = shared_config.keybindings // {
|
keybindings = shared_config.keybindings // {
|
||||||
"${shared_config.modifier}+d" = "exec rofi -show drun";
|
"${shared_config.modifier}+d" = "exec rofi -show drun";
|
||||||
@@ -315,7 +437,5 @@ in {
|
|||||||
sidebar-mode = true;
|
sidebar-mode = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.i3status.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,18 +58,9 @@ with lib;
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
# Modesetting is required.
|
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
package = pkgs.linuxPackages.nvidiaPackages.stable;
|
package = pkgs.linuxPackages.nvidiaPackages.stable;
|
||||||
|
|
||||||
# Use open source kernel modules (recommended for RTX/GTX 16xx and newer)
|
|
||||||
# Set to false if you have an older GPU
|
|
||||||
open = true;
|
open = true;
|
||||||
|
|
||||||
# For gaming performance
|
# For gaming performance
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ in
|
|||||||
|
|
||||||
(mkIf (cfg.enable && cfg.gaming.emulation) {
|
(mkIf (cfg.enable && cfg.gaming.emulation) {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ryubing
|
|
||||||
dolphin-emu
|
dolphin-emu
|
||||||
|
dolphin-emu-primehack
|
||||||
|
retroarch-full
|
||||||
|
ryubing
|
||||||
];
|
];
|
||||||
# TODO: Remove me once dolphin-emu and dolphin-emu-primehack update
|
# TODO: Remove me once dolphin-emu and dolphin-emu-primehack update
|
||||||
# dependencies to mbedtls from mbedtls_2 (which is currently)
|
# dependencies to mbedtls from mbedtls_2 (which is currently)
|
||||||
|
|||||||
Reference in New Issue
Block a user