mirror of
https://github.com/Manoj-HV30/i3wm-ubuntu-dotfiles.git
synced 2026-05-16 19:35:23 +00:00
Initial Ubuntu i3wm dotfiles
This commit is contained in:
Executable
+223
@@ -0,0 +1,223 @@
|
||||
[colors]
|
||||
background = #1a2c4a
|
||||
foreground = #f4f4f4
|
||||
accent = #f0c75e
|
||||
accent-dim = #c9a043
|
||||
green = #6cbf5f
|
||||
yellow = #f8e473
|
||||
blue = #3fa9f5
|
||||
red = #e26b6b
|
||||
purple = #7c5ba7
|
||||
cyan = #a2e4f5
|
||||
orange = #f5a45b
|
||||
dim-foreground = #8a8f9d
|
||||
module-bg = #24364f
|
||||
module-fg = #f4f4f4
|
||||
module-accent = #f0c75e
|
||||
module-border = #31425a
|
||||
separator = #4a5c73
|
||||
[bar/mybar]
|
||||
width = 100%
|
||||
height = 44
|
||||
offset-x = 1%
|
||||
offset-y = 8
|
||||
radius = 20
|
||||
fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
line-size = 3
|
||||
border-size = 1
|
||||
border-color = ${colors.module-border}
|
||||
padding-left = 1
|
||||
padding-right = 3
|
||||
module-margin = 1
|
||||
font-0 = "JetBrainsMono Nerd Font:style=Bold:size=11;2"
|
||||
font-1 = "JetBrainsMono Nerd Font:style=Regular:size=10;2"
|
||||
font-2 = "Font Awesome 6 Free:style=Solid:size=11;2"
|
||||
font-3 = "Material Icons:size=11;2"
|
||||
font-4 = "Noto Color Emoji:scale=10;size=11;2"
|
||||
font-5 = "Noto Sans CJK JP:style=Regular:size=11;2"
|
||||
|
||||
modules-left = i3 float-sep music
|
||||
modules-center = datetime
|
||||
modules-right = memory float-sep pulseaudio float-sep battery float-sep network float-sep cpu_temp float-sep shutdown
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
enable-ipc = true
|
||||
wm-restack = i3
|
||||
override-redirect = false
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
strip-wsnumbers = true
|
||||
pin-workspaces = true
|
||||
|
||||
label-focused = %name%
|
||||
label-focused-background = ${colors.accent}
|
||||
label-focused-foreground = ${colors.background}
|
||||
label-focused-padding = 3
|
||||
label-focused-radius = 10
|
||||
label-focused-font = 1
|
||||
|
||||
label-unfocused = %name%
|
||||
label-unfocused-background = ${colors.module-bg}
|
||||
label-unfocused-foreground = ${colors.dim-foreground}
|
||||
label-unfocused-padding = 3
|
||||
label-unfocused-radius = 10
|
||||
label-unfocused-font = 1
|
||||
|
||||
label-visible = %name%
|
||||
label-visible-background = ${colors.module-bg}
|
||||
label-visible-foreground = ${colors.foreground}
|
||||
label-visible-padding = 3
|
||||
label-visible-radius = 10
|
||||
label-visible-font = 1
|
||||
|
||||
label-urgent = %name%
|
||||
label-urgent-background = ${colors.red}
|
||||
label-urgent-foreground = ${colors.background}
|
||||
label-urgent-padding = 3
|
||||
label-urgent-radius = 10
|
||||
label-urgent-font = 1
|
||||
|
||||
[module/music]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/music.sh
|
||||
interval = 2
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 2
|
||||
format-radius = 10
|
||||
label = %output%
|
||||
label-maxlen = 30
|
||||
click-left = playerctl play-pause
|
||||
click-right = playerctl next
|
||||
scroll-up = playerctl volume 0.05+
|
||||
scroll-down = playerctl volume 0.05-
|
||||
|
||||
[module/datetime]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
date = %a, %d %b
|
||||
time = %H:%M
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 4
|
||||
format-radius = 12
|
||||
label = 🌸 %date% %time%
|
||||
label-font = 1
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 3
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 2
|
||||
format-radius = 10
|
||||
label = 💾 %percentage_used%%
|
||||
warn-percentage = 80
|
||||
format-warn = <label-warn>
|
||||
format-warn-background = ${colors.module-accent}
|
||||
format-warn-foreground = ${colors.background}
|
||||
format-warn-padding = 2
|
||||
format-warn-radius = 10
|
||||
label-warn = ⚠️ %percentage_used%%
|
||||
[module/pulseaudio]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/volume.sh
|
||||
interval = 0.5
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 2
|
||||
format-radius = 10
|
||||
label = %output%
|
||||
|
||||
# Controls
|
||||
click-left = wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
scroll-up = wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
scroll-down = wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
full-at = 98
|
||||
poll-interval = 5
|
||||
|
||||
format-charging = ⚡ <ramp-capacity> <label-charging>
|
||||
format-charging-background = ${colors.module-bg}
|
||||
format-charging-foreground = ${colors.green}
|
||||
format-charging-padding = 2
|
||||
format-charging-radius = 10
|
||||
label-charging = %percentage%%
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-background = ${colors.module-bg}
|
||||
format-discharging-foreground = ${colors.yellow}
|
||||
format-discharging-padding = 2
|
||||
format-discharging-radius = 10
|
||||
label-discharging = %percentage%%
|
||||
|
||||
format-full = 🔌 <ramp-capacity> <label-full>
|
||||
format-full-background = ${colors.module-bg}
|
||||
format-full-foreground = ${colors.green}
|
||||
format-full-padding = 2
|
||||
format-full-radius = 10
|
||||
label-full = %percentage%%
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
label-foreground = ${colors.yellow}
|
||||
|
||||
[module/network]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/network.sh
|
||||
interval = 3
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 2
|
||||
format-radius = 10
|
||||
label = %output%
|
||||
click-left = nm-connection-editor
|
||||
|
||||
[module/cpu_temp]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/cpu_temp.sh
|
||||
interval = 5
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 2
|
||||
format-radius = 10
|
||||
label = %output%
|
||||
|
||||
[module/shutdown]
|
||||
type = custom/script
|
||||
exec = echo "⏻"
|
||||
interval = 0
|
||||
format = <label>
|
||||
format-background = ${colors.module-bg}
|
||||
format-foreground = ${colors.module-fg}
|
||||
format-padding = 2
|
||||
format-radius = 10
|
||||
label = %output%
|
||||
click-left = ~/.config/polybar/scripts/poweroff.sh
|
||||
|
||||
[module/float-sep]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-padding = 0
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Kill any existing polybar
|
||||
killall -q polybar
|
||||
|
||||
# Wait until it fully closes
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch Polybar on your display
|
||||
polybar mybar -r &
|
||||
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get first CPU core temperature
|
||||
TEMP=$(sensors | awk '/Core 0/ {print $3}' | tr -d '+°C')
|
||||
|
||||
# If temperature cannot be read
|
||||
if [ -z "$TEMP" ]; then
|
||||
echo "🌡 N/A"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Convert to integer (truncate decimal)
|
||||
TEMP_INT=${TEMP%.*}
|
||||
|
||||
# Color-coded emojis for cyberpunk style
|
||||
if [ "$TEMP_INT" -lt 50 ]; then
|
||||
EMOJI="🟢"
|
||||
elif [ "$TEMP_INT" -lt 70 ]; then
|
||||
EMOJI="🟡"
|
||||
else
|
||||
EMOJI="🔴"
|
||||
fi
|
||||
|
||||
# Output with some flair
|
||||
echo "$EMOJI $TEMP°C"
|
||||
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MAXLEN=25
|
||||
STATUS=$(playerctl status 2>/dev/null) # playing, paused, stopped
|
||||
TITLE=$(playerctl metadata title 2>/dev/null)
|
||||
|
||||
# Decide emoji based on status
|
||||
if [ "$STATUS" = "Playing" ]; then
|
||||
EMOJI="▶"
|
||||
elif [ "$STATUS" = "Paused" ]; then
|
||||
EMOJI="⏸"
|
||||
else
|
||||
EMOJI="⏹"
|
||||
fi
|
||||
|
||||
# If no song
|
||||
if [ -z "$TITLE" ]; then
|
||||
echo "🕊️ Chillin'"
|
||||
else
|
||||
# Truncate if too long
|
||||
if [ ${#TITLE} -gt $MAXLEN ]; then
|
||||
TITLE="${TITLE:0:MAXLEN}…"
|
||||
fi
|
||||
# Underline with Polybar formatting and show emoji
|
||||
echo "%{+u}%{F#8be9fd}$EMOJI $TITLE%{-u}%{F-}"
|
||||
fi
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if iwgetid -r >/dev/null; then
|
||||
SSID=$(iwgetid -r)
|
||||
IP=$(hostname -I | awk '{print $1}')
|
||||
echo " $SSID"
|
||||
else
|
||||
echo "❌ Disconnected"
|
||||
fi
|
||||
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
systemctl poweroff
|
||||
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Suppress locale-related float warnings
|
||||
LC_NUMERIC=C
|
||||
|
||||
# Get default sink volume info safely
|
||||
VOL_LINE=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null)
|
||||
if [ -z "$VOL_LINE" ]; then
|
||||
echo "🔇 No Sink"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Extract volume (0.00–1.50 range) and convert to integer percent
|
||||
VOL=$(echo "$VOL_LINE" | awk '{printf "%d", $2 * 100}')
|
||||
|
||||
# Check mute status
|
||||
MUTE=$(echo "$VOL_LINE" | grep -q "MUTED" && echo yes || echo no)
|
||||
|
||||
# Sanitize volume
|
||||
if [ -z "$VOL" ]; then VOL=0; fi
|
||||
if [ "$VOL" -gt 150 ]; then VOL=150; fi
|
||||
if [ "$MUTE" = "yes" ]; then VOL=0; fi
|
||||
|
||||
# Choose icon
|
||||
if [ "$VOL" -eq 0 ]; then
|
||||
EMOJI="🔇"
|
||||
elif [ "$VOL" -le 30 ]; then
|
||||
EMOJI="🔈"
|
||||
elif [ "$VOL" -le 70 ]; then
|
||||
EMOJI="🔉"
|
||||
else
|
||||
EMOJI="🔊"
|
||||
fi
|
||||
|
||||
# Output
|
||||
echo "$EMOJI $VOL%"
|
||||
|
||||
Reference in New Issue
Block a user