buncha stuff
This commit is contained in:
16
.bashrc
16
.bashrc
@@ -92,15 +92,13 @@ alias gpe='gopass edit'
|
||||
alias v='nvim'
|
||||
alias vim='nvim'
|
||||
alias vi='nvim'
|
||||
#comment
|
||||
|
||||
# Apt aliases
|
||||
alias install='sudo apt install'
|
||||
alias update='sudo apt update'
|
||||
alias update='sudo apt upgrade'
|
||||
alias uu='sudo apt update && sudo apt upgrade'
|
||||
alias search='apt search'
|
||||
alias remove='sudo apt remove'
|
||||
# DNF
|
||||
alias dnf='sudo dnf5'
|
||||
alias din='sudo dnf5 install'
|
||||
alias dre='sudo dnf5 remove'
|
||||
alias dup='sudo dnf5 update'
|
||||
alias dse='dnf5 search'
|
||||
|
||||
# alias to show the date
|
||||
alias da='date "+%Y-%m-%d %A %T %Z"'
|
||||
@@ -128,7 +126,7 @@ alias .....='cd ../../../..'
|
||||
alias bd='cd "$OLDPWD"'
|
||||
|
||||
# ls -> exa
|
||||
alias ls='exa --icons'
|
||||
alias ls='exa'
|
||||
|
||||
# Search command line history
|
||||
alias h="history | grep "
|
||||
|
||||
18
.config/alacritty/alacritty.toml
Normal file
18
.config/alacritty/alacritty.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
import = ["/home/opal/.config/alacritty/gruvbox-material.toml"]
|
||||
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[font]
|
||||
size = 15
|
||||
|
||||
[font.normal]
|
||||
family = "Hack"
|
||||
style = "Regular"
|
||||
|
||||
[font.offset]
|
||||
x = 0
|
||||
y = 0
|
||||
|
||||
[window]
|
||||
opacity = 0.9
|
||||
@@ -1,18 +0,0 @@
|
||||
import:
|
||||
- ~/.config/alacritty/manegarm.yml
|
||||
# Env
|
||||
env:
|
||||
TERM: xterm-256color
|
||||
|
||||
# Font configuration
|
||||
font:
|
||||
normal:
|
||||
family: Hack
|
||||
style: Regular
|
||||
size: 15
|
||||
offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
window:
|
||||
opacity: 0.90
|
||||
30
.config/alacritty/gruvbox-material.toml
Normal file
30
.config/alacritty/gruvbox-material.toml
Normal file
@@ -0,0 +1,30 @@
|
||||
# Colors (Gruvbox dark)
|
||||
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
# hard contrast background = = '#1d2021'
|
||||
background = '#282828'
|
||||
# soft contrast background = = '#32302f'
|
||||
foreground = '#ebdbb2'
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#282828'
|
||||
red = '#cc241d'
|
||||
green = '#98971a'
|
||||
yellow = '#d79921'
|
||||
blue = '#458588'
|
||||
magenta = '#b16286'
|
||||
cyan = '#689d6a'
|
||||
white = '#a89984'
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#928374'
|
||||
red = '#fb4934'
|
||||
green = '#b8bb26'
|
||||
yellow = '#fabd2f'
|
||||
blue = '#83a598'
|
||||
magenta = '#d3869b'
|
||||
cyan = '#8ec07c'
|
||||
white = '#ebdbb2'
|
||||
60
.config/alacritty/manegarm.toml
Normal file
60
.config/alacritty/manegarm.toml
Normal file
@@ -0,0 +1,60 @@
|
||||
[colors.bright]
|
||||
black = "#1c1f24"
|
||||
blue = "#dbc077"
|
||||
cyan = "#dbc077"
|
||||
green = "#7cb518"
|
||||
magenta = "#d72638"
|
||||
red = "#ff7000"
|
||||
white = "#dfdfdf"
|
||||
yellow = "#ffbf00"
|
||||
|
||||
[colors.cursor]
|
||||
cursor = "CellForeground"
|
||||
text = "CellBackground"
|
||||
|
||||
[colors.footer_bar]
|
||||
background = "#1c1408"
|
||||
foreground = "#7cb518"
|
||||
|
||||
[colors.hints.end]
|
||||
background = "#1c1408"
|
||||
foreground = "#ffbf00"
|
||||
|
||||
[colors.hints.start]
|
||||
background = "#ffbf00"
|
||||
foreground = "#1c1408"
|
||||
|
||||
[colors.line_indicator]
|
||||
background = "None"
|
||||
foreground = "None"
|
||||
|
||||
[colors.normal]
|
||||
black = "#1B2229"
|
||||
blue = "#dbc077"
|
||||
cyan = "#dbc077"
|
||||
green = "#7cb518"
|
||||
magenta = "#d72638"
|
||||
red = "#ff4e00"
|
||||
white = "#dfdfdf"
|
||||
yellow = "#ffbf00"
|
||||
|
||||
[colors.primary]
|
||||
background = "#1c1408"
|
||||
bright_foreground = "#dfdfdf"
|
||||
foreground = "#7cb518"
|
||||
|
||||
[colors.search.focused_match]
|
||||
background = "#ffbf00"
|
||||
foreground = "#3f444a"
|
||||
|
||||
[colors.search.matches]
|
||||
background = "#7cb518"
|
||||
foreground = "#3f444a"
|
||||
|
||||
[colors.selection]
|
||||
background = "#3f444a"
|
||||
text = "CellForeground"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
cursor = "CellForeground"
|
||||
text = "CellBackground"
|
||||
@@ -10,7 +10,7 @@
|
||||
user-mail-address "ry.orlando@proton.me")
|
||||
|
||||
;; (setq doom-theme 'doom-dracula)
|
||||
(load-theme 'doom-manegarm t)
|
||||
(load-theme 'doom-gruvbox t)
|
||||
;;(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
|
||||
|
||||
(dolist (mode '(org-mode-hook
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
["#282c34" "#ff6c6b" "#98be65" "#ECBE7B" "#51afef" "#c678dd" "#46D9FF" "#bbc2cf"])
|
||||
'(auth-source-save-behavior nil)
|
||||
'(custom-safe-themes
|
||||
'("f053f92735d6d238461da8512b9c071a5ce3b9d972501f7a5e6682a90bf29725" "944d52450c57b7cbba08f9b3d08095eb7a5541b0ecfb3a0a9ecd4a18f3c28948" "dad40020beea412623b04507a4c185079bff4dcea20a93d8f8451acb6afc8358" "a0415d8fc6aeec455376f0cbcc1bee5f8c408295d1c2b9a1336db6947b89dd98" "a9a67b318b7417adbedaab02f05fa679973e9718d9d26075c6235b1f0db703c8" "1704976a1797342a1b4ea7a75bdbb3be1569f4619134341bd5a4c1cfb16abad4" "b5803dfb0e4b6b71f309606587dd88651efe0972a5be16ece6a958b197caeed8" default))
|
||||
'("13096a9a6e75c7330c1bc500f30a8f4407bd618431c94aeab55c9855731a95e1" "48042425e84cd92184837e01d0b4fe9f912d875c43021c3bcb7eeb51f1be5710" "c5878086e65614424a84ad5c758b07e9edcf4c513e08a1c5b1533f313d1b17f1" "10e5d4cc0f67ed5cafac0f4252093d2119ee8b8cb449e7053273453c1a1eb7cc" "ffafb0e9f63935183713b204c11d22225008559fa62133a69848835f4f4a758c" "7964b513f8a2bb14803e717e0ac0123f100fb92160dcf4a467f530868ebaae3e" "f053f92735d6d238461da8512b9c071a5ce3b9d972501f7a5e6682a90bf29725" "944d52450c57b7cbba08f9b3d08095eb7a5541b0ecfb3a0a9ecd4a18f3c28948" "dad40020beea412623b04507a4c185079bff4dcea20a93d8f8451acb6afc8358" "a0415d8fc6aeec455376f0cbcc1bee5f8c408295d1c2b9a1336db6947b89dd98" "a9a67b318b7417adbedaab02f05fa679973e9718d9d26075c6235b1f0db703c8" "1704976a1797342a1b4ea7a75bdbb3be1569f4619134341bd5a4c1cfb16abad4" "b5803dfb0e4b6b71f309606587dd88651efe0972a5be16ece6a958b197caeed8" default))
|
||||
'(exwm-floating-border-color "#191b20")
|
||||
'(fci-rule-color "#5B6268")
|
||||
'(highlight-tail-colors
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
;;pass ; password manager for nerds
|
||||
pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
rgb ; creating color strings
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
|
||||
11
.config/eww/greeter.yuck
Normal file
11
.config/eww/greeter.yuck
Normal file
@@ -0,0 +1,11 @@
|
||||
(defwidget greeter [?text name]
|
||||
(box :orientation "horizontal"
|
||||
:halign "center"
|
||||
text
|
||||
(button :onclick "notify-send 'Hello' 'Hello, ${name}'"
|
||||
"Greet")))
|
||||
|
||||
(defwindow example
|
||||
; ... values omitted
|
||||
(greeter :text "Say hello!"
|
||||
:name "Tim")
|
||||
51
.config/nvim/init.lua
Normal file
51
.config/nvim/init.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
require("config.lazy")
|
||||
|
||||
vim.opt.title = true
|
||||
vim.opt.background = 'dark'
|
||||
vim.opt.guicursor = ''
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.clipboard:append('unnamedplus')
|
||||
vim.opt.showmode = false
|
||||
vim.opt.ruler = false
|
||||
vim.opt.laststatus = 0
|
||||
vim.opt.showcmd = false
|
||||
|
||||
vim.cmd('highlight Normal ctermbg=NONE guibg=NONE')
|
||||
|
||||
-- Some basics:
|
||||
vim.api.nvim_set_keymap('n', 'c', '"_c', { noremap = true })
|
||||
vim.opt.compatible = false
|
||||
vim.cmd('filetype plugin on')
|
||||
vim.cmd('syntax on')
|
||||
vim.opt.encoding = 'utf-8'
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Enable autocompletion:
|
||||
vim.opt.wildmode = { 'longest', 'list', 'full' }
|
||||
|
||||
-- Disables automatic commenting on newline:
|
||||
vim.api.nvim_exec([[
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
]], false)
|
||||
|
||||
-- Perform dot commands over visual blocks:
|
||||
vim.api.nvim_set_keymap('v', '.', ':normal .<CR>', { noremap = true })
|
||||
|
||||
-- Goyo plugin makes text more readable when writing prose:
|
||||
vim.api.nvim_set_keymap('n', '<leader>f', ':Goyo | set bg=light | set linebreak<CR>', { noremap = true })
|
||||
|
||||
-- Spell-check set to <leader>o, 'o' for 'orthography':
|
||||
vim.api.nvim_set_keymap('n', '<leader>o', ':setlocal spell! spelllang=en_us<CR>', { noremap = true })
|
||||
|
||||
-- Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
-- Shortcutting split navigation, saving a keypress:
|
||||
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { noremap = true })
|
||||
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', { noremap = true })
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
set title
|
||||
set bg=light
|
||||
set go=a
|
||||
set mouse=a
|
||||
set nohlsearch
|
||||
set clipboard+=unnamedplus
|
||||
set noshowmode
|
||||
set noruler
|
||||
set laststatus=0
|
||||
set noshowcmd
|
||||
|
||||
" Some basics:
|
||||
nnoremap c "_c
|
||||
set nocompatible
|
||||
filetype plugin on
|
||||
syntax on
|
||||
set encoding=utf-8
|
||||
set number relativenumber
|
||||
" Enable autocompletion:
|
||||
set wildmode=longest,list,full
|
||||
" Disables automatic commenting on newline:
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
" Perform dot commands over visual blocks:
|
||||
vnoremap . :normal .<CR>
|
||||
" Goyo plugin makes text more readable when writing prose:
|
||||
map <leader>f :Goyo \| set bg=light \| set linebreak<CR>
|
||||
" Spell-check set to <leader>o, 'o' for 'orthography':
|
||||
map <leader>o :setlocal spell! spelllang=en_us<CR>
|
||||
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
|
||||
set splitbelow splitright
|
||||
|
||||
" Shortcutting split navigation, saving a keypress:
|
||||
map <C-h> <C-w>h
|
||||
map <C-j> <C-w>j
|
||||
map <C-k> <C-w>k
|
||||
map <C-l> <C-w>l
|
||||
51
.config/nvim/lua/config/lazy.lua
Normal file
51
.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
-- add the Gruvbox plugin
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
contrast = "hard", -- can be "soft", "medium" or "hard"
|
||||
palette_overrides = {
|
||||
bright_green = "#a9b665",
|
||||
},
|
||||
overrides = {
|
||||
SignColumn = { bg = "#1e2021" },
|
||||
},
|
||||
})
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
end
|
||||
},
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
@@ -205,7 +205,7 @@ default_floating_border none
|
||||
client.focused "#38761d" "#38761d" "#ffffff" "#38761d"
|
||||
|
||||
set $opacity 0.90
|
||||
for_window [class="Emacs"] opacity $opacity
|
||||
for_window [app_id="emacs"] opacity $opacity
|
||||
for_window [app_id="strawberry"] opacity $opacity
|
||||
for_window [app_id="pcmanfm-qt"] opacity $opacity
|
||||
for_window [app_id="org.kde.polkit-kde-authentication-agent-1"] floating enable
|
||||
@@ -248,12 +248,15 @@ input type:keyboard {
|
||||
}
|
||||
|
||||
# Disable trackpad by default
|
||||
input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" {
|
||||
events disabled
|
||||
}
|
||||
#input "1739:52824:SYNA8008:00_06CB:CE58_Touchpad" {
|
||||
# events disable
|
||||
#}
|
||||
|
||||
# Set trackpoint sensitivity
|
||||
input 2:10:TPPS/2_Elan_TrackPoint pointer_accel 1.0
|
||||
input "2:10:TPPS/2_Elan_TrackPoint" {
|
||||
pointer_accel 1.0
|
||||
accel_profile "flat"
|
||||
}
|
||||
|
||||
|
||||
# Hide mouse cursor after inactivity
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": "{: %H:%M %a %B %d}",
|
||||
"format": " {:%H:%M %a %B %d}",
|
||||
"tooltip-format": "<tt><big>{calendar}</big></tt>"
|
||||
},
|
||||
"custom/music": {
|
||||
@@ -42,22 +42,22 @@
|
||||
"critical": 15
|
||||
},
|
||||
"full-at": "99",
|
||||
"format": "<span font='Font Awesome 5 Free 11'>{icon}</span> {capacity}%",
|
||||
"format-icons": ["","", "","", "", "", "", "", "", ""],
|
||||
"format-good": " {capacity}%", // An empty format will hide the module
|
||||
"format-full": " Full",
|
||||
"format-charging": "{capacity}% "
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-icons": ["","", "","", ""],
|
||||
"format-good": " {capacity}%", // An empty format will hide the module
|
||||
"format-full": " Full",
|
||||
"format-charging": " {capacity}% "
|
||||
},
|
||||
"custom/wlsunset": {
|
||||
"format": "<span size='large'>{icon}</span>",
|
||||
"format": "{icon}",
|
||||
"format-icons": [""],
|
||||
"on-click": "wlsunset -l 47.6 -L -122.3 -t 3000 -T 3100"
|
||||
},
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ifname}",
|
||||
"format-disconnected": "",
|
||||
"format-ethernet": " {ifname}",
|
||||
"format-disconnected": " ",
|
||||
"tooltip-format-wifi": "{essid}:{signalStrength}\nSpeed:{bandwidthDownBits} \n{ipaddr}",
|
||||
"on-click": "alacritty -e nmtui"
|
||||
},
|
||||
@@ -67,17 +67,17 @@
|
||||
"on-click": "pavucontrol",
|
||||
"on-scroll-down": "amixer set Master 3%-",
|
||||
"format": "",
|
||||
"format": "<span size='large'>{icon}</span> {volume}%",
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headset": "",
|
||||
"headphone": "",
|
||||
"default": ["", "", " "]
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format": "{}",
|
||||
"format": "{}",
|
||||
//"exec": "echo ; echo logout",
|
||||
"on-click": "wlogout -p layer-shell",
|
||||
"interval" : 86400, // once every day
|
||||
|
||||
128
.config/waybar/hyprland-config
Normal file
128
.config/waybar/hyprland-config
Normal file
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 44,
|
||||
"modules-left": ["hyprland/workspaces"],
|
||||
"modules-center": ["clock","custom/padd","custom/weather"],
|
||||
"modules-right": ["custom/l_end","custom/music","custom/padd","pulseaudio","custom/padd","network", "custom/padd","battery","custom/padd","custom/wlsunset","custom/padd", "tray","custom/power","custom/padd"],
|
||||
"hyprland/workspaces": {
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
"format": "<span size='large'>{icon}</span>",
|
||||
},
|
||||
|
||||
"sway/mode": {
|
||||
"format": "<span style='italic'>{}</span>"
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 18,
|
||||
"spacing": 8
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": " {:%H:%M %a %B %d}",
|
||||
"tooltip-format": "<tt><big>{calendar}</big></tt>"
|
||||
},
|
||||
"custom/music": {
|
||||
"exec": "~/.config/waybar/scripts/music.py",
|
||||
"interval": 3,
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/weather": {
|
||||
"exec": "~/.config/waybar/scripts/weather.py",
|
||||
"interval": 600,
|
||||
"tooltip": false
|
||||
},
|
||||
"battery": {
|
||||
"interval": 15,
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"full-at": "99",
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-icons": ["","", "","", ""],
|
||||
"format-good": " {capacity}%", // An empty format will hide the module
|
||||
"format-full": " Full",
|
||||
"format-charging": " {capacity}% "
|
||||
},
|
||||
"custom/wlsunset": {
|
||||
"format": "{icon}",
|
||||
"format-icons": [""],
|
||||
"on-click": "wlsunset -l 47.6 -L -122.3 -t 3000 -T 3100"
|
||||
},
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ifname}",
|
||||
"format-disconnected": " ",
|
||||
"tooltip-format-wifi": "{essid}:{signalStrength}\nSpeed:{bandwidthDownBits} \n{ipaddr}",
|
||||
"on-click": "alacritty -e nmtui"
|
||||
},
|
||||
"pulseaudio": {
|
||||
"scroll-step": 1,
|
||||
"on-scroll-up": "amixer set Master 3%+",
|
||||
"on-click": "pavucontrol",
|
||||
"on-scroll-down": "amixer set Master 3%-",
|
||||
"format": "",
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": "",
|
||||
"format-icons": {
|
||||
"headset": "",
|
||||
"headphone": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
},
|
||||
|
||||
"custom/power": {
|
||||
"format": "{}",
|
||||
//"exec": "echo ; echo logout",
|
||||
"on-click": "wlogout -p layer-shell",
|
||||
"interval" : 86400, // once every day
|
||||
"tooltip": true
|
||||
},
|
||||
|
||||
"custom/l_end": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/r_end": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/sl_end": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/sr_end": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/rl_end": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/rr_end": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
"custom/padd": {
|
||||
"format": " ",
|
||||
"interval" : "once",
|
||||
"tooltip": false
|
||||
}
|
||||
}
|
||||
@@ -8,27 +8,26 @@ API_KEY = "99631af2d6db903d1f689c7d2cb13764"
|
||||
CITY_ID = "5809844"
|
||||
UNITS = "metric"
|
||||
|
||||
|
||||
def celsius_to_fahrenheit(celsius):
|
||||
return (celsius * 9 / 5) + 32
|
||||
|
||||
|
||||
def get_weather_icon(description):
|
||||
icons = {
|
||||
"clear sky": "",
|
||||
"few clouds": "",
|
||||
"scattered clouds": "",
|
||||
"broken clouds": "",
|
||||
"overcast clouds": "",
|
||||
"shower rain": "",
|
||||
"light rain": "",
|
||||
"rain": "",
|
||||
"moderate rain": "",
|
||||
"thunderstorm": "",
|
||||
"snow": "",
|
||||
"mist": "",
|
||||
"haze": "",
|
||||
"smoke": ""
|
||||
"clear sky": "☀️",
|
||||
"few clouds": "🌤️",
|
||||
"scattered clouds": "🌥️",
|
||||
"broken clouds": "☁️",
|
||||
"overcast clouds": "☁️",
|
||||
"shower rain": "🌦️",
|
||||
"light rain": "🌧️",
|
||||
"rain": "🌧️",
|
||||
"moderate rain": "🌧️",
|
||||
"thunderstorm": "⛈️",
|
||||
"snow": "❄️",
|
||||
"mist": "🌫️",
|
||||
"haze": "🌫️",
|
||||
"smoke": "🌫️",
|
||||
}
|
||||
return icons.get(description, "❓")
|
||||
|
||||
@@ -39,6 +38,7 @@ try:
|
||||
)
|
||||
response.raise_for_status()
|
||||
weather_data = response.json()
|
||||
#print(weather_data)
|
||||
|
||||
weather_desc = weather_data["weather"][0]["description"]
|
||||
#print(weather_desc)
|
||||
|
||||
43
.config/waybar/scripts/weather2.py
Executable file
43
.config/waybar/scripts/weather2.py
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
def fahrenheit_to_celsius(fahrenheit):
|
||||
return (fahrenheit - 32) * 5 / 9
|
||||
|
||||
|
||||
def get_weather():
|
||||
try:
|
||||
response = requests.get("http://wttr.in/sea?format=1")
|
||||
response.raise_for_status()
|
||||
return response.text.strip()
|
||||
except requests.exceptions.RequestException as e:
|
||||
return f"Error: {e}"
|
||||
|
||||
|
||||
def format_weather(weather):
|
||||
try:
|
||||
# print(f"Raw weather data: '{weather}'") # Debug print
|
||||
match = re.match(r"(\D+)\s+(\+?[\d.]+)°F", weather)
|
||||
if not match:
|
||||
return "Error: Unexpected weather format"
|
||||
|
||||
icon = match.group(1).strip()
|
||||
temp_f = round(float(match.group(2)))
|
||||
temp_c = round(fahrenheit_to_celsius(temp_f))
|
||||
return f"{icon} {temp_c}°C / {temp_f}°F"
|
||||
except Exception as e:
|
||||
return f"Error formatting weather data: {e}"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
weather = get_weather()
|
||||
if weather.startswith("Error"):
|
||||
print(weather)
|
||||
sys.exit(1)
|
||||
else:
|
||||
formatted_weather = format_weather(weather)
|
||||
print(formatted_weather)
|
||||
@@ -2,7 +2,7 @@
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Iosevka, FontAwesome;
|
||||
font-family: "Iosevka Fixed", "Font Awesome 6 Free";
|
||||
font-size: 15px;
|
||||
min-height: 0;
|
||||
color: #bebebe;
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
.config/borgmatic/config.yaml
|
||||
.config/beets/beets-library.db
|
||||
*.swp
|
||||
lazy-lock.json
|
||||
|
||||
2
archive/hyprpaper/hyprpaper.conf
Normal file
2
archive/hyprpaper/hyprpaper.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
preload = ~/.config/wallpapers/exterminator.png
|
||||
wallpaper = ,~/.config/wallpapers/exterminator.png
|
||||
Reference in New Issue
Block a user