From ed5fe87fa537a26550023c09626ef6396ab387cc Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Tue, 4 Apr 2023 11:22:52 +0200 Subject: [PATCH] Add issue and bugfixing --- 1-install.sh | 6 ++++++ issue | 15 +++++++++++++++ qtile/config.py | 16 ++++++++++------ scripts/launchvm.sh | 4 ++-- scripts/templates.sh | 7 +++++-- 5 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 issue diff --git a/1-install.sh b/1-install.sh index bfe8eb0..a743df4 100755 --- a/1-install.sh +++ b/1-install.sh @@ -51,6 +51,7 @@ ln -s ~/dotfiles/rofi/ ~/.config ln -s ~/dotfiles/spotifyd/ ~/.config ln -s ~/dotfiles/vim/ ~/.config ln -s ~/dotfiles/nvim/ ~/.config +ln -s ~/dotfiles/polybar ~/.config ln -s ~/dotfiles/starship/starship.toml ~/.config/starship.toml rm ~/.bashrc ln -s ~/dotfiles/.bashrc ~/.bashrc @@ -70,6 +71,11 @@ git clone https://gitlab.com/stephan-raabe/wallpaper.git ~/wallpaper # ------------------------------------------------------ # starship preset plain-text-symbols > ~/.config/starship.toml +# ------------------------------------------------------ +# Install custom issue (login prompt) +# ------------------------------------------------------ +sudo cp ~/dotfiles/issue /etc/issue + # ------------------------------------------------------ # Init pywal # ------------------------------------------------------ diff --git a/issue b/issue new file mode 100644 index 0000000..ae3b5ff --- /dev/null +++ b/issue @@ -0,0 +1,15 @@ + +## ####### ###### #### ## ## +## ## ## ## ## ## ### ## +## ## ## ## ## #### ## +## ## ## ## #### ## ## ## ## +## ## ## ## ## ## ## #### +## ## ## ## ## ## ## ### +######## ####### ###### #### ## ## + +-------------------------------------------------------------- +LOGIN to Arch Linux +Today is \d \t @ \n +-------------------------------------------------------------- +\r (\l) + diff --git a/qtile/config.py b/qtile/config.py index bb24c7b..86629d4 100644 --- a/qtile/config.py +++ b/qtile/config.py @@ -51,7 +51,10 @@ from libqtile.widget import Spacer, Backlight from libqtile.widget.image import Image from libqtile.dgroups import simple_key_binder -mod = "mod4" +from pathlib import Path + +# Get home path +home = str(Path.home()) # -------------------------------------------------------- # Check for VirtualBox @@ -79,6 +82,7 @@ browser = "brave" # -------------------------------------------------------- # Keybindings # -------------------------------------------------------- +mod = "mod4" keys = [ @@ -131,10 +135,10 @@ keys = [ Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), Key([mod, "control"], "Return", lazy.spawn("rofi -show drun -icon-theme 'Papirus' -show-icons"), desc="Launch Rofi"), Key([mod], "b", lazy.spawn(browser), desc="Launch Chromium"), - Key([mod], "v", lazy.spawn("/home/raabe/dotfiles/scripts/looking-glass.sh"), desc="Start Looking Glass Client"), - Key([mod, "shift"], "w", lazy.spawn("/home/raabe/dotfiles/scripts/updatewal.sh"), desc="Update Theme and Wallpaper"), - Key([mod, "control"], "w", lazy.spawn("/home/raabe/dotfiles/scripts/wallpaper.sh"), desc="Select Theme and Wallpaper"), - Key([mod, "control"], "t", lazy.spawn("/home/raabe/dotfiles/scripts/templates.sh"), desc="Select Tempate and copy to clipboard"), + Key([mod], "v", lazy.spawn(home + "/dotfiles/scripts/looking-glass.sh"), desc="Start Looking Glass Client"), + Key([mod, "shift"], "w", lazy.spawn(home + "/dotfiles/scripts/updatewal.sh"), desc="Update Theme and Wallpaper"), + Key([mod, "control"], "w", lazy.spawn(home + "/dotfiles/scripts/wallpaper.sh"), desc="Select Theme and Wallpaper"), + Key([mod, "control"], "t", lazy.spawn(home + "/dotfiles/scripts/templates.sh"), desc="Select Tempate and copy to clipboard"), # Scratchpads # Key([mod, "control"], "c", lazy.group["calculator"].dropdown_toggle("calc")) @@ -248,7 +252,7 @@ widget_list = [ fontsize=18, foreground='ffffff', desc='Notes', - mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e vim /home/raabe/notes.txt')}, + mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e vim ' + home + '/notes.txt')}, ), widget.TextBox( text='|', diff --git a/scripts/launchvm.sh b/scripts/launchvm.sh index e9d6ff6..2d9c6f3 100755 --- a/scripts/launchvm.sh +++ b/scripts/launchvm.sh @@ -37,8 +37,8 @@ tmp=$(virsh --connect qemu:///system list | grep " win11 " | awk '{ print $3}') if ([ "x$tmp" == "x" ] || [ "x$tmp" != "xrunning" ]) then virsh --connect qemu:///system start win11 - echo "Waiting 20 sec for Windows 11 startup..." - countdown "00:00:20" + echo "Waiting 25 sec for Windows 11 startup..." + countdown "00:00:25" fi echo "Starting xfreerdp now..." diff --git a/scripts/templates.sh b/scripts/templates.sh index f1e0adc..5dbe39e 100755 --- a/scripts/templates.sh +++ b/scripts/templates.sh @@ -12,5 +12,8 @@ # Select text file selected=$(ls -1 ~/private/templates | rofi -dmenu -p "Select the template") -# Add content to clipboard -xclip -sel clip ~/private/templates/$selected + +if [ "$selected" ]; then + # Add content to clipboard + xclip -sel clip ~/private/templates/$selected +fi