spectrwm + polybar + rofi

This commit is contained in:
serxoz 2022-08-06 00:56:45 +02:00
parent fe3835e501
commit 0b1bc2b9ba
18 changed files with 3346 additions and 0 deletions

236
.Xresources Normal file
View File

@ -0,0 +1,236 @@
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
XTerm*background: #222D31
XTerm*foreground: #d8d8d8
XTerm*pointerColor: #1ABB9B
XTerm*faceName: Fixed
XTerm*faceSize: 11
XTerm*reverseVideo: on
XTerm*selectToClipboard: true
*background: #222D31
*foreground: #d8d8d8
*fading: 8
*fadeColor: black
*cursorColor: #1ABB9B
*pointerColorBackground: #2B2C2B
*pointerColorForeground: #16A085
!! black dark/light
*color0: #222D31
*color8: #585858
!! red dark/light
*color1: #ab4642
*color9: #ab4642
!! green dark/light
*color2: #7E807E
*color10: #8D8F8D
!! yellow dark/light
*color3: #f7ca88
*color11: #f7ca88
!! blue dark/light
*color4: #7cafc2
*color12: #7cafc2
!! magenta dark/light
*color5: #ba8baf
*color13: #ba8baf
!! cyan dark/light
*color6: #1ABB9B
*color14: #1ABB9B
!! white dark/light
*color7: #d8d8d8
*color15: #f8f8f8
Xcursor.theme: xcursor-breeze
Xcursor.size: 0
URxvt.font: 9x15,xft:TerminessTTFNerdFontMono
! alternative font settings with 'terminus':
! URxvt.font: -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
! URxvt.bold.font: -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
!! terminus names see end of file!
URxvt.depth: 32
URxvt.background: [100]#222D31
URxvt*scrollBar: false
URxvt*mouseWheelScrollPage: false
URxvt*cursorBlink: true
URxvt*background: black
URxvt*foreground: grey
URxvt*saveLines: 5000
! for 'fake' transparency (without Compton) uncomment the following three lines
! URxvt*inheritPixmap: true
! URxvt*transparent: true
! URxvt*shading: 138
! Normal copy-paste keybindings without perls
URxvt.iso14755: false
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
!Xterm escape codes, word by word movement
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Shift-Control-Left: \033[1;6D
URxvt.keysym.Control-Right: \033[1;5C
URxvt.keysym.Shift-Control-Right: \033[1;6C
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Shift-Control-Up: \033[1;6A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Shift-Control-Down: \033[1;6B
! Rxvt.perl-ext-common: ...,clipboard
! URxvt.keysym.M-C-c: perl:clipboard:copy
! URxvt.keysym.M-v: perl:clipboard:paste
! URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
! URxvt*termName: string
! URxvt*geometry: geometry
! URxvt*chdir: string
! URxvt*loginShell: boolean
! URxvt*multiClickTime: number
! URxvt*jumpScroll: boolean
! URxvt*skipScroll: boolean
! URxvt*pastableTabs: boolean
! URxvt*scrollstyle: plain
! URxvt*scrollBar_right: boolean
! URxvt*scrollBar_floating: true
! URxvt*scrollBar_align: mode
! URxvt*thickness: number
! URxvt*scrollTtyOutput: boolean
! URxvt*scrollTtyKeypress: boolean
! URxvt*scrollWithBuffer: boolean
! URxvt*tintColor: !7DA55
! URxvt*blurRadius: HxV
! URxvt*fading: number
! URxvt*fadeColor: color
! URxvt*utmpInhibit: boolean
! URxvt*urgentOnBell: boolean
! URxvt*visualBell: boolean
! URxvt*mapAlert: boolean
! URxvt*meta8: boolean
! URxvt*tripleclickwords: boolean
! URxvt*insecure: boolean
! URxvt*cursorUnderline: boolean
! URxvt*pointerBlank: boolean
! URxvt*color0: color
! URxvt*color1: color
! URxvt*color2: color
! URxvt*color3: color
! URxvt*color4: color
! URxvt*color5: color
! URxvt*color6: color
! URxvt*color7: color
! URxvt*color8: color
! URxvt*color9: color
! URxvt*color10: color
! URxvt*color11: color
! URxvt*color12: color
! URxvt*color13: color
! URxvt*color14: color
! URxvt*color15: color
! URxvt*colorBD: color
! URxvt*colorIT: color
! URxvt*colorUL: color
! URxvt*colorRV: color
! URxvt*underlineColor: color
! URxvt*scrollColor: color
! URxvt*troughColor: color
! URxvt*highlightColor: color
! URxvt*highlightTextColor: color
! URxvt*cursorColor: color
! URxvt*cursorColor2: color
! URxvt*pointerColor: color
! URxvt*pointerColor2: color
! URxvt*borderColor: color
! URxvt*iconFile: file
! URxvt*font: fontname
! URxvt*boldFont: fontname
! URxvt*italicFont: fontname
! URxvt*boldItalicFont: fontname
! URxvt*intensityStyles: boolean
! URxvt*inputMethod: name
! URxvt*preeditType: style
! URxvt*imLocale: string
! URxvt*imFont: fontname
! URxvt*title: string
! URxvt*iconName: string
! URxvt*buffered: boolean
! URxvt*depth: number
! URxvt*visual: number
! URxvt*transient-for: windowid
! URxvt*override-redirect: boolean
! URxvt*hold: boolean
! URxvt*externalBorder: number
! URxvt*internalBorder: number
! URxvt*borderLess: true
! URxvt*lineSpace: number
! URxvt*letterSpace: number
! URxvt*skipBuiltinGlyphs: boolean
! URxvt*pointerBlankDelay: number
! URxvt*backspacekey: string
! URxvt*deletekey: string
! URxvt*print-pipe: string
! URxvt*modifier: modifier
! URxvt*cutchars: string
! URxvt*answerbackString: string
! URxvt*secondaryScreen: boolean
! URxvt*secondaryScroll: boolean
! URxvt*perl-lib: string
! URxvt*perl-eval: perl-eval
! URxvt*perl-ext-common: string
! URxvt*perl-ext: string
! URxvt*iso14755: boolean
! URxvt*iso14755_52: boolean
! URxvt*xrm: string
! URxvt*keysym.sym: keysym
! URxvt*background.border: boolean
! URxvt*background.expr: string
! URxvt*background.interval: seconds
! URxvt*bell-command: string
! URxvt*kuake.hotkey: string
! URxvt*matcher.button: string
! URxvt*matcher.launcher: string
! URxvt*matcher.launcher.*: string
! URxvt*matcher.pattern.*: string
! URxvt*matcher.rend.*: string
! URxvt*remote-clipboard.fetch: string
! URxvt*remote-clipboard.store: string
! URxvt*searchable-scrollback: string
! URxvt*selection-autotransform.*: string
! URxvt*selection-pastebin.cmd: string
! URxvt*selection-pastebin.url: string
! URxvt*selection.pattern-0: string
! URxvt*tab-bg: colour
! URxvt*tab-fg: colour
! URxvt*tabbar-bg: colour
! URxvt*tabbar-fg: colour
! URxvt*url-launcher: string
! The Terminus font uses the following X-names:
! -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
! -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
! -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
! -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
! -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
! -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
! -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
! -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1
! -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1
! -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso10646-1
! -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1
! -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso10646-1
! -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso10646-1
! -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso10646-1
! -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso10646-1

3
polybar/clean.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
rm -r ~/.config/polybar/

504
polybar/config Normal file
View File

@ -0,0 +1,504 @@
;=====================================================
;
;=====================================================
[global/wm]
margin-top = 0
margin-bottom = 0
[settings]
throttle-output = 5
throttle-output-for = 10
throttle-input-for = 30
screenchange-reload = true
compositing-background = over
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
; Define fallback values used by all module formats
format-foreground = #FF0000
format-background = #00FF00
format-underline =
format-overline =
format-spacing =
format-padding =
format-margin =
format-offset =
[colors]
; Nord theme ============
background = #2F343F
foreground = #f3f4f5
alert = #d08770
volume-min = #a3be8c
volume-med = #ebcb8b
volume-max = #bf616a
; =======================
; Gotham theme ==========
; background = #0a0f14
; foreground = #99d1ce
; alert = #d26937
; volume-min = #2aa889
; volume-med = #edb443
; volume-max = #c23127
; =======================
; INTRCPTR theme ============
;background = ${xrdb:color0:#222}
;background = #aa000000
;background-alt = #444
;foreground = ${xrdb:color7:#222}
;foreground = #fff
;foreground-alt = #555
;primary = #ffb52a
;secondary = #e60053
;alert = #bd2c40
################################################################################
################################################################################
############ MAINBAR-SPECTRWM ############
################################################################################
################################################################################
[bar/mainbar-spectrwm]
monitor = ${env:MONITOR}
;monitor-fallback = HDMI1
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator = |
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
line-color = #f00
wm-restack = bspwm
override-redirect = true
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
border-size = 0
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-color = #00000000
padding-left = 0
padding-right = 1
module-margin-left = 3
module-margin-right = 3
;https://github.com/jaagr/polybar/wiki/Fonts
font-0 = "Noto Sans:size=10;0"
font-1 = "FontAwesome:size=10;0"
font-2 = "Noto Sans:size=10;0"
font-3 = "Noto Sans Mono:size=10;0"
modules-left = ewmh xwindow
#modules-center = xwindow
modules-right = memory3 cpu1 temperature2 date
tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 2
tray-maxsize = 20
tray-scale = 1.0
tray-position = right
tray-background = ${colors.background}
scroll-up = spectrwm-desknext
scroll-down = spectrwm-deskprev
################################################################################
############ MODULES ############
################################################################################
[module/cpu1]
;https://github.com/jaagr/polybar/wiki/Module:-cpu
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
;   
format-prefix = " "
format-prefix-foreground = #cd1f3f
format-underline = #cd1f3f
; Available tags:
; <label> (default)
; <bar-load>
; <ramp-load>
; <ramp-coreload>
format = <label> <ramp-coreload>
format-padding = 2
; Available tokens:
; %percentage% (default) - total cpu load
; %percentage-cores% - load percentage for each core
; %percentage-core[1-9]% - load percentage for specific core
label-font = 3
label = Cpu %percentage:3%%
ramp-coreload-0 = ▁
ramp-coreload-0-font = 3
ramp-coreload-0-foreground = #aaff77
ramp-coreload-1 = ▂
ramp-coreload-1-font = 3
ramp-coreload-1-foreground = #aaff77
ramp-coreload-2 = ▃
ramp-coreload-2-font = 3
ramp-coreload-2-foreground = #aaff77
ramp-coreload-3 = ▄
ramp-coreload-3-font = 3
ramp-coreload-3-foreground = #aaff77
ramp-coreload-4 = ▅
ramp-coreload-4-font = 3
ramp-coreload-4-foreground = #fba922
ramp-coreload-5 = ▆
ramp-coreload-5-font = 3
ramp-coreload-5-foreground = #fba922
ramp-coreload-6 = ▇
ramp-coreload-6-font = 3
ramp-coreload-6-foreground = #ff5555
ramp-coreload-7 = █
ramp-coreload-7-font = 3
ramp-coreload-7-foreground = #ff5555
################################################################################
[module/cpu2]
;https://github.com/jaagr/polybar/wiki/Module:-cpu
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix = "  "
format-prefix-foreground = #d75f5f
format-underline = #d75f5f
label-font = 3
; Available tags:
; <label> (default)
; <bar-load>
; <ramp-load>
; <ramp-coreload>
format = <label>
format-padding = 2
; Available tokens:
; %percentage% (default) - total cpu load
; %percentage-cores% - load percentage for each core
; %percentage-core[1-9]% - load percentage for specific core
label = Cpu %percentage:3%%
################################################################################
[module/date]
;https://github.com/jaagr/polybar/wiki/Module:-date
type = internal/date
; Seconds to sleep between updates
interval = 5
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = " %Y-%m-%d%"
date-alt = " %d-%m-%Y"
time = %H:%M
time-alt = %H:%M
format-prefix = " "
format-prefix-foreground = #c1941a
format-underline = #c1941a
format-foreground = ${colors.foreground}
format-background = ${colors.background}
label = %date% %time%
#################################################################
[module/ewmh]
type = internal/xworkspaces
pin-workspaces = false
enable-click = true
enable-scroll = true
reverse-scroll = true
icon-0 = 1;
icon-1 = 2;
icon-2 = 3;
icon-3 = 4;
icon-4 = 5;
#icon-5 = 6;
format = <label-state>
label-monitor = %name%
label-active = %name%
label-active-foreground = ${colors.foreground}
label-active-background = ${colors.background}
label-active-underline= #6790eb
label-active-padding = 2
label-occupied = %name%
label-occupied-background = ${colors.background}
label-occupied-underline = #555555
label-occupied-padding = 2
label-urgent = %name%
label-urgent-foreground = ${colors.foreground}
label-urgent-background = ${colors.alert}
label-urgent-underline = ${colors.alert}
label-urgent-padding = 2
label-empty = %name%
label-empty-foreground = ${colors.foreground}
label-empty-padding = 2
format-foreground = ${colors.foreground}
format-background = ${colors.background}
################################################################################
[module/jgmenu]
type = custom/script
interval = 120
exec = echo "ArcoLinux"
click-left = "jgmenu_run >/dev/null 2>&1 &"
format-foreground = ${colors.foreground}
format-background = ${colors.background}
################################################################################
[module/memory1]
;https://github.com/jaagr/polybar/wiki/Module:-memory
type = internal/memory
interval = 1
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
label = %percentage_used%%
bar-used-indicator =
bar-used-width = 10
bar-used-foreground-0 = #3384d0
bar-used-fill = 
bar-used-empty = 
bar-used-empty-foreground = #ffffff
format = <label> <bar-used>
format-prefix = "  "
format-prefix-foreground = #3384d0
format-underline = #3384d0
format-foreground = ${colors.foreground}
format-background = ${colors.background}
################################################################################
[module/memory2]
;https://github.com/jaagr/polybar/wiki/Module:-memory
type = internal/memory
interval = 1
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
label = %percentage_used%%
format = Mem <label>
format-prefix = "  "
format-prefix-foreground = #3384d0
format-underline = #3384d0
format-foreground = ${colors.foreground}
format-background = ${colors.background}
################################################################################
[module/memory3]
;https://github.com/jaagr/polybar/wiki/Module:-memory
type = internal/memory
interval = 1
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
label = %gb_used%/%gb_free%
format = Mem <label>
format-prefix = "  "
format-prefix-foreground = #3384d0
format-underline = #3384d0
format-foreground = ${colors.foreground}
format-background = ${colors.background}
################################################################################
[module/mpd]
;https://github.com/jaagr/polybar/wiki/Module:-mpd
type = internal/mpd
;format-online = "<label-song> <icon-prev> <icon-stop> <toggle> <icon-next>"
format-online = "<label-song> <bar-progress>"
;format-online = "<label-song> <bar-progress> <icon-prev> <icon-stop> <toggle> <icon-next>"
icon-prev = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
label-song-maxlen = 40
label-song-ellipsis = true
bar-progress-width = 10
bar-progress-indicator = 
bar-progress-fill = 
bar-progress-empty = 
bar-progress-fill-foreground = #ff0
bar-progress-fill-background = ${colors.background}
bar-progress-indicator-foreground = ${colors.foreground}
format-online-foreground = ${colors.foreground}
format-online-background = ${colors.background}
################################################################################
[module/temperature1]
;https://github.com/jaagr/polybar/wiki/Module:-temperature
type = internal/temperature
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
warn-temperature = 70
format = <ramp> <label>
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-underline = #c72581
format-warn = <ramp> <label-warn>
format-warn-underline = #c7254f
label = %temperature%
label-warn =  %temperature%
label-warn-foreground = #c7254f
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-foreground =${colors.foreground}
################################################################################
[module/temperature2]
type = custom/script
exec = ~/.config/polybar/scripts/temperature-laptop
interval = 2
format-padding = 1
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-underline = #C1B93E
format-prefix-foreground = #C1B93E
label = %output%
################################################################################
[module/volume]
;https://github.com/jaagr/polybar/wiki/Module:-volume
type = internal/volume
format-volume = "<label-volume> <bar-volume>"
label-volume = " "
label-volume-foreground = #40ad4b
label-muted = muted
bar-volume-width = 10
bar-volume-foreground-0 = #40ad4b
bar-volume-foreground-1 = #40ad4b
bar-volume-foreground-2 = #40ad4b
bar-volume-foreground-3 = #40ad4b
bar-volume-foreground-4 = #40ad4b
bar-volume-foreground-5 = #40ad4b
bar-volume-foreground-6 = #40ad4b
bar-volume-gradient = false
bar-volume-indicator = 
bar-volume-indicator-font = 2
bar-volume-fill = 
bar-volume-fill-font = 2
bar-volume-empty = 
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground}
format-volume-foreground = ${colors.foreground}
format-volume-background = ${colors.background}
format-muted-prefix = "  "
format-muted-prefix-foreground = "#ff0000"
format-muted-foreground = ${colors.foreground}
format-muted-background = ${colors.background}
################################################################################
[module/weather]
type = custom/script
interval = 10
format = <label>
format-prefix-foreground = #3EC13F
format-underline = #3EC13F
format-foreground = ${colors.foreground}
format-background = ${colors.background}
exec = ~/.config/polybar/scripts/weather.sh
tail = true
################################################################################
[module/xwindow]
;https://github.com/jaagr/polybar/wiki/Module:-xwindow
type = internal/xwindow
; Available tokens:
; %title%
; Default: %title%
label = %title%
label-maxlen = 50
format-foreground = ${colors.foreground}
format-background = ${colors.background}
###############################################################################

1984
polybar/config.full Normal file

File diff suppressed because it is too large Load Diff

4
polybar/install.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
rm -r ~/.config/polybar/
ln -s $HOME/dotfiles/polybar $HOME/.config/polybar

132
polybar/launch.sh Executable file
View File

@ -0,0 +1,132 @@
#!/usr/bin/env sh
# More info : https://github.com/jaagr/polybar/wiki
# Install the following applications for polybar and icons in polybar if you are on ArcoLinuxD
# awesome-terminal-fonts
# Tip : There are other interesting fonts that provide icons like nerd-fonts-complete
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar > /dev/null; do sleep 1; done
desktop=$(echo $DESKTOP_SESSION)
count=$(xrandr --query | grep " connected" | cut -d" " -f1 | wc -l)
case $desktop in
i3|/usr/share/xsessions/i3)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-i3 -c ~/.config/polybar/config &
done
else
polybar --reload mainbar-i3 -c ~/.config/polybar/config &
fi
# second polybar at bottom
# if type "xrandr" > /dev/null; then
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload mainbar-i3-extra -c ~/.config/polybar/config &
# done
# else
# polybar --reload mainbar-i3-extra -c ~/.config/polybar/config &
# fi
;;
openbox|/usr/share/xsessions/openbox)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-openbox -c ~/.config/polybar/config &
done
else
polybar --reload mainbar-openbox -c ~/.config/polybar/config &
fi
# second polybar at bottom
# if type "xrandr" > /dev/null; then
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload mainbar-openbox-extra -c ~/.config/polybar/config &
# done
# else
# polybar --reload mainbar-openbox-extra -c ~/.config/polybar/config &
# fi
;;
bspwm|/usr/share/xsessions/bspwm)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-bspwm -c ~/.config/polybar/config &
done
else
polybar --reload mainbar-bspwm -c ~/.config/polybar/config &
fi
# second polybar at bottom
# if type "xrandr" > /dev/null; then
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload mainbar-bspwm-extra -c ~/.config/polybar/config &
# done
# else
# polybar --reload mainbar-bspwm-extra -c ~/.config/polybar/config &
# fi
;;
herbstluftwm|/usr/share/xsessions/herbstluftwm)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-herbstluftwm -c ~/.config/polybar/config &
done
else
polybar --reload mainbar-herbstluftwm -c ~/.config/polybar/config &
fi
# second polybar at bottom
# if type "xrandr" > /dev/null; then
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload mainbar-herbstluftwm-extra -c ~/.config/polybar/config &
# done
# else
# polybar --reload mainbar-herbstluftwm-extra -c ~/.config/polybar/config &
# fi
;;
xmonad|/usr/share/xsessions/xmonad)
if [ $count = 1 ]; then
m=$(xrandr --query | grep " connected" | cut -d" " -f1)
MONITOR=$m polybar --reload mainbar-xmonad -c ~/.config/polybar/config &
else
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-xmonad -c ~/.config/polybar/config &
done
fi
# second polybar at bottom
# if [ $count = 1 ]; then
# m=$(xrandr --query | grep " connected" | cut -d" " -f1)
# MONITOR=$m polybar --reload mainbar-xmonad-extra -c ~/.config/polybar/config &
# else
# for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
# MONITOR=$m polybar --reload mainbar-xmonad-extra -c ~/.config/polybar/config &
# done
# fi
;;
spectrwm|/usr/share/xsessions/spectrwm)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-spectrwm -c ~/.config/polybar/config &
done
else
polybar --reload mainbar-spectrwm -c ~/.config/polybar/config &
fi
;;
cwm|/usr/share/xsessions/cwm)
if type "xrandr" > /dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload mainbar-cwm -c ~/.config/polybar/config &
done
else
polybar --reload mainbar-cwm -c ~/.config/polybar/config &
fi
;;
esac

