Update dotfiles

This commit is contained in:
CramMK
2020-08-21 14:22:12 +02:00
parent 071dca52bc
commit b71db5b0b8
31 changed files with 1307 additions and 453 deletions

View File

@@ -5,6 +5,8 @@ My personal configurations, managed with the 'dotdrop' submodule.
[Nord-themed.](https://www.nordtheme.com/)
[Lock Screen Wallpaper](https://i.imgur.com/csyOJZJ.jpg)
![home](https://i.imgur.com/zayLDb6.png)
![vim](https://i.imgur.com/aihcZMe.png)
![spotify](https://i.imgur.com/hFKH7y1.png)

View File

@@ -34,7 +34,7 @@ window:
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
padding:
x: 15
x: 20
y: 15
# Spread additional padding evenly around the terminal content.
@@ -279,7 +279,7 @@ visual_bell:
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 0.95
background_opacity: 0.98
selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"

View File

@@ -50,10 +50,11 @@ bindsym $mod+n workspace next
bindsym $mod+p workspace prev
# Rofi and dmenu
bindsym $mod+space exec "rofi -show"
bindsym $mod+space exec "~/.config/rofi/launchers-git/launcher.sh"
bindsym $mod+d exec "dmenu_run -fn 'InconsolataLGC Nerd Font Mono' -nb '#2E3440' -sb '#5E81AC' -nf '#ECEFF4' -sf '#ECEFF4'
bindsym --release $mod+Shift+p exec"import ~/screenshots/Screenshot-$(date '+%Y%m%d-%H%M%S').png"
#bindsym --release $mod+Shift+p exec"import ~/screenshots/Screenshot-$(date '+%Y%m%d-%H%M%S').png"
bindsym $mod+Shift+p exec "flameshot gui"
# Screen brightness
bindsym XF86MonBrightnessUp exec light -A 5 # increase
@@ -112,7 +113,7 @@ bindsym $mod+Shift+r restart
### Design ###
new_window 1pixel
for_window [class="^.*"] border pixel 2
for_window [class="^.*"] border pixel 0
# Colors from https://www.nordtheme.com/
set $nord0 "#2e3440"
@@ -133,15 +134,12 @@ client.unfocused $nord0 $nord0 $frost0 $blue1 $nord0
client.urgent $red $red $frost2 $red $red
client.background #ffffff
exec "~/scripts/startup-laptop"
exec "~/scripts/startup-laptop.sh"
# i3 doesnt let me put this in the startscript
exec_always --no-startup-id ~/.config/polybar/start.sh &amp;
# Powermenu
bindsym $mod+Shift+e exec "~/scripts/powermenu"
exec_always --no-startup-id ~/.config/polybar/launch.sh &amp;
# Locking
bindsym $mod+Shift+BackSpace exec "~/scripts/lock-laptop"
bindsym $mod+Shift+BackSpace exec "~/scripts/lock-laptop.sh"
# Monitors
set $monitor1 "eDP-1"

View File

@@ -0,0 +1,351 @@
; vim: ft=dosini
[colors]
transparent = #00000000
red = #BF616A
orange = #D08770
yellow = #EBCB8B
green = #A3BE8C
purple = #B48EAD
blue0 = #8FBCBB
blue1 = #88C0D0
blue2 = #81A1C1
blue3 = #5E81AC
nord0 = #2E3440
nord1 = #3b4252
nord2 = #434c5e
nord3 = #4C566A
frost0 = #d8dee9
frost1 = #e5e9f0
frost2 = #ECEFF4
accent = ${colors.green}
foreground = ${colors.frost2}
background = ${colors.nord0}
tray = ${colors.nord0}
###############################################################################
[settings]
screenchange-reload = true
###############################################################################
[bar/main]
monitor = ${env:MONITOR}
enable-ipc = false
# FONTS PROVIDED WITH DOTFILES
# https://github.com/stark/siji
font-0 = "InconsolataLGC Nerd Font Mono:pixelsize=9;2"
font-1 = "IPAGothic:fontformat=truetype:antialias=false:pixelsize=11;2"
font-2 = "Siji:size=7;2"
bottom = false
fixed-center = true
padding-left = 0
padding-right = 0
radius = 0.0
foreground = ${colors.foreground}
background = ${colors.transparent}
tray-position = right
tray-padding = 2
tray-background = ${colors.tray}
tray-offset-x = 8
tray-offset-y = 0
# 100%-16px(gaps)-8px(tray)
width = 100%:-24px
#width = 100%:-16px
height = 27
offset-y = 8px
offset-x = 8px
override-redirect = true
modules-left = i3 spotify
modules-center =
modules-right = ip backlight volume battery date
separator =
module-margin= 0
wm-name = i3
wm-restack = i3
###############################################################################
[module/i3]
type = internal/i3
pin-workspaces = true
index-sort = true
enable-click = true
enable-scroll = true
wrapping-scroll = false
format = <label-state> <label-mode>
background = ${colors.nord0}
ws-icon-0 = 1;1
ws-icon-1 = 2;2
ws-icon-2 = 3;3
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;9
ws-icon-9 = 10;10
label-focused = %icon%
label-focused-foreground = ${self.background}
label-focused-background = ${colors.accent}
label-focused-padding = 2
label-unfocused = %index%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-background = ${self.background}
label-unfocused-padding = 2
label-visible = %index%
label-visible-foreground = ${colors.foreground}
label-visible-background = ${self.background}
label-visible-padding = 2
label-urgent = %index%
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.red}
label-urgent-padding = 2
###############################################################################
[module/date]
type = internal/date
format-padding = 1
format-background = ${colors.background}
interval = 1.0
time =  %I:%M %p - %A, %d %B %Y
time-alt =  %I:%M %p
format = <label>
label = %time%
###############################################################################
[module/title]
type = internal/xwindow
label = %title%
format = <label>
label-maxlen = 80
label-empty = "Yoroshiku!"
format-padding = 1
###############################################################################
[module/cpu]
type = internal/cpu
interval = 5
format-background = ${colors.frost1}
format-foreground = ${colors.nord0}
format = <label>
format-prefix = 
format-padding = 1
label = " %percentage%%"
###############################################################################
[module/memory]
type = internal/memory
interval = 3
format = <label>
format-prefix = 
label = " %mb_used%"
###############################################################################
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
apdapter = ADP1
bg = ${colors.background}
format-charging = <animation-charging> <label-charging>
format-charging-background = ${self.bg}
format-charging-padding = 1
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-background = ${self.bg}
format-discharging-padding = 1
format-full = <ramp-capacity> <label-full>
format-full-background = ${self.bg}
format-full-padding = 1
label-charging = %percentage%%
label-discharging = %percentage%%
label-full = 100%
; Only applies if <ramp-capacity> is used
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-5 = 
ramp-capacity-6 = 
ramp-capacity-7 = 
ramp-capacity-8 = 
ramp-capacity-9 = 
; Only applies if <animation-charging> is used
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
; Framerate in milliseconds
animation-charging-framerate = 750
###############################################################################
[module/volume]
type = internal/pulseaudio
format-volume-background = ${colors.background}
format-volume-padding = 1
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
format-muted-prefix = " "
format-muted-padding = 1
label-muted = "Muted"
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-3 = 
ramp-volume-4 = 
ramp-headphones-0 = 
ramp-headphones-1 = 
###############################################################################
[module/network]
type = internal/network
interface = wlo1
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <ramp-signal> <label-connected>
format-connected-background = ${colors.nord1}
format-connected-padding = 1
format-disconnected = <label-disconnected>
format-disconnected-background = ${colors.nord1}
format-disconnected-padding = 1
label-connected = %essid%
label-disconnected =  Disconnected
; Only applies if <ramp-signal> is used
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
###############################################################################
[module/backlight]
type = internal/backlight
format-padding = 1
format-background = ${colors.background}
format-foreground = ${colors.foreground}
# ls -1 /sys/class/backlight
card = amdgpu_bl0
format = <label>
format-prefix = ""
label = " %percentage%%"
bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty= ─
###############################################################################
[module/load]
type = custom/script
exec = ~/.config/polybar/scripts/load.sh
interval = 5.0
###############################################################################
[module/spotify]
type = custom/script
format-padding = 1
format-background = ${colors.blue3}
format-prefix = " "
exec = ~/.config/polybar/scripts/spotify.sh %artist% - %title%
tail = true
interval = 2
###############################################################################
[module/hostname]
type = custom/script
format-padding = 1
format-background = ${colors.green}
format-foreground = ${colors.nord0}
exec = ~/.config/polybar/scripts/hostname.sh
tail = true
interval = 60
###############################################################################
[module/ip]
type = custom/script
format-padding = 1
format-background = ${colors.nord0}
format-foreground = ${colors.foreground}
format-prefix = "直 "
exec = ~/.config/polybar/scripts/ip.sh
tail = true
interval = 20
###############################################################################
[module/powerbutton]
type = custom/text
content-padding = 1
content-background = ${colors.nord1}
content-foreground = ${colors.frost2}
content = "襤"
click-left = ~/scripts/powermenu

View File

@@ -0,0 +1,3 @@
#!/bin/bash
echo "$USER@$HOSTNAME"

View File

@@ -0,0 +1,8 @@
#!/bin/bash
PUBLIC_IP=`wget http://ipecho.net/plain -O - -q ; echo`
WLO1=`hostname -I | awk '{print $1}'`
SSID=`iwgetid -r`
echo "$PUBLIC_IP - $WLO1 - $SSID"

View File

@@ -0,0 +1,69 @@
configuration {
show-icons: true;
font: "InconsolataLGC Nerd Font Mono 11";
drun-display-format: "{icon} {name}";
display-run: " ";
display-drun: " ";
display-window: " ";
modi: "drun";
}
* {
background-color: #2E3440;
bg-alt: #3B4252;
fg: #ECEFF4;
nord-blue-light: #88C0D0;
nord-yellow: #EBCB8B;
nord-green: #a3be8c;
accent: @nord-yellow;
border: 0;
lines: 12;
padding: 0;
margin: 0;
spacing: 0;
}
window {
width: 30%;
transparency: "real";
}
mainbox {
children: [inputbar, listview];
}
listview {
columns: 1;
}
element {
padding: 12;
orientation: vertical;
text-color: @fg;
}
element selected {
background-color: @bg-alt;
text-color: @nord-blue-light;
}
inputbar {
background-color: @background;
children: [prompt, entry];
}
prompt {
enabled: true;
font: "InconsolataLGC Nerd Font Mono 16";
padding: 7 -12 0 12;
text-color: @accent;
}
entry {
padding: 12;
text-color: @accent;
}

View File

@@ -3,3 +3,5 @@ opacity-rule = [
"95:class_g *?= 'Rofi'",
"95:class_g *?= 'XTerm'",
];
corner-radius = 15;

View File

@@ -1,329 +1,395 @@
; vim: ft=dosini
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
transparent = #00000000
background = ${xrdb:background}
background-alt = #444
foreground = ${xrdb:foreground}
foreground-alt = #555
black = ${xrdb:Polybar.color0}
red = ${xrdb:Polybar.color1}
green = ${xrdb:Polybar.color2}
yellow = ${xrdb:Polybar.color3}
blue = ${xrdb:Polybar.color4}
magenta = ${xrdb:Polybar.color5}
cyan = ${xrdb:Polybar.color6}
white = ${xrdb:Polybar.color7}
red = #BF616A
orange = #D08770
yellow = #EBCB8B
green = #A3BE8C
purple = #B48EAD
;; ========================== WORKSPACES BAR =====================
blue0 = #8FBCBB
blue1 = #88C0D0
blue2 = #81A1C1
blue3 = #5E81AC
nord0 = #2E3440
nord1 = #3b4252
nord2 = #434c5e
nord3 = #4C566A
frost0 = #d8dee9
frost1 = #e5e9f0
frost2 = #ECEFF4
accent = ${colors.blue3}
foreground = ${colors.frost2}
shade0 = ${colors.nord3}
shade1 = ${colors.nord2}
shade2 = ${colors.nord1}
shade3 = ${colors.nord0}
tray = ${colors.nord0}
###############################################################################
[settings]
format-foreground = ${colors.foreground}
format-background = ${colors.nord0}
screenchange-reload = true
###############################################################################
[bar/main]
monitor = ${env:MONITOR}
enable-ipc = false
# FONTS PROVIDED WITH DOTFILES
# https://github.com/stark/siji
font-0 = "InconsolataLGC Nerd Font Mono:pixelsize=9;2"
font-1 = "IPAGothic:fontformat=truetype:antialias=false:pixelsize=11;2"
font-2 = "Siji:size=7;2"
bottom = false
[bar/workspaces]
width = 17%
height = 30px
offset-x = 10px
offset-y = 5px
radius = 12
fixed-center = true
padding-left = 0
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 2
padding-right = 0
radius = 0.0
module-margin-left = 0
module-margin-right = 0
foreground = ${colors.foreground}
background = ${colors.transparent}
font-0 = Fira Code Nerd Font:pixelsize=10;1
font-1 = Material Design Icons:pixelsize=16:style:Regular;2
font-2 = Material Design Icons:pixelsize=50:style:Regular;3
font-3 = BreezeSans:pixelsize=16:style=Bold;-10
tray-position = right
tray-padding = 2
tray-background = ${colors.tray}
tray-offset-x = 8
tray-offset-y = 0
# 100%-16px(gaps)-8px(tray)
width = 100%:-24px
#width = 100%:-16px
height = 27
offset-y = 8px
offset-x = 8px
modules-left = app
modules-right = terminal browser
modules-center = i3
wm-restack = i3
override-redirect = true
modules-left = i3
modules-center =
modules-right = spotify backlight volume battery date
separator =
cursor-click = pointer
cursor-scroll = default
;; =================== MUSIC BAR ========================
[bar/music]
width = 25%
height = 30px
offset-x = 37.25%
offset-y = 5px
radius = 12
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 2
padding-right = 0
module-margin-left = 0
module-margin-right = 0
font-0 = Fira Code Nerd Font:pixelsize=10;1
font-1 = Material Design Icons:pixelsize=16:style:Regular;2
font-2 = Material Design Icons:pixelsize=50:style:Regular;3
font-3 = BreezeSans:pixelsize=16:style=Bold;-10
font-4 = "IPAGothic:fontformat=truetype:antialias=false:pixelsize=11;2"
modules-center = spotify prev toggle next
wm-name = i3
wm-restack = i3
override-redirect = true
cursor-click = pointer
cursor-scroll = default
;; =================== BAR STATUS =========================
[bar/status]
width = 20%
height = 30px
offset-x = 80%:-10
offset-y = 5px
radius = 12
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 2
padding-right = 0
module-margin-left = 0
module-margin-right = 0
font-0 = BreezeSans:pixelsize=16:style=Bold;-10
font-1 = Fira Code Nerd Font:pixelsize=10;1
font-2 = Material Design Icons:pixelsize=16:style:Regular;2
font-3 = Fira Code Nerd Font:pixelsize=8;10
font-4 = Fira Code Nerd Font:pixelsize=8;-8
modules-right = brightness battery volume update date power-menu
modules-left = open
wm-restack = i3
override-redirect = true
cursor-click = pointer
cursor-scroll = default
;; ==================== BAR INFO ============================
[bar/info]
width = 10%
height = 30px
offset-x = 72%:-5
offset-y = 5px
radius = 12
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 2
padding-right = 0
module-margin-left = 0
module-margin-right = 0
font-0 = BreezeSans:pixelsize=16:style=Bold;-10
font-1 = Fira Code Nerd Font:pixelsize=10;1
font-2 = Material Design Icons:pixelsize=16:style:Regular;2
font-3 = Fira Code Nerd Font:pixelsize=8;10
font-4 = Fira Code Nerd Font:pixelsize=8;-8
modules-center = cpu temperature memory
modules-left = close
wm-restack = i3
override-redirect = true
cursor-click = pointer
cursor-scroll = default
;; =================== I3 MODULE ============================
###############################################################################
[module/i3]
type = internal/i3
pin-workspaces = true
index-sort = true
enable-click = true
enable-scroll = true
format = <label-state> <label-mode>
wrapping-scroll = false
format = <label-state> <label-mode>
; Only show workspaces on the same output as the bar
;pin-workspaces = true
background = ${colors.nord0}
label-mode-padding = 2
label-mode-foreground = ${colors.foreground}
label-mode-background = ${colors.background}
ws-icon-0 = 1;1
ws-icon-1 = 2;2
ws-icon-2 = 3;3
ws-icon-3 = 4;4
ws-icon-4 = 5;5
ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;9
ws-icon-9 = 10;10
; focused = Active workspace on focused monitor
label-focused = ""
label-focused-padding = 1
label-focused-font = 3
label-focused = %icon%
label-focused-foreground = ${colors.foreground}
label-focused-background = ${colors.accent}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = ""
label-unfocused-padding = 1
label-unfocused-font = 3
label-unfocused = %index%
label-unfocused-foreground = ${colors.foreground}
label-unfocused-background = ${self.background}
label-unfocused-padding = 2
; urgent = Workspace with urgency hint set
label-urgent = ""
label-urgent-foreground = ${colors.red}
label-urgent-font = 3
label-urgent-padding = 1
label-visible = %index%
label-visible-foreground = ${colors.foreground}
label-visible-background = ${self.background}
label-visible-padding = 2
label-urgent = %index%
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.red}
label-urgent-padding = 2
;; ===================== MODULE OPEN APP =================
[module/app]
type = custom/text
content = "%{T4} %{T-}"
content-background = ${colors.background}
content-foreground = ${colors.cyan}
content-padding = 1
content-font = 2
click-left = "~/.config/rofi/launchers-git/launcher.sh"
;; ======================== SPOTIFY =========================
[module/spotify]
type = custom/script
exec = ~/.config/polybar/scripts/song.sh 2>/dev/null || echo "No player found"
format = "<label> "
format-prefix = "%{T4}%{F#79e6f3}  %{F-}%{T-}"
interval = 1
tail = true
;; ===================== TOGGLE =============================
[module/toggle]
type = custom/script
exec = ~/.config/polybar/scripts/toggle.sh
interval = 0.2
format = <label>
format-foreground = ${colors.cyan}
format-padding = 1
label = %output%
tail = true
click-left = playerctl play-pause &
;; ======================== PREV =============================
[module/prev]
type = custom/text
content = "%{T4}%{T-}"
content-foreground = ${colors.cyan}
content-padding = 2
content-font = 2
click-left = playerctl previous &
;; ======================== NEXT =============================
[module/next]
type = custom/text
content = "%{T4} %{T-}"
content-foreground = ${colors.cyan}
content-padding = 2
content-font = 2
click-left = playerctl next &
;; ======================= DATE ===============================
###############################################################################
[module/date]
type = internal/date
type = custom/script
format-padding = 2
format-background = ${colors.shade3}
exec = ~/.config/polybar/scripts/date.sh
interval = 1
tail = true
interval = 1.0
;; ====================== POWERMENU ===========================
time =  %I:%M %p
time-alt =  %Y-%m-%d%
[module/power-menu]
type = custom/script
format = <label>
exec = echo " 󰐥 "
format-foreground = ${colors.red}
click-left = ~/.config/polybar/scripts/powermenu.sh &
label = %time%
###############################################################################
[module/title]
type = internal/xwindow
label = %title%
format = <label>
label-maxlen = 80
label-empty = "Yoroshiku!"
format-padding = 2
;; ======================= UPDATES ============================
###############################################################################
[module/cpu]
type = internal/cpu
[module/update]
type = custom/script
exec = ~/.config/polybar/scripts/updates.sh
interval = 5
format-background = ${colors.frost1}
format-foreground = ${colors.nord0}
tail =true
format = <label>
format-prefix = 
format-padding = 2
click-left = ~/.config/polybar/scripts/lupdates &
label = " %percentage%%"
###############################################################################
[module/memory]
type = internal/memory
interval = 3
format = <label>
format-prefix = 
label = " %mb_used%"
###############################################################################
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
apdapter = ADP1
bg = ${colors.shade2}
format-charging = <animation-charging> <label-charging>
format-charging-background = ${self.bg}
format-charging-padding = 2
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-background = ${self.bg}
format-discharging-padding = 2
format-full = <ramp-capacity> <label-full>
format-full-background = ${self.bg}
format-full-padding = 2
label-charging = %percentage%%
label-discharging = %percentage%%
label-full = 100%
; Only applies if <ramp-capacity> is used
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-5 = 
ramp-capacity-6 = 
ramp-capacity-7 = 
ramp-capacity-8 = 
ramp-capacity-9 = 
; Only applies if <animation-charging> is used
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
; Framerate in milliseconds
animation-charging-framerate = 750
###############################################################################
[module/volume]
type = internal/pulseaudio
format-volume-background = ${colors.shade1}
format-volume-padding = 2
format-volume = <ramp-volume> <label-volume>
label-volume = %percentage%%
format-muted-prefix = " "
format-muted-padding = 2
label-muted = "Muted"
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-3 = 
ramp-volume-4 = 
ramp-headphones-0 = 
ramp-headphones-1 = 
###############################################################################
[module/network]
type = internal/network
interface = wlo1
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <ramp-signal> <label-connected>
format-connected-background = ${colors.nord1}
format-connected-padding = 2
format-disconnected = <label-disconnected>
format-disconnected-background = ${colors.nord1}
format-disconnected-padding = 2
label-connected = %essid%
label-disconnected =  Disconnected
; Only applies if <ramp-signal> is used
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
###############################################################################
[module/backlight]
;; ======================= BRIGHTNESS ===============================
[module/brightness]
type = internal/backlight
format-padding = 2
format-background = ${colors.shade0}
format-foreground = ${colors.foreground}
# ls -1 /sys/class/backlight
card = amdgpu_bl0
format = <bar>
format-prefix = " "
label = " %percentage%%"
format = <label>
label= "%{T2}%percentage%%%{T2} "
bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty= ─
;; ======================= BATTERY ===============================
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
adapter = ADP1
###############################################################################
[module/load]
type = custom/script
exec = ~/.config/polybar/scripts/load.sh
interval = 5.0
format-full = <label-full>
label-full = "%{T2}FULL%{T2} "
###############################################################################
[module/spotify]
type = custom/script
format-charging = <label-charging>
label-charging = "%{T2}%percentage%%%{T2} "
format-padding = 2
format-background = ${colors.blue3}
format-prefix = " "
format-discharging = <label-discharging>
label-discharging = "%{T2}%percentage%%%{T2} "
;; ======================= VOLUME ===============================
[module/volume]
type = internal/pulseaudio
format = <label>
label-volume = "󰎇%{T2}%percentage%%%{T-} "
label-muted = "󰎊 "
label-muted-foreground = #607290
;; ======================== CPU ================================
[module/cpu]
type = internal/cpu
interval = 1
format = <label>
format-prefix = " "
label = "%{T2}%percentage%%%{T2} "
;; ======================== TEMPERATURE ========================
[module/temperature]
type = internal/temperature
format = <label>
format-prefix = "  "
hwmon-path = /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.0/hwmon/hwmon2/temp1_input
label = "%{T2}%temperature-c%%{T-} "
;; ========================= MEMORY ===============================
[module/memory]
type = internal/memory
exec = ~/.config/polybar/scripts/spotify.sh %artist% - %title%
tail = true
interval = 2
format-prefix = "ﴵ "
label = "%{T2}%percentage_used%%%{T-} "
###############################################################################
[module/powerbutton]
type = custom/text
content-padding = 2
content-background = ${colors.nord1}
content-foreground = ${colors.frost2}
;; ========================= OPEN =================================
content = "襤"
[module/open]
type = custom/script
click-left = ~/scripts/powermenu
exec = echo "%{F#79e6f3} %{F-}"
click-left = ~/.config/polybar/scripts/open.sh &
;; ========================= CLOSE =================================
[module/close]
type = custom/script
exec = echo "%{F#f37f97} %{F-}"
click-left = ~/.config/polybar/scripts/close.sh
# vim:ft=dosini

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Terminate already running bar instances
killall -q polybar
# If all your bars have ipc enabled, you can also use
# polybar-msg cmd quit
# Launch bar1 and bar2
echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log
polybar workspaces >>/tmp/polybar1.log 2>&1 &
polybar music >>/tmp/polybar2.log 2>&1 &
polybar status >>/tmp/polybar3.log 2>&1 &
echo "Bars launched..."

View File

@@ -0,0 +1,3 @@
#!/bin/sh
ps aux| grep "polybar info"| head -1 | tr -s ' ' |cut -d' ' -f2 | xargs kill

View File

@@ -0,0 +1,157 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
configuration {
font: "Fira Code Nerd Font 16";
show-icons: false;
icon-theme: "Papirus";
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
* {
background: #1d1f28;
background-alt: #282a36;
foreground: #fdfdfd;
border: #282a36;
border-alt: #79e6f3;
selected: #282a36;
urgent: #f37f97;
}
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 15px;
border: 6px;
border-color: @border;
height: 1030px;
width: 12%;
location: east;
x-offset: 0;
y-offset: 15;
}
prompt {
enabled: true;
padding: 4px 8px 4px 8px;
background-color: @border-alt;
text-color: @foreground;
}
textbox-prompt-colon {
expand: false;
str: "System";
background-color: @border;
text-color: @foreground;
padding: 2px 0px 4px 20px;
}
inputbar {
children: [ textbox-prompt-colon ];
background-color: @border;
text-color: @foreground;
expand: false;
border: 1px;
border-radius: 100%;
border-color: @border;
margin: 0px 0px 0px 0px;
padding: 8px 8px 8px 8px;
position: center;
}
entry {
background-color: @background-alt;
text-color: @foreground;
placeholder-color: @foreground;
padding: 4px 8px 4px 8px;
expand: true;
horizontal-align: 0;
placeholder: "Search";
blink: true;
}
case-indicator {
background-color: @background-alt;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
margin: 0% 0% 0% 0%;
spacing: 2.5%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
spacing: 4%;
children: [ inputbar, listview ];
padding: 4% 2% 0% 2%;
}
element {
background-color: @background-alt;
text-color: @foreground;
orientation: vertical;
border-radius: 100%;
padding: 0px 0px 0px -5px;
}
element-icon {
size: 65px;
border: 0px;
}
element-text {
font: "feather 32";
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 30px 30px 30px 35px;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 100%;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @border-alt;
text-color: @background;
border: 1px;
border-radius: 100%;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}

View File

@@ -0,0 +1,21 @@
#!/bin/env bash
file=/tmp/cpu
ex="false"
[ ! -s $file ] && ex="true"
useage=$(head -n1 $file)
temperature=$(tail -n1 $file)
useage=$(echo "${useage%%.*}" | sed "s/^\(..\)$/\1 /" | sed "s/^\(.\)$/\1 /" )
[[ "$ex" == "false" ]] && echo "%{T2}$useage%%{F-}"
useage=$(cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat)| tr -s ' ' | cut -d' ' -f2,4,5| tr '\n' ' '| sed "s/^\([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) \([^ ]*\) $/(\1-\4+\2-\5)*100\/(\1-\4+\2-\5+\3-\6)/g"| calc -dp)
temperature=$(cat /sys/devices/pci0000:00/0000:00:08.1/0000:07:00.0/hwmon/hwmon2/temp1_input | tail -n1 | sed 's/...$/°/')
echo "$useage" > $file
echo "$temperature" >> $file
[[ "$ex" == "true" ]] && exit 1 || exit 0

View File

@@ -0,0 +1,7 @@
#!/bin/env bash
date=$(date '+%a %e %b %k:%M')
echo " %{T2}$date%{T-}"

View File

@@ -0,0 +1,3 @@
#!/bin/bash
alacritty -e bash -c "sudo dnf upgrade"

View File

@@ -0,0 +1,4 @@
#!/bin/sh
ps aux| grep "polybar info"| head -1 | tr -s ' ' |cut -d' ' -f2 | xargs kill
polybar info &

View File

@@ -0,0 +1,47 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme ~/.config/polybar/scripts/color.rasi"
uptime=$(uptime -p | sed -e 's/up //g')
# Options
#shutdown="󰐥"
#reboot="󰜉"
#lock="󰤁"
#suspend="󰤄"
#logout="󰿅"
shutdown="Shutdown"
reboot="Reboot"
lock="Lock"
suspend="Suspend"
logout="Logout"
dir="$HOME/.config/rofi/power"
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)"
case $chosen in
$shutdown)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
~/scripts/lock-laptop.sh
;;
$suspend)
mpc -q pause
amixer set Master mute
systemctl suspend
;;
$logout)
i3-msg exit
;;
esac

View File

@@ -0,0 +1,37 @@
#!/bin/sh
function scroll () {
prefix="$1"
scrolling="$2"
temp="$(echo "$scrolling"| sed "s/^\(.\{20\}\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$//")"
suffix="$3"
if [ "$(echo -n $scrolling |wc -c)" -gt 20 ]; then
echo "$prefix%{T7}$temp%{T-}$suffix"
sleep 0.5
zscroll -l 20 \
--delay 0.2 \
--before-text "$prefix%{T7}" \
--after-text "%{T-}$suffix" \
--scroll-padding " " \
--update-check true "echo '$(get_title)'" &
wait
else
echo "$prefix%{T8} $temp %{T-}$suffix"
fi
} #
function get_artist () {
echo "$(playerctl -p spotify metadata --format "{{ artist }}"| sed -e "s/[[(]....*[])]*//g" | sed "s/ *$//"| sed "s/^\(.\{20\}[^ ]*\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$/.../")"
} #
function get_title () {
echo "$(playerctl -p spotify metadata --format "{{title}}" | sed 's/'\''/\\'\''/g')"
} #
[ ! -z "$(playerctl -p spotify status 2>/dev/null)" ] \
&& artist=$(get_artist) \
&& title=$(get_title) \
&& ([ -z "$artist$title" ] && scroll "" "Spotify is not connected on this pc" "" || scroll "%{F#79e6f3}$artist%{F#FFF} [" "$title" "]%{F-}" ) \
|| exit 1

View File

@@ -0,0 +1,3 @@
#!/bin/bash
[[ "$(playerctl -p spotify status 2>/dev/null)" == "Playing" ]] && echo "" || echo ""

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env bash
BAR_ICON="󰏗"
#NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); }
while true; do
get_total_updates
# notify user of updates
if hash notify-send &>/dev/null; then
if (( UPDATES > 50 )); then
notify-send -u critical \
"󰑥 You really need to update!!" "$UPDATES New packages"
elif (( UPDATES > 25 )); then
notify-send -u normal \
"󰑥 You should update soon" "$UPDATES New packages"
elif (( UPDATES > 2 )); then
notify-send -u low \
"󰑥 $UPDATES New packages"
fi
fi
# when there are updates available
# every 10 seconds another check for updates is done
while (( UPDATES > 0 )); do
if (( UPDATES == 1 )); then
echo " 󰏖 %{T2}$UPDATES%{T-} "
elif (( UPDATES > 1 )); then
echo " 󰏖 %{T2}$UPDATES%{T-} "
else
echo $BAR_ICON
fi
sleep 10
get_total_updates
done
# when no updates are available, use a longer loop, this saves on CPU
# and network uptime, only checking once every 30 min for new updates
while (( UPDATES == 0 )); do
echo " $BAR_ICON %{T2}$UPDATES%{T-} "
sleep 1800
get_total_updates
done
done

View File

@@ -1,69 +1,9 @@
/** Configured For Applets **/
configuration {
show-icons: true;
font: "InconsolataLGC Nerd Font Mono 11";
drun-display-format: "{icon} {name}";
display-run: " ";
display-drun: " ";
display-window: " ";
modi: "drun";
show-icons: true;
icon-theme: "Papirus";
location: 5;
yoffset: -50;
xoffset: -20;
}
* {
background-color: #2E3440;
bg-alt: #3B4252;
fg: #ECEFF4;
nord-blue-light: #88C0D0;
nord-yellow: #EBCB8B;
nord-green: #a3be8c;
accent: @nord-yellow;
border: 0;
lines: 12;
padding: 0;
margin: 0;
spacing: 0;
}
window {
width: 30%;
transparency: "real";
}
mainbox {
children: [inputbar, listview];
}
listview {
columns: 1;
}
element {
padding: 12;
orientation: vertical;
text-color: @fg;
}
element selected {
background-color: @bg-alt;
text-color: @nord-blue-light;
}
inputbar {
background-color: @background;
children: [prompt, entry];
}
prompt {
enabled: true;
font: "InconsolataLGC Nerd Font Mono 16";
padding: 7 -12 0 12;
text-color: @accent;
}
entry {
padding: 12;
text-color: @accent;
}

View File

@@ -0,0 +1,155 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
configuration {
font: "Fira Code Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
threads: 0;
scroll-method: 0;
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
* {
background: #1d1f28;
background-alt: #282a36;
background-ib: #282a36;
foreground: #fdfdfd;
border: #282a36;
border-sel: #79e6f3;
selected: #282a36;
urgent: #f37f97;
}
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border: 6px;
border-radius: 15px;
border-color: @border;
height: 1030px;
width: 25%;
location: west;
anchor: west;
x-offset: 0;
y-offset: 15px;
}
prompt {
enabled: true;
padding: 0px 8px 0px 4px;
background-color: @background-ib;
text-color: @foreground;
font: "Fira Code Nerd Font 20";
}
inputbar {
background-color: @background-ib;
text-color: @foreground;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 30px;
border-color: @border;
margin: 0px 0px 0px 0px;
padding: 2px 2px 2px 2px;
position: center;
}
entry {
background-color: @background-ib;
text-color: @foreground;
placeholder-color: @foreground;
expand: true;
horizontal-align: 0;
padding: 8px 2px 2px 2px;
placeholder: "Search Apps";
blink: true;
}
case-indicator {
background-color: @background-ib;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 2;
spacing: 4px;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
spacing: 10px;
padding: 8px 15px 8px 15px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: vertical;
border-radius: 0px;
margin: 0px 5px 0px 5px;
padding: 10px 0px 10px 0px;
}
element-icon {
size: 64px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0.5;
vertical-align: 0.5;
margin: 5px 10px 0px 10px;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @selected;
text-color: @foreground;
border: 0px 0px 2px 0px;
border-radius: 4px;
border-color: @border-sel;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
# Available Styles
# >> Styles Below Only Works With "rofi-git(AUR)", Current Version: 1.5.4-76-gca067234
#
# blurry blurry_full kde_simplemenu kde_krunner launchpad
# gnome_do slingshot appdrawer appfolder column
# row row_center screen row_dock row_dropdown
style="appdrawer"
rofi -no-lazy-grab -show drun -theme launchers-git/"$style".rasi

View File

@@ -17,7 +17,7 @@ green="a3be8c"
inside="${nord0}77"
i3lock \
--blur=10 \
-i ~/data/wallpaper/forest_staircase.png \
\
--insidecolor=${inside} \
--ringcolor=${nord0}ff \

View File

@@ -35,7 +35,7 @@ def list_wallpapers(wallpaper_list, *args):
if __name__ == "__main__":
### DEFAULT WALLPAPER DIRECTORY HERE
path = "wallpaper"
path = "~/data/wallpaper"
parser = argparse.ArgumentParser()
parser.add_argument("-q", "--query", help="Refine selection")

View File

@@ -1,100 +0,0 @@
#!/usr/bin/env bash
# Starts a scan of available broadcasting SSIDs
# nmcli dev wifi rescan
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
FIELDS=SSID,SECURITY
POSITION=0
YOFF=0
XOFF=0
FONT="INCONSOLATA 13"
if [ -r "$DIR/config" ]; then
source "$DIR/config"
elif [ -r "$HOME/.config/rofi/wifi" ]; then
source "$HOME/.config/rofi/wifi"
else
echo "WARNING: config file not found! Using default values."
fi
LIST=$(nmcli --fields "$FIELDS" device wifi list | sed '/^--/d')
# For some reason rofi always approximates character width 2 short... hmmm
RWIDTH=$(($(echo "$LIST" | head -n 1 | awk '{print length($0); }')+2))
# Dynamically change the height of the rofi menu
LINENUM=$(echo "$LIST" | wc -l)
# Gives a list of known connections so we can parse it later
KNOWNCON=$(nmcli connection show)
# Really janky way of telling if there is currently a connection
CONSTATE=$(nmcli -fields WIFI g)
CURRSSID=$(LANGUAGE=C nmcli -t -f active,ssid dev wifi | awk -F: '$1 ~ /^yes/ {print $2}')
if [[ ! -z $CURRSSID ]]; then
HIGHLINE=$(echo "$(echo "$LIST" | awk -F "[ ]{2,}" '{print $1}' | grep -Fxn -m 1 "$CURRSSID" | awk -F ":" '{print $1}') + 1" | bc )
fi
# HOPEFULLY you won't need this as often as I do
# If there are more than 8 SSIDs, the menu will still only have 8 lines
if [ "$LINENUM" -gt 8 ] && [[ "$CONSTATE" =~ "enabled" ]]; then
LINENUM=8
elif [[ "$CONSTATE" =~ "disabled" ]]; then
LINENUM=1
fi
if [[ "$CONSTATE" =~ "enabled" ]]; then
TOGGLE="toggle off"
elif [[ "$CONSTATE" =~ "disabled" ]]; then
TOGGLE="toggle on"
fi
CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | rofi -dmenu -p "Wi-Fi SSID: " -lines "$LINENUM" -a "$HIGHLINE" -location "$POSITION" -yoffset "$YOFF" -xoffset "$XOFF" -width -"$RWIDTH")
#echo "$CHENTRY"
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}')
#echo "$CHSSID"
# If the user inputs "manual" as their SSID in the start window, it will bring them to this screen
if [ "$CHENTRY" = "manual" ] ; then
# Manual entry of the SSID and password (if appplicable)
MSSID=$(echo "enter the SSID of the network (SSID,password)" | rofi -dmenu -p "Manual Entry: " -font "$FONT" -lines 1)
# Separating the password from the entered string
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}')
#echo "$MSSID"
#echo "$MPASS"
# If the user entered a manual password, then use the password nmcli command
if [ "$MPASS" = "" ]; then
nmcli dev wifi con "$MSSID"
else
nmcli dev wifi con "$MSSID" password "$MPASS"
fi
elif [ "$CHENTRY" = "toggle on" ]; then
nmcli radio wifi on
elif [ "$CHENTRY" = "toggle off" ]; then
nmcli radio wifi off
else
# If the connection is already in use, then this will still be able to get the SSID
if [ "$CHSSID" = "*" ]; then
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}')
fi
# Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process
if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then
nmcli con up "$CHSSID"
else
if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then
WIFIPASS=$(echo "if connection is stored, hit enter" | rofi -dmenu -p "password: " -lines 1 -font "$FONT" )
fi
nmcli dev wifi con "$CHSSID" password "$WIFIPASS"
fi
fi