gruvbox, better polybar and rofi

master
EmaMaker 2022-09-06 16:49:31 +02:00
parent 6d8bbfbe90
commit e09f3a1995
5 changed files with 383 additions and 40 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# Dotfiles
I like the warm colors of the [Gruvbox](!https://github.com/morhetz/gruvbox) theme
Wallpapers from [Wallpapers Cave](!https://wallpapercave.com/gruvbox-wallpapers)
Remember to:
- copy the sddm config files to /etc/sddm.conf.d/ and place the wallpaper in /usr/share/sddm/themes/maldives, naming it background.jpg
- install rofi themes from [github](!https://github.com/adi1090x/rofi) and then copy my modified dotfiles there in $HOME/.config/rofi
- Change colors and styles to rofi themes:
This theme should also be compatible with my Thinkpad Yoga 370, some polybar modules are there to be used while in touchscreen mode, but they also have a keyboard shortcut define in i3 config. For polybar, remember to install [fontawesome](!https://fontawesome.com) (`ttf-font-awesome` package if on ArchLinux)

View File

@ -8,7 +8,6 @@ exec_always /home/emamaker/.screenlayout/layout.sh
set $screen2 HDMI-0
set $screen1 DisplayPort-0
######### Basic I3 Behaviour Config #########
# keyboard layout
exec --no-startup-id setxkbmap -layout it
@ -32,17 +31,17 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec prime-run alacritty
bindsym $mod+Shift Return exec alacritty
bindsym $mod+Return exec alacritty
bindsym $mod+Shift+Return prime-run exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# change focus
#bindsym $mod+a focus left
#bindsym $mod+s focus down
#bindsym $mod+w focus up
#bindsym $mod+d focus right
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
@ -51,10 +50,10 @@ bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+ograve move right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
@ -63,8 +62,7 @@ bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
@ -106,10 +104,10 @@ mode "resize" {
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym h resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym ograve resize grow width 10 px or 10 ppt
bindsym j resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
@ -133,15 +131,6 @@ default_orientation vertical
exec_always --no-startup-id i3altlayout
bindsym --release Mod1+w exec --no-startup-id xdotool key --clearmodifiers Up
bindsym --release Mod1+a exec --no-startup-id xdotool key --clearmodifiers Left
bindsym --release Mod1+s exec --no-startup-id xdotool key --clearmodifiers Down
bindsym --release Mod1+d exec --no-startup-id xdotool key --clearmodifiers Right
# bindsym --release Mod1+c exec --no-startup-id xdotool key --clearmodifiers Return
bindsym --release Mod1+z exec --no-startup-id xdotool key --clearmodifiers XF86Back
bindsym --release Mod1+x exec --no-startup-id xdotool key --clearmodifiers XF86Forward
bindsym Mod1+Tab workspace back_and_forth
bindsym Shift+F2 exec i3-input -F 'rename workspace to "%s"' -P 'New name for this workspace: '
@ -149,8 +138,6 @@ bindsym Shift+F2 exec i3-input -F 'rename workspace to "%s"' -P 'New name for th
# gaps
gaps inner 10
# smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
@ -210,25 +197,25 @@ exec_always picom --config $HOME/.config/picom/picom.conf
# Applets / System-tray
exec --no-startup-id nm-applet
exec --no-startup-id volctl
# redshift
#exec --no-startup-id volctl
# wallpaper
set $bg "/home/emamaker/Pictures/Wallpapers/material.jpg"
set $bg "/home/emamaker/Pictures/Wallpapers/wp11058332-gruvbox-wallpapers.png"
exec_always --no-startup-id feh --bg-fill $bg;
#i3 expo
#bindsym $mod+Tab exec --no-startup-id "killall -s SIGUSR1 i3expod.py"
#rofi
#running with prime so that applications launched from rofi use the dedicated gpu
bindsym $mod+e exec --no-startup-id prime-run rofi -show drun -show-icons
bindsym Mod1+e exec --no-startup-id rofi -show drun -show-icons
bindsym $mod+e exec --no-startup-id $HOME/.config/rofi/launchers/type-1/launcher.sh
bindsym Mod1+e exec --no-startup-id prime-run $HOME/.config/rofi/launchers/type-1/launcher.sh
# rofi power-menu
bindsym $mod+p exec --no-startup-id $HOME/.config/rofi/powermenu/type-1/powermenu.sh
bindsym $mod+x exec --no-startup-id $HOME/.config/rofi/applets/bin/screenshot.sh
bindsym $mod+o exec --no-startup-id $HOME/.config/rofi/applets/bin/volume.sh
bindsym $mod+i exec --no-startup-id $HOME/.config/rofi/applets/bin/brightness.sh
bindsym $mod+u exec --no-startup-id $HOME/.config/rofi/applets/bin/battery.sh
#scratchpad
bindsym $mod+minus move scratchpad
bindsym $mod+Shift+minus exec --no-startup-id rofi -show window -show-icons
############### workspaces mapping ###############
# Define names for default workspaces for which we configure key bindings later on.
@ -328,9 +315,6 @@ workspace $ws20 output $screen2
set $i3_resurrect /home/emamaker/.local/bin/i3-resurrect
exec --no-startup-id i3_resurrect restore -w $ws10; sleep 1; $i3_resurrect restore -w $ws20
#exec_always /home/emamaker/.config/i3/restore.sh
# Save workspace mode.
mode "save" {
@ -400,3 +384,9 @@ bindsym $mod+n mode "restore"
exec /usr/lib/polkit-1/polkitd --no-debug
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
for_window [class="Viewnior"] floating enable
# assign to workspaces
assign [class="TelegramDesktop"] $ws10
assign [class="Whatsapp-for-linux"] $ws10
assign [class="UXTerm"] $ws20

203
polybar/config.ini Normal file
View File

@ -0,0 +1,203 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #282A2E
background-alt = #373B41
foreground = #C5C8C6
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
[bar/example]
monitor = ${env:MONITOR:}
width = 100%
height = 24pt
radius = 6
; dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 4pt
border-color = #00000000
padding-left = 2
padding-right =2
module-margin = 2
separator = |
separator-foreground = ${colors.disabled}
font-0 = fixed:pixelsize=10;1
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-2 = siji:pixelsize=10;1
font-3 = FontAwesome5Free:style=Solid:pixelsize=18:antialias=false;3
font-4 = FontAwesome5Brands:style=Solid:pixelsize=18:antialias=false;3
modules-left = i3
modules-center = date
modules-right = filesystem wlan eth memory cpu screenshot volume brightness launcher powermenu
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
; Only show workspaces on the same output as the bar
pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 2
#visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
; Separator in between workspaces
; label-separator = |
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %used:2%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date-alt = %H:%M
date = %Y-%m-%d - %H:%M
label = %date%
label-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini
[module/launcher]
type = custom/text
content =
content-background = black
content-foreground = green
click-left = ~/.config/rofi/launchers/type-1/launcher.sh
click-right = launcher_t1
;; Power Menu Module
[module/powermenu]
type = custom/text
content =
content-background = black
content-foreground = red
click-left = ~/.config/rofi/powermenu/type-1/powermenu.sh
click-right = powermenu_t1
;; Volume Menu Module
[module/volume]
type = custom/text
content =
content-background = black
content-foreground = red
click-left = ~/.config/rofi/applets/bin/volume.sh
click-right = volume_t1
;; Brightness Menu Module
[module/brightness]
type = custom/text
content =
content-background = black
content-foreground = red
click-left = ~/.config/rofi/applets/bin/brightness.sh
click-right = volume_t1
;; Screenshot Menu Module
[module/screenshot]
type = custom/text
content =
content-background = black
content-foreground = red
click-left = ~/.config/rofi/applets/bin/screenshot.sh
click-right = volume_t1

135
sddm/default.conf Normal file
View File

@ -0,0 +1,135 @@
[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false
# Name of session file for autologin session (if empty try last logged in)
Session=
# Username for autologin session
User=
[General]
# Halt command
HaltCommand=/usr/bin/systemctl poweroff
# Input method module
InputMethod=
# Comma-separated list of Linux namespaces for user session to enter
Namespaces=
# Initial NumLock state. Can be on, off or none.
# If property is set to none, numlock won't be changed
# NOTE: Currently ignored if autologin is enabled.
Numlock=none
# Reboot command
RebootCommand=/usr/bin/systemctl reboot
[Theme]
# Current theme name
Current=maldives
# Cursor theme used in the greeter
CursorTheme=
# Number of users to use as threshold
# above which avatars are disabled
# unless explicitly enabled with EnableAvatars
DisableAvatarsThreshold=7
# Enable display of custom user avatars
EnableAvatars=true
# Global directory for user avatars
# The files should be named <username>.face.icon
FacesDir=/usr/share/sddm/faces
# Font used in the greeter
Font=
# Theme directory path
ThemeDir=/usr/share/sddm/themes
[Users]
# Default $PATH for logged in users
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
# Comma-separated list of shells.
# Users with these shells as their default won't be listed
HideShells=
# Comma-separated list of users that should not be listed
HideUsers=
# Maximum user id for displayed users
MaximumUid=60513
# Minimum user id for displayed users
MinimumUid=1000
# Remember the session of the last successfully logged in user
RememberLastSession=true
# Remember the last successfully logged in user
RememberLastUser=true
# When logging in as the same user twice, restore the original session, rather than create a new one
ReuseSession=true
[Wayland]
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/wayland-session
# Directory containing available Wayland sessions
SessionDir=/usr/share/wayland-sessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/wayland-session.log
[X11]
# Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup
# Path to a script to execute when stopping the display server
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false
# The lowest virtual terminal number that will be used.
MinimumVT=1
# Arguments passed to the X server invocation
ServerArguments=-nolisten tcp
# Path to X server binary
ServerPath=/usr/bin/X
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/Xsession
# Directory containing available X sessions
SessionDir=/usr/share/xsessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/xorg-session.log
# Path to the Xauthority file
UserAuthFile=.Xauthority
# Path to xauth binary
XauthPath=/usr/bin/xauth
# Path to Xephyr binary
XephyrPath=/usr/bin/Xephyr

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB