This commit is contained in:
Tobias Manske 2024-02-27 02:25:37 +01:00
parent 67a44a5ff8
commit 6d92c68425
Signed by: tobias
GPG Key ID: 9164B527694A0709
14 changed files with 265 additions and 89 deletions

View File

@ -1,20 +1,9 @@
URxvt*depth: 32
URxvt.foreground: #d0d1d2
URxvt.background: [90]#000000
URxvt.cursorColor: #d0d1d2
Xcursor.size: 16
Xft.dpi: 164
! no scrollbar
URxvt.scrollBar: false
! clipboard
URxvt.keysym.Shift-Control-V: perl:clipboard:paste
URxvt.iso14755: False
URxvt.perl-ext-common: default,clipboard
! font
URxvt.font: xft:DejaVu Sans Mono:size=10,xft:Source Code Pro for Powerline:size=10
URxvt.boldFont: xft:DejaVu Sans Mono:size=10,xft:Source Code Pro for Powerline:bold:size=10
! rofi
rofi.case-sensitive: false
! These might also be useful depending on your monitor and personal preference:
Xft.autohint: 1
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

View File

@ -18,19 +18,22 @@ exec-once = battery_status &
exec-once = swayidle &
exec-once = xiccd &
exec-once = dunst &
exec-once = ibus-daemon -drxR &
exec-once = /usr/lib/ibus/ibus-ui-gtk3 --enable-wayland-im --exec-daemon --daemon-args "--xim --panel disable"
exec-once = sleep 3 && kanshi &
exec-once = bash ~/.config/hypr/scripts/launch_waybar.sh &
exec-once = easyeffects --gapplication-service &
exec-once = lxqt-policykit-agent &
exec-once = thunar --daemon &
exec-once = hyprpaper &
# Software
exec-once = copyq --start-server
exec-once = kdeconnect-indicator &
exec-once = element-desktop &
exec-once = keepassxc &
exec-once = env QT_QPA_PLATFORM=xcb /usr/lib/kdeconnectd &
exec-once = env QT_QPA_PLATFORM=xcb kdeconnect-indicator &
monitor = eDP-1,pref,auto,auto
monitor = eDP-1,pref,auto,1
# On reload:
exec = pkill -1 kanshi
@ -40,6 +43,15 @@ exec = pkill -1 kanshi
# Some default env vars.
env = XCURSOR_SIZE,24
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = GRIMBLAST_EDITOR,kolourpaint
# Unset mpd env vars
env = MPD_HOST,localhost
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
@ -92,6 +104,10 @@ decoration {
col.shadow = rgba(1a1a1aee)
}
xwayland {
force_zero_scaling = true
}
animations {
enabled = yes
@ -129,11 +145,14 @@ misc {
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = float,class:^(thunderbird)$,title:.*Reminders?
windowrulev2 = float,class:^(firefox)$,title:^(.*)Extension(.*)Bitwarden(.*)$
windowrulev2 = workspace, 4,title:^(Spotify)$
windowrulev2 = workspace, 4,class:^(org.keepassxc.KeepassXC)$
windowrulev2 = workspace, 5,title:^(Discord).*$
windowrulev2 = workspace, 8,class:^(thunderbird)$
windowrulev2 = workspace 4,title:^(Spotify)$
windowrulev2 = workspace 4,class:^(org.keepassxc.KeepassXC)$
windowrulev2 = workspace 5,title:^(Discord).*$
windowrulev2 = workspace 6,title:^(Element).*$
windowrulev2 = workspace 8,class:^(thunderbird)$
windowrulev2 = workspace 9,class:^(thunderbird)$,title:^.*@atix.de.*$
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
@ -164,15 +183,12 @@ binde = , XF86MonBrightnessDown, exec, brightnessctl s 2%-
binde = SHIFT , XF86MonBrightnessUp, exec, brightnessctl s +10%
binde = SHIFT , XF86MonBrightnessDown, exec, brightnessctl s 10%-
# Flameshot
bindr = CONTROL SHIFT, Print, exec, ~/.config/hypr/scripts/screenshot.sh
bindr = , Print, exec, ~/.config/hypr/scripts/screenshot.sh
# Media Control
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
bind = , XF86AudioStop, exec, playerctl stop
bind = , XF86AudioPlay, exec, mpc --host=localhost toggle
bind = , XF86AudioNext, exec, mpc --host=localhost next
bind = , XF86AudioPrev, exec, mpc --host=localhost previous
bind = , XF86AudioStop, exec, mpc --host=localhost stop
# ROFI
@ -180,6 +196,7 @@ bind = ALT, SPACE, exec, rofi -show drun
bind = $mainMod, TAB, exec, rofi -show window
bind = $mainMod SHIFT, N, exec, networkmanager_dmenu --rofi -i
bind = $mainMod SHIFT, B, exec, rofi-bluetooth
bind = $mainMod SHIFT, V, exec, rofi-rbw
bind = $mainMod SHIFT , E, exec, rofimoji --typer wtype
bind = $mainMod CONTROL, SPACE, togglefloating,
@ -245,6 +262,28 @@ submap = resize
bind = ,return,submap,reset
submap = reset
bindr = , Print, submap, screenshot
submap = screenshot
bind = $mainMod, TAB, exec, rofi -show window
bindr = , Print, exec, grimblast --freeze copy area
bind = , 1, exec, grimblast --freeze copy area
bind = , 2, exec, grimblast --freeze save screen
bind = , 3, exec, grimblast --freeze edit area
bind = , 4, exec, grimblast --freeze copy screen
bind = , 5, exec, grimblast --freeze save area
bind = , 6, exec, ~/.config/hypr/scripts/zbarcpy.sh
# and reset
bind = , 1, submap, reset
bind = , 2, submap, reset
bind = , 3, submap, reset
bind = , 4, submap, reset
bind = , 5, submap, reset
bind = , 6, submap, reset
bind = , escape, submap, reset
bindr = , Print, submap, reset
submap = reset
windowrulev2 = float, title:(KeePassXC - Access Request)
windowrulev2 = float, class:(lxqt-policykit-agent)
# vim: ft=hypr

View File

@ -0,0 +1,3 @@
preload = /usr/share/backgrounds/archlinux/wave.png
wallpaper = ,/usr/share/backgrounds/archlinux/wave.png
splash = false

4
hyprland/scripts/zbarcpy.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
I="$(grimblast --freeze save area - | zbarimg --raw --oneshot --quiet -)"
wl-copy "$I"
notify-send "Copied" "$I"

View File

@ -0,0 +1,8 @@
profile Dock {
output "LG Electronics 24EB23 609NTFAF4483" enable mode 1920x1080 position 0,0 scale 1
output "LG Electronics 24EB23 305NDGL87831" enable mode 1920x1080 position 1920,0 scale 1
output eDP-1 enable mode 2256x1504 position 3840,0 scale 1.25
exec systemctl --user start gammastep.service
exec rfkill block wifi
exec bash ~/.config/hypr/scripts/launch_waybar.sh
}

View File

@ -1,5 +1,5 @@
profile mobile {
output eDP-1 enable scale 1.25 position 0,0
output eDP-1 enable scale 1 position 0,0
exec systemctl --user start gammastep.service
exec rfkill unblock wifi
exec bash ~/.config/hypr/scripts/launch_waybar.sh

View File

@ -0,0 +1,10 @@
vim.api.nvim_create_autocmd({"FileType", "BufWinEnter"}, {
pattern = "*.tex",
callback = function(opts)
vim.keymap.set('n', "<leader>k", "<plug>(vimtex-doc-package)",
{ desc = "[TeX] Show Package Documentation", buffer = opts.buf })
end
})
-- vim: ts=2 sts=2 sw=2 et

View File

@ -22,7 +22,7 @@ require('packer').startup(function(use)
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'jose-elias-alvarez/null-ls.nvim',
'nvimtools/none-ls.nvim',
'jay-babu/mason-null-ls.nvim',
-- Useful status updates for LSP
@ -55,7 +55,8 @@ require('packer').startup(function(use)
pattern = { "bib", "tex" },
callback = function()
vim.wo.conceallevel = 2
vim.keymap.set('n', "K", "<plug>(vimtex-doc-package)", { desc = "[TeX] Show Package Documentation", remap = true })
vim.keymap.set('n', "K", "<plug>(vimtex-doc-package)",
{ desc = "[TeX] Show Package Documentation", remap = true })
end,
})
vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- Disable K mapping conflicts with LSP.
@ -145,6 +146,10 @@ require('packer').startup(function(use)
end
}
use {
'AndrewRadev/linediff.vim'
}
use {
"folke/trouble.nvim",
requires = "nvim-tree/nvim-web-devicons",
@ -168,7 +173,7 @@ require('packer').startup(function(use)
-- refer to the configuration section below
}
end
}
}
use 'majutsushi/tagbar'
@ -219,6 +224,15 @@ require('packer').startup(function(use)
requires = "neovim/nvim-lspconfig"
}
use {
'norcalli/nvim-colorizer.lua',
}
-- TYPST
use {'kaarmu/typst.vim', ft = {'typst'}}
use { 'dhruvasagar/vim-table-mode', ft = 'markdown' }
-- Add custom plugins to packer from ~/.config/nvim/lua/custom/plugins.lua
local has_plugins, plugins = pcall(require, 'custom.plugins')
if has_plugins then
@ -361,6 +375,14 @@ require('nvim-navic').setup {
highlight = true,
}
require('colorizer').setup {
'html',
'css',
'javascript',
'typescript',
'hypr',
}
-- Set lualine as statusline
-- See `:help lualine.txt`
require('lualine').setup {
@ -384,10 +406,7 @@ require('Comment').setup()
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt`
require('indent_blankline').setup {
char = '',
show_trailing_blankline_indent = false,
}
require('ibl').setup {}
-- Gitsigns
-- See `:help gitsigns.txt`
@ -664,7 +683,10 @@ local servers = {
yamlls = {},
texlab = {}, -- latex
terraformls = {},
tflint = {},
typst_lsp = {
exportPdf = "onSave"
},
-- tflint = {}, -- currently broken?
java_language_server = {},
ltex = {
ltex = {

View File

@ -9,7 +9,7 @@
// Choose the order of the modules
"modules-left": ["hyprland/workspaces", "hyprland/window"],
"modules-center": ["custom/inhibit", "idle_inhibitor", "custom/dunst"],
"modules-right": ["hyprland/submap", "custom/wifionice", "custom/spotify", "pulseaudio", "custom/network", "cpu", "memory", "temperature", "backlight", "battery", "clock", "tray"],
"modules-right": ["hyprland/submap", "custom/wifionice", "mpd", "pulseaudio", "custom/fsi", "custom/fsm", "custom/network", "cpu", "memory", "temperature", "backlight", "battery", "clock", "tray"],
// Modules configuration
"hyprland/workspaces": {
"format-alt": "{name}",
@ -30,6 +30,32 @@
"default": ""
}
},
"mpd": {
"format": "[ {title} ]",
"format-disconnected": "Disconnected ",
"max-length": 40,
"server" : "localhost",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"interval": 2,
"consume-icons": {
"on": " " // Icon shows only when "consume" is on
},
"random-icons": {
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon} [ {artist} ] - [ {title} ] on [ {album} ] [ {elapsedTime:%M:%S}/{totalTime:%M:%S} ]",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"custom/spotify": {
"format-alt": "{status_icon} {title}",
"format-alt-click": "click-middle",
@ -48,6 +74,22 @@
"escape": true,
"interval": 3
},
"custom/fsi": {
"format": "FSI",
"exec": "~/.config/waybar/scripts/fsmi.sh fsi",
"return-type": "json",
"tooltip": false,
"on-click": "/bin/true", // Enables refresh on click
"interval": 600
},
"custom/fsm": {
"format": "FSM",
"exec": "~/.config/waybar/scripts/fsmi.sh fsm",
"return-type": "json",
"tooltip": false,
"on-click": "/bin/true", // Enables refresh on click
"interval": 600
},
"custom/inhibit": {
"format": "☕",
"on-click": "systemd-inhibit --what=handle-lid-switch --who=waybar --why='Inhibiting suspend' --mode=block sleep 120 & notify-send 'Inhibiting suspend' 'Waybar will prevent the system from suspending for 2 minutes'"

View File

@ -35,3 +35,9 @@
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;
@define-color bad @red;
@define-color good @green;
@define-color off @surface0;
@define-color on @yellow;

26
waybar/scripts/fsmi.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: fsmi.sh <fsi|fsm>"
exit 1
fi
if [[ "$1" == "fsi" ]]; then
state=$(curl https://www-test.fsmi.org/spaceapi/fsi.json 2>/dev/null | jq .state.open)
elif [[ "$1" == "fsm" ]]; then
state=$(curl https://www-test.fsmi.org/spaceapi/fsm.json 2>/dev/null | jq .state.open)
fi
class="fs-closed"
if [[ "$state" == "true" ]]; then
class="fs-open"
elif [[ "$state" == "" ]]; then
class="fs-unknown"
fi
cat <<EOF | jq -r --unbuffered --compact-output
{
"text": "$state",
"alt": "$1",
"class": "$class"
}
EOF

View File

@ -13,10 +13,10 @@ print_train_info() {
wifionice_conn=$( echo "$wifionice" | jq -r .connectivity.currentState )
wifionice_nextConn=$( echo "$wifionice" | jq -r .connectivity.nextState )
wifionice_connTime=$( echo "$wifionice" | jq -r .connectivity.remainingTimeSeconds | awk '{printf "%d m", $1/60}' )
if [ "$wifionice_speed" -ne 0 ]; then
wifionice_speed=" - $wifionice_speed km/h"
else
if [ "$wifionice_speed" = "0" ]; then
wifionice_speed=""
else
wifionice_speed=" $wifionice_speed km/h"
fi
station=$(curl -sLf https://iceportal.de/api1/rs/tripInfo/trip | jq '[.[].stops[]? | select(.info.passed == false)][0]')
@ -41,7 +41,7 @@ print_train_info() {
net_text="Net: $wifionice_conn$wifionice_nextConn ($wifionice_connTime)"
fi
echo "$icon $station_arrival$station_delay - $station_name, Gl. $station_track$wifionice_speed | $net_text"
echo "$icon $station_arrival$station_delay - $station_name, Gl. $station_track$wifionice_speed"
fi
sleep 10
else

View File

@ -4,12 +4,13 @@
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
color: @text;
}
window#waybar {
background-color: shade(@base, 0.9);
border: 2px solid alpha(@mantle, 0.3);
border-bottom: 3px solid alpha(@crust, 0.5);
/* border: 2px solid alpha(@mantle, 0.3); */
border-bottom: 1px solid alpha(@crust, 0.5);
color: @text;
transition-property: background-color;
transition-duration: .5s;
@ -66,7 +67,7 @@ button:hover {
}
#workspaces button.urgent {
background-color: @red;
background-color: @bad;
}
#mode {
@ -92,10 +93,14 @@ button:hover {
#mode,
#idle_inhibitor,
#custom-spotify,
#mpd,
#scratchpad,
#custom-fsi,
#custom-fsm,
#mpd {
padding: 0 10px;
color: @text;
background-color: @off;
border-bottom: 3px solid alpha(@crust, 0.5);
}
#window,
@ -120,20 +125,22 @@ button:hover {
#memory,
#clock,
#memory,
#disk,
#idle_inhibitor.activated {
background-color: @lavender;
color: @base;
#disk {
background-color: @off;
color: @text;
}
#battery {
background-color: @yellow;
#idle_inhibitor.activated {
background-color: @good;
color: @base;
}
#battery {
background-color: @off;
}
#battery.charging, #battery.plugged {
color: @base;
background-color: @green;
background-color: @good;
}
@keyframes blink {
@ -144,7 +151,7 @@ button:hover {
}
#battery.critical:not(.charging) {
background-color: @red;
background-color: @bad;
color: @base;
animation-name: blink;
animation-duration: 0.5s;
@ -153,8 +160,15 @@ button:hover {
animation-direction: alternate;
}
#custom-fsi.fs-closed,
#custom-fsm.fs-closed,
#custom-wifionice {
background-color: @red;
background-color: @off;
}
#custom-fsi.fs-unknown,
#custom-fsm.fs-unknown {
background-color: @bad;
color: @base;
}
@ -162,54 +176,56 @@ label:focus {
background-color: @base;
}
#cpu {
background-color: @green;
#custom-fsi.fs-open,
#custom-fsm.fs-open {
background-color: @good;
color: @base;
}
#backlight {
background-color: @overlay1;
background-color: @off;
}
#custom-network {
background-color: @sky;
color: @base;
background-color: @off;
}
#network.disconnected {
background-color: @overlay2;
background-color: @bad;
color: @base;
}
#pulseaudio {
background-color: @yellow;
color: @base;
background-color: @off;
}
#custom-dunst.disabled,
#pulseaudio.source-muted {
background-color: @red;
background-color: @bad;
color: @base;
}
#custom-media {
background-color: @base;
color: @text;
min-width: 100px;
background-color: @off;
}
#mpd.playing,
#custom-spotify {
background-color: @green;
background-color: @good;
color: @base;
}
#mpd.stopped,
#mpd.paused {
background-color: @off;
}
#temperature {
background-color: @peach;
color: @base;
background-color: @off;
}
#temperature.critical {
background-color: @red;
background-color: @bad;
}
#tray {
@ -222,5 +238,5 @@ label:focus {
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: @red;
background-color: @bad;
}

View File

@ -33,7 +33,7 @@ WORDCHARS=${WORDCHARS//[\/]}
export ZIM_HOME=$HOME/.zim
export MPD_HOST=fsi-hase.fsmi.uni-karlsruhe.de
# export MPD_HOST=fsi-hase.fsmi.uni-karlsruhe.de
# --------------------
@ -239,5 +239,16 @@ function ghcd() {
gh repo clone "$repo" "$repo_path" \
&& pushd "$repo_path"
}
function mpc() {
if [ "$1" = "searchinsert" ]; then
shift
SEARCH=$(mpc search "$@" | head -n1)
command mpc insert "${SEARCH}"
else
command mpc $@
fi
}
# zprof