Binary file not shown.

View File

@ -0,0 +1,19 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
FILE *fp;
char buffer[3];
int temp = 0;
fp = fopen("/sys/class/thermal/thermal_zone7/temp", "r");
fgets(buffer, sizeof buffer, (FILE*)fp);
fclose(fp);
buffer[strcspn(buffer, "\r\n")] = 0;
temp = atoi(buffer);
printf(" %d°C \n", temp);
return 0;
}

3
polybar/scripts/weather.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo `curl 'https://wttr.in/Viveiro?format=%c%t+%m+%w' 2>/dev/null`

3
rofi/clean.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
rm -r ~/.config/rofi

131
rofi/config.rasi Normal file
View File

@ -0,0 +1,131 @@
configuration {
modi: "window,run,ssh,combi,drun";
width: 50;
lines: 15;
columns: 1;
font: "UbuntuMono Nerd Font 14";
bw: 1;
location: 0;
padding: 5;
yoffset: 0;
xoffset: 0;
fixed-num-lines: true;
show-icons: true;
terminal: "rofi-sensible-terminal";
ssh-client: "ssh";
ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]";
run-command: "{cmd}";
run-list-command: "";
run-shell-command: "{terminal} -e {cmd}";
window-command: "wmctrl -i -R {window}";
window-match-fields: "all";
icon-theme: "Papirus";
drun-match-fields: "name,generic,exec,categories";
drun-show-actions: false;
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";
disable-history: false;
ignored-prefixes: "";
sort: false;
case-sensitive: false;
cycle: true;
sidebar-mode: false;
eh: 1;
auto-select: false;
parse-hosts: false;
parse-known-hosts: true;
combi-modi: "window,drun,ssh";
matching: "normal";
tokenize: true;
m: "-5";
line-margin: 2;
line-padding: 1;
separator-style: "dash";
hide-scrollbar: false;
fullscreen: false;
fake-transparency: false;
dpi: -1;
threads: 0;
scrollbar-width: 8;
scroll-method: 0;
fake-background: "screenshot";
window-format: "{w} {c} {t}";
click-to-exit: true;
show-match: true;
max-history-size: 25;
combi-hide-mode-prefix: false;
pid: "/run/user/1001/rofi.pid";
kb-primary-paste: "Control+V,Shift+Insert";
kb-secondary-paste: "Control+v,Insert";
kb-clear-line: "Control+w";
kb-move-front: "Control+a";
kb-move-end: "Control+e";
kb-move-word-back: "Alt+b,Control+Left";
kb-move-word-forward: "Alt+f,Control+Right";
kb-move-char-back: "Left,Control+b";
kb-move-char-forward: "Right,Control+f";
kb-remove-word-back: "Control+Alt+h,Control+BackSpace";
kb-remove-word-forward: "Control+Alt+d";
kb-remove-char-forward: "Delete,Control+d";
kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h";
kb-remove-to-eol: "Control+k";
kb-remove-to-sol: "Control+u";
kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";
kb-accept-custom: "Control+Return";
kb-accept-alt: "Shift+Return";
kb-delete-entry: "Shift+Delete";
kb-mode-next: "Shift+Right,Control+Tab";
kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";
kb-row-left: "Control+Page_Up";
kb-row-right: "Control+Page_Down";
kb-row-up: "Up,Control+p,ISO_Left_Tab";
kb-row-down: "Down,Control+n";
kb-row-tab: "Tab";
kb-page-prev: "Page_Up";
kb-page-next: "Page_Down";
kb-row-first: "Home,KP_Home";
kb-row-last: "End,KP_End";
kb-row-select: "Control+space";
kb-screenshot: "Alt+S";
kb-ellipsize: "Alt+period";
kb-toggle-case-sensitivity: "grave,dead_grave";
kb-toggle-sort: "Alt+grave";
kb-cancel: "Escape,Control+g,Control+bracketleft";
kb-custom-1: "Alt+1";
kb-custom-2: "Alt+2";
kb-custom-3: "Alt+3";
kb-custom-4: "Alt+4";
kb-custom-5: "Alt+5";
kb-custom-6: "Alt+6";
kb-custom-7: "Alt+7";
kb-custom-8: "Alt+8";
kb-custom-9: "Alt+9";
kb-custom-10: "Alt+0";
kb-custom-11: "Alt+exclam";
kb-custom-12: "Alt+at";
kb-custom-13: "Alt+numbersign";
kb-custom-14: "Alt+dollar";
kb-custom-15: "Alt+percent";
kb-custom-16: "Alt+dead_circumflex";
kb-custom-17: "Alt+ampersand";
kb-custom-18: "Alt+asterisk";
kb-custom-19: "Alt+parenleft";
kb-select-1: "Super+1";
kb-select-2: "Super+2";
kb-select-3: "Super+3";
kb-select-4: "Super+4";
kb-select-5: "Super+5";
kb-select-6: "Super+6";
kb-select-7: "Super+7";
kb-select-8: "Super+8";
kb-select-9: "Super+9";
kb-select-10: "Super+0";
ml-row-left: "ScrollLeft";
ml-row-right: "ScrollRight";
ml-row-up: "ScrollUp";
ml-row-down: "ScrollDown";
me-select-entry: "MousePrimary";
me-accept-entry: "MouseDPrimary";
me-accept-custom: "Control+MouseDPrimary";
}
@theme "onedark"

