Automated Theme generation using pywal

This commit is contained in:
2025-08-15 14:38:18 +05:30
parent 1885d1d8df
commit 5b4a997676

539
setup
View File

@@ -196,8 +196,8 @@ sed -n '33,81p;82q' ~/arch_install3.sh | cut -c2- > ~/.bashrc
#export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
#export PATH=~/.local/bin:~/.local/scripts:$PATH
#export EDITOR=nvim
#export TERMINAL=st
#export TERM='xterm-256color'
#export TERMINAL=alacritty
#export RANGER_LOAD_DEFAULT_RC=FALSE
#
#
##Shortcuts
@@ -233,8 +233,8 @@ sed -n '103,104p;105q' ~/arch_install3.sh | cut -c2- > ~/.config/hypr/hyprpaper.
#######################
#
#
#preload = $HOME/Pictures/Wallpapers/b-001.jpg
#wallpaper = , $HOME/Pictures/Wallpapers/b-001.jpg
#preload =
#wallpaper =
#
#
@@ -325,50 +325,50 @@ sed -n '114,429p;430q' ~/arch_install3.sh | cut -c2- > ~/.config/hypr/hyprland.c
## Refer to https://wiki.hyprland.org/Configuring/Variables/
#
## https://wiki.hyprland.org/Configuring/Variables/#general
#general {
# gaps_in = 3
# gaps_out = 3
#
# border_size = 2
#source = ~/.cache/wal/hyprland-looknfeel.conf
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
# col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
# col.inactive_border = rgba(595959aa)
#
# # Set to true enable resizing windows by clicking and dragging on borders and gaps
# resize_on_border = false
#
# # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
# allow_tearing = true
#
# layout = master
#}
#
## https://wiki.hyprland.org/Configuring/Variables/#decoration
#decoration {
# rounding = 0
# rounding_power = 2
#
# # Change transparency of focused and unfocused windows
# active_opacity = 1.0
# inactive_opacity = 1.0
#
# shadow {
# enabled = true
# range = 4
# render_power = 3
# color = rgba(1a1a1aee)
# }
#
# # https://wiki.hyprland.org/Configuring/Variables/#blur
# blur {
# enabled = true
# size = 3
# passes = 1
#
# vibrancy = 0.1696
# }
#}
#
## https://wiki.hyprland.org/Configuring/Variables/#animations
#animations {
@@ -571,7 +571,7 @@ sed -n '438,489p;490q' ~/arch_install3.sh | cut -c2- > ~/.config/nvim/init.vim
#syntax enable
#
#filetype plugin on
#
#set notermguicolors
#set nocompatible
#set noerrorbells
#set tabstop=4 softtabstop=4
@@ -621,12 +621,404 @@ sed -n '438,489p;490q' ~/arch_install3.sh | cut -c2- > ~/.config/nvim/init.vim
#set laststatus=2
#
#######################
########WAYBAR#########
#######################
mkdir -p ~/.config/waybar
sed -n '498,591p;592q' ~/arch_install3.sh | cut -c2- > ~/.config/waybar/config.jsonc
#// -*- mode: jsonc -*-
#{
# // "layer": "top", // Waybar at top layer
# // "position": "bottom", // Waybar position (top|bottom|left|right)
# "height": 30, // Waybar height (to be removed for auto height)
# // "width": 1280, // Waybar width
# "spacing": 4, // Gaps between modules (4px)
# // Choose the order of the modules
# "modules-left": [
# "hyprland/workspaces",
# ],
# "modules-center": [
# "hyprland/window"
# ],
# "modules-right": [
# "tray",
# "pulseaudio",
# "network",
# "cpu",
# "memory",
# "battery",
# "battery#bat2",
# "clock",
# "power-profiles-daemon"
# ],
# "tray": {
# "spacing": 10,
# },
# "clock": {
# "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
# "format-alt": "{:%Y-%m-%d}"
# },
# "cpu": {
# "format": "{usage}% ",
# "tooltip": false,
# "on-click": "alacritty -e htop"
# },
# "memory": {
# "format": "{}% ",
# "on-click": "alacritty -e htop -s PERCENT_MEM"
# },
# "battery": {
# "states": {
# "warning": 30,
# "critical": 15
# },
# "format": "{capacity}% {icon}",
# "format-full": "{capacity}% {icon}",
# "format-charging": "{capacity}% ",
# "format-plugged": "{capacity}% ",
# "format-alt": "{time} {icon}",
# "format-icons": ["", "", "", "", ""]
# },
# "battery#bat2": {
# "bat": "BAT2"
# },
# "power-profiles-daemon": {
# "format": "{icon}",
# "tooltip-format": "Power profile: {profile}\nDriver: {driver}",
# "tooltip": true,
# "format-icons": {
# "default": "",
# "performance": "",
# "balanced": "",
# "power-saver": ""
# }
# },
# "network": {
# "format-wifi": "{essid} ({signalStrength}%) ",
# "format-ethernet": "{ipaddr}/{cidr} ",
# "tooltip-format": "{ifname} via {gwaddr} ",
# "format-linked": "{ifname} (No IP) ",
# "format-disconnected": "Disconnected ⚠",
# "on-click": "alacritty -e nmtui"
# },
# "pulseaudio": {
# "format": "{volume}% {icon} {format_source}",
# "format-bluetooth": "{volume}% {icon} {format_source}",
# "format-bluetooth-muted": " {icon} {format_source}",
# "format-muted": " {format_source}",
# "format-source": "{volume}% ",
# "format-source-muted": "",
# "format-icons": {
# "headphone": "",
# "hands-free": "",
# "headset": "",
# "phone": "",
# "portable": "",
# "car": "",
# "default": ["", "", ""]
# },
# "on-click": "pavucontrol"
# },
#}
#######################
#####PYWALTEMPLATE#####
#######################
mkdir -p ~/.config/wal/templates
sed -n '602,646p;647q' ~/arch_install3.sh | cut -c2- > ~/.config/wal/templates/dmenu.rasi
#/**
# * ROFI Color theme
# * User: Qball
# * Copyright: Dave Davenport
# */
#
#* {{
# background-color: {color11};
# border-color: {color10};
# text-color: {color0};
# font: "Terminess Nerd Font 12";
#}}
#window {{
# anchor: south;
# location: south;
# width: 100%;
# padding: 2px;
# children: [ horibox ];
#}}
#horibox {{
# orientation: horizontal;
# children: [ prompt, entry, listview ];
#}}
#listview {{
# layout: horizontal;
# lines: 100;
#}}
#entry {{
# expand: false;
# width: 10em;
# background-color: {color12};
# margin: 2px 2px;
#}}
#element {{
# padding: 0px 2px;
# border: 2px;
#}}
#element selected {{
# background-color: {color10};
#}}
#
#element-text, element-icon {{
# background-color: inherit;
# text-color: inherit;
#}}
sed -n '650,693p;694q' ~/arch_install3.sh | cut -c2- > ~/.config/wal/templates/hyprland-looknfeel.conf
#general {{
# gaps_in = 3
# gaps_out = 3
#
# border_size = 2
#
# # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
# col.active_border = rgba({color9.strip}ff)
# col.inactive_border = rgba({color10.strip}aa)
#
# # Set to true enable resizing windows by clicking and dragging on borders and gaps
# resize_on_border = false
#
# # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
# allow_tearing = true
#
# layout = master
#}}
#
## https://wiki.hyprland.org/Configuring/Variables/#decoration
#decoration {{
# rounding = 0
# rounding_power = 2
#
# # Change transparency of focused and unfocused windows
# active_opacity = 1.0
# inactive_opacity = 1.0
#
# shadow {{
# enabled = true
# range = 4
# render_power = 3
# color = rgba(1a1a1aee)
# }}
#
# # https://wiki.hyprland.org/Configuring/Variables/#blur
# blur {{
# enabled = true
# size = 3
# passes = 1
#
# vibrancy = 0.1696
# }}
#}}
sed -n '697,880p;881q' ~/arch_install3.sh | cut -c2- > ~/.config/wal/templates/waybar-style.css
#* {{
# /* `otf-font-awesome` is required to be installed for icons */
# font-family: Terminess Nerd Font, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
# font-size: 13px;
#}}
#
#window#waybar {{
# background-color: {color14.rgba};
# border-bottom: 3px solid {color9.rgba};
# border-top: 3px solid {color9.rgba};
# color: {color0};
# transition-property: background-color;
# transition-duration: .5s;
# box-shadow: inset 0 3px transparent;
#}}
#
#window#waybar.hidden {{
# opacity: 0.2;
#}}
#
#button {{
# /* Use box-shadow instead of border so the text isn't offset */
# /* Avoid rounded borders under each button name */
# border: none;
# border-radius: 0;
#}}
#
#/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#button:hover {{
# background: inherit;
# text-shadow: inherit;
#}}
#
#/* you can set a style on hover for any module like this */
##cpu:hover,#network:hover,#power-profiles-daemon:hover,#clock:hover,#memory:hover,#pulseaudio:hover {{
# background-color: {color12};
#}}
#
##workspaces button {{
# padding: 0 5px;
# margin: 3 0px;
# background-color: {color11};
# color: {color0};
#}}
#
##workspaces button:hover {{
# background: {color12.rgba};
#}}
#
##workspaces button.active {{
# background-color: {color10};
#}}
#
##workspaces button.urgent {{
# background-color: #eb4d4b;
#}}
#
##clock,
##battery,
##cpu,
##memory,
##network,
##pulseaudio,
##tray,
##power-profiles-daemon {{
# padding: 0 10px;
# margin: 3 0px;
# color: #ffffff;
#}}
#
##window,
##workspaces {{
# margin: 0 4px;
#}}
#
#/* If workspaces is the leftmost module, omit left margin */
#.modules-left > widget:first-child > #workspaces {{
# margin-left: 0;
#}}
#
#/* If workspaces is the rightmost module, omit right margin */
#.modules-right > widget:last-child > #workspaces {{
# margin-right: 0;
#}}
#
##clock {{
# background-color: {color11};
# color: {color0};
#}}
#
##battery {{
# background-color: {color11};
# color: {color0};
#}}
#
##battery.charging, #battery.plugged {{
# color: #ffffff;
# background-color: #26A65B;
#}}
#
#@keyframes blink {{
# to {{
# background-color: #ffffff;
# color: #000000;
# }}
#}}
#
#/* Using steps() instead of linear as a timing function to limit cpu usage */
##battery.critical:not(.charging) {{
# background-color: #f53c3c;
# color: #ffffff;
# animation-name: blink;
# animation-duration: 0.5s;
# animation-timing-function: steps(12);
# animation-iteration-count: infinite;
# animation-direction: alternate;
#}}
#
##power-profiles-daemon {{
# padding-right: 15px;
#}}
#
##power-profiles-daemon.performance {{
# background-color: #f53c3c;
# color: #ffffff;
#}}
#
##power-profiles-daemon.balanced {{
# background-color: #2980b9;
# color: #ffffff;
#}}
#
##power-profiles-daemon.power-saver {{
# background-color: #2ecc71;
# color: #000000;
#}}
#
#label:focus {{
# background-color: {color13};
# color: {color0};
#}}
#
##cpu {{
# background-color: {color11};
# color: {color0};
#}}
#
##memory {{
# background-color: {color11};
# color: {color0};
#}}
#
##network {{
# background-color: {color11};
# color: {color0};
#}}
#
##network.disconnected {{
# background-color: {color15};
# color: {color0};
#}}
#
##pulseaudio {{
# background-color: {color11};
# color: {color0};
#}}
#
##pulseaudio.muted {{
# background-color: {color15};
# color: {color0};
#}}
#
##tray {{
# background-color: {color11};
#}}
#
##tray > .passive {{
# -gtk-icon-effect: dim;
#}}
#
##tray > .needs-attention {{
# -gtk-icon-effect: highlight;
# background-color: #eb4d4b;
#}}
#######################
#######SCRIPTS#########
#######################
mkdir -p ~/.local/scripts
sed -n '498,518p;519q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/mountlocalvol
sed -n '890,910p;911q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/mountlocalvol
##!/bin/sh
#
@@ -650,7 +1042,7 @@ sed -n '498,518p;519q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/mountloc
#sudo systemctl daemon-reload
#sudo mount -a
sed -n '522,546p;547q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/mountsmbvol
sed -n '914,938p;939q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/mountsmbvol
##!/bin/sh
#
@@ -678,7 +1070,7 @@ sed -n '522,546p;547q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/mountsmb
#sudo systemctl daemon-reload
#sudo mount -a
sed -n '550,562p;563q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/disableipv6
sed -n '942,954p;955q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/disableipv6
##!/bin/sh
#
@@ -694,13 +1086,13 @@ sed -n '550,562p;563q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/disablei
#
#echo "Add -->sudo systemctl restart systemd-sysctl.service &<-- to your init script of liking to automatically unbind the ipv6 address assigned to your ethernet controller"
sed -n '566,568p;569q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/fuzzyopen
sed -n '958,960p;961q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/fuzzyopen
##! /bin/sh
#
#find ~/ | fzf | xargs -I{} xdg-open {}
sed -n '572,581p;582q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/updatewp
sed -n '964,973p;974q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/randomwp
##!/usr/bin/env bash
#
@@ -713,24 +1105,19 @@ sed -n '572,581p;582q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/updatewp
## Apply the selected wallpaper
#hyprctl hyprpaper reload ,"$WALLPAPER"
sudo chmod +x ~/.local/scripts/mountlocalvol
sudo chmod +x ~/.local/scripts/mountsmbvol
sudo chmod +x ~/.local/scripts/disableipv6
sudo chmod +x ~/.local/scripts/fuzzyopen
sudo chmod +x ~/.local/scripts/updatewp
sed -n '977,987p;988q' ~/arch_install3.sh | cut -c2- > ~/.local/scripts/updatetheme
#######################
########WAYBAR#########
#######################
mkdir -p ~/.config/waybar
cp /etc/xdg/waybar/* ~/.config/waybar/
sed -i 's/workspaces button.focused/workspaces button.active/' ~/.config/waybar/style.css
sed -i 's/font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;/font-family: Terminess Nerd Font, FontAwesome, Roboto, Helvetica, Arial, sans-serif;/' ~/.config/waybar/style.css
sed -i 's/sway/hyprland/' ~/.config/waybar/config.jsonc
sed -i '20d' ~/.config/waybar/config.jsonc
sed -i 's/"tray",/"tray"/' ~/.config/waybar/config.jsonc
sed -i '33d' ~/.config/waybar/config.jsonc
##!/bin/sh
#
#wallpaper=$(sxiv -frto ~/Pictures/Wallpapers/)
#wal --cols16 lighten -n --contrast 1.5 -i "$wallpaper"
#echo "preload = $wallpaper" > ~/.config/hypr/hyprpaper.conf
#echo "wallpaper = , $wallpaper" >> ~/.config/hypr/hyprpaper.conf
#hyprctl hyprpaper reload ,"$wallpaper"
#cp ~/.cache/wal/dmenu.rasi ~/.config/rofi/dmenu.rasi
#cp ~/.cache/wal/waybar-style.css ~/.config/waybar/style.css
#
#killall -SIGUSR2 waybar
#######################
@@ -738,21 +1125,20 @@ sed -i '33d' ~/.config/waybar/config.jsonc
#######################
mkdir -p ~/.config/rofi
echo '@theme "dmenu.rasi"' > ~/.config/rofi/config.rasi
cp /usr/share/rofi/themes/dmenu.rasi ~/.config/rofi/dmenu.rasi
sed -i 's/Times New Roman 12/Terminess Nerd Font 14/' ~/.config/rofi/dmenu.rasi
sed -i 's/north/south/g' ~/.config/rofi/dmenu.rasi
#######################
######ALACRITTY########
#######################
mkdir -p ~/.config/alacritty
echo '[font]' > ~/.config/alacritty/alacritty.toml
echo 'size = 8.0' >> ~/.config/alacritty/alacritty.toml
echo 'size = 12.0' >> ~/.config/alacritty/alacritty.toml
echo '[font.normal]' >> ~/.config/alacritty/alacritty.toml
echo 'family = "Terminess Nerd Font"' >> ~/.config/alacritty/alacritty.toml
echo 'style = "Regular"' >> ~/.config/alacritty/alacritty.toml
echo '[window]' >> ~/.config/alacritty/alacritty.toml
echo 'opacity = 0.6' >> ~/.config/alacritty/alacritty.toml
echo 'opacity = 0.8' >> ~/.config/alacritty/alacritty.toml
echo '[general]' >> ~/.config/alacritty/alacritty.toml
echo 'import = ["~/.cache/wal/colors-alacritty.toml",]' >> ~/.config/alacritty/alacritty.toml
#######################
######FLAMESHOT########
@@ -762,12 +1148,21 @@ echo '[General]' > ~/.config/flameshot/flameshot.ini
echo 'contrastOpacity=188' >> ~/.config/flameshot/flameshot.ini
echo 'useGrimAdapter=true' >> ~/.config/flameshot/flameshot.ini
# Making all of the generated scripts executable
sudo chmod +x ~/.local/scripts/mountlocalvol
sudo chmod +x ~/.local/scripts/mountsmbvol
sudo chmod +x ~/.local/scripts/disableipv6
sudo chmod +x ~/.local/scripts/fuzzyopen
sudo chmod +x ~/.local/scripts/randomwp
sudo chmod +x ~/.local/scripts/updatetheme
# Downloading wallpapers
cd $HOME
mkdir -p Pictures/Wallpapers
cd Pictures/Wallpapers
for (( w=1; w<2; w++ )); do curl -LOS "https://raw.githubusercontent.com/whoisYoges/lwalpapers/PicturesOnly/wallpapers/$(printf b-%0.3d.jpg "$w")"; done
for (( w=1; w<934; w++ )); do curl -LOS "https://raw.githubusercontent.com/whoisYoges/lwalpapers/PicturesOnly/wallpapers/$(printf b-%0.3d.jpg "$w")"; done
# Installing Yay
@@ -781,6 +1176,14 @@ rm -r yay
# Installing Aur Packages
yay -Syu xpadneo-dkms
yay -Syu xpadneo-dkms python-pywal16
# Setting up Wallpaper for first use
wal --cols16 lighten -n --contrast 1.5 -i ~/Pictures/Wallpapers/b-257.jpg
echo "preload = $wallpaper" > ~/.config/hypr/hyprpaper.conf
echo "wallpaper = , $wallpaper" >> ~/.config/hypr/hyprpaper.conf
cp ~/.cache/wal/dmenu.rasi ~/.config/rofi/dmenu.rasi
cp ~/.cache/wal/waybar-style.css ~/.config/waybar/style.css
exit