4
rofi/install.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
rm -r ~/.config/rofi
ln -s $HOME/dotfiles/rofi $HOME/.config/rofi

100
rofi/onedark.rasi Normal file
View File

@ -0,0 +1,100 @@
/*
* ROFI One Dark
*
* Based on OneDark.vim (https://github.com/joshdick/onedark.vim)
*
* Author: Benjamin Stauss
* User: me-benni
*
*/
* {
black: #000000;
red: #eb6e67;
green: #95ee8f;
yellow: #f8c456;
blue: #6eaafb;
mangenta: #d886f3;
cyan: #6cdcf7;
emphasis: #50536b;
text: #dfdfdf;
text-alt: #b2b2b2;
fg: #abb2bf;
bg: #282c34;
spacing: 0;
background-color: transparent;
font: "Knack Nerd Font 14";
text-color: @text;
}
window {
transparency: "real";
fullscreen: true;
background-color: #282c34dd;
}
mainbox {
padding: 30% 30%;
}
inputbar {
margin: 0px 0px 20px 0px;
children: [prompt, textbox-prompt-colon, entry, case-indicator];
}
prompt {
text-color: @blue;
}
textbox-prompt-colon {
expand: false;
str: ":";
text-color: @text-alt;
}
entry {
margin: 0px 10px;
}
listview {
spacing: 5px;
dynamic: true;
scrollbar: false;
}
element {
padding: 5px;
text-color: @text-alt;
highlight: bold #95ee8f; /* green */
border-radius: 3px;
}
element selected {
background-color: @emphasis;
text-color: @text;
}
element urgent, element selected urgent {
text-color: @red;
}
element active, element selected active {
text-color: @purple;
}
message {
padding: 5px;
border-radius: 3px;
background-color: @emphasis;
border: 1px;
border-color: @cyan;
}
button selected {
padding: 5px;
border-radius: 3px;
background-color: @emphasis;
}

8
spectrwm/README.md Normal file
View File

@ -0,0 +1,8 @@
# Spectrwm
Próbao con [`Xephyr`](https://wiki.archlinux.org/index.php/Xephyr):
```bash
Xephyr -br -ac -noreset -screen 1280x720 :1 &
DISPLAY=:1 spectrwm
```

19
spectrwm/autostart.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# Spectrwm autostart script
setxkbmap es intl
setxkbmap -option caps:escape # mapea caps a escape
#setxkbmap -option # restaura o mapeo anterior - recordatorio
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
nitrogen --restore; sleep 1; compton -b &
nm-applet &
xfce4-power-manager &
pamac-tray &
clipit &
#blueman-applet &
#start_conky_maia &
xautolock -time 10 -locker blurlock &
udiskie --no-automount --tray &
# gajim &

3
spectrwm/clean.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
rm -r ~/.config/spectrwm/

4
spectrwm/install.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
rm -r ~/.config/spectrwm
ln -s $HOME/dotfiles/spectrwm $HOME/.config/spectrwm

189
spectrwm/spectrwm.conf Normal file
View File

@ -0,0 +1,189 @@
# Spectrwm Config File
# https://github.com/conformal/spectrwm
workspace_limit = 9
focus_mode = default
focus_close = previous
focus_close_wrap = 1
focus_default = last
spawn_position = next
workspace_clamp = 0
warp_focus = 0
warp_pointer = 1
# Window Decorations
# color_focus = rgb:e4/6a/6a # Material-Black-Cherry
color_focus = rgb:86/6c/b4 # Material-Black-Plum
# color_focus = rgb:a9/dc/76 # Material-Black-Lime
color_unfocus = rgb:0f/10/1a
border_width = 1
disable_border = 1
region_padding = 6
tile_gap = 6
# ---------------------------------- Bar -----------------------------------
bar_action = ~/.config/polybar/launch.sh
bar_action_expand = 1
bar_enabled = 1
bar_border_width = 5
bar_border[1] = rgb:28/2a/36
bar_border_unfocus[1] = rgb:28/2a/36
bar_color[1] = rgb:28/2a/36, rgb:00/80/80
bar_color_selected[1] = rgb:00/80/80
bar_delay = 1
bar_font_color[1] = rgb:bb/c5/ff, rgb:e1/ac/ff, rgb:dd/ff/a7, rgb:ff/8b/92, rgb:ff/e5/85, rgb:89/dd/ff
bar_font_color_selected = black
bar_font = Noto-Sans-fonts:size=11 awesome-terminal-fonts:size=11 NotoMonoRegular:bold:size=14'
bar_justify = center
bar_format = +N:+I +S (+D) | +A
workspace_indicator = listcurrent,listactive,markcurrent,printnames
bar_at_bottom = 0
stack_enabled = 1
clock_enabled = 0
clock_format = %a %b %d %R %Z %Y
iconic_enabled = 0
maximize_hide_bar = 0
window_class_enabled = 1
window_instance_enabled = 1
window_name_enabled = 1
verbose_layout = 1
urgent_enabled = 1
# Dialog box size ratio when using TRANSSZ quirk; 0.3 < dialog_ratio <= 1.0
# # dialog_ratio = 0.6
#
# # Split a non-RandR dual head setup into one region per monitor
# # (non-standard driver-based multihead is not seen by spectrwm)
# # region = screen[1]:1280x1024+0+0
# # region = screen[1]:1280x1024+1280+0
# ------------------------------- Workspaces -------------------------------
# Get the icons at https://www.nerdfonts.com/cheat-sheet (you need a Nerd Font)
name = ws[1]:1
name = ws[2]:2
name = ws[3]:3
name = ws[4]:4
name = ws[5]:5
name = ws[6]:6
name = ws[7]:7
name = ws[8]:8
name = ws[9]:9
# ---------------------------------- Keys ----------------------------------
modkey = Mod4
# ---------------- Windows -----------------
# Switch between windows in current stack pane
bind[focus_next] = MOD+j
bind[focus_prev] = MOD+k
# Change window sizes
bind[master_grow] = MOD+Shift+l
bind[master_shrink] = MOD+Shift+h
# Toggle floating
bind[float_toggle] = MOD+Shift+f
# Move windows up or down in current stack
bind[swap_next] = MOD+Shift+j
bind[swap_prev] = MOD+Shift+k
# Toggle between layouts
bind[cycle_layout] = MOD+Tab
# Kill window
bind[wind_del] = MOD+w
# Focus next/prev monitor
bind[rg_next] = MOD+period
bind[rg_prev] = MOD+comma
# Restart
bind[restart] = MOD+Control+r
# Quit
bind[quit] = MOD+Control+q
# --------------- Workspaces ---------------
# Go to workspace N
bind[ws_1] = MOD+1
bind[ws_2] = MOD+2
bind[ws_3] = MOD+3
bind[ws_4] = MOD+4
bind[ws_5] = MOD+5
bind[ws_6] = MOD+6
bind[ws_7] = MOD+7
bind[ws_8] = MOD+8
bind[ws_9] = MOD+9
# Move window to workspace N
bind[mvws_1] = MOD+Shift+1
bind[mvws_2] = MOD+Shift+2
bind[mvws_3] = MOD+Shift+3
bind[mvws_4] = MOD+Shift+4
bind[mvws_5] = MOD+Shift+5
bind[mvws_6] = MOD+Shift+6
bind[mvws_7] = MOD+Shift+7
bind[mvws_8] = MOD+Shift+8
bind[mvws_9] = MOD+Shift+9
# Send workspace to next / prev screen
# bind[rg_move_next] = MOD+Control+j
# bind[rg_move_prev] = MOD+Control+k
# ------------------ Apps ------------------
# Menu
program[rofi] = rofi -show drun
bind[rofi] = MOD+space
# Nav
program[nav] = rofi -show
bind[nav] = MOD+Shift+space
# Terminal
program[alacritty] = alacritty
bind[alacritty] = MOD+Shift+Return
# Powermenu
program[powermenu] = ~/bin/power
bind[powermenu] = MOD+Shift+q
# Browser
program[firefox] = firefox
bind[firefox] = MOD+b
# File explorer
program[pcmanfm] = pcmanfm
bind[pcmanfm] = MOD+e
# Redshift
program[redon] = redshift -O 2400
bind[redon] = MOD+r
program[redoff] = redshift -x
bind[redoff] = MOD+Shift+r
# Screenshot
program[flameshot] = flameshot gui
bind[flameshot] = MOD+s
# ---------------- Hardware ----------------
# Volume
#program[voldown] = pactl set-sink-volume @DEFAULT_SINK@ -5%
#bind[voldown] = XF86AudioLowerVolume
#program[volup] = pactl set-sink-volume @DEFAULT_SINK@ +5%
#bind[volup] = XF86AudioRaiseVolume
#program[mute] = pactl set-sink-mute @DEFAULT_SINK@ toggle
#bind[mute] = XF86AudioMute
# Brightness
#program[brup] = brightnessctl set +10%
#bind[brup] = XF86MonBrightnessUp
#program[brdown] = brightnessctl set 10%-
#bind[brdown] = XF86MonBrightnessDown
# -------------------------------- Autorun ---------------------------------
autorun = ws[1]:~/.config/spectrwm/autostart.sh
quirk[trayer] = FLOAT + ANYWHERE + MINIMALBORDER + NOFOCUSCYCLE + NOFOCUSONMAP